Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/Makefile.kmk
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/Makefile.kmk	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/Makefile.kmk	(revision 19678)
@@ -26,5 +26,5 @@
 DLLS += libWine
 
-libWine_TEMPLATE     = VBOXGUESTR3NPDLL
+libWine_TEMPLATE     = VBOXGUESTR3NPLIB
 libWine_DEFS         = __WINESRC__ WINE_UNICODE_API="" _REENTRANT WINE_NOWINSOCK USE_WIN32_OPENGL __i386__ \
     DLLDIR=\"\" \
@@ -135,5 +135,6 @@
     wined3d/ati_fragment_shader.c \
     wined3d/baseshader.c \
-    wined3d/basetexture.c \
+	wined3d/basetexture.c \
+	wined3d/buffer.c \
     wined3d/clipper.c \
     wined3d/context.c \
@@ -142,6 +143,6 @@
     wined3d/directx.c \
     wined3d/drawprim.c \
+	wined3d/gl_compat.c \
     wined3d/glsl_shader.c \
-    wined3d/indexbuffer.c \
     wined3d/nvidia_texture_shader.c \
     wined3d/palette.c \
@@ -149,4 +150,6 @@
     wined3d/query.c \
     wined3d/resource.c \
+	wined3d/shader_sm1.c \
+	wined3d/shader_sm4.c \
     wined3d/state.c \
     wined3d/stateblock.c \
@@ -159,7 +162,7 @@
     wined3d/texture.c \
     wined3d/utils.c \
-    wined3d/vertexbuffer.c \
     wined3d/vertexdeclaration.c \
     wined3d/vertexshader.c \
+	wined3d/view.c \
     wined3d/volume.c \
     wined3d/volumetexture.c \
@@ -182,5 +185,4 @@
 d3d8_INCS         := $(PATH_SUB_CURRENT)/include
 d3d8_SOURCES      := \
-    d3d8/basetexture.c \
     d3d8/cubetexture.c \
     d3d8/d3d8_main.c \
@@ -204,3 +206,37 @@
     $(PATH_LIB)/wined3d$(VBOX_SUFF_LIB)
 
+DLLS += d3d9
+
+d3d9_TEMPLATE     = VBOXGUESTR3NPDLL
+d3d9_DEFS         = __WINESRC__ WINE_UNICODE_API="" _REENTRANT WINE_NOWINSOCK USE_WIN32_OPENGL __i386__ _USE_MATH_DEFINES\
+    DLLDIR=\"\" \
+    BINDIR=\"\" \
+    LIB_TO_BINDIR=\"\" \
+    LIB_TO_DLLDIR=\"\" \
+    BIN_TO_DLLDIR=\"\" \
+    LIB_TO_DATADIR=\"\" \
+    BIN_TO_DATADIR=\"\"
+d3d9_INCS         := $(PATH_SUB_CURRENT)/include
+d3d9_SOURCES      := \
+    d3d9/cubetexture.c \
+    d3d9/d3d9_main.c \
+    d3d9/device.c \
+    d3d9/directx.c \
+    d3d9/indexbuffer.c \
+    d3d9/pixelshader.c \
+    d3d9/query.c \
+    d3d9/stateblock.c \
+    d3d9/surface.c \
+    d3d9/swapchain.c \
+    d3d9/texture.c \
+    d3d9/vertexbuffer.c \
+    d3d9/vertexdeclaration.c \
+    d3d9/vertexshader.c \
+    d3d9/volume.c \
+    d3d9/volumetexture.c \
+    d3d9/d3d9.def
+d3d9_LIBS = \
+    $(PATH_LIB)/libWine$(VBOX_SUFF_LIB) \
+    $(PATH_LIB)/wined3d$(VBOX_SUFF_LIB)
+
 include $(KBUILD_PATH)/subfooter.kmk
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/basetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/basetexture.c	(revision 19677)
+++ 	(revision )
@@ -1,173 +1,0 @@
-/*
- * IDirect3DBaseTexture8 implementation
- *
- * Copyright 2005 Oliver Stieber
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/*
- * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
- * other than GPL or LGPL is available it will apply instead, Sun elects to use only
- * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
- * a choice of LGPL license versions is made available with the language indicating
- * that LGPLv2 or any later version may be used, or where a choice of which version
- * of the LGPL is applied is otherwise unspecified.
- */
-
-#include "config.h"
-#include "d3d8_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
-
-/* IDirect3DBaseTexture8 IUnknown parts follow: */
-static HRESULT WINAPI IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 iface, REFIID riid, LPVOID *ppobj) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    if (IsEqualGUID(riid, &IID_IUnknown)
-        || IsEqualGUID(riid, &IID_IDirect3DResource8)
-        || IsEqualGUID(riid, &IID_IDirect3DBaseTexture8)) {
-        IUnknown_AddRef(iface);
-        *ppobj = This;
-        return S_OK;
-    }
-
-    WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
-
-    *ppobj = NULL;
-    return E_NOINTERFACE;
-}
-
-static ULONG WINAPI IDirect3DBaseTexture8Impl_AddRef(LPDIRECT3DBASETEXTURE8 iface) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    ULONG ref = InterlockedIncrement(&This->ref);
-
-    TRACE("(%p) : AddRef from %d\n", This, ref - 1);
-
-    return ref;
-}
-
-static ULONG WINAPI IDirect3DBaseTexture8Impl_Release(LPDIRECT3DBASETEXTURE8 iface) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    ULONG ref = InterlockedDecrement(&This->ref);
-
-    TRACE("(%p) : ReleaseRef to %d\n", This, ref);
-
-    if (ref == 0) {
-        IWineD3DBaseTexture_Release(This->wineD3DBaseTexture);
-        HeapFree(GetProcessHeap(), 0, This);
-    }
-
-    return ref;
-}
-
-/* IDirect3DBaseTexture8 IDirect3DResource8 Interface follow: */
-static HRESULT WINAPI IDirect3DBaseTexture8Impl_GetDevice(LPDIRECT3DBASETEXTURE8 iface, IDirect3DDevice8 **ppDevice) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
-}
-
-static HRESULT WINAPI IDirect3DBaseTexture8Impl_SetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_SetPrivateData(This->wineD3DBaseTexture, refguid, pData, SizeOfData, Flags);
-}
-
-static HRESULT WINAPI IDirect3DBaseTexture8Impl_GetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_GetPrivateData(This->wineD3DBaseTexture, refguid, pData, pSizeOfData);
-}
-
-static HRESULT WINAPI IDirect3DBaseTexture8Impl_FreePrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_FreePrivateData(This->wineD3DBaseTexture, refguid);
-}
-
-static DWORD WINAPI IDirect3DBaseTexture8Impl_SetPriority(LPDIRECT3DBASETEXTURE8 iface, DWORD PriorityNew) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_SetPriority(This->wineD3DBaseTexture, PriorityNew);
-}
-
-static DWORD WINAPI IDirect3DBaseTexture8Impl_GetPriority(LPDIRECT3DBASETEXTURE8 iface) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_GetPriority(This->wineD3DBaseTexture);
-}
-
-static void WINAPI IDirect3DBaseTexture8Impl_PreLoad(LPDIRECT3DBASETEXTURE8 iface) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    IWineD3DBaseTexture_PreLoad(This->wineD3DBaseTexture);
-    return;
-}
-
-static D3DRESOURCETYPE WINAPI IDirect3DBaseTexture8Impl_GetType(LPDIRECT3DBASETEXTURE8 iface) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_GetType(This->wineD3DBaseTexture);
-}
-
-/* IDirect3DBaseTexture8 Interface follow: */
-static DWORD WINAPI IDirect3DBaseTexture8Impl_SetLOD(LPDIRECT3DBASETEXTURE8 iface, DWORD LODNew) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_SetLOD(This->wineD3DBaseTexture, LODNew);
-}
-
-static DWORD WINAPI IDirect3DBaseTexture8Impl_GetLOD(LPDIRECT3DBASETEXTURE8 iface) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_GetLOD(This->wineD3DBaseTexture);
-}
-
-static DWORD WINAPI IDirect3DBaseTexture8Impl_GetLevelCount(LPDIRECT3DBASETEXTURE8 iface) {
-    IDirect3DBaseTexture8Impl *This = (IDirect3DBaseTexture8Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
-    return IWineD3DBaseTexture_GetLevelCount(This->wineD3DBaseTexture);
-}
-
-const IDirect3DBaseTexture8Vtbl Direct3DBaseTexture8_Vtbl =
-{
-    IDirect3DBaseTexture8Impl_QueryInterface,
-    IDirect3DBaseTexture8Impl_AddRef,
-    IDirect3DBaseTexture8Impl_Release,
-    IDirect3DBaseTexture8Impl_GetDevice,
-    IDirect3DBaseTexture8Impl_SetPrivateData,
-    IDirect3DBaseTexture8Impl_GetPrivateData,
-    IDirect3DBaseTexture8Impl_FreePrivateData,
-    IDirect3DBaseTexture8Impl_SetPriority,
-    IDirect3DBaseTexture8Impl_GetPriority,
-    IDirect3DBaseTexture8Impl_PreLoad,
-    IDirect3DBaseTexture8Impl_GetType,
-
-    IDirect3DBaseTexture8Impl_SetLOD,
-    IDirect3DBaseTexture8Impl_GetLOD,
-    IDirect3DBaseTexture8Impl_GetLevelCount
-};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/cubetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/cubetexture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/cubetexture.c	(revision 19678)
@@ -79,9 +79,15 @@
 static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetDevice(LPDIRECT3DCUBETEXTURE8 iface, IDirect3DDevice8 **ppDevice) {
     IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface;
+    IWineD3DDevice *wined3d_device;
     HRESULT hr;
     TRACE("(%p) Relay\n" , This);
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
+    hr = IWineD3DCubeTexture_GetDevice(This->wineD3DCubeTexture, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -219,4 +225,7 @@
     hr = IWineD3DCubeTexture_GetLevelDesc(This->wineD3DCubeTexture, Level, &wined3ddesc);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(pDesc->Format);
+
     return hr;
 }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/d3d8_private.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/d3d8_private.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/d3d8_private.h	(revision 19678)
@@ -44,7 +44,4 @@
 #include "d3d8.h"
 #include "wine/wined3d.h"
-
-/* Device caps */
-#define INITIAL_SHADER_HANDLE_TABLE_SIZE        64
 
 /* CreateVertexShader can return > 0xFFFF */
@@ -170,4 +167,5 @@
  */
 extern const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl;
+extern const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl;
 
 /*****************************************************************************
@@ -175,10 +173,19 @@
  */
 
-typedef void * shader_handle;
+#define D3D8_INITIAL_HANDLE_TABLE_SIZE 64
+#define D3D8_INVALID_HANDLE ~0U
+
+struct d3d8_handle_table
+{
+    void **entries;
+    void **free_entries;
+    UINT table_size;
+    UINT entry_count;
+};
 
 struct FvfToDecl
 {
     DWORD fvf;
-    IWineD3DVertexDeclaration *decl;
+    struct IDirect3DVertexDeclaration8 *decl;
 };
 
@@ -187,11 +194,9 @@
     /* IUnknown fields */
     const IDirect3DDevice8Vtbl   *lpVtbl;
+    const IWineD3DDeviceParentVtbl *device_parent_vtbl;
     LONG                         ref;
 /* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
     IWineD3DDevice               *WineD3DDevice;
-    DWORD                         shader_handle_table_size;
-    DWORD                         allocated_shader_handles;
-    shader_handle                *shader_handles;
-    shader_handle                *free_shader_handles;
+    struct d3d8_handle_table handle_table;
 
     /* FVF management */
@@ -210,4 +215,5 @@
  * IDirect3DVolume8 implementation structure
  */
+extern const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl;
 struct IDirect3DVolume8Impl
 {
@@ -306,5 +312,4 @@
     IWineD3DResource             *wineD3DResource;
 };
-extern HRESULT WINAPI IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface, IDirect3DDevice8** ppDevice);
 
 /* ---------------------- */
@@ -327,8 +332,10 @@
 
     /* IDirect3DResource8 fields */
-    IWineD3DVertexBuffer             *wineD3DVertexBuffer;
+    IWineD3DBuffer *wineD3DVertexBuffer;
 
     /* Parent reference */
     LPDIRECT3DDEVICE8                 parentDevice;
+
+    DWORD                             fvf;
 };
 
@@ -352,8 +359,10 @@
 
     /* IDirect3DResource8 fields */
-    IWineD3DIndexBuffer             *wineD3DIndexBuffer;
+    IWineD3DBuffer                  *wineD3DIndexBuffer;
 
     /* Parent reference */
     LPDIRECT3DDEVICE8                parentDevice;
+
+    WINED3DFORMAT                    format;
 };
 
@@ -541,9 +550,10 @@
 
     IWineD3DVertexDeclaration *wined3d_vertex_declaration;
+    DWORD shader_handle;
 } IDirect3DVertexDeclaration8Impl;
 
 
 /*****************************************************************************
- * IDirect3DVertexShader9 interface
+ * IDirect3DVertexShader8 interface
  */
 #define INTERFACE IDirect3DVertexShader8
@@ -554,7 +564,4 @@
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
     STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirect3DVertexShader9 methods ***/
-    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
-    STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
 };
 #undef INTERFACE
@@ -564,7 +571,4 @@
 #define IDirect3DVertexShader8_AddRef(p)              (p)->lpVtbl->AddRef(p)
 #define IDirect3DVertexShader8_Release(p)             (p)->lpVtbl->Release(p)
-/*** IDirect3DVertexShader8 methods ***/
-#define IDirect3DVertexShader8_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexShader8_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
 
 /* ------------------------- */
@@ -573,5 +577,5 @@
 
 /*****************************************************************************
- * IDirect3DPixelShader9 interface
+ * IDirect3DPixelShader8 interface
  */
 #define INTERFACE IDirect3DPixelShader8
@@ -582,7 +586,4 @@
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
     STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirect3DPixelShader8 methods ***/
-    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
-    STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
 };
 #undef INTERFACE
@@ -592,8 +593,4 @@
 #define IDirect3DPixelShader8_AddRef(p)              (p)->lpVtbl->AddRef(p)
 #define IDirect3DPixelShader8_Release(p)             (p)->lpVtbl->Release(p)
-/*** IDirect3DPixelShader8 methods ***/
-#define IDirect3DPixelShader8_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DPixelShader8_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
-
 
 /*****************************************************************************
@@ -610,8 +607,9 @@
   LONG ref;
 
-  DWORD                             handle;
   IDirect3DVertexDeclaration8      *vertex_declaration;
   IWineD3DVertexShader             *wineD3DVertexShader;
 };
+
+#define D3D8_MAX_VERTEX_SHADER_CONSTANTF 256
 
 
@@ -634,5 +632,4 @@
 
     DWORD                            handle;
-    /* The device, to be replaced by an IDirect3DDeviceImpl */
     IWineD3DPixelShader             *wineD3DPixelShader;
 } IDirect3DPixelShader8Impl;
@@ -643,4 +640,6 @@
  * to see how not defined it here
  */
+D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format);
+WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format);
 void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader);
 UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, WINED3DVERTEXELEMENT **wined3d_elements);
@@ -648,32 +647,8 @@
 
 /* Callbacks */
-extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
-                                         WINED3DCUBEMAP_FACES Face, IWineD3DSurface** ppSurface,
-                                         HANDLE* pSharedHandle);
-
-extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown  *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
-                                          WINED3DFORMAT  Format, WINED3DPOOL Pool, DWORD Usage,
-                                          IWineD3DVolume **ppVolume,
-                                          HANDLE   * pSharedHandle);
-
-extern HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Discard,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
-
-extern HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Lockable,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
-
 extern ULONG WINAPI D3D8CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
-
 extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
-
 extern ULONG WINAPI D3D8CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
-
 extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface);
-
 extern ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume);
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/device.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/device.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/device.c	(revision 19678)
@@ -46,27 +46,174 @@
 WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
 
-/* Shader handle functions */
-static shader_handle *alloc_shader_handle(IDirect3DDevice8Impl *This) {
-    if (This->free_shader_handles) {
+D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
+{
+    BYTE *c = (BYTE *)&format;
+
+    /* Don't translate FOURCC formats */
+    if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return format;
+
+    switch(format)
+    {
+        case WINED3DFMT_UNKNOWN: return D3DFMT_UNKNOWN;
+        case WINED3DFMT_R8G8B8: return D3DFMT_R8G8B8;
+        case WINED3DFMT_A8R8G8B8: return D3DFMT_A8R8G8B8;
+        case WINED3DFMT_X8R8G8B8: return D3DFMT_X8R8G8B8;
+        case WINED3DFMT_R5G6B5: return D3DFMT_R5G6B5;
+        case WINED3DFMT_X1R5G5B5: return D3DFMT_X1R5G5B5;
+        case WINED3DFMT_A1R5G5B5: return D3DFMT_A1R5G5B5;
+        case WINED3DFMT_A4R4G4B4: return D3DFMT_A4R4G4B4;
+        case WINED3DFMT_R3G3B2: return D3DFMT_R3G3B2;
+        case WINED3DFMT_A8_UNORM: return D3DFMT_A8;
+        case WINED3DFMT_A8R3G3B2: return D3DFMT_A8R3G3B2;
+        case WINED3DFMT_X4R4G4B4: return D3DFMT_X4R4G4B4;
+        case WINED3DFMT_R10G10B10A2_UNORM: return D3DFMT_A2B10G10R10;
+        case WINED3DFMT_R16G16_UNORM: return D3DFMT_G16R16;
+        case WINED3DFMT_A8P8: return D3DFMT_A8P8;
+        case WINED3DFMT_P8: return D3DFMT_P8;
+        case WINED3DFMT_L8: return D3DFMT_L8;
+        case WINED3DFMT_A8L8: return D3DFMT_A8L8;
+        case WINED3DFMT_A4L4: return D3DFMT_A4L4;
+        case WINED3DFMT_R8G8_SNORM: return D3DFMT_V8U8;
+        case WINED3DFMT_L6V5U5: return D3DFMT_L6V5U5;
+        case WINED3DFMT_X8L8V8U8: return D3DFMT_X8L8V8U8;
+        case WINED3DFMT_R8G8B8A8_SNORM: return D3DFMT_Q8W8V8U8;
+        case WINED3DFMT_R16G16_SNORM: return D3DFMT_V16U16;
+        case WINED3DFMT_A2W10V10U10: return D3DFMT_A2W10V10U10;
+        case WINED3DFMT_D16_LOCKABLE: return D3DFMT_D16_LOCKABLE;
+        case WINED3DFMT_D32: return D3DFMT_D32;
+        case WINED3DFMT_D15S1: return D3DFMT_D15S1;
+        case WINED3DFMT_D24S8: return D3DFMT_D24S8;
+        case WINED3DFMT_D24X8: return D3DFMT_D24X8;
+        case WINED3DFMT_D24X4S4: return D3DFMT_D24X4S4;
+        case WINED3DFMT_D16_UNORM: return D3DFMT_D16;
+        case WINED3DFMT_VERTEXDATA: return D3DFMT_VERTEXDATA;
+        case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
+        case WINED3DFMT_R32_UINT: return D3DFMT_INDEX32;
+        default:
+            FIXME("Unhandled WINED3DFORMAT %#x\n", format);
+            return D3DFMT_UNKNOWN;
+    }
+}
+
+WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
+{
+    BYTE *c = (BYTE *)&format;
+
+    /* Don't translate FOURCC formats */
+    if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return format;
+
+    switch(format)
+    {
+        case D3DFMT_UNKNOWN: return WINED3DFMT_UNKNOWN;
+        case D3DFMT_R8G8B8: return WINED3DFMT_R8G8B8;
+        case D3DFMT_A8R8G8B8: return WINED3DFMT_A8R8G8B8;
+        case D3DFMT_X8R8G8B8: return WINED3DFMT_X8R8G8B8;
+        case D3DFMT_R5G6B5: return WINED3DFMT_R5G6B5;
+        case D3DFMT_X1R5G5B5: return WINED3DFMT_X1R5G5B5;
+        case D3DFMT_A1R5G5B5: return WINED3DFMT_A1R5G5B5;
+        case D3DFMT_A4R4G4B4: return WINED3DFMT_A4R4G4B4;
+        case D3DFMT_R3G3B2: return WINED3DFMT_R3G3B2;
+        case D3DFMT_A8: return WINED3DFMT_A8_UNORM;
+        case D3DFMT_A8R3G3B2: return WINED3DFMT_A8R3G3B2;
+        case D3DFMT_X4R4G4B4: return WINED3DFMT_X4R4G4B4;
+        case D3DFMT_A2B10G10R10: return WINED3DFMT_R10G10B10A2_UNORM;
+        case D3DFMT_G16R16: return WINED3DFMT_R16G16_UNORM;
+        case D3DFMT_A8P8: return WINED3DFMT_A8P8;
+        case D3DFMT_P8: return WINED3DFMT_P8;
+        case D3DFMT_L8: return WINED3DFMT_L8;
+        case D3DFMT_A8L8: return WINED3DFMT_A8L8;
+        case D3DFMT_A4L4: return WINED3DFMT_A4L4;
+        case D3DFMT_V8U8: return WINED3DFMT_R8G8_SNORM;
+        case D3DFMT_L6V5U5: return WINED3DFMT_L6V5U5;
+        case D3DFMT_X8L8V8U8: return WINED3DFMT_X8L8V8U8;
+        case D3DFMT_Q8W8V8U8: return WINED3DFMT_R8G8B8A8_SNORM;
+        case D3DFMT_V16U16: return WINED3DFMT_R16G16_SNORM;
+        case D3DFMT_A2W10V10U10: return WINED3DFMT_A2W10V10U10;
+        case D3DFMT_D16_LOCKABLE: return WINED3DFMT_D16_LOCKABLE;
+        case D3DFMT_D32: return WINED3DFMT_D32;
+        case D3DFMT_D15S1: return WINED3DFMT_D15S1;
+        case D3DFMT_D24S8: return WINED3DFMT_D24S8;
+        case D3DFMT_D24X8: return WINED3DFMT_D24X8;
+        case D3DFMT_D24X4S4: return WINED3DFMT_D24X4S4;
+        case D3DFMT_D16: return WINED3DFMT_D16_UNORM;
+        case D3DFMT_VERTEXDATA: return WINED3DFMT_VERTEXDATA;
+        case D3DFMT_INDEX16: return WINED3DFMT_R16_UINT;
+        case D3DFMT_INDEX32: return WINED3DFMT_R32_UINT;
+        default:
+            FIXME("Unhandled D3DFORMAT %#x\n", format);
+            return WINED3DFMT_UNKNOWN;
+    }
+}
+
+static UINT vertex_count_from_primitive_count(D3DPRIMITIVETYPE primitive_type, UINT primitive_count)
+{
+    switch(primitive_type)
+    {
+        case D3DPT_POINTLIST:
+            return primitive_count;
+
+        case D3DPT_LINELIST:
+            return primitive_count * 2;
+
+        case D3DPT_LINESTRIP:
+            return primitive_count + 1;
+
+        case D3DPT_TRIANGLELIST:
+            return primitive_count * 3;
+
+        case D3DPT_TRIANGLESTRIP:
+        case D3DPT_TRIANGLEFAN:
+            return primitive_count + 2;
+
+        default:
+            FIXME("Unhandled primitive type %#x\n", primitive_type);
+            return 0;
+    }
+}
+
+/* Handle table functions */
+static DWORD d3d8_allocate_handle(struct d3d8_handle_table *t, void *object)
+{
+    if (t->free_entries)
+    {
         /* Use a free handle */
-        shader_handle *handle = This->free_shader_handles;
-        This->free_shader_handles = *handle;
-        return handle;
-    }
-    if (!(This->allocated_shader_handles < This->shader_handle_table_size)) {
+        void **entry = t->free_entries;
+        t->free_entries = *entry;
+        *entry = object;
+        return entry - t->entries;
+    }
+
+    if (!(t->entry_count < t->table_size))
+    {
         /* Grow the table */
-        DWORD new_size = This->shader_handle_table_size + (This->shader_handle_table_size >> 1);
-        shader_handle *new_handles = HeapReAlloc(GetProcessHeap(), 0, This->shader_handles, new_size * sizeof(shader_handle));
-        if (!new_handles) return NULL;
-        This->shader_handles = new_handles;
-        This->shader_handle_table_size = new_size;
-    }
-
-    return &This->shader_handles[This->allocated_shader_handles++];
-}
-
-static void free_shader_handle(IDirect3DDevice8Impl *This, shader_handle *handle) {
-    *handle = This->free_shader_handles;
-    This->free_shader_handles = handle;
+        UINT new_size = t->table_size + (t->table_size >> 1);
+        void **new_entries = HeapReAlloc(GetProcessHeap(), 0, t->entries, new_size * sizeof(void *));
+        if (!new_entries) return D3D8_INVALID_HANDLE;
+        t->entries = new_entries;
+        t->table_size = new_size;
+    }
+
+    t->entries[t->entry_count] = object;
+    return t->entry_count++;
+}
+
+static void *d3d8_free_handle(struct d3d8_handle_table *t, DWORD handle)
+{
+    void **entry, *object;
+
+    if (handle >= t->entry_count) return NULL;
+
+    entry = &t->entries[handle];
+    object = *entry;
+    *entry = t->free_entries;
+    t->free_entries = entry;
+
+    return object;
+}
+
+static void *d3d8_get_object(struct d3d8_handle_table *t, DWORD handle)
+{
+    if (handle >= t->entry_count) return NULL;
+    return t->entries[handle];
 }
 
@@ -83,4 +230,11 @@
     }
 
+    if (IsEqualGUID(riid, &IID_IWineD3DDeviceParent))
+    {
+        IUnknown_AddRef((IUnknown *)&This->device_parent_vtbl);
+        *ppobj = &This->device_parent_vtbl;
+        return S_OK;
+    }
+
     WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
     *ppobj = NULL;
@@ -114,5 +268,5 @@
 
         for(i = 0; i < This->numConvertedDecls; i++) {
-            IWineD3DVertexDeclaration_Release(This->decls[i].decl);
+            IDirect3DVertexDeclaration8_Release(This->decls[i].decl);
         }
         HeapFree(GetProcessHeap(), 0, This->decls);
@@ -120,5 +274,5 @@
         IWineD3DDevice_Uninit3D(This->WineD3DDevice, D3D8CB_DestroyDepthStencilSurface, D3D8CB_DestroySwapChain);
         IWineD3DDevice_Release(This->WineD3DDevice);
-        HeapFree(GetProcessHeap(), 0, This->shader_handles);
+        HeapFree(GetProcessHeap(), 0, This->handle_table.entries);
         HeapFree(GetProcessHeap(), 0, This);
         LeaveCriticalSection(&d3d8_cs);
@@ -215,4 +369,5 @@
         pCaps->VertexShaderVersion = D3DVS_VERSION(1,1);
     }
+    pCaps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);
 
     TRACE("Returning %p %p\n", This, pCaps);
@@ -228,4 +383,7 @@
     hr = IWineD3DDevice_GetDisplayMode(This->WineD3DDevice, 0, (WINED3DDISPLAYMODE *) pMode);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
+
     return hr;
 }
@@ -303,5 +461,5 @@
     localParameters.BackBufferWidth                             = pPresentationParameters->BackBufferWidth;
     localParameters.BackBufferHeight                            = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                            = pPresentationParameters->BackBufferFormat;
+    localParameters.BackBufferFormat                            = wined3dformat_from_d3dformat(pPresentationParameters->BackBufferFormat);
     localParameters.BackBufferCount                             = pPresentationParameters->BackBufferCount;
     localParameters.MultiSampleType                             = pPresentationParameters->MultiSampleType;
@@ -311,5 +469,5 @@
     localParameters.Windowed                                    = pPresentationParameters->Windowed;
     localParameters.EnableAutoDepthStencil                      = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat                      = pPresentationParameters->AutoDepthStencilFormat;
+    localParameters.AutoDepthStencilFormat                      = wined3dformat_from_d3dformat(pPresentationParameters->AutoDepthStencilFormat);
     localParameters.Flags                                       = pPresentationParameters->Flags;
     localParameters.FullScreen_RefreshRateInHz                  = pPresentationParameters->FullScreen_RefreshRateInHz;
@@ -318,10 +476,11 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hrc = IWineD3DDevice_CreateSwapChain(This->WineD3DDevice, &localParameters, &object->wineD3DSwapChain, (IUnknown*)object, D3D8CB_CreateRenderTarget, D3D8CB_CreateDepthStencilSurface, SURFACE_OPENGL);
+    hrc = IWineD3DDevice_CreateSwapChain(This->WineD3DDevice, &localParameters,
+            &object->wineD3DSwapChain, (IUnknown *)object, SURFACE_OPENGL);
     LeaveCriticalSection(&d3d8_cs);
 
     pPresentationParameters->BackBufferWidth                    = localParameters.BackBufferWidth;
     pPresentationParameters->BackBufferHeight                   = localParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat                   = localParameters.BackBufferFormat;
+    pPresentationParameters->BackBufferFormat                   = d3dformat_from_wined3dformat(localParameters.BackBufferFormat);
     pPresentationParameters->BackBufferCount                    = localParameters.BackBufferCount;
     pPresentationParameters->MultiSampleType                    = localParameters.MultiSampleType;
@@ -330,5 +489,5 @@
     pPresentationParameters->Windowed                           = localParameters.Windowed;
     pPresentationParameters->EnableAutoDepthStencil             = localParameters.EnableAutoDepthStencil;
-    pPresentationParameters->AutoDepthStencilFormat             = localParameters.AutoDepthStencilFormat;
+    pPresentationParameters->AutoDepthStencilFormat             = d3dformat_from_wined3dformat(localParameters.AutoDepthStencilFormat);
     pPresentationParameters->Flags                              = localParameters.Flags;
     pPresentationParameters->FullScreen_RefreshRateInHz         = localParameters.FullScreen_RefreshRateInHz;
@@ -357,5 +516,5 @@
     localParameters.BackBufferWidth                             = pPresentationParameters->BackBufferWidth;
     localParameters.BackBufferHeight                            = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                            = pPresentationParameters->BackBufferFormat;
+    localParameters.BackBufferFormat                            = wined3dformat_from_d3dformat(pPresentationParameters->BackBufferFormat);
     localParameters.BackBufferCount                             = pPresentationParameters->BackBufferCount;
     localParameters.MultiSampleType                             = pPresentationParameters->MultiSampleType;
@@ -365,5 +524,5 @@
     localParameters.Windowed                                    = pPresentationParameters->Windowed;
     localParameters.EnableAutoDepthStencil                      = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat                      = pPresentationParameters->AutoDepthStencilFormat;
+    localParameters.AutoDepthStencilFormat                      = wined3dformat_from_d3dformat(pPresentationParameters->AutoDepthStencilFormat);
     localParameters.Flags                                       = pPresentationParameters->Flags;
     localParameters.FullScreen_RefreshRateInHz                  = pPresentationParameters->FullScreen_RefreshRateInHz;
@@ -377,5 +536,5 @@
     pPresentationParameters->BackBufferWidth                    = localParameters.BackBufferWidth;
     pPresentationParameters->BackBufferHeight                   = localParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat                   = localParameters.BackBufferFormat;
+    pPresentationParameters->BackBufferFormat                   = d3dformat_from_wined3dformat(localParameters.BackBufferFormat);
     pPresentationParameters->BackBufferCount                    = localParameters.BackBufferCount;
     pPresentationParameters->MultiSampleType                    = localParameters.MultiSampleType;
@@ -384,5 +543,5 @@
     pPresentationParameters->Windowed                           = localParameters.Windowed;
     pPresentationParameters->EnableAutoDepthStencil             = localParameters.EnableAutoDepthStencil;
-    pPresentationParameters->AutoDepthStencilFormat             = localParameters.AutoDepthStencilFormat;
+    pPresentationParameters->AutoDepthStencilFormat             = d3dformat_from_wined3dformat(localParameters.AutoDepthStencilFormat);
     pPresentationParameters->Flags                              = localParameters.Flags;
     pPresentationParameters->FullScreen_RefreshRateInHz         = localParameters.FullScreen_RefreshRateInHz;
@@ -472,5 +631,5 @@
     EnterCriticalSection(&d3d8_cs);
     hrc = IWineD3DDevice_CreateTexture(This->WineD3DDevice, Width, Height, Levels, Usage & WINED3DUSAGE_MASK,
-                                 (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DTexture, NULL, (IUnknown *)object, D3D8CB_CreateSurface);
+            wined3dformat_from_d3dformat(Format), Pool, &object->wineD3DTexture, (IUnknown *)object);
     LeaveCriticalSection(&d3d8_cs);
 
@@ -511,7 +670,7 @@
     object->ref = 1;
     EnterCriticalSection(&d3d8_cs);
-    hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels, Usage & WINED3DUSAGE_MASK,
-                                 (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DVolumeTexture, NULL,
-                                 (IUnknown *)object, D3D8CB_CreateVolume);
+    hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels,
+            Usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(Format),
+            Pool, &object->wineD3DVolumeTexture, (IUnknown *)object);
     LeaveCriticalSection(&d3d8_cs);
 
@@ -553,6 +712,5 @@
     EnterCriticalSection(&d3d8_cs);
     hr = IWineD3DDevice_CreateCubeTexture(This->WineD3DDevice, EdgeLength, Levels, Usage & WINED3DUSAGE_MASK,
-                                 (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DCubeTexture, NULL, (IUnknown*)object,
-                                 D3D8CB_CreateSurface);
+            wined3dformat_from_d3dformat(Format), Pool, &object->wineD3DCubeTexture, (IUnknown *)object);
     LeaveCriticalSection(&d3d8_cs);
 
@@ -590,6 +748,8 @@
     object->ref = 1;
     EnterCriticalSection(&d3d8_cs);
-    hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage & WINED3DUSAGE_MASK, FVF, (WINED3DPOOL) Pool, &(object->wineD3DVertexBuffer), NULL, (IUnknown *)object);
-    LeaveCriticalSection(&d3d8_cs);
+    hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage & WINED3DUSAGE_MASK,
+            0 /* fvf for ddraw only */, (WINED3DPOOL)Pool, &object->wineD3DVertexBuffer, (IUnknown *)object);
+    LeaveCriticalSection(&d3d8_cs);
+    object->fvf = FVF;
 
     if (D3D_OK != hrc) {
@@ -623,7 +783,9 @@
     object->lpVtbl = &Direct3DIndexBuffer8_Vtbl;
     object->ref = 1;
+    object->format = wined3dformat_from_d3dformat(Format);
     TRACE("Calling wined3d create index buffer\n");
     EnterCriticalSection(&d3d8_cs);
-    hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage & WINED3DUSAGE_MASK, Format, (WINED3DPOOL) Pool, &object->wineD3DIndexBuffer, NULL, (IUnknown *)object);
+    hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage & WINED3DUSAGE_MASK,
+            (WINED3DPOOL)Pool, &object->wineD3DIndexBuffer, (IUnknown *)object);
     LeaveCriticalSection(&d3d8_cs);
 
@@ -671,6 +833,9 @@
     TRACE("(%p) : w(%d) h(%d) fmt(%d) surf@%p\n", This, Width, Height, Format, *ppSurface);
 
-    /* Not called from the VTable, no locking needed */
-    hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level,  &object->wineD3DSurface, Type, Usage & WINED3DUSAGE_MASK, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality, NULL, SURFACE_OPENGL, (IUnknown *)object);
+    EnterCriticalSection(&d3d8_cs);
+    hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, wined3dformat_from_d3dformat(Format),
+            Lockable, Discard, Level,  &object->wineD3DSurface, Type, Usage & WINED3DUSAGE_MASK,
+            (WINED3DPOOL)Pool, MultiSample, MultisampleQuality, SURFACE_OPENGL, (IUnknown *)object);
+    LeaveCriticalSection(&d3d8_cs);
     if (hrc != D3D_OK || NULL == object->wineD3DSurface) {
        /* free up object */
@@ -690,7 +855,5 @@
     TRACE("Relay\n");
 
-    EnterCriticalSection(&d3d8_cs);
     hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, Lockable, FALSE /* Discard */, 0 /* Level */ , ppSurface, D3DRTYPE_SURFACE, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, MultiSample, 0);
-    LeaveCriticalSection(&d3d8_cs);
     return hr;
 }
@@ -701,9 +864,7 @@
 
     /* TODO: Verify that Discard is false */
-    EnterCriticalSection(&d3d8_cs);
     hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, FALSE, 0 /* Level */
                                                ,ppSurface, D3DRTYPE_SURFACE, D3DUSAGE_DEPTHSTENCIL,
                                                 D3DPOOL_DEFAULT, MultiSample, 0);
-    LeaveCriticalSection(&d3d8_cs);
     return hr;
 }
@@ -714,8 +875,6 @@
     TRACE("Relay\n");
 
-    EnterCriticalSection(&d3d8_cs);
     hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Loackable */ , FALSE /*Discard*/ , 0 /* Level */ , ppSurface,
                                             D3DRTYPE_SURFACE, 0 /* Usage (undefined/none) */ , D3DPOOL_SYSTEMMEM, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */);
-    LeaveCriticalSection(&d3d8_cs);
     return hr;
 }
@@ -743,4 +902,5 @@
     winedesc.Height = &srcHeight;
     winedesc.Size   = &srcSize;
+    EnterCriticalSection(&d3d8_cs);
     IWineD3DSurface_GetDesc(Source->wineD3DSurface, &winedesc);
 
@@ -749,5 +909,4 @@
     winedesc.Height = &destHeight;
     winedesc.Size   = NULL;
-    EnterCriticalSection(&d3d8_cs);
     IWineD3DSurface_GetDesc(Dest->wineD3DSurface, &winedesc);
 
@@ -771,9 +930,9 @@
         if (NULL != pSourceRects && NULL != pDestPoints) {
             for (i = 0; i < cRects; ++i) {
-                IWineD3DSurface_BltFast(Dest->wineD3DSurface, pDestPoints[i].x, pDestPoints[i].y, Source->wineD3DSurface, (RECT *) &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY);
+                IWineD3DSurface_BltFast(Dest->wineD3DSurface, pDestPoints[i].x, pDestPoints[i].y, Source->wineD3DSurface, &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY);
             }
         } else {
             for (i = 0; i < cRects; ++i) {
-                IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, (RECT *) &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY);
+                IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY);
             }
         }
@@ -1120,5 +1279,5 @@
     hr = IWineD3DDevice_EndStateBlock(This->WineD3DDevice , &wineD3DStateBlock);
     if (hr != D3D_OK) {
-        FIXME("IWineD3DDevice_EndStateBlock returned an error\n");
+        WARN("IWineD3DDevice_EndStateBlock returned an error\n");
         LeaveCriticalSection(&d3d8_cs);
         return hr;
@@ -1132,19 +1291,35 @@
     object->wineD3DStateBlock = wineD3DStateBlock;
 
-    *pToken = (DWORD)object;
-    TRACE("(%p)Returning %p %p\n", This, object, wineD3DStateBlock);
-
-    LeaveCriticalSection(&d3d8_cs);
+    *pToken = d3d8_allocate_handle(&This->handle_table, object);
+    LeaveCriticalSection(&d3d8_cs);
+
+    if (*pToken == D3D8_INVALID_HANDLE)
+    {
+        ERR("Failed to create a handle\n");
+        IDirect3DStateBlock8_Release((IDirect3DStateBlock8 *)object);
+        return E_FAIL;
+    }
+    ++*pToken;
+
+    TRACE("Returning %#x (%p).\n", *pToken, object);
+
     return hr;
 }
 
 static HRESULT WINAPI IDirect3DDevice8Impl_ApplyStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token) {
-    IDirect3DStateBlock8Impl *pSB  = (IDirect3DStateBlock8Impl*) Token;
     IDirect3DDevice8Impl     *This = (IDirect3DDevice8Impl *)iface;
-    HRESULT hr;
-
-    TRACE("(%p) %p Relay\n", This, pSB);
-
-    EnterCriticalSection(&d3d8_cs);
+    IDirect3DStateBlock8Impl *pSB;
+    HRESULT hr;
+
+    TRACE("(%p) %#x Relay\n", This, Token);
+
+    EnterCriticalSection(&d3d8_cs);
+    pSB = d3d8_get_object(&This->handle_table, Token - 1);
+    if (!pSB)
+    {
+        WARN("Invalid handle (%#x) passed.\n", Token);
+        LeaveCriticalSection(&d3d8_cs);
+        return D3DERR_INVALIDCALL;
+    }
     hr = IWineD3DStateBlock_Apply(pSB->wineD3DStateBlock);
     LeaveCriticalSection(&d3d8_cs);
@@ -1153,11 +1328,18 @@
 
 static HRESULT WINAPI IDirect3DDevice8Impl_CaptureStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token) {
-    IDirect3DStateBlock8Impl* pSB = (IDirect3DStateBlock8Impl *)Token;
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    HRESULT hr;
-
-    TRACE("(%p) %p Relay\n", This, pSB);
-
-    EnterCriticalSection(&d3d8_cs);
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DStateBlock8Impl *pSB;
+    HRESULT hr;
+
+    TRACE("(%p) %#x Relay\n", This, Token);
+
+    EnterCriticalSection(&d3d8_cs);
+    pSB = d3d8_get_object(&This->handle_table, Token - 1);
+    if (!pSB)
+    {
+        WARN("Invalid handle (%#x) passed.\n", Token);
+        LeaveCriticalSection(&d3d8_cs);
+        return D3DERR_INVALIDCALL;
+    }
     hr = IWineD3DStateBlock_Capture(pSB->wineD3DStateBlock);
     LeaveCriticalSection(&d3d8_cs);
@@ -1166,50 +1348,79 @@
 
 static HRESULT WINAPI IDirect3DDevice8Impl_DeleteStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token) {
-    IDirect3DStateBlock8Impl* pSB = (IDirect3DStateBlock8Impl *)Token;
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DStateBlock8Impl *pSB;
 
     TRACE("(%p) Relay\n", This);
 
     EnterCriticalSection(&d3d8_cs);
-    while(IUnknown_Release((IUnknown *)pSB));
-    LeaveCriticalSection(&d3d8_cs);
+    pSB = d3d8_free_handle(&This->handle_table, Token - 1);
+    LeaveCriticalSection(&d3d8_cs);
+
+    if (!pSB)
+    {
+        WARN("Invalid handle (%#x) passed.\n", Token);
+        return D3DERR_INVALIDCALL;
+    }
+
+    if (IUnknown_Release((IUnknown *)pSB))
+    {
+        ERR("Stateblock %p has references left, this shouldn't happen.\n", pSB);
+    }
 
     return D3D_OK;
 }
 
-static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(LPDIRECT3DDEVICE8 iface, D3DSTATEBLOCKTYPE Type, DWORD* pToken) {
-   IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-   IDirect3DStateBlock8Impl *object;
-   HRESULT hrc = D3D_OK;
-
-   TRACE("(%p) Relay\n", This);
-
-   if(Type != D3DSBT_ALL         && Type != D3DSBT_PIXELSTATE &&
-      Type != D3DSBT_VERTEXSTATE                              ) {
-       WARN("Unexpected stateblock type, returning D3DERR_INVALIDCALL\n");
-       return D3DERR_INVALIDCALL;
-   }
-
-   object  = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DStateBlock8Impl));
-   if (NULL == object) {
-      *pToken = 0;
-      return E_OUTOFMEMORY;
-   }
-   object->lpVtbl = &Direct3DStateBlock8_Vtbl;
-   object->ref = 1;
-
-   EnterCriticalSection(&d3d8_cs);
-   hrc = IWineD3DDevice_CreateStateBlock(This->WineD3DDevice, (WINED3DSTATEBLOCKTYPE)Type, &object->wineD3DStateBlock, (IUnknown *)object);
-   LeaveCriticalSection(&d3d8_cs);
-   if(D3D_OK != hrc){
-       FIXME("(%p) Call to IWineD3DDevice_CreateStateBlock failed.\n", This);
-       HeapFree(GetProcessHeap(), 0, object);
-       *pToken = 0;
-   } else {
-       *pToken = (DWORD)object;
-       TRACE("(%p) returning token (ptr to stateblock) of %p\n", This, object);
-   }
-
-   return hrc;
+static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(IDirect3DDevice8 *iface,
+        D3DSTATEBLOCKTYPE Type, DWORD *handle)
+{
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DStateBlock8Impl *object;
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    if (Type != D3DSBT_ALL
+            && Type != D3DSBT_PIXELSTATE
+            && Type != D3DSBT_VERTEXSTATE)
+    {
+        WARN("Unexpected stateblock type, returning D3DERR_INVALIDCALL\n");
+        return D3DERR_INVALIDCALL;
+    }
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DStateBlock8Impl));
+    if (!object)
+    {
+        ERR("Failed to allocate memory.\n");
+        return E_OUTOFMEMORY;
+    }
+
+    object->lpVtbl = &Direct3DStateBlock8_Vtbl;
+    object->ref = 1;
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DDevice_CreateStateBlock(This->WineD3DDevice, (WINED3DSTATEBLOCKTYPE)Type,
+            &object->wineD3DStateBlock, (IUnknown *)object);
+    if (FAILED(hr))
+    {
+        LeaveCriticalSection(&d3d8_cs);
+        ERR("IWineD3DDevice_CreateStateBlock failed, hr %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        return hr;
+    }
+
+    *handle = d3d8_allocate_handle(&This->handle_table, object);
+    LeaveCriticalSection(&d3d8_cs);
+
+    if (*handle == D3D8_INVALID_HANDLE)
+    {
+        ERR("Failed to allocate a handle.\n");
+        IDirect3DStateBlock8_Release((IDirect3DStateBlock8 *)object);
+        return E_FAIL;
+    }
+    ++*handle;
+
+    TRACE("Returning %#x (%p).\n", *handle, object);
+
+    return hr;
 }
 
@@ -1273,49 +1484,53 @@
 }
 
+static const struct tss_lookup
+{
+    BOOL sampler_state;
+    DWORD state;
+}
+tss_lookup[] =
+{
+    {FALSE, WINED3DTSS_FORCE_DWORD},            /*  0, unused */
+    {FALSE, WINED3DTSS_COLOROP},                /*  1, D3DTSS_COLOROP */
+    {FALSE, WINED3DTSS_COLORARG1},              /*  2, D3DTSS_COLORARG1 */
+    {FALSE, WINED3DTSS_COLORARG2},              /*  3, D3DTSS_COLORARG2 */
+    {FALSE, WINED3DTSS_ALPHAOP},                /*  4, D3DTSS_ALPHAOP */
+    {FALSE, WINED3DTSS_ALPHAARG1},              /*  5, D3DTSS_ALPHAARG1 */
+    {FALSE, WINED3DTSS_ALPHAARG2},              /*  6, D3DTSS_ALPHAARG2 */
+    {FALSE, WINED3DTSS_BUMPENVMAT00},           /*  7, D3DTSS_BUMPENVMAT00 */
+    {FALSE, WINED3DTSS_BUMPENVMAT01},           /*  8, D3DTSS_BUMPENVMAT01 */
+    {FALSE, WINED3DTSS_BUMPENVMAT10},           /*  9, D3DTSS_BUMPENVMAT10 */
+    {FALSE, WINED3DTSS_BUMPENVMAT11},           /* 10, D3DTSS_BUMPENVMAT11 */
+    {FALSE, WINED3DTSS_TEXCOORDINDEX},          /* 11, D3DTSS_TEXCOORDINDEX */
+    {FALSE, WINED3DTSS_FORCE_DWORD},            /* 12, unused */
+    {TRUE,  WINED3DSAMP_ADDRESSU},              /* 13, D3DTSS_ADDRESSU */
+    {TRUE,  WINED3DSAMP_ADDRESSV},              /* 14, D3DTSS_ADDRESSV */
+    {TRUE,  WINED3DSAMP_BORDERCOLOR},           /* 15, D3DTSS_BORDERCOLOR */
+    {TRUE,  WINED3DSAMP_MAGFILTER},             /* 16, D3DTSS_MAGFILTER */
+    {TRUE,  WINED3DSAMP_MINFILTER},             /* 17, D3DTSS_MINFILTER */
+    {TRUE,  WINED3DSAMP_MIPFILTER},             /* 18, D3DTSS_MIPFILTER */
+    {TRUE,  WINED3DSAMP_MIPMAPLODBIAS},         /* 19, D3DTSS_MIPMAPLODBIAS */
+    {TRUE,  WINED3DSAMP_MAXMIPLEVEL},           /* 20, D3DTSS_MAXMIPLEVEL */
+    {TRUE,  WINED3DSAMP_MAXANISOTROPY},         /* 21, D3DTSS_MAXANISOTROPY */
+    {FALSE, WINED3DTSS_BUMPENVLSCALE},          /* 22, D3DTSS_BUMPENVLSCALE */
+    {FALSE, WINED3DTSS_BUMPENVLOFFSET},         /* 23, D3DTSS_BUMPENVLOFFSET */
+    {FALSE, WINED3DTSS_TEXTURETRANSFORMFLAGS},  /* 24, D3DTSS_TEXTURETRANSFORMFLAGS */
+    {TRUE,  WINED3DSAMP_ADDRESSW},              /* 25, D3DTSS_ADDRESSW */
+    {FALSE, WINED3DTSS_COLORARG0},              /* 26, D3DTSS_COLORARG0 */
+    {FALSE, WINED3DTSS_ALPHAARG0},              /* 27, D3DTSS_ALPHAARG0 */
+    {FALSE, WINED3DTSS_RESULTARG},              /* 28, D3DTSS_RESULTARG */
+};
+
 static HRESULT  WINAPI  IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue) {
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n" , This);
-
-    switch(Type) {
-    case D3DTSS_ADDRESSU:
-        Type = WINED3DSAMP_ADDRESSU;
-        break;
-    case D3DTSS_ADDRESSV:
-        Type = WINED3DSAMP_ADDRESSV;
-        break;
-    case D3DTSS_ADDRESSW:
-        Type = WINED3DSAMP_ADDRESSW;
-        break;
-    case D3DTSS_BORDERCOLOR:
-        Type = WINED3DSAMP_BORDERCOLOR;
-        break;
-    case D3DTSS_MAGFILTER:
-        Type = WINED3DSAMP_MAGFILTER;
-        break;
-    case D3DTSS_MAXANISOTROPY:
-        Type = WINED3DSAMP_MAXANISOTROPY;
-        break;
-    case D3DTSS_MAXMIPLEVEL:
-        Type = WINED3DSAMP_MAXMIPLEVEL;
-        break;
-    case D3DTSS_MINFILTER:
-        Type = WINED3DSAMP_MINFILTER;
-        break;
-    case D3DTSS_MIPFILTER:
-        Type = WINED3DSAMP_MIPFILTER;
-        break;
-    case D3DTSS_MIPMAPLODBIAS:
-        Type = WINED3DSAMP_MIPMAPLODBIAS;
-        break;
-    default:
-        EnterCriticalSection(&d3d8_cs);
-        hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, Type, pValue);
-        LeaveCriticalSection(&d3d8_cs);
-        return hr;
-    }
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_GetSamplerState(This->WineD3DDevice, Stage, Type, pValue);
+    const struct tss_lookup *l = &tss_lookup[Type];
+    HRESULT hr;
+    TRACE("(%p) Relay\n" , This);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    if (l->sampler_state) hr = IWineD3DDevice_GetSamplerState(This->WineD3DDevice, Stage, l->state, pValue);
+    else hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, l->state, pValue);
+
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1324,47 +1539,13 @@
 static HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) {
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n" , This);
-
-    switch(Type) {
-    case D3DTSS_ADDRESSU:
-        Type = WINED3DSAMP_ADDRESSU;
-        break;
-    case D3DTSS_ADDRESSV:
-        Type = WINED3DSAMP_ADDRESSV;
-        break;
-    case D3DTSS_ADDRESSW:
-        Type = WINED3DSAMP_ADDRESSW;
-        break;
-    case D3DTSS_BORDERCOLOR:
-        Type = WINED3DSAMP_BORDERCOLOR;
-        break;
-    case D3DTSS_MAGFILTER:
-        Type = WINED3DSAMP_MAGFILTER;
-        break;
-    case D3DTSS_MAXANISOTROPY:
-        Type = WINED3DSAMP_MAXANISOTROPY;
-        break;
-    case D3DTSS_MAXMIPLEVEL:
-        Type = WINED3DSAMP_MAXMIPLEVEL;
-        break;
-    case D3DTSS_MINFILTER:
-        Type = WINED3DSAMP_MINFILTER;
-        break;
-    case D3DTSS_MIPFILTER:
-        Type = WINED3DSAMP_MIPFILTER;
-        break;
-    case D3DTSS_MIPMAPLODBIAS:
-        Type = WINED3DSAMP_MIPMAPLODBIAS;
-        break;
-    default:
-        EnterCriticalSection(&d3d8_cs);
-        hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, Type, Value);
-        LeaveCriticalSection(&d3d8_cs);
-        return hr;
-    }
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_SetSamplerState(This->WineD3DDevice, Stage, Type, Value);
+    const struct tss_lookup *l = &tss_lookup[Type];
+    HRESULT hr;
+    TRACE("(%p) Relay\n" , This);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    if (l->sampler_state) hr = IWineD3DDevice_SetSamplerState(This->WineD3DDevice, Stage, l->state, Value);
+    else hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, l->state, Value);
+
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1438,5 +1619,7 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_DrawPrimitive(This->WineD3DDevice, PrimitiveType, StartVertex, PrimitiveCount);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawPrimitive(This->WineD3DDevice, StartVertex,
+            vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount));
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1450,5 +1633,7 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, PrimitiveType, MinVertexIndex, NumVertices, startIndex, primCount);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, MinVertexIndex, NumVertices,
+            startIndex, vertex_count_from_primitive_count(PrimitiveType, primCount));
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1461,5 +1646,8 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_DrawPrimitiveUP(This->WineD3DDevice, PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawPrimitiveUP(This->WineD3DDevice,
+            vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount),
+            pVertexStreamZeroData, VertexStreamZeroStride);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1475,6 +1663,8 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->WineD3DDevice, PrimitiveType, MinVertexIndex, NumVertexIndices, PrimitiveCount,
-                                               pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->WineD3DDevice, MinVertexIndex, NumVertexIndices,
+            vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount), pIndexData,
+            wined3dformat_from_d3dformat(IndexDataFormat), pVertexStreamZeroData, VertexStreamZeroStride);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1484,8 +1674,9 @@
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
     HRESULT hr;
-    TRACE("(%p) Relay\n" , This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_ProcessVertices(This->WineD3DDevice,SrcStartIndex, DestIndex, VertexCount, ((IDirect3DVertexBuffer8Impl *)pDestBuffer)->wineD3DVertexBuffer, NULL, Flags);
+    IDirect3DVertexBuffer8Impl *dest = (IDirect3DVertexBuffer8Impl *) pDestBuffer;
+    TRACE("(%p) Relay\n" , This);
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DDevice_ProcessVertices(This->WineD3DDevice,SrcStartIndex, DestIndex, VertexCount, dest->wineD3DVertexBuffer, NULL, Flags, dest->fvf);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1547,4 +1738,5 @@
     IWineD3DVertexDeclaration *wined3d_vertex_declaration;
     const DWORD *token = pDeclaration;
+    DWORD handle;
 
     /* Test if the vertex declaration is valid */
@@ -1576,39 +1768,53 @@
     object->lpVtbl = &Direct3DVertexShader8_Vtbl;
 
-    EnterCriticalSection(&d3d8_cs);
     hrc = IDirect3DDevice8Impl_CreateVertexDeclaration(iface, pDeclaration, &object->vertex_declaration);
     if (FAILED(hrc)) {
         ERR("(%p) : IDirect3DDeviceImpl_CreateVertexDeclaration call failed\n", This);
-        LeaveCriticalSection(&d3d8_cs);
         HeapFree(GetProcessHeap(), 0, object);
         *ppShader = 0;
         return D3DERR_INVALIDCALL;
     }
-    wined3d_vertex_declaration = ((IDirect3DVertexDeclaration8Impl *)object->vertex_declaration)->wined3d_vertex_declaration;
-
-    /* Usage is missing ... Use SetRenderState to set the sw vp render state in SetVertexShader */
-    hrc = IWineD3DDevice_CreateVertexShader(This->WineD3DDevice, wined3d_vertex_declaration, pFunction, &object->wineD3DVertexShader, (IUnknown *)object);
-
-    if (FAILED(hrc)) {
-        /* free up object */
-        FIXME("Call to IWineD3DDevice_CreateVertexShader failed\n");
+
+    EnterCriticalSection(&d3d8_cs);
+    handle = d3d8_allocate_handle(&This->handle_table, object);
+    if (handle == D3D8_INVALID_HANDLE)
+    {
+        ERR("Failed to allocate shader handle\n");
+        LeaveCriticalSection(&d3d8_cs);
+        IDirect3DVertexDeclaration8_Release(object->vertex_declaration);
         HeapFree(GetProcessHeap(), 0, object);
         *ppShader = 0;
-    } else {
-        /* TODO: Store the VS declarations locally so that they can be dereferenced with a value higher than VS_HIGHESTFIXEDFXF */
-        shader_handle *handle = alloc_shader_handle(This);
-        if (!handle) {
-            ERR("Failed to allocate shader handle\n");
-            IDirect3DVertexShader8_Release((IUnknown *)object);
-            hrc = E_OUTOFMEMORY;
-        } else {
-            *handle = object;
-            object->handle = (handle - This->shader_handles) + VS_HIGHESTFIXEDFXF + 1;
-            *ppShader = object->handle;
-
+        return E_OUTOFMEMORY;
+    }
+    else
+    {
+        DWORD shader_handle = handle + VS_HIGHESTFIXEDFXF + 1;
+        *ppShader = ((IDirect3DVertexDeclaration8Impl *)object->vertex_declaration)->shader_handle = shader_handle;
+    }
+
+    wined3d_vertex_declaration = ((IDirect3DVertexDeclaration8Impl *)object->vertex_declaration)->wined3d_vertex_declaration;
+
+    if (pFunction)
+    {
+        /* Usage is missing ... Use SetRenderState to set the sw vp render state in SetVertexShader */
+        hrc = IWineD3DDevice_CreateVertexShader(This->WineD3DDevice, wined3d_vertex_declaration,
+                pFunction, &object->wineD3DVertexShader, (IUnknown *)object);
+
+        if (FAILED(hrc))
+        {
+            /* free up object */
+            FIXME("Call to IWineD3DDevice_CreateVertexShader failed\n");
+            d3d8_free_handle(&This->handle_table, handle);
+            IDirect3DVertexDeclaration8_Release(object->vertex_declaration);
+            HeapFree(GetProcessHeap(), 0, object);
+            *ppShader = 0;
+        }
+        else
+        {
             load_local_constants(pDeclaration, object->wineD3DVertexShader);
             TRACE("(%p) : returning %p (handle %#x)\n", This, object, *ppShader);
         }
     }
+
     LeaveCriticalSection(&d3d8_cs);
 
@@ -1616,8 +1822,8 @@
 }
 
-static IWineD3DVertexDeclaration *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8Impl *This, DWORD fvf)
+static IDirect3DVertexDeclaration8Impl *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8Impl *This, DWORD fvf)
 {
-    HRESULT hr;
-    IWineD3DVertexDeclaration* pDecl = NULL;
+    IDirect3DVertexDeclaration8Impl *d3d8_declaration;
+    HRESULT hr;
     int p, low, high; /* deliberately signed */
     struct FvfToDecl *convertedDecls = This->decls;
@@ -1632,5 +1838,5 @@
         if(convertedDecls[p].fvf == fvf) {
             TRACE("found %p\n", convertedDecls[p].decl);
-            return convertedDecls[p].decl;
+            return (IDirect3DVertexDeclaration8Impl *)convertedDecls[p].decl;
         } else if(convertedDecls[p].fvf < fvf) {
             low = p + 1;
@@ -1641,9 +1847,25 @@
     TRACE("not found. Creating and inserting at position %d.\n", low);
 
+    d3d8_declaration = HeapAlloc(GetProcessHeap(), 0, sizeof(*d3d8_declaration));
+    if (!d3d8_declaration)
+    {
+        ERR("Memory allocation failed.\n");
+        return NULL;
+    }
+
+    d3d8_declaration->ref_count = 1;
+    d3d8_declaration->lpVtbl = &Direct3DVertexDeclaration8_Vtbl;
+    d3d8_declaration->elements = NULL;
+    d3d8_declaration->elements_size = 0;
+    d3d8_declaration->shader_handle = fvf;
+
     hr = IWineD3DDevice_CreateVertexDeclarationFromFVF(This->WineD3DDevice,
-                                                       &pDecl,
-                                                       (IUnknown *) This,
-                                                       fvf);
-    if (FAILED(hr)) return NULL;
+            &d3d8_declaration->wined3d_vertex_declaration, (IUnknown *)d3d8_declaration, fvf);
+    if (FAILED(hr))
+    {
+        ERR("Failed to create wined3d vertex declaration.\n");
+        HeapFree(GetProcessHeap(), 0, d3d8_declaration);
+        return NULL;
+    }
 
     if(This->declArraySize == This->numConvertedDecls) {
@@ -1653,5 +1875,5 @@
         if(!convertedDecls) {
             /* This will destroy it */
-            IWineD3DVertexDeclaration_Release(pDecl);
+            IDirect3DVertexDeclaration8_Release((IDirect3DVertexDeclaration8 *)d3d8_declaration);
             return NULL;
         }
@@ -1661,134 +1883,175 @@
 
     memmove(convertedDecls + low + 1, convertedDecls + low, sizeof(convertedDecls[0]) * (This->numConvertedDecls - low));
-    convertedDecls[low].decl = pDecl;
+    convertedDecls[low].decl = (IDirect3DVertexDeclaration8 *)d3d8_declaration;
     convertedDecls[low].fvf = fvf;
     This->numConvertedDecls++;
 
-    TRACE("Returning %p. %d decls in array\n", pDecl, This->numConvertedDecls);
-    return pDecl;
+    TRACE("Returning %p. %u decls in array\n", d3d8_declaration, This->numConvertedDecls);
+    return d3d8_declaration;
 }
 
 static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) {
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    HRESULT hrc = D3D_OK;
+    IDirect3DVertexShader8Impl *shader;
+    HRESULT hr;
 
     TRACE("(%p) : Relay\n", This);
-    EnterCriticalSection(&d3d8_cs);
+
     if (VS_HIGHESTFIXEDFXF >= pShader) {
-        TRACE("Setting FVF, %d %d\n", VS_HIGHESTFIXEDFXF, pShader);
-        IWineD3DDevice_SetFVF(This->WineD3DDevice, pShader);
-        IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, IDirect3DDevice8Impl_FindDecl(This, pShader));
+        TRACE("Setting FVF, %#x\n", pShader);
+
+        EnterCriticalSection(&d3d8_cs);
+        IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice,
+                IDirect3DDevice8Impl_FindDecl(This, pShader)->wined3d_vertex_declaration);
         IWineD3DDevice_SetVertexShader(This->WineD3DDevice, NULL);
-    } else {
-        TRACE("Setting shader\n");
-        if (This->allocated_shader_handles <= pShader - (VS_HIGHESTFIXEDFXF + 1)) {
-            FIXME("(%p) : Number of shaders exceeds the maximum number of possible shaders\n", This);
-            hrc = D3DERR_INVALIDCALL;
-        } else {
-            IDirect3DVertexShader8Impl *shader = This->shader_handles[pShader - (VS_HIGHESTFIXEDFXF + 1)];
-            IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice,
-                    shader ? ((IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration)->wined3d_vertex_declaration : NULL);
-            hrc = IWineD3DDevice_SetVertexShader(This->WineD3DDevice, 0 == shader ? NULL : shader->wineD3DVertexShader);
-        }
-    }
-    TRACE("(%p) : returning hr(%u)\n", This, hrc);
-    LeaveCriticalSection(&d3d8_cs);
-
-    return hrc;
-}
-
-static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD* ppShader) {
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    IWineD3DVertexShader *pShader;
-    HRESULT hrc = D3D_OK;
-
-    TRACE("(%p) : Relay  device@%p\n", This, This->WineD3DDevice);
-    EnterCriticalSection(&d3d8_cs);
-    hrc = IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &pShader);
-    if (D3D_OK == hrc) {
-        if(0 != pShader) {
-            IDirect3DVertexShader8Impl *d3d8_shader;
-            hrc = IWineD3DVertexShader_GetParent(pShader, (IUnknown **)&d3d8_shader);
-            IWineD3DVertexShader_Release(pShader);
-            *ppShader = d3d8_shader->handle;
-        } else {
-            *ppShader = 0;
-            hrc = D3D_OK;
-        }
-    } else {
-        WARN("(%p) : Call to IWineD3DDevice_GetVertexShader failed %u (device %p)\n", This, hrc, This->WineD3DDevice);
-    }
-    TRACE("(%p) : returning %#x\n", This, *ppShader);
-    LeaveCriticalSection(&d3d8_cs);
-
-    return hrc;
-}
-
-static HRESULT  WINAPI  IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) {
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-
-    TRACE("(%p) : pShader %#x\n", This, pShader);
-
-    EnterCriticalSection(&d3d8_cs);
-    if (pShader <= VS_HIGHESTFIXEDFXF || This->allocated_shader_handles <= pShader - (VS_HIGHESTFIXEDFXF + 1)) {
-        ERR("(%p) : Trying to delete an invalid handle\n", This);
+        LeaveCriticalSection(&d3d8_cs);
+        return D3D_OK;
+    }
+
+    TRACE("Setting shader\n");
+
+    EnterCriticalSection(&d3d8_cs);
+    shader = d3d8_get_object(&This->handle_table, pShader - (VS_HIGHESTFIXEDFXF + 1));
+    if (!shader)
+    {
+        WARN("Invalid handle (%#x) passed.\n", pShader);
         LeaveCriticalSection(&d3d8_cs);
         return D3DERR_INVALIDCALL;
-    } else {
-        IWineD3DVertexShader *cur = NULL;
-        shader_handle *handle = &This->shader_handles[pShader - (VS_HIGHESTFIXEDFXF + 1)];
-        IDirect3DVertexShader8Impl *shader = *handle;
-
-        IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &cur);
-        if(cur) {
-            if(cur == shader->wineD3DVertexShader) IDirect3DDevice8_SetVertexShader(iface, 0);
-            IWineD3DVertexShader_Release(cur);
-        }
-
-        while(IUnknown_Release((IUnknown *)shader));
-        free_shader_handle(This, handle);
-    }
-    LeaveCriticalSection(&d3d8_cs);
-
-    return D3D_OK;
-}
-
-static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, CONST void* pConstantData, DWORD ConstantCount) {
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) : Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_SetVertexShaderConstantF(This->WineD3DDevice, Register, (CONST float *)pConstantData, ConstantCount);
-    LeaveCriticalSection(&d3d8_cs);
-    return hr;
-}
-
-static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, void* pConstantData, DWORD ConstantCount) {
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) : Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_GetVertexShaderConstantF(This->WineD3DDevice, Register, (float *)pConstantData, ConstantCount);
-    LeaveCriticalSection(&d3d8_cs);
-    return hr;
-}
-
-static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderDeclaration(LPDIRECT3DDEVICE8 iface, DWORD pVertexShader, void* pData, DWORD* pSizeOfData) {
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    IDirect3DVertexDeclaration8Impl *declaration;
-    IDirect3DVertexShader8Impl *shader = NULL;
-
-    TRACE("(%p) : pVertexShader 0x%08x, pData %p, *pSizeOfData %u\n", This, pVertexShader, pData, *pSizeOfData);
-
-    EnterCriticalSection(&d3d8_cs);
-    if (pVertexShader <= VS_HIGHESTFIXEDFXF || This->allocated_shader_handles <= pVertexShader - (VS_HIGHESTFIXEDFXF + 1)) {
-        ERR("Passed an invalid shader handle.\n");
+    }
+
+    hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice,
+            ((IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration)->wined3d_vertex_declaration);
+    if (SUCCEEDED(hr)) hr = IWineD3DDevice_SetVertexShader(This->WineD3DDevice, shader->wineD3DVertexShader);
+    LeaveCriticalSection(&d3d8_cs);
+
+    TRACE("Returning hr %#x\n", hr);
+
+    return hr;
+}
+
+static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD* ppShader) {
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IWineD3DVertexDeclaration *wined3d_declaration;
+    IDirect3DVertexDeclaration8 *d3d8_declaration;
+    HRESULT hrc;
+
+    TRACE("(%p) : Relay  device@%p\n", This, This->WineD3DDevice);
+    EnterCriticalSection(&d3d8_cs);
+
+    hrc = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &wined3d_declaration);
+    if (FAILED(hrc))
+    {
+        LeaveCriticalSection(&d3d8_cs);
+        WARN("(%p) : Call to IWineD3DDevice_GetVertexDeclaration failed %#x (device %p)\n",
+                This, hrc, This->WineD3DDevice);
+        return hrc;
+    }
+
+    if (!wined3d_declaration)
+    {
+        LeaveCriticalSection(&d3d8_cs);
+        *ppShader = 0;
+        return D3D_OK;
+    }
+
+    hrc = IWineD3DVertexDeclaration_GetParent(wined3d_declaration, (IUnknown **)&d3d8_declaration);
+    IWineD3DVertexDeclaration_Release(wined3d_declaration);
+    LeaveCriticalSection(&d3d8_cs);
+    if (SUCCEEDED(hrc))
+    {
+        *ppShader = ((IDirect3DVertexDeclaration8Impl *)d3d8_declaration)->shader_handle;
+        IDirect3DVertexDeclaration8_Release(d3d8_declaration);
+    }
+
+    TRACE("(%p) : returning %#x\n", This, *ppShader);
+
+    return hrc;
+}
+
+static HRESULT  WINAPI  IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) {
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DVertexShader8Impl *shader;
+    IWineD3DVertexShader *cur = NULL;
+
+    TRACE("(%p) : pShader %#x\n", This, pShader);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    shader = d3d8_free_handle(&This->handle_table, pShader - (VS_HIGHESTFIXEDFXF + 1));
+    if (!shader)
+    {
+        WARN("Invalid handle (%#x) passed.\n", pShader);
         LeaveCriticalSection(&d3d8_cs);
         return D3DERR_INVALIDCALL;
     }
 
-    shader = This->shader_handles[pVertexShader - (VS_HIGHESTFIXEDFXF + 1)];
+    IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &cur);
+
+    if (cur)
+    {
+        if (cur == shader->wineD3DVertexShader) IDirect3DDevice8_SetVertexShader(iface, 0);
+        IWineD3DVertexShader_Release(cur);
+    }
+
+    LeaveCriticalSection(&d3d8_cs);
+
+    if (IUnknown_Release((IUnknown *)shader))
+    {
+        ERR("Shader %p has references left, this shouldn't happen.\n", shader);
+    }
+
+    return D3D_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, CONST void* pConstantData, DWORD ConstantCount) {
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    HRESULT hr;
+    TRACE("(%p) : Relay\n", This);
+
+    if(Register + ConstantCount > D3D8_MAX_VERTEX_SHADER_CONSTANTF) {
+        WARN("Trying to access %u constants, but d3d8 only supports %u\n",
+             Register + ConstantCount, D3D8_MAX_VERTEX_SHADER_CONSTANTF);
+        return D3DERR_INVALIDCALL;
+    }
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DDevice_SetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
+    LeaveCriticalSection(&d3d8_cs);
+    return hr;
+}
+
+static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, void* pConstantData, DWORD ConstantCount) {
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    HRESULT hr;
+    TRACE("(%p) : Relay\n", This);
+
+    if(Register + ConstantCount > D3D8_MAX_VERTEX_SHADER_CONSTANTF) {
+        WARN("Trying to access %u constants, but d3d8 only supports %u\n",
+             Register + ConstantCount, D3D8_MAX_VERTEX_SHADER_CONSTANTF);
+        return D3DERR_INVALIDCALL;
+    }
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DDevice_GetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
+    LeaveCriticalSection(&d3d8_cs);
+    return hr;
+}
+
+static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderDeclaration(LPDIRECT3DDEVICE8 iface, DWORD pVertexShader, void* pData, DWORD* pSizeOfData) {
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DVertexDeclaration8Impl *declaration;
+    IDirect3DVertexShader8Impl *shader;
+
+    TRACE("(%p) : pVertexShader 0x%08x, pData %p, *pSizeOfData %u\n", This, pVertexShader, pData, *pSizeOfData);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    shader = d3d8_get_object(&This->handle_table, pVertexShader - (VS_HIGHESTFIXEDFXF + 1));
+    LeaveCriticalSection(&d3d8_cs);
+    if (!shader)
+    {
+        WARN("Invalid handle (%#x) passed.\n", pVertexShader);
+        return D3DERR_INVALIDCALL;
+    }
     declaration = (IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration;
 
@@ -1796,5 +2059,4 @@
     if (!pData) {
         *pSizeOfData = declaration->elements_size;
-        LeaveCriticalSection(&d3d8_cs);
         return D3D_OK;
     }
@@ -1804,30 +2066,38 @@
      * That's not actually true. */
     if (*pSizeOfData < declaration->elements_size) {
+        return D3DERR_INVALIDCALL;
+    }
+
+    CopyMemory(pData, declaration->elements, declaration->elements_size);
+
+    return D3D_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD pVertexShader, void* pData, DWORD* pSizeOfData) {
+    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DVertexShader8Impl *shader = NULL;
+    HRESULT hr;
+
+    TRACE("(%p) : pVertexShader %#x, pData %p, pSizeOfData %p\n", This, pVertexShader, pData, pSizeOfData);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    shader = d3d8_get_object(&This->handle_table, pVertexShader - (VS_HIGHESTFIXEDFXF + 1));
+    if (!shader)
+    {
+        WARN("Invalid handle (%#x) passed.\n", pVertexShader);
         LeaveCriticalSection(&d3d8_cs);
         return D3DERR_INVALIDCALL;
     }
 
-    CopyMemory(pData, declaration->elements, declaration->elements_size);
-    LeaveCriticalSection(&d3d8_cs);
-
-    return D3D_OK;
-}
-
-static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD pVertexShader, void* pData, DWORD* pSizeOfData) {
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    IDirect3DVertexShader8Impl *shader = NULL;
-    HRESULT hr;
-
-    TRACE("(%p) : pVertexShader %#x, pData %p, pSizeOfData %p\n", This, pVertexShader, pData, pSizeOfData);
-
-    EnterCriticalSection(&d3d8_cs);
-    if (pVertexShader <= VS_HIGHESTFIXEDFXF || This->allocated_shader_handles <= pVertexShader - (VS_HIGHESTFIXEDFXF + 1)) {
-        ERR("Passed an invalid shader handle.\n");
+    if (!shader->wineD3DVertexShader)
+    {
         LeaveCriticalSection(&d3d8_cs);
-        return D3DERR_INVALIDCALL;
-    }
-
-    shader = This->shader_handles[pVertexShader - (VS_HIGHESTFIXEDFXF + 1)];
+        *pSizeOfData = 0;
+        return D3D_OK;
+    }
+
     hr = IWineD3DVertexShader_GetFunction(shader->wineD3DVertexShader, pData, pSizeOfData);
+
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1837,4 +2107,5 @@
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
     HRESULT hr;
+    IDirect3DIndexBuffer8Impl *ib = (IDirect3DIndexBuffer8Impl *)pIndexData;
     TRACE("(%p) Relay\n", This);
 
@@ -1848,5 +2119,6 @@
     IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, baseVertexIndex);
     hr = IWineD3DDevice_SetIndices(This->WineD3DDevice,
-            pIndexData ? ((IDirect3DIndexBuffer8Impl *)pIndexData)->wineD3DIndexBuffer : NULL);
+            ib ? ib->wineD3DIndexBuffer : NULL,
+            ib ? ib->format : WINED3DFMT_UNKNOWN);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1855,5 +2127,5 @@
 static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex) {
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    IWineD3DIndexBuffer *retIndexData = NULL;
+    IWineD3DBuffer *retIndexData = NULL;
     HRESULT rc = D3D_OK;
 
@@ -1869,6 +2141,6 @@
     rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
     if (SUCCEEDED(rc) && retIndexData) {
-        IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
-        IWineD3DIndexBuffer_Release(retIndexData);
+        IWineD3DBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
+        IWineD3DBuffer_Release(retIndexData);
     } else {
         if (FAILED(rc)) FIXME("Call to GetIndices failed\n");
@@ -1882,5 +2154,6 @@
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
     IDirect3DPixelShader8Impl *object;
-    HRESULT hrc = D3D_OK;
+    DWORD handle;
+    HRESULT hr;
 
     TRACE("(%p) : pFunction(%p), ppShader(%p)\n", This, pFunction, ppShader);
@@ -1890,40 +2163,45 @@
         return D3DERR_INVALIDCALL;
     }
+
     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
-
-    if (NULL == object) {
+    if (!object)
+    {
+        ERR("Failed to allocate memmory.\n");
         return E_OUTOFMEMORY;
-    } else {
-        EnterCriticalSection(&d3d8_cs);
-
-        object->ref    = 1;
-        object->lpVtbl = &Direct3DPixelShader8_Vtbl;
-        hrc = IWineD3DDevice_CreatePixelShader(This->WineD3DDevice, pFunction, &object->wineD3DPixelShader , (IUnknown *)object);
-        if (D3D_OK != hrc) {
-            FIXME("(%p) call to IWineD3DDevice_CreatePixelShader failed\n", This);
-            HeapFree(GetProcessHeap(), 0 , object);
-            *ppShader = 0;
-        } else {
-            shader_handle *handle = alloc_shader_handle(This);
-            if (!handle) {
-                ERR("Failed to allocate shader handle\n");
-                IDirect3DVertexShader8_Release((IUnknown *)object);
-                hrc = E_OUTOFMEMORY;
-            } else {
-                *handle = object;
-                object->handle = (handle - This->shader_handles) + VS_HIGHESTFIXEDFXF + 1;
-                *ppShader = object->handle;
-                TRACE("(%p) : returning %p (handle %#x)\n", This, object, *ppShader);
-            }
-        }
+    }
+
+    object->ref    = 1;
+    object->lpVtbl = &Direct3DPixelShader8_Vtbl;
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DDevice_CreatePixelShader(This->WineD3DDevice, pFunction,
+            &object->wineD3DPixelShader, (IUnknown *)object);
+    if (FAILED(hr))
+    {
         LeaveCriticalSection(&d3d8_cs);
-    }
-
-    return hrc;
+        FIXME("(%p) call to IWineD3DDevice_CreatePixelShader failed\n", This);
+        HeapFree(GetProcessHeap(), 0 , object);
+        *ppShader = 0;
+        return hr;
+    }
+
+    handle = d3d8_allocate_handle(&This->handle_table, object);
+    LeaveCriticalSection(&d3d8_cs);
+    if (handle == D3D8_INVALID_HANDLE)
+    {
+        ERR("Failed to allocate shader handle\n");
+        IDirect3DVertexShader8_Release((IUnknown *)object);
+        return E_OUTOFMEMORY;
+    }
+
+    *ppShader = object->handle = handle + VS_HIGHESTFIXEDFXF + 1;
+    TRACE("(%p) : returning %p (handle %#x)\n", This, object, *ppShader);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) {
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    IDirect3DPixelShader8Impl *shader = NULL;
+    IDirect3DPixelShader8Impl *shader;
     HRESULT hr;
 
@@ -1931,12 +2209,22 @@
 
     EnterCriticalSection(&d3d8_cs);
-    if (pShader > VS_HIGHESTFIXEDFXF && This->allocated_shader_handles > pShader - (VS_HIGHESTFIXEDFXF + 1)) {
-        shader = This->shader_handles[pShader - (VS_HIGHESTFIXEDFXF + 1)];
-    } else if (pShader) {
-        ERR("Trying to set an invalid handle.\n");
+
+    if (!pShader)
+    {
+        hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, NULL);
+        LeaveCriticalSection(&d3d8_cs);
+        return hr;
+    }
+
+    shader = d3d8_get_object(&This->handle_table, pShader - (VS_HIGHESTFIXEDFXF + 1));
+    if (!shader)
+    {
+        WARN("Invalid handle (%#x) passed.\n", pShader);
+        LeaveCriticalSection(&d3d8_cs);
+        return D3DERR_INVALIDCALL;
     }
 
     TRACE("(%p) : Setting shader %p\n", This, shader);
-    hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, shader == NULL ? NULL :shader->wineD3DPixelShader);
+    hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, shader->wineD3DPixelShader);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -1961,4 +2249,5 @@
         IWineD3DPixelShader_Release(object);
         *ppShader = d3d8_shader->handle;
+        IDirect3DPixelShader8_Release((IDirect3DPixelShader8 *)d3d8_shader);
     } else {
         *ppShader = 0;
@@ -1972,27 +2261,33 @@
 static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) {
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
+    IDirect3DPixelShader8Impl *shader;
+    IWineD3DPixelShader *cur = NULL;
 
     TRACE("(%p) : pShader %#x\n", This, pShader);
 
     EnterCriticalSection(&d3d8_cs);
-    if (pShader <= VS_HIGHESTFIXEDFXF || This->allocated_shader_handles <= pShader - (VS_HIGHESTFIXEDFXF + 1)) {
-        ERR("(%p) : Trying to delete an invalid handle\n", This);
+
+    shader = d3d8_free_handle(&This->handle_table, pShader - (VS_HIGHESTFIXEDFXF + 1));
+    if (!shader)
+    {
+        WARN("Invalid handle (%#x) passed.\n", pShader);
         LeaveCriticalSection(&d3d8_cs);
         return D3DERR_INVALIDCALL;
-    } else {
-        IWineD3DPixelShader *cur = NULL;
-        shader_handle *handle = &This->shader_handles[pShader - (VS_HIGHESTFIXEDFXF + 1)];
-        IDirect3DPixelShader8Impl *shader = *handle;
-
-        IWineD3DDevice_GetPixelShader(This->WineD3DDevice, &cur);
-        if(cur) {
-            if(cur == shader->wineD3DPixelShader) IDirect3DDevice8_SetPixelShader(iface, 0);
-            IWineD3DPixelShader_Release(cur);
-        }
-
-        while(IUnknown_Release((IUnknown *)shader));
-        free_shader_handle(This, handle);
-    }
-    LeaveCriticalSection(&d3d8_cs);
+    }
+
+    IWineD3DDevice_GetPixelShader(This->WineD3DDevice, &cur);
+
+    if (cur)
+    {
+        if (cur == shader->wineD3DPixelShader) IDirect3DDevice8_SetPixelShader(iface, 0);
+        IWineD3DPixelShader_Release(cur);
+    }
+
+    LeaveCriticalSection(&d3d8_cs);
+
+    if (IUnknown_Release((IUnknown *)shader))
+    {
+        ERR("Shader %p has references left, this shouldn't happen.\n", shader);
+    }
 
     return D3D_OK;
@@ -2005,5 +2300,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_SetPixelShaderConstantF(This->WineD3DDevice, Register, (CONST float *)pConstantData, ConstantCount);
+    hr = IWineD3DDevice_SetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -2016,5 +2311,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DDevice_GetPixelShaderConstantF(This->WineD3DDevice, Register, (float *)pConstantData, ConstantCount);
+    hr = IWineD3DDevice_GetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -2029,11 +2324,12 @@
 
     EnterCriticalSection(&d3d8_cs);
-    if (pPixelShader <= VS_HIGHESTFIXEDFXF || This->allocated_shader_handles <= pPixelShader - (VS_HIGHESTFIXEDFXF + 1)) {
-        ERR("Passed an invalid shader handle.\n");
+    shader = d3d8_get_object(&This->handle_table, pPixelShader - (VS_HIGHESTFIXEDFXF + 1));
+    if (!shader)
+    {
+        WARN("Invalid handle (%#x) passed.\n", pPixelShader);
         LeaveCriticalSection(&d3d8_cs);
         return D3DERR_INVALIDCALL;
     }
 
-    shader = This->shader_handles[pPixelShader - (VS_HIGHESTFIXEDFXF + 1)];
     hr = IWineD3DPixelShader_GetFunction(shader->wineD3DPixelShader, pData, pSizeOfData);
     LeaveCriticalSection(&d3d8_cs);
@@ -2089,5 +2385,5 @@
 static HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, UINT StreamNumber,IDirect3DVertexBuffer8** pStream,UINT* pStride) {
     IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
-    IWineD3DVertexBuffer *retStream = NULL;
+    IWineD3DBuffer *retStream = NULL;
     HRESULT rc = D3D_OK;
 
@@ -2101,6 +2397,6 @@
     rc = IWineD3DDevice_GetStreamSource(This->WineD3DDevice, StreamNumber, &retStream, 0 /* Offset in bytes */, pStride);
     if (rc == D3D_OK  && NULL != retStream) {
-        IWineD3DVertexBuffer_GetParent(retStream, (IUnknown **)pStream);
-        IWineD3DVertexBuffer_Release(retStream);
+        IWineD3DBuffer_GetParent(retStream, (IUnknown **)pStream);
+        IWineD3DBuffer_Release(retStream);
     }else{
         if (rc != D3D_OK){
@@ -2216,32 +2512,4 @@
 };
 
-/* Internal function called back during the CreateDevice to create a render target  */
-HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
-                                         WINED3DCUBEMAP_FACES Face, IWineD3DSurface **ppSurface,
-                                         HANDLE *pSharedHandle) {
-
-    HRESULT res = D3D_OK;
-    IDirect3DSurface8Impl *d3dSurface = NULL;
-    BOOL Lockable = TRUE;
-
-    if((WINED3DPOOL_DEFAULT == Pool && WINED3DUSAGE_DYNAMIC != Usage))
-        Lockable = FALSE;
-
-    TRACE("relay\n");
-    res = IDirect3DDevice8Impl_CreateSurface((IDirect3DDevice8 *)device, Width, Height, (D3DFORMAT)Format, Lockable, FALSE/*Discard*/, Level,  (IDirect3DSurface8 **)&d3dSurface, D3DRTYPE_SURFACE, Usage, Pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */);
-
-    if (SUCCEEDED(res)) {
-        *ppSurface = d3dSurface->wineD3DSurface;
-        d3dSurface->container = pSuperior;
-        IUnknown_Release(d3dSurface->parentDevice);
-        d3dSurface->parentDevice = NULL;
-        d3dSurface->forwardReference = pSuperior;
-    } else {
-        FIXME("(%p) IDirect3DDevice8_CreateSurface failed\n", device);
-    }
-    return res;
-}
-
 ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface) {
     IDirect3DSurface8Impl* surfaceParent;
@@ -2254,2 +2522,240 @@
     return IDirect3DSurface8_Release((IDirect3DSurface8*) surfaceParent);
 }
+
+/* IWineD3DDeviceParent IUnknown methods */
+
+static inline struct IDirect3DDevice8Impl *device_from_device_parent(IWineD3DDeviceParent *iface)
+{
+    return (struct IDirect3DDevice8Impl *)((char*)iface
+            - FIELD_OFFSET(struct IDirect3DDevice8Impl, device_parent_vtbl));
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_QueryInterface(IWineD3DDeviceParent *iface, REFIID riid, void **object)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    return IDirect3DDevice8Impl_QueryInterface((IDirect3DDevice8 *)This, riid, object);
+}
+
+static ULONG STDMETHODCALLTYPE device_parent_AddRef(IWineD3DDeviceParent *iface)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    return IDirect3DDevice8Impl_AddRef((IDirect3DDevice8 *)This);
+}
+
+static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    return IDirect3DDevice8Impl_Release((IDirect3DDevice8 *)This);
+}
+
+/* IWineD3DDeviceParent methods */
+
+static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceParent *iface, IWineD3DDevice *device)
+{
+    TRACE("iface %p, device %p\n", iface, device);
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, DWORD usage,
+        WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    IDirect3DSurface8Impl *d3d_surface;
+    BOOL lockable = TRUE;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n"
+            "\tpool %#x, level %u, face %u, surface %p\n",
+            iface, superior, width, height, format, usage, pool, level, face, surface);
+
+
+    if (pool == WINED3DPOOL_DEFAULT && !(usage & WINED3DUSAGE_DYNAMIC)) lockable = FALSE;
+
+    hr = IDirect3DDevice8Impl_CreateSurface((IDirect3DDevice8 *)This, width, height,
+            d3dformat_from_wined3dformat(format), lockable, FALSE /* Discard */, level,
+            (IDirect3DSurface8 **)&d3d_surface, D3DRTYPE_SURFACE, usage, pool,
+            D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateSurface failed, returning %#x\n", iface, hr);
+        return hr;
+    }
+
+    *surface = d3d_surface->wineD3DSurface;
+    d3d_surface->container = superior;
+    IUnknown_Release(d3d_surface->parentDevice);
+    d3d_surface->parentDevice = NULL;
+    d3d_surface->forwardReference = superior;
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality, BOOL lockable, IWineD3DSurface **surface)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    IDirect3DSurface8Impl *d3d_surface;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+            "\tmultisample_quality %u, lockable %u, surface %p\n",
+            iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface);
+
+    hr = IDirect3DDevice8_CreateRenderTarget((IDirect3DDevice8 *)This, width, height,
+            d3dformat_from_wined3dformat(format), multisample_type, lockable, (IDirect3DSurface8 **)&d3d_surface);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateRenderTarget failed, returning %#x\n", iface, hr);
+        return hr;
+    }
+
+    *surface = d3d_surface->wineD3DSurface;
+    d3d_surface->container = (IUnknown *)This;
+    d3d_surface->isImplicit = TRUE;
+    /* Implicit surfaces are created with an refcount of 0 */
+    IUnknown_Release((IUnknown *)d3d_surface);
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    IDirect3DSurface8Impl *d3d_surface;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+            "\tmultisample_quality %u, discard %u, surface %p\n",
+            iface, superior, width, height, format, multisample_type, multisample_quality, discard, surface);
+
+    hr = IDirect3DDevice8_CreateDepthStencilSurface((IDirect3DDevice8 *)This, width, height,
+            d3dformat_from_wined3dformat(format), multisample_type, (IDirect3DSurface8 **)&d3d_surface);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateDepthStencilSurface failed, returning %#x\n", iface, hr);
+        return hr;
+    }
+
+    *surface = d3d_surface->wineD3DSurface;
+    d3d_surface->container = (IUnknown *)This;
+    d3d_surface->isImplicit = TRUE;
+    /* Implicit surfaces are created with an refcount of 0 */
+    IUnknown_Release((IUnknown *)d3d_surface);
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, UINT depth, WINED3DFORMAT format,
+        WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    IDirect3DVolume8Impl *object;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
+            iface, superior, width, height, depth, format, pool, usage, volume);
+
+    /* Allocate the storage for the device */
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        FIXME("Allocation of memory failed\n");
+        *volume = NULL;
+        return D3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &Direct3DVolume8_Vtbl;
+    object->ref = 1;
+    hr = IWineD3DDevice_CreateVolume(This->WineD3DDevice, width, height, depth, usage,
+            format, pool, &object->wineD3DVolume, (IUnknown *)object);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateVolume failed, returning %#x\n", iface, hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *volume = NULL;
+        return hr;
+    }
+
+    *volume = object->wineD3DVolume;
+    object->container = superior;
+    object->forwardReference = superior;
+
+    TRACE("(%p) Created volume %p\n", iface, *volume);
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDeviceParent *iface,
+        WINED3DPRESENT_PARAMETERS *present_parameters, IWineD3DSwapChain **swapchain)
+{
+    struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
+    IDirect3DSwapChain8Impl *d3d_swapchain;
+    D3DPRESENT_PARAMETERS local_parameters;
+    HRESULT hr;
+
+    TRACE("iface %p, present_parameters %p, swapchain %p\n", iface, present_parameters, swapchain);
+
+    /* Copy the presentation parameters */
+    local_parameters.BackBufferWidth = present_parameters->BackBufferWidth;
+    local_parameters.BackBufferHeight = present_parameters->BackBufferHeight;
+    local_parameters.BackBufferFormat = d3dformat_from_wined3dformat(present_parameters->BackBufferFormat);
+    local_parameters.BackBufferCount = present_parameters->BackBufferCount;
+    local_parameters.MultiSampleType = present_parameters->MultiSampleType;
+    local_parameters.SwapEffect = present_parameters->SwapEffect;
+    local_parameters.hDeviceWindow = present_parameters->hDeviceWindow;
+    local_parameters.Windowed = present_parameters->Windowed;
+    local_parameters.EnableAutoDepthStencil = present_parameters->EnableAutoDepthStencil;
+    local_parameters.AutoDepthStencilFormat = d3dformat_from_wined3dformat(present_parameters->AutoDepthStencilFormat);
+    local_parameters.Flags = present_parameters->Flags;
+    local_parameters.FullScreen_RefreshRateInHz = present_parameters->FullScreen_RefreshRateInHz;
+    local_parameters.FullScreen_PresentationInterval = present_parameters->PresentationInterval;
+
+    hr = IDirect3DDevice8_CreateAdditionalSwapChain((IDirect3DDevice8 *)This,
+            &local_parameters, (IDirect3DSwapChain8 **)&d3d_swapchain);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateAdditionalSwapChain failed, returning %#x\n", iface, hr);
+        *swapchain = NULL;
+        return hr;
+    }
+
+    *swapchain = d3d_swapchain->wineD3DSwapChain;
+    IUnknown_Release(d3d_swapchain->parentDevice);
+    d3d_swapchain->parentDevice = NULL;
+
+    /* Copy back the presentation parameters */
+    present_parameters->BackBufferWidth = local_parameters.BackBufferWidth;
+    present_parameters->BackBufferHeight = local_parameters.BackBufferHeight;
+    present_parameters->BackBufferFormat = wined3dformat_from_d3dformat(local_parameters.BackBufferFormat);
+    present_parameters->BackBufferCount = local_parameters.BackBufferCount;
+    present_parameters->MultiSampleType = local_parameters.MultiSampleType;
+    present_parameters->SwapEffect = local_parameters.SwapEffect;
+    present_parameters->hDeviceWindow = local_parameters.hDeviceWindow;
+    present_parameters->Windowed = local_parameters.Windowed;
+    present_parameters->EnableAutoDepthStencil = local_parameters.EnableAutoDepthStencil;
+    present_parameters->AutoDepthStencilFormat = wined3dformat_from_d3dformat(local_parameters.AutoDepthStencilFormat);
+    present_parameters->Flags = local_parameters.Flags;
+    present_parameters->FullScreen_RefreshRateInHz = local_parameters.FullScreen_RefreshRateInHz;
+    present_parameters->PresentationInterval = local_parameters.FullScreen_PresentationInterval;
+
+    return hr;
+}
+
+const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl =
+{
+    /* IUnknown methods */
+    device_parent_QueryInterface,
+    device_parent_AddRef,
+    device_parent_Release,
+    /* IWineD3DDeviceParent methods */
+    device_parent_WineD3DDeviceCreated,
+    device_parent_CreateSurface,
+    device_parent_CreateRenderTarget,
+    device_parent_CreateDepthStencilSurface,
+    device_parent_CreateVolume,
+    device_parent_CreateSwapChain,
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/directx.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/directx.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/directx.c	(revision 19678)
@@ -81,5 +81,7 @@
     if (ref == 0) {
         TRACE("Releasing wined3d %p\n", This->WineD3D);
+        EnterCriticalSection(&d3d8_cs);
         IWineD3D_Release(This->WineD3D);
+        LeaveCriticalSection(&d3d8_cs);
         HeapFree(GetProcessHeap(), 0, This);
     }
@@ -157,4 +159,7 @@
     hr = IWineD3D_EnumAdapterModes(This->WineD3D, Adapter, WINED3DFMT_UNKNOWN, Mode, (WINED3DDISPLAYMODE *) pMode);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
+
     return hr;
 }
@@ -168,4 +173,7 @@
     hr = IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) pMode);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
+
     return hr;
 }
@@ -179,6 +187,6 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, DisplayFormat,
-                                    BackBufferFormat, Windowed);
+    hr = IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, wined3dformat_from_d3dformat(DisplayFormat),
+            wined3dformat_from_d3dformat(BackBufferFormat), Windowed);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -190,9 +198,21 @@
     IDirect3D8Impl *This = (IDirect3D8Impl *)iface;
     HRESULT hr;
+    WINED3DRESOURCETYPE WineD3DRType;
     TRACE("(%p)->(%d, %d, %d, %08x, %d, %d)\n", This, Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat);
 
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, AdapterFormat,
-                                    Usage, RType, CheckFormat, SURFACE_OPENGL);
+    switch(RType) {
+        case D3DRTYPE_VERTEXBUFFER:
+        case D3DRTYPE_INDEXBUFFER:
+            WineD3DRType = WINED3DRTYPE_BUFFER;
+            break;
+
+        default:
+            WineD3DRType = RType;
+            break;
+    }
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat),
+            Usage, WineD3DRType, wined3dformat_from_d3dformat(CheckFormat), SURFACE_OPENGL);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -207,6 +227,6 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType, SurfaceFormat,
-                                               Windowed, (WINED3DMULTISAMPLE_TYPE) MultiSampleType, NULL);
+    hr = IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType,
+            wined3dformat_from_d3dformat(SurfaceFormat), Windowed, (WINED3DMULTISAMPLE_TYPE) MultiSampleType, NULL);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -221,6 +241,7 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType, AdapterFormat,
-                                           RenderTargetFormat, DepthStencilFormat);
+    hr = IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType,
+            wined3dformat_from_d3dformat(AdapterFormat), wined3dformat_from_d3dformat(RenderTargetFormat),
+            wined3dformat_from_d3dformat(DepthStencilFormat));
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -254,4 +275,5 @@
         pCaps->VertexShaderVersion = D3DVS_VERSION(1,1);
     }
+    pCaps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);
 
     TRACE("(%p) returning %p\n", This, pCaps);
@@ -268,29 +290,4 @@
     LeaveCriticalSection(&d3d8_cs);
     return ret;
-}
-
-/* Internal function called back during the CreateDevice to create a render target */
-HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Lockable,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
-    HRESULT res = D3D_OK;
-    IDirect3DSurface8Impl *d3dSurface = NULL;
-
-    TRACE("(%p) call back\n", device);
-    res = IDirect3DDevice8_CreateRenderTarget((IDirect3DDevice8 *)device, Width, Height, 
-                                         (D3DFORMAT)Format, MultiSample, Lockable, 
-                                         (IDirect3DSurface8 **)&d3dSurface);
-
-    if (SUCCEEDED(res)) {
-        *ppSurface = d3dSurface->wineD3DSurface;
-        d3dSurface->container = device;
-        d3dSurface->isImplicit = TRUE;
-        /* Implicit surfaces are created with an refcount of 0 */
-        IUnknown_Release((IUnknown *)d3dSurface);
-    } else {
-        *ppSurface = NULL;
-    }
-    return res;
 }
 
@@ -305,56 +302,4 @@
 }
 
-/* Callback for creating the implicit swapchain when the device is created */
-static HRESULT WINAPI D3D8CB_CreateAdditionalSwapChain(IUnknown *device,
-                                                WINED3DPRESENT_PARAMETERS* pPresentationParameters,
-                                                IWineD3DSwapChain ** ppSwapChain){
-    HRESULT res = D3D_OK;
-    IDirect3DSwapChain8Impl *d3dSwapChain = NULL;
-    D3DPRESENT_PARAMETERS localParameters;
-    TRACE("(%p) call back\n", device);
-
-    /* Copy the presentation parameters */
-    localParameters.BackBufferWidth                             = pPresentationParameters->BackBufferWidth;
-    localParameters.BackBufferHeight                            = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                            = pPresentationParameters->BackBufferFormat;
-    localParameters.BackBufferCount                             = pPresentationParameters->BackBufferCount;
-    localParameters.MultiSampleType                             = pPresentationParameters->MultiSampleType;
-    localParameters.SwapEffect                                  = pPresentationParameters->SwapEffect;
-    localParameters.hDeviceWindow                               = pPresentationParameters->hDeviceWindow;
-    localParameters.Windowed                                    = pPresentationParameters->Windowed;
-    localParameters.EnableAutoDepthStencil                      = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat                      = pPresentationParameters->AutoDepthStencilFormat;
-    localParameters.Flags                                       = pPresentationParameters->Flags;
-    localParameters.FullScreen_RefreshRateInHz                  = pPresentationParameters->FullScreen_RefreshRateInHz;
-    localParameters.FullScreen_PresentationInterval             = pPresentationParameters->PresentationInterval;
-
-    res = IDirect3DDevice8_CreateAdditionalSwapChain((IDirect3DDevice8 *)device, &localParameters, (IDirect3DSwapChain8 **)&d3dSwapChain);
-
-    /* Copy back the presentation parameters */
-    pPresentationParameters->BackBufferWidth                    = localParameters.BackBufferWidth;
-    pPresentationParameters->BackBufferHeight                   = localParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat                   = localParameters.BackBufferFormat;
-    pPresentationParameters->BackBufferCount                    = localParameters.BackBufferCount;
-    pPresentationParameters->MultiSampleType                    = localParameters.MultiSampleType;
-    pPresentationParameters->SwapEffect                         = localParameters.SwapEffect;
-    pPresentationParameters->hDeviceWindow                      = localParameters.hDeviceWindow;
-    pPresentationParameters->Windowed                           = localParameters.Windowed;
-    pPresentationParameters->EnableAutoDepthStencil             = localParameters.EnableAutoDepthStencil;
-    pPresentationParameters->AutoDepthStencilFormat             = localParameters.AutoDepthStencilFormat;
-    pPresentationParameters->Flags                              = localParameters.Flags;
-    pPresentationParameters->FullScreen_RefreshRateInHz         = localParameters.FullScreen_RefreshRateInHz;
-    pPresentationParameters->PresentationInterval               = localParameters.FullScreen_PresentationInterval;
-
-    if (SUCCEEDED(res)) {
-        *ppSwapChain = d3dSwapChain->wineD3DSwapChain;
-        IUnknown_Release(d3dSwapChain->parentDevice);
-        d3dSwapChain->parentDevice = NULL;
-    } else {
-        *ppSwapChain = NULL;
-    }
-
-    return res;
-}
-
 ULONG WINAPI D3D8CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain) {
     IUnknown* swapChainParent;
@@ -364,25 +309,4 @@
     IUnknown_Release(swapChainParent);
     return IUnknown_Release(swapChainParent);
-}
-
-/* Internal function called back during the CreateDevice to create a render target */
-HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Discard,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
-    HRESULT res = D3D_OK;
-    IDirect3DSurface8Impl *d3dSurface = NULL;
-    TRACE("(%p) call back\n", device);
-
-    res = IDirect3DDevice8_CreateDepthStencilSurface((IDirect3DDevice8 *)device, Width, Height, 
-                                         (D3DFORMAT)Format, MultiSample, (IDirect3DSurface8 **)&d3dSurface);
-    if (SUCCEEDED(res)) {
-        *ppSurface = d3dSurface->wineD3DSurface;
-        d3dSurface->container = device;
-        d3dSurface->isImplicit = TRUE;
-        /* Implicit surfaces are created with an refcount of 0 */
-        IUnknown_Release((IUnknown *)d3dSurface);
-    }
-    return res;
 }
 
@@ -422,12 +346,15 @@
 
     object->lpVtbl = &Direct3DDevice8_Vtbl;
+    object->device_parent_vtbl = &d3d8_wined3d_device_parent_vtbl;
     object->ref = 1;
-    object->shader_handles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, INITIAL_SHADER_HANDLE_TABLE_SIZE * sizeof(shader_handle));
-    object->shader_handle_table_size = INITIAL_SHADER_HANDLE_TABLE_SIZE;
+    object->handle_table.entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
+            D3D8_INITIAL_HANDLE_TABLE_SIZE * sizeof(*object->handle_table.entries));
+    object->handle_table.table_size = D3D8_INITIAL_HANDLE_TABLE_SIZE;
     *ppReturnedDeviceInterface = (IDirect3DDevice8 *)object;
 
     /* Allocate an associated WineD3DDevice object */
     EnterCriticalSection(&d3d8_cs);
-    hr =IWineD3D_CreateDevice(This->WineD3D, Adapter, DeviceType, hFocusWindow, BehaviourFlags, &object->WineD3DDevice, (IUnknown *)object);
+    hr = IWineD3D_CreateDevice(This->WineD3D, Adapter, DeviceType, hFocusWindow, BehaviourFlags,
+            (IUnknown *)object, (IWineD3DDeviceParent *)&object->device_parent_vtbl, &object->WineD3DDevice);
 
     if (hr != D3D_OK) {
@@ -442,5 +369,5 @@
     localParameters.BackBufferWidth                             = pPresentationParameters->BackBufferWidth;
     localParameters.BackBufferHeight                            = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                            = pPresentationParameters->BackBufferFormat;
+    localParameters.BackBufferFormat                            = wined3dformat_from_d3dformat(pPresentationParameters->BackBufferFormat);
     localParameters.BackBufferCount                             = pPresentationParameters->BackBufferCount;
     localParameters.MultiSampleType                             = pPresentationParameters->MultiSampleType;
@@ -450,5 +377,5 @@
     localParameters.Windowed                                    = pPresentationParameters->Windowed;
     localParameters.EnableAutoDepthStencil                      = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat                      = pPresentationParameters->AutoDepthStencilFormat;
+    localParameters.AutoDepthStencilFormat                      = wined3dformat_from_d3dformat(pPresentationParameters->AutoDepthStencilFormat);
     localParameters.Flags                                       = pPresentationParameters->Flags;
     localParameters.FullScreen_RefreshRateInHz                  = pPresentationParameters->FullScreen_RefreshRateInHz;
@@ -460,10 +387,10 @@
     }
 
-    hr = IWineD3DDevice_Init3D(object->WineD3DDevice, &localParameters, D3D8CB_CreateAdditionalSwapChain);
+    hr = IWineD3DDevice_Init3D(object->WineD3DDevice, &localParameters);
     LeaveCriticalSection(&d3d8_cs);
 
     pPresentationParameters->BackBufferWidth                    = localParameters.BackBufferWidth;
     pPresentationParameters->BackBufferHeight                   = localParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat                   = localParameters.BackBufferFormat;
+    pPresentationParameters->BackBufferFormat                   = d3dformat_from_wined3dformat(localParameters.BackBufferFormat);
     pPresentationParameters->BackBufferCount                    = localParameters.BackBufferCount;
     pPresentationParameters->MultiSampleType                    = localParameters.MultiSampleType;
@@ -472,5 +399,5 @@
     pPresentationParameters->Windowed                           = localParameters.Windowed;
     pPresentationParameters->EnableAutoDepthStencil             = localParameters.EnableAutoDepthStencil;
-    pPresentationParameters->AutoDepthStencilFormat             = localParameters.AutoDepthStencilFormat;
+    pPresentationParameters->AutoDepthStencilFormat             = d3dformat_from_wined3dformat(localParameters.AutoDepthStencilFormat);
     pPresentationParameters->Flags                              = localParameters.Flags;
     pPresentationParameters->FullScreen_RefreshRateInHz         = localParameters.FullScreen_RefreshRateInHz;
@@ -487,5 +414,7 @@
     if(!object->decls) {
         ERR("Out of memory\n");
+        EnterCriticalSection(&d3d8_cs);
         IWineD3DDevice_Release(object->WineD3DDevice);
+        LeaveCriticalSection(&d3d8_cs);
         HeapFree(GetProcessHeap(), 0, object);
         *ppReturnedDeviceInterface = NULL;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/indexbuffer.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/indexbuffer.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/indexbuffer.c	(revision 19678)
@@ -67,5 +67,5 @@
     if (ref == 0) {
         EnterCriticalSection(&d3d8_cs);
-        IWineD3DIndexBuffer_Release(This->wineD3DIndexBuffer);
+        IWineD3DBuffer_Release(This->wineD3DIndexBuffer);
         LeaveCriticalSection(&d3d8_cs);
         IUnknown_Release(This->parentDevice);
@@ -78,9 +78,15 @@
 static HRESULT WINAPI IDirect3DIndexBuffer8Impl_GetDevice(LPDIRECT3DINDEXBUFFER8 iface, IDirect3DDevice8 **ppDevice) {
     IDirect3DIndexBuffer8Impl *This = (IDirect3DIndexBuffer8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DBuffer_GetDevice(This->wineD3DIndexBuffer, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -93,5 +99,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DIndexBuffer_SetPrivateData(This->wineD3DIndexBuffer, refguid, pData, SizeOfData, Flags);
+    hr = IWineD3DBuffer_SetPrivateData(This->wineD3DIndexBuffer, refguid, pData, SizeOfData, Flags);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -104,5 +110,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DIndexBuffer_GetPrivateData(This->wineD3DIndexBuffer, refguid, pData, pSizeOfData);
+    hr = IWineD3DBuffer_GetPrivateData(This->wineD3DIndexBuffer, refguid, pData, pSizeOfData);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -115,5 +121,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DIndexBuffer_FreePrivateData(This->wineD3DIndexBuffer, refguid);
+    hr = IWineD3DBuffer_FreePrivateData(This->wineD3DIndexBuffer, refguid);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -126,5 +132,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    ret = IWineD3DIndexBuffer_SetPriority(This->wineD3DIndexBuffer, PriorityNew);
+    ret = IWineD3DBuffer_SetPriority(This->wineD3DIndexBuffer, PriorityNew);
     LeaveCriticalSection(&d3d8_cs);
     return ret;
@@ -137,5 +143,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    ret = IWineD3DIndexBuffer_GetPriority(This->wineD3DIndexBuffer);
+    ret = IWineD3DBuffer_GetPriority(This->wineD3DIndexBuffer);
     LeaveCriticalSection(&d3d8_cs);
     return ret;
@@ -147,5 +153,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    IWineD3DIndexBuffer_PreLoad(This->wineD3DIndexBuffer);
+    IWineD3DBuffer_PreLoad(This->wineD3DIndexBuffer);
     LeaveCriticalSection(&d3d8_cs);
 }
@@ -153,11 +159,7 @@
 static D3DRESOURCETYPE WINAPI IDirect3DIndexBuffer8Impl_GetType(LPDIRECT3DINDEXBUFFER8 iface) {
     IDirect3DIndexBuffer8Impl *This = (IDirect3DIndexBuffer8Impl *)iface;
-    D3DRESOURCETYPE type;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    type = IWineD3DIndexBuffer_GetType(This->wineD3DIndexBuffer);
-    LeaveCriticalSection(&d3d8_cs);
-    return type;
+    TRACE("(%p)\n", This);
+
+    return D3DRTYPE_INDEXBUFFER;
 }
 
@@ -169,5 +171,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DIndexBuffer_Lock(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, ppbData, Flags);
+    hr = IWineD3DBuffer_Map(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, ppbData, Flags);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -180,5 +182,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DIndexBuffer_Unlock(This->wineD3DIndexBuffer);
+    hr = IWineD3DBuffer_Unmap(This->wineD3DIndexBuffer);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -188,9 +190,19 @@
     IDirect3DIndexBuffer8Impl *This = (IDirect3DIndexBuffer8Impl *)iface;
     HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DIndexBuffer_GetDesc(This->wineD3DIndexBuffer, (WINED3DINDEXBUFFER_DESC *) pDesc);
-    LeaveCriticalSection(&d3d8_cs);
+    WINED3DBUFFER_DESC desc;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DBuffer_GetDesc(This->wineD3DIndexBuffer, &desc);
+    LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) {
+        pDesc->Format = d3dformat_from_wined3dformat(This->format);
+        pDesc->Type = D3DRTYPE_INDEXBUFFER;
+        pDesc->Usage = desc.Usage;
+        pDesc->Pool = desc.Pool;
+        pDesc->Size = desc.Size;
+    }
+
     return hr;
 }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/pixelshader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/pixelshader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/pixelshader.c	(revision 19678)
@@ -66,30 +66,11 @@
 
     if (ref == 0) {
+        EnterCriticalSection(&d3d8_cs);
         IWineD3DPixelShader_Release(This->wineD3DPixelShader);
+        LeaveCriticalSection(&d3d8_cs);
         HeapFree(GetProcessHeap(), 0, This);
     }
     return ref;
 }
-
-/* IDirect3DPixelShader8 Interface follow: */
-static HRESULT WINAPI IDirect3DPixelShader8Impl_GetDevice(IDirect3DPixelShader8 *iface, IDirect3DDevice8 **ppDevice) {
-    IDirect3DPixelShader8Impl *This = (IDirect3DPixelShader8Impl *)iface;
-    IWineD3DDevice *myDevice = NULL;
-
-    TRACE("(%p) : Relay\n", This);
-
-    IWineD3DPixelShader_GetDevice(This->wineD3DPixelShader, &myDevice);
-    IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice);
-    IWineD3DDevice_Release(myDevice);
-    TRACE("(%p) returning (%p)\n", This, *ppDevice);
-    return D3D_OK;
-}
-
-static HRESULT WINAPI IDirect3DPixelShader8Impl_GetFunction(IDirect3DPixelShader8 *iface, VOID *pData, UINT *pSizeOfData) {
-    IDirect3DPixelShader8Impl *This = (IDirect3DPixelShader8Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DPixelShader_GetFunction(This->wineD3DPixelShader, pData, pSizeOfData);
-}
-
 
 const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl =
@@ -99,6 +80,3 @@
     IDirect3DPixelShader8Impl_AddRef,
     IDirect3DPixelShader8Impl_Release,
-    /* IDirect3DPixelShader8 */
-    IDirect3DPixelShader8Impl_GetDevice,
-    IDirect3DPixelShader8Impl_GetFunction
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/stateblock.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/stateblock.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/stateblock.c	(revision 19678)
@@ -68,5 +68,7 @@
 
     if (ref == 0) {
+        EnterCriticalSection(&d3d8_cs);
         IWineD3DStateBlock_Release(This->wineD3DStateBlock);
+        LeaveCriticalSection(&d3d8_cs);
         HeapFree(GetProcessHeap(), 0, This);
     }
@@ -77,18 +79,51 @@
 static HRESULT WINAPI IDirect3DStateBlock8Impl_GetDevice(IDirect3DStateBlock8 *iface, IDirect3DDevice8 **ppDevice) {
     IDirect3DStateBlock8Impl *This = (IDirect3DStateBlock8Impl *)iface;
-    TRACE("(%p) Relay\n", This); 
-    return IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    hr = IWineD3DStateBlock_GetDevice(This->wineD3DStateBlock, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
+
+    LeaveCriticalSection(&d3d8_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DStateBlock8Impl_Capture(IDirect3DStateBlock8 *iface) {
     IDirect3DStateBlock8Impl *This = (IDirect3DStateBlock8Impl *)iface;
-    TRACE("(%p) Relay\n", This); 
-    return IWineD3DStateBlock_Capture(This->wineD3DStateBlock);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    hr = IWineD3DStateBlock_Capture(This->wineD3DStateBlock);
+
+    LeaveCriticalSection(&d3d8_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DStateBlock8Impl_Apply(IDirect3DStateBlock8 *iface) {
     IDirect3DStateBlock8Impl *This = (IDirect3DStateBlock8Impl *)iface;
-    TRACE("(%p) Relay\n", This); 
-    return IWineD3DStateBlock_Apply(This->wineD3DStateBlock);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+
+    hr = IWineD3DStateBlock_Apply(This->wineD3DStateBlock);
+
+    LeaveCriticalSection(&d3d8_cs);
+
+    return hr;
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/surface.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/surface.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/surface.c	(revision 19678)
@@ -100,9 +100,15 @@
 static HRESULT WINAPI IDirect3DSurface8Impl_GetDevice(LPDIRECT3DSURFACE8 iface, IDirect3DDevice8 **ppDevice) {
     IDirect3DSurface8Impl *This = (IDirect3DSurface8Impl *)iface;
+    IWineD3DDevice *wined3d_device;
     HRESULT hr;
     TRACE("(%p)->(%p)\n", This, ppDevice);
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
+    hr = IWineD3DSurface_GetDevice(This->wineD3DSurface, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -177,4 +183,7 @@
     hr = IWineD3DSurface_GetDesc(This->wineD3DSurface, &wined3ddesc);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(pDesc->Format);
+
     return hr;
 }
@@ -216,5 +225,9 @@
     hr = IWineD3DSurface_UnlockRect(This->wineD3DSurface);
     LeaveCriticalSection(&d3d8_cs);
-    return hr;
+    switch(hr)
+    {
+        case WINEDDERR_NOTLOCKED:       return D3DERR_INVALIDCALL;
+        default:                        return hr;
+    }
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/texture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/texture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/texture.c	(revision 19678)
@@ -79,8 +79,14 @@
 static HRESULT WINAPI IDirect3DTexture8Impl_GetDevice(LPDIRECT3DTEXTURE8 iface, IDirect3DDevice8 **ppDevice) {
     IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-    EnterCriticalSection(&d3d8_cs);
-    hr = IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+    TRACE("(%p) Relay\n", This);
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DTexture_GetDevice(This->wineD3DTexture, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -218,4 +224,7 @@
     hr = IWineD3DTexture_GetLevelDesc(This->wineD3DTexture, Level, &wined3ddesc);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(pDesc->Format);
+
     return hr;
 }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexbuffer.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexbuffer.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexbuffer.c	(revision 19678)
@@ -68,5 +68,5 @@
     if (ref == 0) {
         EnterCriticalSection(&d3d8_cs);
-        IWineD3DVertexBuffer_Release(This->wineD3DVertexBuffer);
+        IWineD3DBuffer_Release(This->wineD3DVertexBuffer);
         LeaveCriticalSection(&d3d8_cs);
         IUnknown_Release(This->parentDevice);
@@ -80,9 +80,15 @@
 static HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetDevice(LPDIRECT3DVERTEXBUFFER8 iface, IDirect3DDevice8 **ppDevice) {
     IDirect3DVertexBuffer8Impl *This = (IDirect3DVertexBuffer8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DBuffer_GetDevice(This->wineD3DVertexBuffer, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -95,5 +101,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DVertexBuffer_SetPrivateData(This->wineD3DVertexBuffer, refguid, pData, SizeOfData, Flags);
+    hr = IWineD3DBuffer_SetPrivateData(This->wineD3DVertexBuffer, refguid, pData, SizeOfData, Flags);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -106,5 +112,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DVertexBuffer_GetPrivateData(This->wineD3DVertexBuffer, refguid, pData, pSizeOfData);
+    hr = IWineD3DBuffer_GetPrivateData(This->wineD3DVertexBuffer, refguid, pData, pSizeOfData);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -117,5 +123,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DVertexBuffer_FreePrivateData(This->wineD3DVertexBuffer, refguid);
+    hr = IWineD3DBuffer_FreePrivateData(This->wineD3DVertexBuffer, refguid);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -128,5 +134,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    ret = IWineD3DVertexBuffer_SetPriority(This->wineD3DVertexBuffer, PriorityNew);
+    ret = IWineD3DBuffer_SetPriority(This->wineD3DVertexBuffer, PriorityNew);
     LeaveCriticalSection(&d3d8_cs);
     return ret;
@@ -139,5 +145,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    ret = IWineD3DVertexBuffer_GetPriority(This->wineD3DVertexBuffer);
+    ret = IWineD3DBuffer_GetPriority(This->wineD3DVertexBuffer);
     LeaveCriticalSection(&d3d8_cs);
     return ret;
@@ -149,5 +155,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    IWineD3DVertexBuffer_PreLoad(This->wineD3DVertexBuffer);
+    IWineD3DBuffer_PreLoad(This->wineD3DVertexBuffer);
     LeaveCriticalSection(&d3d8_cs);
 }
@@ -155,11 +161,7 @@
 static D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer8Impl_GetType(LPDIRECT3DVERTEXBUFFER8 iface) {
     IDirect3DVertexBuffer8Impl *This = (IDirect3DVertexBuffer8Impl *)iface;
-    D3DRESOURCETYPE type;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    type = IWineD3DVertexBuffer_GetType(This->wineD3DVertexBuffer);
-    LeaveCriticalSection(&d3d8_cs);
-    return type;
+    TRACE("(%p)\n", This);
+
+    return D3DRTYPE_VERTEXBUFFER;
 }
 
@@ -171,5 +173,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DVertexBuffer_Lock(This->wineD3DVertexBuffer, OffsetToLock, SizeToLock, ppbData, Flags);
+    hr = IWineD3DBuffer_Map(This->wineD3DVertexBuffer, OffsetToLock, SizeToLock, ppbData, Flags);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -182,5 +184,5 @@
 
     EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DVertexBuffer_Unlock(This->wineD3DVertexBuffer);
+    hr = IWineD3DBuffer_Unmap(This->wineD3DVertexBuffer);
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -190,9 +192,20 @@
     IDirect3DVertexBuffer8Impl *This = (IDirect3DVertexBuffer8Impl *)iface;
     HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IWineD3DVertexBuffer_GetDesc(This->wineD3DVertexBuffer, (WINED3DVERTEXBUFFER_DESC *) pDesc);
-    LeaveCriticalSection(&d3d8_cs);
+    WINED3DBUFFER_DESC desc;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DBuffer_GetDesc(This->wineD3DVertexBuffer, &desc);
+    LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) {
+        pDesc->Type = D3DRTYPE_VERTEXBUFFER;
+        pDesc->Usage = desc.Usage;
+        pDesc->Pool = desc.Pool;
+        pDesc->Size = desc.Size;
+        pDesc->FVF = This->fvf;
+        pDesc->Format = D3DFMT_VERTEXDATA;
+    }
+
     return hr;
 }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexdeclaration.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexdeclaration.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexdeclaration.c	(revision 19678)
@@ -71,5 +71,7 @@
 
     if (!ref_count) {
+        EnterCriticalSection(&d3d8_cs);
         IWineD3DVertexDeclaration_Release(This->wined3d_vertex_declaration);
+        LeaveCriticalSection(&d3d8_cs);
         HeapFree(GetProcessHeap(), 0, This->elements);
         HeapFree(GetProcessHeap(), 0, This);
@@ -236,5 +238,6 @@
 
 /* NOTE: Make sure these are in the correct numerical order. (see /include/wined3d_types.h) */
-static const size_t wined3d_type_sizes[WINED3DDECLTYPE_UNUSED] = {
+static const size_t wined3d_type_sizes[] =
+{
     /*WINED3DDECLTYPE_FLOAT1*/    1 * sizeof(float),
     /*WINED3DDECLTYPE_FLOAT2*/    2 * sizeof(float),
@@ -254,4 +257,25 @@
     /*WINED3DDECLTYPE_FLOAT16_2*/ 2 * sizeof(short int),
     /*WINED3DDECLTYPE_FLOAT16_4*/ 4 * sizeof(short int)
+};
+
+static const WINED3DFORMAT wined3d_format_lookup[] =
+{
+    /*WINED3DDECLTYPE_FLOAT1*/    WINED3DFMT_R32_FLOAT,
+    /*WINED3DDECLTYPE_FLOAT2*/    WINED3DFMT_R32G32_FLOAT,
+    /*WINED3DDECLTYPE_FLOAT3*/    WINED3DFMT_R32G32B32_FLOAT,
+    /*WINED3DDECLTYPE_FLOAT4*/    WINED3DFMT_R32G32B32A32_FLOAT,
+    /*WINED3DDECLTYPE_D3DCOLOR*/  WINED3DFMT_A8R8G8B8,
+    /*WINED3DDECLTYPE_UBYTE4*/    WINED3DFMT_R8G8B8A8_UINT,
+    /*WINED3DDECLTYPE_SHORT2*/    WINED3DFMT_R16G16_SINT,
+    /*WINED3DDECLTYPE_SHORT4*/    WINED3DFMT_R16G16B16A16_SINT,
+    /*WINED3DDECLTYPE_UBYTE4N*/   WINED3DFMT_R8G8B8A8_UNORM,
+    /*WINED3DDECLTYPE_SHORT2N*/   WINED3DFMT_R16G16_SNORM,
+    /*WINED3DDECLTYPE_SHORT4N*/   WINED3DFMT_R16G16B16A16_SNORM,
+    /*WINED3DDECLTYPE_USHORT2N*/  WINED3DFMT_R16G16_UNORM,
+    /*WINED3DDECLTYPE_USHORT4N*/  WINED3DFMT_R16G16B16A16_UNORM,
+    /*WINED3DDECLTYPE_UDEC3*/     WINED3DFMT_R10G10B10A2_UINT,
+    /*WINED3DDECLTYPE_DEC3N*/     WINED3DFMT_R10G10B10A2_SNORM,
+    /*WINED3DDECLTYPE_FLOAT16_2*/ WINED3DFMT_R16G16_FLOAT,
+    /*WINED3DDECLTYPE_FLOAT16_4*/ WINED3DFMT_R16G16B16A16_FLOAT,
 };
 
@@ -310,11 +334,11 @@
 
             element = *wined3d_elements + element_count++;
-            element->Stream = stream;
-            element->Method = WINED3DDECLMETHOD_DEFAULT;
-            element->Usage = wined3d_usage_lookup[reg].usage;
-            element->UsageIndex = wined3d_usage_lookup[reg].usage_idx;
-            element->Type = type;
-            element->Offset = offset;
-            element->Reg = reg;
+            element->format = wined3d_format_lookup[type];
+            element->input_slot = stream;
+            element->offset = offset;
+            element->output_slot = reg;
+            element->method = WINED3DDECLMETHOD_DEFAULT;
+            element->usage = wined3d_usage_lookup[reg].usage;
+            element->usage_idx = wined3d_usage_lookup[reg].usage_idx;
 
             offset += wined3d_type_sizes[type];
@@ -332,9 +356,4 @@
     }
 
-    /* END */
-    element = *wined3d_elements + element_count++;
-    element->Stream = 0xFF;
-    element->Type = WINED3DDECLTYPE_UNUSED;
-
     *d3d8_elements_size = (++token - d3d8_elements) * sizeof(DWORD);
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexshader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexshader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/vertexshader.c	(revision 19678)
@@ -67,35 +67,14 @@
     if (ref == 0) {
         IDirect3DVertexDeclaration8_Release(This->vertex_declaration);
-        IWineD3DVertexShader_Release(This->wineD3DVertexShader);
+        if (This->wineD3DVertexShader)
+        {
+            EnterCriticalSection(&d3d8_cs);
+            IWineD3DVertexShader_Release(This->wineD3DVertexShader);
+            LeaveCriticalSection(&d3d8_cs);
+        }
         HeapFree(GetProcessHeap(), 0, This);
     }
     return ref;
 }
-
-/* IDirect3DVertexShader8 Interface follow: */
-static HRESULT WINAPI IDirect3DVertexShader8Impl_GetDevice(IDirect3DVertexShader8 *iface, IDirect3DDevice8** ppDevice) {
-    IDirect3DVertexShader8Impl *This = (IDirect3DVertexShader8Impl *)iface;
-    IWineD3DDevice *myDevice = NULL;
-    HRESULT hr;
-    TRACE("(%p) : Relay\n", This);
-
-    hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice);
-    if (WINED3D_OK == hr && myDevice != NULL) {
-        hr = IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice);
-        IWineD3DDevice_Release(myDevice);
-    } else {
-        *ppDevice = NULL;
-    }
-    TRACE("(%p) returning (%p)\n", This, *ppDevice);
-    return hr;
-}
-
-static HRESULT WINAPI IDirect3DVertexShader8Impl_GetFunction(IDirect3DVertexShader8 *iface, VOID* pData, UINT* pSizeOfData) {
-    IDirect3DVertexShader8Impl *This = (IDirect3DVertexShader8Impl *)iface;
-
-    TRACE("(%p) : Relay\n", This);
-    return IWineD3DVertexShader_GetFunction(This->wineD3DVertexShader, pData, pSizeOfData);
-}
-
 
 const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl =
@@ -105,6 +84,3 @@
     IDirect3DVertexShader8Impl_AddRef,
     IDirect3DVertexShader8Impl_Release,
-    /* IDirect3DVertexShader8 */
-    IDirect3DVertexShader8Impl_GetDevice,
-    IDirect3DVertexShader8Impl_GetFunction
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/volume.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/volume.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/volume.c	(revision 19678)
@@ -177,4 +177,7 @@
     hr = IWineD3DVolume_GetDesc(This->wineD3DVolume, &wined3ddesc);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(pDesc->Format);
+
     return hr;
 }
@@ -202,5 +205,5 @@
 }
 
-static const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl =
+const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl =
 {
     /* IUnknown */
@@ -219,40 +222,4 @@
 };
 
-
-/* Internal function called back during the CreateVolumeTexture */
-HRESULT WINAPI D3D8CB_CreateVolume(IUnknown  *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
-                                   WINED3DFORMAT  Format, WINED3DPOOL Pool, DWORD Usage,
-                                   IWineD3DVolume **ppVolume,
-                                   HANDLE   * pSharedHandle) {
-    IDirect3DVolume8Impl *object;
-    IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)pDevice;
-    HRESULT hrc = D3D_OK;
-
-    /* Allocate the storage for the device */
-    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DVolume8Impl));
-    if (NULL == object) {
-        FIXME("Allocation of memory failed\n");
-        *ppVolume = NULL;
-        return D3DERR_OUTOFVIDEOMEMORY;
-    }
-
-    object->lpVtbl = &Direct3DVolume8_Vtbl;
-    object->ref = 1;
-    hrc = IWineD3DDevice_CreateVolume(This->WineD3DDevice, Width, Height, Depth, Usage, Format, 
-                                       Pool, &object->wineD3DVolume, pSharedHandle, (IUnknown *)object);
-    if (hrc != D3D_OK) {
-        /* free up object */ 
-        FIXME("(%p) call to IWineD3DDevice_CreateVolume failed\n", This);
-        HeapFree(GetProcessHeap(), 0, object);
-        *ppVolume = NULL;
-    } else {
-        *ppVolume = object->wineD3DVolume;
-        object->container = pSuperior;
-        object->forwardReference = pSuperior;
-    }
-    TRACE("(%p) Created volume %p\n", This, *ppVolume);
-    return hrc;
-}
-
 ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume) {
     IDirect3DVolume8Impl* volumeParent;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/volumetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/volumetexture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/volumetexture.c	(revision 19678)
@@ -79,9 +79,15 @@
 static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE8 iface, IDirect3DDevice8 **ppDevice) {
     IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d8_cs);
-    hr = IDirect3DResource8Impl_GetDevice((LPDIRECT3DRESOURCE8) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d8_cs);
+    hr = IWineD3DVolumeTexture_GetDevice(This->wineD3DVolumeTexture, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d8_cs);
     return hr;
@@ -219,4 +225,7 @@
     hr = IWineD3DVolumeTexture_GetLevelDesc(This->wineD3DVolumeTexture, Level, &wined3ddesc);
     LeaveCriticalSection(&d3d8_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(pDesc->Format);
+
     return hr;
 }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/basetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/basetexture.c	(revision 19677)
+++ 	(revision )
@@ -1,181 +1,0 @@
-/*
- * IDirect3DBaseTexture9 implementation
- *
- * Copyright 2002-2004 Jason Edmeades
- *                     Raphael Junqueira
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/*
- * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
- * other than GPL or LGPL is available it will apply instead, Sun elects to use only
- * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
- * a choice of LGPL license versions is made available with the language indicating
- * that LGPLv2 or any later version may be used, or where a choice of which version
- * of the LGPL is applied is otherwise unspecified.
- */
-
-#include "config.h"
-#include "d3d9_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
-
-/* IDirect3DBaseTexture9 IUnknown parts follow: */
-static HRESULT WINAPI IDirect3DBaseTexture9Impl_QueryInterface(LPDIRECT3DBASETEXTURE9 iface, REFIID riid, LPVOID* ppobj) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    if (IsEqualGUID(riid, &IID_IUnknown)
-        || IsEqualGUID(riid, &IID_IDirect3DResource9)
-        || IsEqualGUID(riid, &IID_IDirect3DBaseTexture9)) {
-        IDirect3DBaseTexture9_AddRef(iface);
-        *ppobj = This;
-        return S_OK;
-    }
-
-    WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
-    *ppobj = NULL;
-    return E_NOINTERFACE;
-}
-
-static ULONG WINAPI IDirect3DBaseTexture9Impl_AddRef(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    ULONG ref = InterlockedIncrement(&This->ref);
-
-    TRACE("(%p) : AddRef from %d\n", This, ref - 1);
-
-    return ref;
-}
-
-static ULONG WINAPI IDirect3DBaseTexture9Impl_Release(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    ULONG ref = InterlockedDecrement(&This->ref);
-
-    TRACE("(%p) : ReleaseRef to %d\n", This, ref);
-
-    if (ref == 0) {
-        IWineD3DBaseTexture_Release(This->wineD3DBaseTexture);
-        HeapFree(GetProcessHeap(), 0, This);
-    }
-    return ref;
-}
-
-/* IDirect3DBaseTexture9 IDirect3DResource9 Interface follow: */
-static HRESULT WINAPI IDirect3DBaseTexture9Impl_GetDevice(LPDIRECT3DBASETEXTURE9 iface, IDirect3DDevice9** ppDevice) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
-}
-
-static HRESULT WINAPI IDirect3DBaseTexture9Impl_SetPrivateData(LPDIRECT3DBASETEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_SetPrivateData(This->wineD3DBaseTexture, refguid, pData, SizeOfData, Flags);
-}
-
-static HRESULT WINAPI IDirect3DBaseTexture9Impl_GetPrivateData(LPDIRECT3DBASETEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_GetPrivateData(This->wineD3DBaseTexture, refguid, pData, pSizeOfData);
-}
-
-static HRESULT WINAPI IDirect3DBaseTexture9Impl_FreePrivateData(LPDIRECT3DBASETEXTURE9 iface, REFGUID refguid) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_FreePrivateData(This->wineD3DBaseTexture, refguid);
-}
-
-static DWORD WINAPI IDirect3DBaseTexture9Impl_SetPriority(LPDIRECT3DBASETEXTURE9 iface, DWORD PriorityNew) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_SetPriority(This->wineD3DBaseTexture, PriorityNew);
-}
-
-static DWORD WINAPI IDirect3DBaseTexture9Impl_GetPriority(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_GetPriority(This->wineD3DBaseTexture);
-}
-
-static void WINAPI IDirect3DBaseTexture9Impl_PreLoad(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    IWineD3DBaseTexture_PreLoad(This->wineD3DBaseTexture);
-    return ;
-}
-
-static D3DRESOURCETYPE WINAPI IDirect3DBaseTexture9Impl_GetType(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_GetType(This->wineD3DBaseTexture);
-}
-
-/* IDirect3DBaseTexture9 Interface follow: */
-static DWORD  WINAPI IDirect3DBaseTexture9Impl_SetLOD(LPDIRECT3DBASETEXTURE9 iface, DWORD LODNew) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_SetLOD(This->wineD3DBaseTexture, LODNew);
-}
-
-DWORD WINAPI IDirect3DBaseTexture9Impl_GetLOD(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_GetLOD(This->wineD3DBaseTexture);
-}
-
-static DWORD WINAPI IDirect3DBaseTexture9Impl_GetLevelCount(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_GetLevelCount(This->wineD3DBaseTexture);
-}
-
-static HRESULT WINAPI IDirect3DBaseTexture9Impl_SetAutoGenFilterType(LPDIRECT3DBASETEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return IWineD3DBaseTexture_SetAutoGenFilterType(This->wineD3DBaseTexture, (WINED3DTEXTUREFILTERTYPE) FilterType);
-}
-
-static D3DTEXTUREFILTERTYPE WINAPI IDirect3DBaseTexture9Impl_GetAutoGenFilterType(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    return (D3DTEXTUREFILTERTYPE) IWineD3DBaseTexture_GetAutoGenFilterType(This->wineD3DBaseTexture);
-}
-
-static void WINAPI IDirect3DBaseTexture9Impl_GenerateMipSubLevels(LPDIRECT3DBASETEXTURE9 iface) {
-    IDirect3DBaseTexture9Impl *This = (IDirect3DBaseTexture9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-    IWineD3DBaseTexture_GenerateMipSubLevels(This->wineD3DBaseTexture);
-}
-
-const IDirect3DBaseTexture9Vtbl Direct3DBaseTexture9_Vtbl =
-{
-    IDirect3DBaseTexture9Impl_QueryInterface,
-    IDirect3DBaseTexture9Impl_AddRef,
-    IDirect3DBaseTexture9Impl_Release,
-    IDirect3DBaseTexture9Impl_GetDevice,
-    IDirect3DBaseTexture9Impl_SetPrivateData,
-    IDirect3DBaseTexture9Impl_GetPrivateData,
-    IDirect3DBaseTexture9Impl_FreePrivateData,
-    IDirect3DBaseTexture9Impl_SetPriority,
-    IDirect3DBaseTexture9Impl_GetPriority,
-    IDirect3DBaseTexture9Impl_PreLoad,
-    IDirect3DBaseTexture9Impl_GetType,
-    IDirect3DBaseTexture9Impl_SetLOD,
-    IDirect3DBaseTexture9Impl_GetLOD,
-    IDirect3DBaseTexture9Impl_GetLevelCount,
-    IDirect3DBaseTexture9Impl_SetAutoGenFilterType,
-    IDirect3DBaseTexture9Impl_GetAutoGenFilterType,
-    IDirect3DBaseTexture9Impl_GenerateMipSubLevels   
-};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/cubetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/cubetexture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/cubetexture.c	(revision 19678)
@@ -84,9 +84,15 @@
 static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetDevice(LPDIRECT3DCUBETEXTURE9 iface, IDirect3DDevice9** ppDevice) {
     IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface;
+    IWineD3DDevice *wined3d_device;
     HRESULT hr;
     TRACE("(%p) Relay\n" , This);
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
+    hr = IWineD3DCubeTexture_GetDevice(This->wineD3DCubeTexture, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -186,5 +192,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    ret = IDirect3DBaseTexture9Impl_GetLOD((LPDIRECT3DBASETEXTURE9) This);
+    ret = IWineD3DCubeTexture_GetLOD(This->wineD3DCubeTexture);
     LeaveCriticalSection(&d3d9_cs);
     return ret;
@@ -238,4 +244,5 @@
     WINED3DSURFACE_DESC    wined3ddesc;
     UINT                   tmpInt = -1;
+    WINED3DFORMAT format;
     HRESULT hr;
 
@@ -243,5 +250,5 @@
 
     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
-    wined3ddesc.Format              = (WINED3DFORMAT *)&pDesc->Format;
+    wined3ddesc.Format              = &format;
     wined3ddesc.Type                = (WINED3DRESOURCETYPE *) &pDesc->Type;
     wined3ddesc.Usage               = &pDesc->Usage;
@@ -256,4 +263,7 @@
     hr = IWineD3DCubeTexture_GetLevelDesc(This->wineD3DCubeTexture, Level, &wined3ddesc);
     LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
+
     return hr;
 }
@@ -358,5 +368,5 @@
 
     if (NULL == object) {
-        FIXME("(%p) allocation of CubeTexture failed\n", This);
+        ERR("(%p) allocation of CubeTexture failed\n", This);
         return D3DERR_OUTOFVIDEOMEMORY;
     }
@@ -365,6 +375,5 @@
     EnterCriticalSection(&d3d9_cs);
     hr = IWineD3DDevice_CreateCubeTexture(This->WineD3DDevice, EdgeLength, Levels, Usage,
-                                 (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DCubeTexture, pSharedHandle, (IUnknown*)object,
-                                 D3D9CB_CreateSurface);
+            wined3dformat_from_d3dformat(Format), Pool, &object->wineD3DCubeTexture, (IUnknown *)object);
     LeaveCriticalSection(&d3d9_cs);
 
@@ -372,5 +381,5 @@
 
         /* free up object */
-        FIXME("(%p) call to IWineD3DDevice_CreateCubeTexture failed\n", This);
+        WARN("(%p) call to IWineD3DDevice_CreateCubeTexture failed\n", This);
         HeapFree(GetProcessHeap(), 0, object);
     } else {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9.def
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9.def	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9.def	(revision 19678)
@@ -4,13 +4,13 @@
 
 EXPORTS
-  Direct3DShaderValidatorCreate9@0 @1
-  D3DPERF_BeginEvent@8 @4
-  D3DPERF_EndEvent@0 @5
-  D3DPERF_GetStatus@0 @6
-  D3DPERF_QueryRepeatFrame@0 @7
-  D3DPERF_SetMarker@8 @8
-  D3DPERF_SetOptions@4 @9
-  D3DPERF_SetRegion@8 @10
-  DebugSetMute@0 @12
-  Direct3DCreate9@4 @13
-  Direct3DCreate9Ex@8 @14
+  Direct3DShaderValidatorCreate9@0=Direct3DShaderValidatorCreate9
+  D3DPERF_BeginEvent@8=D3DPERF_BeginEvent
+  D3DPERF_EndEvent@0=D3DPERF_EndEvent
+  D3DPERF_GetStatus@0=D3DPERF_GetStatus
+  D3DPERF_QueryRepeatFrame@0=D3DPERF_QueryRepeatFrame
+  D3DPERF_SetMarker@8=D3DPERF_SetMarker
+  D3DPERF_SetOptions@4=D3DPERF_SetOptions
+  D3DPERF_SetRegion@8=D3DPERF_SetRegion
+  DebugSetMute@0=DebugSetMute
+  Direct3DCreate9@4=Direct3DCreate9
+  Direct3DCreate9Ex@8=Direct3DCreate9Ex
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_private.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_private.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_private.h	(revision 19678)
@@ -55,4 +55,6 @@
     D3DVERTEXELEMENT9** ppVertexElements);
 extern CRITICAL_SECTION d3d9_cs;
+D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format);
+WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format);
 
 /* ===========================================================================
@@ -177,4 +179,5 @@
  */
 extern const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl;
+extern const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl;
 
 /*****************************************************************************
@@ -185,4 +188,5 @@
     /* IUnknown fields */
     const IDirect3DDevice9ExVtbl   *lpVtbl;
+    const IWineD3DDeviceParentVtbl *device_parent_vtbl;
     LONG                          ref;
 
@@ -243,4 +247,5 @@
  * IDirect3DVolume9 implementation structure
  */
+extern const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl;
 typedef struct IDirect3DVolume9Impl
 {
@@ -282,24 +287,4 @@
 } IDirect3DSwapChain9Impl;
 
-/* ------------------ */
-/* IDirect3DResource9 */
-/* ------------------ */
-
-/*****************************************************************************
- * IDirect3DResource9 implementation structure
- */
-typedef struct IDirect3DResource9Impl
-{
-    /* IUnknown fields */
-    const IDirect3DResource9Vtbl *lpVtbl;
-    LONG                    ref;
-
-    /* IDirect3DResource9 fields */
-    IWineD3DResource       *wineD3DResource;
-} IDirect3DResource9Impl;
-
-extern HRESULT  WINAPI        IDirect3DResource9Impl_GetDevice(LPDIRECT3DRESOURCE9 iface, IDirect3DDevice9** ppDevice);
-
-
 /* ----------------- */
 /* IDirect3DSurface9 */
@@ -350,8 +335,10 @@
 
     /* IDirect3DResource9 fields */
-    IWineD3DVertexBuffer   *wineD3DVertexBuffer;
-
-    /* Parent reference */
-    LPDIRECT3DDEVICE9EX       parentDevice;
+    IWineD3DBuffer *wineD3DVertexBuffer;
+
+    /* Parent reference */
+    LPDIRECT3DDEVICE9EX       parentDevice;
+
+    DWORD fvf;
 } IDirect3DVertexBuffer9Impl;
 
@@ -370,8 +357,9 @@
 
     /* IDirect3DResource9 fields */
-    IWineD3DIndexBuffer    *wineD3DIndexBuffer;
-
-    /* Parent reference */
-    LPDIRECT3DDEVICE9EX       parentDevice;
+    IWineD3DBuffer         *wineD3DIndexBuffer;
+
+    /* Parent reference */
+    LPDIRECT3DDEVICE9EX       parentDevice;
+    WINED3DFORMAT             format;
 } IDirect3DIndexBuffer9Impl;
 
@@ -393,6 +381,4 @@
     
 } IDirect3DBaseTexture9Impl;
-
-extern DWORD    WINAPI        IDirect3DBaseTexture9Impl_GetLOD(LPDIRECT3DBASETEXTURE9 iface);
 
 /* --------------------- */
@@ -521,4 +507,6 @@
 } IDirect3DVertexShader9Impl;
 
+#define D3D9_MAX_VERTEX_SHADER_CONSTANTF 256
+
 /* --------------------- */
 /* IDirect3DPixelShader9 */
@@ -561,32 +549,8 @@
 
 /* Callbacks */
-extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
-                                         WINED3DCUBEMAP_FACES Face, IWineD3DSurface** ppSurface,
-                                         HANDLE* pSharedHandle);
-
-extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown  *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
-                                          WINED3DFORMAT  Format, WINED3DPOOL Pool, DWORD Usage,
-                                          IWineD3DVolume **ppVolume,
-                                          HANDLE   * pSharedHandle);
-
-extern HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Discard,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
-
-extern HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Lockable,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
-
 extern ULONG WINAPI D3D9CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
-
 extern ULONG WINAPI D3D9CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
-
 extern ULONG WINAPI D3D9CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
-
 extern ULONG WINAPI D3D9CB_DestroySurface(IWineD3DSurface *pSurface);
-
 extern ULONG WINAPI D3D9CB_DestroyVolume(IWineD3DVolume *pVolume);
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c	(revision 19678)
@@ -35,4 +35,159 @@
 WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
 
+D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
+{
+    BYTE *c = (BYTE *)&format;
+
+    /* Don't translate FOURCC formats */
+    if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return format;
+
+    switch(format)
+    {
+        case WINED3DFMT_UNKNOWN: return D3DFMT_UNKNOWN;
+        case WINED3DFMT_R8G8B8: return D3DFMT_R8G8B8;
+        case WINED3DFMT_A8R8G8B8: return D3DFMT_A8R8G8B8;
+        case WINED3DFMT_X8R8G8B8: return D3DFMT_X8R8G8B8;
+        case WINED3DFMT_R5G6B5: return D3DFMT_R5G6B5;
+        case WINED3DFMT_X1R5G5B5: return D3DFMT_X1R5G5B5;
+        case WINED3DFMT_A1R5G5B5: return D3DFMT_A1R5G5B5;
+        case WINED3DFMT_A4R4G4B4: return D3DFMT_A4R4G4B4;
+        case WINED3DFMT_R3G3B2: return D3DFMT_R3G3B2;
+        case WINED3DFMT_A8_UNORM: return D3DFMT_A8;
+        case WINED3DFMT_A8R3G3B2: return D3DFMT_A8R3G3B2;
+        case WINED3DFMT_X4R4G4B4: return D3DFMT_X4R4G4B4;
+        case WINED3DFMT_R10G10B10A2_UNORM: return D3DFMT_A2B10G10R10;
+        case WINED3DFMT_R8G8B8A8_UNORM: return D3DFMT_A8B8G8R8;
+        case WINED3DFMT_X8B8G8R8: return D3DFMT_X8B8G8R8;
+        case WINED3DFMT_R16G16_UNORM: return D3DFMT_G16R16;
+        case WINED3DFMT_A2R10G10B10: return D3DFMT_A2R10G10B10;
+        case WINED3DFMT_R16G16B16A16_UNORM: return D3DFMT_A16B16G16R16;
+        case WINED3DFMT_A8P8: return D3DFMT_A8P8;
+        case WINED3DFMT_P8: return D3DFMT_P8;
+        case WINED3DFMT_L8: return D3DFMT_L8;
+        case WINED3DFMT_A8L8: return D3DFMT_A8L8;
+        case WINED3DFMT_A4L4: return D3DFMT_A4L4;
+        case WINED3DFMT_R8G8_SNORM: return D3DFMT_V8U8;
+        case WINED3DFMT_L6V5U5: return D3DFMT_L6V5U5;
+        case WINED3DFMT_X8L8V8U8: return D3DFMT_X8L8V8U8;
+        case WINED3DFMT_R8G8B8A8_SNORM: return D3DFMT_Q8W8V8U8;
+        case WINED3DFMT_R16G16_SNORM: return D3DFMT_V16U16;
+        case WINED3DFMT_A2W10V10U10: return D3DFMT_A2W10V10U10;
+        case WINED3DFMT_D16_LOCKABLE: return D3DFMT_D16_LOCKABLE;
+        case WINED3DFMT_D32: return D3DFMT_D32;
+        case WINED3DFMT_D15S1: return D3DFMT_D15S1;
+        case WINED3DFMT_D24S8: return D3DFMT_D24S8;
+        case WINED3DFMT_D24X8: return D3DFMT_D24X8;
+        case WINED3DFMT_D24X4S4: return D3DFMT_D24X4S4;
+        case WINED3DFMT_D16_UNORM: return D3DFMT_D16;
+        case WINED3DFMT_L16: return D3DFMT_L16;
+        case WINED3DFMT_D32F_LOCKABLE: return D3DFMT_D32F_LOCKABLE;
+        case WINED3DFMT_D24FS8: return D3DFMT_D24FS8;
+        case WINED3DFMT_VERTEXDATA: return D3DFMT_VERTEXDATA;
+        case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
+        case WINED3DFMT_R32_UINT: return D3DFMT_INDEX32;
+        case WINED3DFMT_R16G16B16A16_SNORM: return D3DFMT_Q16W16V16U16;
+        case WINED3DFMT_R16_FLOAT: return D3DFMT_R16F;
+        case WINED3DFMT_R16G16_FLOAT: return D3DFMT_G16R16F;
+        case WINED3DFMT_R16G16B16A16_FLOAT: return D3DFMT_A16B16G16R16F;
+        case WINED3DFMT_R32_FLOAT: return D3DFMT_R32F;
+        case WINED3DFMT_R32G32_FLOAT: return D3DFMT_G32R32F;
+        case WINED3DFMT_R32G32B32A32_FLOAT: return D3DFMT_A32B32G32R32F;
+        case WINED3DFMT_CxV8U8: return D3DFMT_CxV8U8;
+        default:
+            FIXME("Unhandled WINED3DFORMAT %#x\n", format);
+            return D3DFMT_UNKNOWN;
+    }
+}
+
+WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
+{
+    BYTE *c = (BYTE *)&format;
+
+    /* Don't translate FOURCC formats */
+    if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return format;
+
+    switch(format)
+    {
+        case D3DFMT_UNKNOWN: return WINED3DFMT_UNKNOWN;
+        case D3DFMT_R8G8B8: return WINED3DFMT_R8G8B8;
+        case D3DFMT_A8R8G8B8: return WINED3DFMT_A8R8G8B8;
+        case D3DFMT_X8R8G8B8: return WINED3DFMT_X8R8G8B8;
+        case D3DFMT_R5G6B5: return WINED3DFMT_R5G6B5;
+        case D3DFMT_X1R5G5B5: return WINED3DFMT_X1R5G5B5;
+        case D3DFMT_A1R5G5B5: return WINED3DFMT_A1R5G5B5;
+        case D3DFMT_A4R4G4B4: return WINED3DFMT_A4R4G4B4;
+        case D3DFMT_R3G3B2: return WINED3DFMT_R3G3B2;
+        case D3DFMT_A8: return WINED3DFMT_A8_UNORM;
+        case D3DFMT_A8R3G3B2: return WINED3DFMT_A8R3G3B2;
+        case D3DFMT_X4R4G4B4: return WINED3DFMT_X4R4G4B4;
+        case D3DFMT_A2B10G10R10: return WINED3DFMT_R10G10B10A2_UNORM;
+        case D3DFMT_A8B8G8R8: return WINED3DFMT_R8G8B8A8_UNORM;
+        case D3DFMT_X8B8G8R8: return WINED3DFMT_X8B8G8R8;
+        case D3DFMT_G16R16: return WINED3DFMT_R16G16_UNORM;
+        case D3DFMT_A2R10G10B10: return WINED3DFMT_A2R10G10B10;
+        case D3DFMT_A16B16G16R16: return WINED3DFMT_R16G16B16A16_UNORM;
+        case D3DFMT_A8P8: return WINED3DFMT_A8P8;
+        case D3DFMT_P8: return WINED3DFMT_P8;
+        case D3DFMT_L8: return WINED3DFMT_L8;
+        case D3DFMT_A8L8: return WINED3DFMT_A8L8;
+        case D3DFMT_A4L4: return WINED3DFMT_A4L4;
+        case D3DFMT_V8U8: return WINED3DFMT_R8G8_SNORM;
+        case D3DFMT_L6V5U5: return WINED3DFMT_L6V5U5;
+        case D3DFMT_X8L8V8U8: return WINED3DFMT_X8L8V8U8;
+        case D3DFMT_Q8W8V8U8: return WINED3DFMT_R8G8B8A8_SNORM;
+        case D3DFMT_V16U16: return WINED3DFMT_R16G16_SNORM;
+        case D3DFMT_A2W10V10U10: return WINED3DFMT_A2W10V10U10;
+        case D3DFMT_D16_LOCKABLE: return WINED3DFMT_D16_LOCKABLE;
+        case D3DFMT_D32: return WINED3DFMT_D32;
+        case D3DFMT_D15S1: return WINED3DFMT_D15S1;
+        case D3DFMT_D24S8: return WINED3DFMT_D24S8;
+        case D3DFMT_D24X8: return WINED3DFMT_D24X8;
+        case D3DFMT_D24X4S4: return WINED3DFMT_D24X4S4;
+        case D3DFMT_D16: return WINED3DFMT_D16_UNORM;
+        case D3DFMT_L16: return WINED3DFMT_L16;
+        case D3DFMT_D32F_LOCKABLE: return WINED3DFMT_D32F_LOCKABLE;
+        case D3DFMT_D24FS8: return WINED3DFMT_D24FS8;
+        case D3DFMT_VERTEXDATA: return WINED3DFMT_VERTEXDATA;
+        case D3DFMT_INDEX16: return WINED3DFMT_R16_UINT;
+        case D3DFMT_INDEX32: return WINED3DFMT_R32_UINT;
+        case D3DFMT_Q16W16V16U16: return WINED3DFMT_R16G16B16A16_SNORM;
+        case D3DFMT_R16F: return WINED3DFMT_R16_FLOAT;
+        case D3DFMT_G16R16F: return WINED3DFMT_R16G16_FLOAT;
+        case D3DFMT_A16B16G16R16F: return WINED3DFMT_R16G16B16A16_FLOAT;
+        case D3DFMT_R32F: return WINED3DFMT_R32_FLOAT;
+        case D3DFMT_G32R32F: return WINED3DFMT_R32G32_FLOAT;
+        case D3DFMT_A32B32G32R32F: return WINED3DFMT_R32G32B32A32_FLOAT;
+        case D3DFMT_CxV8U8: return WINED3DFMT_CxV8U8;
+        default:
+            FIXME("Unhandled D3DFORMAT %#x\n", format);
+            return WINED3DFMT_UNKNOWN;
+    }
+}
+
+static UINT vertex_count_from_primitive_count(D3DPRIMITIVETYPE primitive_type, UINT primitive_count)
+{
+    switch(primitive_type)
+    {
+        case D3DPT_POINTLIST:
+            return primitive_count;
+
+        case D3DPT_LINELIST:
+            return primitive_count * 2;
+
+        case D3DPT_LINESTRIP:
+            return primitive_count + 1;
+
+        case D3DPT_TRIANGLELIST:
+            return primitive_count * 3;
+
+        case D3DPT_TRIANGLESTRIP:
+        case D3DPT_TRIANGLEFAN:
+            return primitive_count + 2;
+
+        default:
+            FIXME("Unhandled primitive type %#x\n", primitive_type);
+            return 0;
+    }
+}
 
 /* IDirect3D IUnknown parts follow: */
@@ -69,4 +224,11 @@
     }
 
+    if (IsEqualGUID(riid, &IID_IWineD3DDeviceParent))
+    {
+        IUnknown_AddRef((IUnknown *)&This->device_parent_vtbl);
+        *ppobj = &This->device_parent_vtbl;
+        return S_OK;
+    }
+
     WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
     *ppobj = NULL;
@@ -216,4 +378,7 @@
     hr = IWineD3DDevice_GetDisplayMode(This->WineD3DDevice, iSwapChain, (WINED3DDISPLAYMODE *) pMode);
     LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
+
     return hr;
 }
@@ -268,20 +433,21 @@
 
 static HRESULT WINAPI reset_enum_callback(IWineD3DResource *resource, void *data) {
-    BOOL *resources_ok = (BOOL *) data;
+    BOOL *resources_ok = data;
     WINED3DRESOURCETYPE type;
     HRESULT ret = S_OK;
     WINED3DSURFACE_DESC surface_desc;
     WINED3DVOLUME_DESC volume_desc;
-    WINED3DINDEXBUFFER_DESC index_desc;
-    WINED3DVERTEXBUFFER_DESC vertex_desc;
+    D3DINDEXBUFFER_DESC index_desc;
+    D3DVERTEXBUFFER_DESC vertex_desc;
     WINED3DFORMAT dummy_format;
     WINED3DMULTISAMPLE_TYPE dummy_multisampletype;
     DWORD dummy_dword;
     WINED3DPOOL pool = WINED3DPOOL_SCRATCH; /* a harmless pool */
-    IUnknown *parent;
-
-    type = IWineD3DResource_GetType(resource);
+    IDirect3DResource9 *parent;
+
+    IWineD3DResource_GetParent(resource, (IUnknown **) &parent);
+    type = IDirect3DResource9_GetType(parent);
     switch(type) {
-        case WINED3DRTYPE_SURFACE:
+        case D3DRTYPE_SURFACE:
             surface_desc.Format = &dummy_format;
             surface_desc.Type = &type;
@@ -297,5 +463,5 @@
             break;
 
-        case WINED3DRTYPE_VOLUME:
+        case D3DRTYPE_VOLUME:
             volume_desc.Format = &dummy_format;
             volume_desc.Type = &type;
@@ -309,11 +475,11 @@
             break;
 
-        case WINED3DRTYPE_INDEXBUFFER:
-            IWineD3DIndexBuffer_GetDesc((IWineD3DIndexBuffer *) resource, &index_desc);
+        case D3DRTYPE_INDEXBUFFER:
+            IDirect3DIndexBuffer9_GetDesc((IDirect3DIndexBuffer9 *) parent, &index_desc);
             pool = index_desc.Pool;
             break;
 
-        case WINED3DRTYPE_VERTEXBUFFER:
-            IWineD3DVertexBuffer_GetDesc((IWineD3DVertexBuffer *) resource, &vertex_desc);
+        case D3DRTYPE_VERTEXBUFFER:
+            IDirect3DVertexBuffer9_GetDesc((IDirect3DVertexBuffer9 *)parent, &vertex_desc);
             pool = vertex_desc.Pool;
             break;
@@ -327,5 +493,4 @@
 
     if(pool == WINED3DPOOL_DEFAULT) {
-        IWineD3DResource_GetParent(resource, &parent);
         if(IUnknown_Release(parent) == 0) {
             TRACE("Parent %p is an implicit resource with ref 0\n", parent);
@@ -335,4 +500,6 @@
             *resources_ok = FALSE;
         }
+    } else {
+        IUnknown_Release(parent);
     }
     IWineD3DResource_Release(resource);
@@ -358,5 +525,6 @@
      * below fails, the device is considered "lost", and _Reset and _Release are the only allowed calls
      */
-    IWineD3DDevice_SetIndices(This->WineD3DDevice, NULL);
+    EnterCriticalSection(&d3d9_cs);
+    IWineD3DDevice_SetIndices(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
     for(i = 0; i < 16; i++) {
         IWineD3DDevice_SetStreamSource(This->WineD3DDevice, i, NULL, 0, 0);
@@ -370,4 +538,5 @@
         WARN("The application is holding D3DPOOL_DEFAULT resources, rejecting reset\n");
         This->notreset = TRUE;
+        LeaveCriticalSection(&d3d9_cs);
         return WINED3DERR_INVALIDCALL;
     }
@@ -375,5 +544,5 @@
     localParameters.BackBufferWidth                     = pPresentationParameters->BackBufferWidth;
     localParameters.BackBufferHeight                    = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                    = pPresentationParameters->BackBufferFormat;
+    localParameters.BackBufferFormat                    = wined3dformat_from_d3dformat(pPresentationParameters->BackBufferFormat);
     localParameters.BackBufferCount                     = pPresentationParameters->BackBufferCount;
     localParameters.MultiSampleType                     = pPresentationParameters->MultiSampleType;
@@ -383,5 +552,5 @@
     localParameters.Windowed                            = pPresentationParameters->Windowed;
     localParameters.EnableAutoDepthStencil              = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat              = pPresentationParameters->AutoDepthStencilFormat;
+    localParameters.AutoDepthStencilFormat              = wined3dformat_from_d3dformat(pPresentationParameters->AutoDepthStencilFormat);
     localParameters.Flags                               = pPresentationParameters->Flags;
     localParameters.FullScreen_RefreshRateInHz          = pPresentationParameters->FullScreen_RefreshRateInHz;
@@ -389,7 +558,5 @@
     localParameters.AutoRestoreDisplayMode              = TRUE;
 
-    EnterCriticalSection(&d3d9_cs);
     hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters);
-    LeaveCriticalSection(&d3d9_cs);
     if(FAILED(hr)) {
         This->notreset = TRUE;
@@ -397,5 +564,5 @@
         pPresentationParameters->BackBufferWidth            = localParameters.BackBufferWidth;
         pPresentationParameters->BackBufferHeight           = localParameters.BackBufferHeight;
-        pPresentationParameters->BackBufferFormat           = localParameters.BackBufferFormat;
+        pPresentationParameters->BackBufferFormat           = d3dformat_from_wined3dformat(localParameters.BackBufferFormat);
         pPresentationParameters->BackBufferCount            = localParameters.BackBufferCount;
         pPresentationParameters->MultiSampleType            = localParameters.MultiSampleType;
@@ -405,5 +572,5 @@
         pPresentationParameters->Windowed                   = localParameters.Windowed;
         pPresentationParameters->EnableAutoDepthStencil     = localParameters.EnableAutoDepthStencil;
-        pPresentationParameters->AutoDepthStencilFormat     = localParameters.AutoDepthStencilFormat;
+        pPresentationParameters->AutoDepthStencilFormat     = d3dformat_from_wined3dformat(localParameters.AutoDepthStencilFormat);
         pPresentationParameters->Flags                      = localParameters.Flags;
         pPresentationParameters->FullScreen_RefreshRateInHz = localParameters.FullScreen_RefreshRateInHz;
@@ -412,4 +579,6 @@
         This->notreset = FALSE;
     }
+
+    LeaveCriticalSection(&d3d9_cs);
 
     return hr;
@@ -514,9 +683,13 @@
     object->lpVtbl = &Direct3DSurface9_Vtbl;
     object->ref = 1;
-    
+
     TRACE("(%p) : w(%d) h(%d) fmt(%d) surf@%p\n", This, Width, Height, Format, *ppSurface);
-           
-    hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level,  &object->wineD3DSurface, Type, Usage & WINED3DUSAGE_MASK, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality,pSharedHandle,SURFACE_OPENGL,(IUnknown *)object);
-    
+
+    EnterCriticalSection(&d3d9_cs);
+    hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, wined3dformat_from_d3dformat(Format),
+            Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage & WINED3DUSAGE_MASK,
+            (WINED3DPOOL)Pool, MultiSample, MultisampleQuality, SURFACE_OPENGL, (IUnknown *)object);
+    LeaveCriticalSection(&d3d9_cs);
+
     if (hrc != D3D_OK || NULL == object->wineD3DSurface) {
 
@@ -542,8 +715,5 @@
     TRACE("Relay\n");
 
-   /* Is this correct? */
-   EnterCriticalSection(&d3d9_cs);
    hr = IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,Lockable,FALSE/*Discard*/, 0/*Level*/, ppSurface,D3DRTYPE_SURFACE,D3DUSAGE_RENDERTARGET,D3DPOOL_DEFAULT,MultiSample,MultisampleQuality,pSharedHandle);
-   LeaveCriticalSection(&d3d9_cs);
    return hr;
 }
@@ -556,9 +726,7 @@
     TRACE("Relay\n");
 
-     EnterCriticalSection(&d3d9_cs);
      hr = IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,TRUE/* Lockable */,Discard, 0/* Level */
                                                ,ppSurface,D3DRTYPE_SURFACE,D3DUSAGE_DEPTHSTENCIL,
                                                 D3DPOOL_DEFAULT,MultiSample,MultisampleQuality,pSharedHandle);
-     LeaveCriticalSection(&d3d9_cs);
      return hr;
 }
@@ -620,5 +788,5 @@
     TRACE("(%p)->(%p,%p,%p,%p,%d)\n" , This, src, pSourceRect, dst, pDestRect, Filter);
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DSurface_Blt(dst->wineD3DSurface, (RECT *) pDestRect, src->wineD3DSurface, (RECT *) pSourceRect, 0, NULL, Filter);
+    hr = IWineD3DSurface_Blt(dst->wineD3DSurface, pDestRect, src->wineD3DSurface, pSourceRect, 0, NULL, Filter);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -639,4 +807,6 @@
     desc.Pool = &pool;
     desc.Type = &restype;
+
+    EnterCriticalSection(&d3d9_cs);
     IWineD3DSurface_GetDesc(surface->wineD3DSurface, &desc);
 
@@ -645,4 +815,5 @@
      */
     if(!(usage & WINED3DUSAGE_RENDERTARGET) && (pool != D3DPOOL_DEFAULT || restype != D3DRTYPE_SURFACE)) {
+        LeaveCriticalSection(&d3d9_cs);
         WARN("Surface is not a render target, or not a stand-alone D3DPOOL_DEFAULT surface\n");
         return D3DERR_INVALIDCALL;
@@ -651,5 +822,4 @@
     /* Colorfill can only be used on rendertarget surfaces, or offscreen plain surfaces in D3DPOOL_DEFAULT */
     /* Note: D3DRECT is compatible with WINED3DRECT */
-    EnterCriticalSection(&d3d9_cs);
     hr = IWineD3DDevice_ColorFill(This->WineD3DDevice, surface->wineD3DSurface, (CONST WINED3DRECT*)pRect, color);
     LeaveCriticalSection(&d3d9_cs);
@@ -671,7 +841,6 @@
         should I change the usage to dynamic?        
         */
-    EnterCriticalSection(&d3d9_cs);
     hr = IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,TRUE/*Loackable*/,FALSE/*Discard*/,0/*Level*/ , ppSurface,D3DRTYPE_SURFACE, 0/*Usage (undefined/none)*/,(WINED3DPOOL) Pool,D3DMULTISAMPLE_NONE,0/*MultisampleQuality*/,pSharedHandle);
-    LeaveCriticalSection(&d3d9_cs);
+
     return hr;
 }
@@ -801,8 +970,14 @@
 static HRESULT  WINAPI  IDirect3DDevice9Impl_GetTransform(LPDIRECT3DDEVICE9EX iface, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) {
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
-    TRACE("(%p) Relay\n" , This);
-
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n" , This);
+
+    EnterCriticalSection(&d3d9_cs);
     /* Note: D3DMATRIX is compatible with WINED3DMATRIX */
-    return IWineD3DDevice_GetTransform(This->WineD3DDevice, State, (WINED3DMATRIX*) pMatrix);
+    hr = IWineD3DDevice_GetTransform(This->WineD3DDevice, State, (WINED3DMATRIX*) pMatrix);
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
@@ -1018,4 +1193,41 @@
 }
 
+static const WINED3DTEXTURESTAGESTATETYPE tss_lookup[] =
+{
+    WINED3DTSS_FORCE_DWORD,             /*  0, unused */
+    WINED3DTSS_COLOROP,                 /*  1, D3DTSS_COLOROP */
+    WINED3DTSS_COLORARG1,               /*  2, D3DTSS_COLORARG1 */
+    WINED3DTSS_COLORARG2,               /*  3, D3DTSS_COLORARG2 */
+    WINED3DTSS_ALPHAOP,                 /*  4, D3DTSS_ALPHAOP */
+    WINED3DTSS_ALPHAARG1,               /*  5, D3DTSS_ALPHAARG1 */
+    WINED3DTSS_ALPHAARG2,               /*  6, D3DTSS_ALPHAARG2 */
+    WINED3DTSS_BUMPENVMAT00,            /*  7, D3DTSS_BUMPENVMAT00 */
+    WINED3DTSS_BUMPENVMAT01,            /*  8, D3DTSS_BUMPENVMAT01 */
+    WINED3DTSS_BUMPENVMAT10,            /*  9, D3DTSS_BUMPENVMAT10 */
+    WINED3DTSS_BUMPENVMAT11,            /* 10, D3DTSS_BUMPENVMAT11 */
+    WINED3DTSS_TEXCOORDINDEX,           /* 11, D3DTSS_TEXCOORDINDEX */
+    WINED3DTSS_FORCE_DWORD,             /* 12, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 13, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 14, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 15, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 16, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 17, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 18, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 19, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 20, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 21, unused */
+    WINED3DTSS_BUMPENVLSCALE,           /* 22, D3DTSS_BUMPENVLSCALE */
+    WINED3DTSS_BUMPENVLOFFSET,          /* 23, D3DTSS_BUMPENVLOFFSET */
+    WINED3DTSS_TEXTURETRANSFORMFLAGS,   /* 24, D3DTSS_TEXTURETRANSFORMFLAGS */
+    WINED3DTSS_FORCE_DWORD,             /* 25, unused */
+    WINED3DTSS_COLORARG0,               /* 26, D3DTSS_COLORARG0 */
+    WINED3DTSS_ALPHAARG0,               /* 27, D3DTSS_ALPHAARG0 */
+    WINED3DTSS_RESULTARG,               /* 28, D3DTSS_RESULTARG */
+    WINED3DTSS_FORCE_DWORD,             /* 29, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 30, unused */
+    WINED3DTSS_FORCE_DWORD,             /* 31, unused */
+    WINED3DTSS_CONSTANT,                /* 32, D3DTSS_CONSTANT */
+};
+
 static HRESULT  WINAPI  IDirect3DDevice9Impl_GetTextureStageState(LPDIRECT3DDEVICE9EX iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) {
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
@@ -1024,5 +1236,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, Type, pValue);
+    hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, tss_lookup[Type], pValue);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1035,5 +1247,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, Type, Value);
+    hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, tss_lookup[Type], Value);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1189,5 +1401,7 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_DrawPrimitive(This->WineD3DDevice, PrimitiveType, StartVertex, PrimitiveCount);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawPrimitive(This->WineD3DDevice, StartVertex,
+            vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount));
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1203,5 +1417,7 @@
     EnterCriticalSection(&d3d9_cs);
     IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, BaseVertexIndex);
-    hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, PrimitiveType, MinVertexIndex, NumVertices, startIndex, primCount);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, MinVertexIndex, NumVertices,
+            startIndex, vertex_count_from_primitive_count(PrimitiveType, primCount));
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1214,5 +1430,8 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_DrawPrimitiveUP(This->WineD3DDevice, PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawPrimitiveUP(This->WineD3DDevice,
+            vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount),
+            pVertexStreamZeroData, VertexStreamZeroStride);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1227,6 +1446,8 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->WineD3DDevice, PrimitiveType, MinVertexIndex, NumVertexIndices, PrimitiveCount,
-                                                 pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
+    IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType);
+    hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->WineD3DDevice, MinVertexIndex, NumVertexIndices,
+            vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount), pIndexData,
+            wined3dformat_from_d3dformat(IndexDataFormat), pVertexStreamZeroData, VertexStreamZeroStride);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1237,8 +1458,9 @@
     IDirect3DVertexDeclaration9Impl *Decl = (IDirect3DVertexDeclaration9Impl *) pVertexDecl;
     HRESULT hr;
-    TRACE("(%p) Relay\n" , This);
-
-    EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_ProcessVertices(This->WineD3DDevice,SrcStartIndex, DestIndex, VertexCount, ((IDirect3DVertexBuffer9Impl *)pDestBuffer)->wineD3DVertexBuffer, Decl ? Decl->wineD3DVertexDeclaration : NULL, Flags);
+    IDirect3DVertexBuffer9Impl *dest = (IDirect3DVertexBuffer9Impl *) pDestBuffer;
+    TRACE("(%p) Relay\n" , This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DDevice_ProcessVertices(This->WineD3DDevice,SrcStartIndex, DestIndex, VertexCount, dest->wineD3DVertexBuffer, Decl ? Decl->wineD3DVertexDeclaration : NULL, Flags, dest->fvf);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1304,26 +1526,28 @@
 static HRESULT WINAPI IDirect3DDevice9Impl_SetFVF(LPDIRECT3DDEVICE9EX iface, DWORD FVF) {
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n" , This);
-
-    EnterCriticalSection(&d3d9_cs);
-    if (0 != FVF) {
-         IDirect3DVertexDeclaration9* pDecl = getConvertedDecl(This, FVF);
-
-         if(!pDecl) {
-             /* Any situation when this should happen, except out of memory? */
-             ERR("Failed to create a converted vertex declaration\n");
-             LeaveCriticalSection(&d3d9_cs);
-             return D3DERR_DRIVERINTERNALERROR;
-         }
-
-         hr = IDirect3DDevice9Impl_SetVertexDeclaration(iface, pDecl);
-         if (hr != S_OK) {
-             LeaveCriticalSection(&d3d9_cs);
-             return hr;
-         }
-    }
-    hr = IWineD3DDevice_SetFVF(This->WineD3DDevice, FVF);
-    LeaveCriticalSection(&d3d9_cs);
+    IDirect3DVertexDeclaration9 *decl;
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n" , This);
+
+    if (!FVF)
+    {
+        WARN("%#x is not a valid FVF\n", FVF);
+        return D3D_OK;
+    }
+
+    EnterCriticalSection(&d3d9_cs);
+    decl = getConvertedDecl(This, FVF);
+    LeaveCriticalSection(&d3d9_cs);
+
+    if (!decl)
+    {
+         /* Any situation when this should happen, except out of memory? */
+         ERR("Failed to create a converted vertex declaration\n");
+         return D3DERR_DRIVERINTERNALERROR;
+    }
+
+    hr = IDirect3DDevice9Impl_SetVertexDeclaration(iface, decl);
+    if (FAILED(hr)) ERR("Failed to set vertex declaration\n");
 
     return hr;
@@ -1332,10 +1556,28 @@
 static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF(LPDIRECT3DDEVICE9EX iface, DWORD* pFVF) {
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n" , This);
-
-    EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_GetFVF(This->WineD3DDevice, pFVF);
-    LeaveCriticalSection(&d3d9_cs);
+    IDirect3DVertexDeclaration9 *decl;
+    HRESULT hr;
+    TRACE("(%p) Relay\n" , This);
+
+    hr = IDirect3DDevice9_GetVertexDeclaration(iface, &decl);
+    if (FAILED(hr))
+    {
+        WARN("Failed to get vertex declaration, %#x\n", hr);
+        *pFVF = 0;
+        return hr;
+    }
+
+    if (decl)
+    {
+        *pFVF = ((IDirect3DVertexDeclaration9Impl *)decl)->convFVF;
+        IDirect3DVertexDeclaration9_Release(decl);
+    }
+    else
+    {
+        *pFVF = 0;
+    }
+
+    TRACE("Returning FVF %#x\n", *pFVF);
+
     return hr;
 }
@@ -1356,5 +1598,5 @@
 static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(LPDIRECT3DDEVICE9EX iface, UINT StreamNumber, IDirect3DVertexBuffer9 **pStream, UINT* OffsetInBytes, UINT* pStride) {
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
-    IWineD3DVertexBuffer *retStream = NULL;
+    IWineD3DBuffer *retStream = NULL;
     HRESULT rc = D3D_OK;
 
@@ -1368,6 +1610,6 @@
     rc = IWineD3DDevice_GetStreamSource(This->WineD3DDevice, StreamNumber, &retStream, OffsetInBytes, pStride);
     if (rc == D3D_OK  && NULL != retStream) {
-        IWineD3DVertexBuffer_GetParent(retStream, (IUnknown **)pStream);
-        IWineD3DVertexBuffer_Release(retStream);
+        IWineD3DBuffer_GetParent(retStream, (IUnknown **)pStream);
+        IWineD3DBuffer_Release(retStream);
     }else{
         if (rc != D3D_OK){
@@ -1406,9 +1648,11 @@
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
     HRESULT hr;
+    IDirect3DIndexBuffer9Impl *ib = (IDirect3DIndexBuffer9Impl *) pIndexData;
     TRACE("(%p) Relay\n", This);
 
     EnterCriticalSection(&d3d9_cs);
     hr = IWineD3DDevice_SetIndices(This->WineD3DDevice,
-            pIndexData ? ((IDirect3DIndexBuffer9Impl *)pIndexData)->wineD3DIndexBuffer : NULL);
+            ib ? ib->wineD3DIndexBuffer : NULL,
+            ib ? ib->format : WINED3DFMT_UNKNOWN);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -1417,5 +1661,5 @@
 static HRESULT  WINAPI  IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9EX iface, IDirect3DIndexBuffer9 **ppIndexData) {
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
-    IWineD3DIndexBuffer *retIndexData = NULL;
+    IWineD3DBuffer *retIndexData = NULL;
     HRESULT rc = D3D_OK;
 
@@ -1429,6 +1673,6 @@
     rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
     if (SUCCEEDED(rc) && retIndexData) {
-        IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
-        IWineD3DIndexBuffer_Release(retIndexData);
+        IWineD3DBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
+        IWineD3DBuffer_Release(retIndexData);
     } else {
         if (FAILED(rc)) FIXME("Call to GetIndices failed\n");
@@ -1704,35 +1948,4 @@
 };
 
-
-/* Internal function called back during the CreateDevice to create a render target  */
-HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
-                                         WINED3DCUBEMAP_FACES Face,IWineD3DSurface** ppSurface,
-                                         HANDLE* pSharedHandle) {
-
-    HRESULT res = D3D_OK;
-    IDirect3DSurface9Impl *d3dSurface = NULL;
-    BOOL Lockable = TRUE;
-    
-    if((Pool == D3DPOOL_DEFAULT &&  Usage != D3DUSAGE_DYNAMIC)) 
-        Lockable = FALSE;
-        
-    TRACE("relay\n");
-    res = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9Ex *)device, Width, Height, (D3DFORMAT)Format,
-                Lockable, FALSE/*Discard*/, Level,  (IDirect3DSurface9 **)&d3dSurface, D3DRTYPE_SURFACE,
-                Usage, (D3DPOOL) Pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */, pSharedHandle);  
-
-    if (SUCCEEDED(res)) {
-        *ppSurface = d3dSurface->wineD3DSurface;
-        d3dSurface->container = pSuperior;
-        IDirect3DDevice9Ex_Release(d3dSurface->parentDevice);
-        d3dSurface->parentDevice = NULL;
-        d3dSurface->forwardReference = pSuperior;
-    } else {
-        FIXME("(%p) IDirect3DDevice9_CreateSurface failed\n", device);
-    }
-    return res;
-}
-
 ULONG WINAPI D3D9CB_DestroySurface(IWineD3DSurface *pSurface) {
     IDirect3DSurface9Impl* surfaceParent;
@@ -1745,2 +1958,244 @@
     return IDirect3DSurface9_Release((IDirect3DSurface9*) surfaceParent);
 }
+
+/* IWineD3DDeviceParent IUnknown methods */
+
+static inline struct IDirect3DDevice9Impl *device_from_device_parent(IWineD3DDeviceParent *iface)
+{
+    return (struct IDirect3DDevice9Impl *)((char*)iface
+            - FIELD_OFFSET(struct IDirect3DDevice9Impl, device_parent_vtbl));
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_QueryInterface(IWineD3DDeviceParent *iface, REFIID riid, void **object)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    return IDirect3DDevice9Impl_QueryInterface((IDirect3DDevice9Ex *)This, riid, object);
+}
+
+static ULONG STDMETHODCALLTYPE device_parent_AddRef(IWineD3DDeviceParent *iface)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    return IDirect3DDevice9Impl_AddRef((IDirect3DDevice9Ex *)This);
+}
+
+static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    return IDirect3DDevice9Impl_Release((IDirect3DDevice9Ex *)This);
+}
+
+/* IWineD3DDeviceParent methods */
+
+static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceParent *iface, IWineD3DDevice *device)
+{
+    TRACE("iface %p, device %p\n", iface, device);
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, DWORD usage,
+        WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    IDirect3DSurface9Impl *d3d_surface;
+    BOOL lockable = TRUE;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n"
+            "\tpool %#x, level %u, face %u, surface %p\n",
+            iface, superior, width, height, format, usage, pool, level, face, surface);
+
+    if (pool == D3DPOOL_DEFAULT && !(usage & D3DUSAGE_DYNAMIC)) lockable = FALSE;
+
+    hr = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9Ex *)This, width, height,
+            d3dformat_from_wined3dformat(format), lockable, FALSE /* Discard */, level,
+            (IDirect3DSurface9 **)&d3d_surface, D3DRTYPE_SURFACE, usage, pool,
+            D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */, NULL);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateSurface failed, returning %#x\n", iface, hr);
+        return hr;
+    }
+
+    *surface = d3d_surface->wineD3DSurface;
+    d3d_surface->container = superior;
+    IDirect3DDevice9Ex_Release(d3d_surface->parentDevice);
+    d3d_surface->parentDevice = NULL;
+    d3d_surface->forwardReference = superior;
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality, BOOL lockable, IWineD3DSurface **surface)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    IDirect3DSurface9Impl *d3d_surface;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+            "\tmultisample_quality %u, lockable %u, surface %p\n",
+            iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface);
+
+    hr = IDirect3DDevice9Impl_CreateRenderTarget((IDirect3DDevice9Ex *)This, width, height,
+            d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, lockable,
+            (IDirect3DSurface9 **)&d3d_surface, NULL);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateRenderTarget failed, returning %#x\n", iface, hr);
+        return hr;
+    }
+
+    *surface = d3d_surface->wineD3DSurface;
+    d3d_surface->container = superior;
+    d3d_surface->isImplicit = TRUE;
+    /* Implicit surfaces are created with an refcount of 0 */
+    IDirect3DSurface9_Release((IDirect3DSurface9 *)d3d_surface);
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, WINED3DFORMAT format, WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    IDirect3DSurface9Impl *d3d_surface;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
+            "\tmultisample_quality %u, discard %u, surface %p\n",
+            iface, superior, width, height, format, multisample_type, multisample_quality, discard, surface);
+
+    hr = IDirect3DDevice9Impl_CreateDepthStencilSurface((IDirect3DDevice9Ex *)This, width, height,
+            d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, discard,
+            (IDirect3DSurface9 **)&d3d_surface, NULL);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateDepthStencilSurface failed, returning %#x\n", iface, hr);
+        return hr;
+    }
+
+    *surface = d3d_surface->wineD3DSurface;
+    d3d_surface->container = (IUnknown *)This;
+    d3d_surface->isImplicit = TRUE;
+    /* Implicit surfaces are created with an refcount of 0 */
+    IDirect3DSurface9_Release((IDirect3DSurface9 *)d3d_surface);
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
+        IUnknown *superior, UINT width, UINT height, UINT depth, WINED3DFORMAT format,
+        WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    IDirect3DVolume9Impl *object;
+    HRESULT hr;
+
+    TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n",
+            iface, superior, width, height, depth, format, pool, usage, volume);
+
+    /* Allocate the storage for the device */
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        FIXME("Allocation of memory failed\n");
+        *volume = NULL;
+        return D3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &Direct3DVolume9_Vtbl;
+    object->ref = 1;
+    hr = IWineD3DDevice_CreateVolume(This->WineD3DDevice, width, height, depth, usage & WINED3DUSAGE_MASK,
+            format, pool, &object->wineD3DVolume, (IUnknown *)object);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateVolume failed, returning %#x\n", iface, hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *volume = NULL;
+        return hr;
+    }
+
+    *volume = object->wineD3DVolume;
+    object->container = superior;
+    object->forwardReference = superior;
+
+    TRACE("(%p) Created volume %p\n", iface, *volume);
+
+    return hr;
+}
+
+static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDeviceParent *iface,
+        WINED3DPRESENT_PARAMETERS *present_parameters, IWineD3DSwapChain **swapchain)
+{
+    struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
+    IDirect3DSwapChain9Impl *d3d_swapchain;
+    D3DPRESENT_PARAMETERS local_parameters;
+    HRESULT hr;
+
+    TRACE("iface %p, present_parameters %p, swapchain %p\n", iface, present_parameters, swapchain);
+
+    /* Copy the presentation parameters */
+    local_parameters.BackBufferWidth = present_parameters->BackBufferWidth;
+    local_parameters.BackBufferHeight = present_parameters->BackBufferHeight;
+    local_parameters.BackBufferFormat = d3dformat_from_wined3dformat(present_parameters->BackBufferFormat);
+    local_parameters.BackBufferCount = present_parameters->BackBufferCount;
+    local_parameters.MultiSampleType = present_parameters->MultiSampleType;
+    local_parameters.MultiSampleQuality = present_parameters->MultiSampleQuality;
+    local_parameters.SwapEffect = present_parameters->SwapEffect;
+    local_parameters.hDeviceWindow = present_parameters->hDeviceWindow;
+    local_parameters.Windowed = present_parameters->Windowed;
+    local_parameters.EnableAutoDepthStencil = present_parameters->EnableAutoDepthStencil;
+    local_parameters.AutoDepthStencilFormat = d3dformat_from_wined3dformat(present_parameters->AutoDepthStencilFormat);
+    local_parameters.Flags = present_parameters->Flags;
+    local_parameters.FullScreen_RefreshRateInHz = present_parameters->FullScreen_RefreshRateInHz;
+    local_parameters.PresentationInterval = present_parameters->PresentationInterval;
+
+    hr = IDirect3DDevice9Impl_CreateAdditionalSwapChain((IDirect3DDevice9Ex *)This,
+            &local_parameters, (IDirect3DSwapChain9 **)&d3d_swapchain);
+    if (FAILED(hr))
+    {
+        ERR("(%p) CreateAdditionalSwapChain failed, returning %#x\n", iface, hr);
+        *swapchain = NULL;
+        return hr;
+    }
+
+    *swapchain = d3d_swapchain->wineD3DSwapChain;
+    d3d_swapchain->isImplicit = TRUE;
+    /* Implicit swap chains are created with an refcount of 0 */
+    IDirect3DSwapChain9_Release((IDirect3DSwapChain9 *)d3d_swapchain);
+
+    /* Copy back the presentation parameters */
+    present_parameters->BackBufferWidth = local_parameters.BackBufferWidth;
+    present_parameters->BackBufferHeight = local_parameters.BackBufferHeight;
+    present_parameters->BackBufferFormat = wined3dformat_from_d3dformat(local_parameters.BackBufferFormat);
+    present_parameters->BackBufferCount = local_parameters.BackBufferCount;
+    present_parameters->MultiSampleType = local_parameters.MultiSampleType;
+    present_parameters->MultiSampleQuality = local_parameters.MultiSampleQuality;
+    present_parameters->SwapEffect = local_parameters.SwapEffect;
+    present_parameters->hDeviceWindow = local_parameters.hDeviceWindow;
+    present_parameters->Windowed = local_parameters.Windowed;
+    present_parameters->EnableAutoDepthStencil = local_parameters.EnableAutoDepthStencil;
+    present_parameters->AutoDepthStencilFormat = wined3dformat_from_d3dformat(local_parameters.AutoDepthStencilFormat);
+    present_parameters->Flags = local_parameters.Flags;
+    present_parameters->FullScreen_RefreshRateInHz = local_parameters.FullScreen_RefreshRateInHz;
+    present_parameters->PresentationInterval = local_parameters.PresentationInterval;
+
+    return hr;
+}
+
+const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl =
+{
+    /* IUnknown methods */
+    device_parent_QueryInterface,
+    device_parent_AddRef,
+    device_parent_Release,
+    /* IWineD3DDeviceParent methods */
+    device_parent_WineD3DDeviceCreated,
+    device_parent_CreateSurface,
+    device_parent_CreateRenderTarget,
+    device_parent_CreateDepthStencilSurface,
+    device_parent_CreateVolume,
+    device_parent_CreateSwapChain,
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/directx.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/directx.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/directx.c	(revision 19678)
@@ -47,5 +47,5 @@
     } else if(IsEqualGUID(riid, &IID_IDirect3D9Ex)) {
         if(This->extended) {
-            *ppobj = (IDirect3D9Ex *) This;
+            *ppobj = This;
             TRACE("Returning IDirect3D9Ex interface at %p\n", *ppobj);
             IDirect3D9Ex_AddRef((IDirect3D9Ex *)*ppobj);
@@ -147,5 +147,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3D_GetAdapterModeCount(This->WineD3D, Adapter, Format);
+    hr = IWineD3D_GetAdapterModeCount(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format));
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -158,10 +158,14 @@
     /* We can't pass this to WineD3D, otherwise it'll think it came from D3D8 or DDraw.
        It's supposed to fail anyway, so no harm returning failure. */
-    if(Format != WINED3DFMT_X8R8G8B8 && Format != WINED3DFMT_R5G6B5)
+    if(Format != D3DFMT_X8R8G8B8 && Format != D3DFMT_R5G6B5)
         return D3DERR_INVALIDCALL;
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3D_EnumAdapterModes(This->WineD3D, Adapter, Format, Mode, (WINED3DDISPLAYMODE *) pMode);
-    LeaveCriticalSection(&d3d9_cs);
+    hr = IWineD3D_EnumAdapterModes(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format),
+            Mode, (WINED3DDISPLAYMODE *) pMode);
+    LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
+
     return hr;
 }
@@ -169,5 +173,13 @@
 static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9EX iface, UINT Adapter, D3DDISPLAYMODE* pMode) {
     IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
-    return IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) pMode);
+    HRESULT hr;
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) pMode);
+    LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
+
+    return hr;
 }
 
@@ -181,6 +193,6 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, DisplayFormat,
-                                    BackBufferFormat, Windowed);
+    hr = IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, wined3dformat_from_d3dformat(DisplayFormat),
+            wined3dformat_from_d3dformat(BackBufferFormat), Windowed);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -192,9 +204,21 @@
     IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
     HRESULT hr;
+    WINED3DRESOURCETYPE WineD3DRType;
     TRACE("%p\n", This);
 
-    EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, AdapterFormat,
-                                    Usage, RType, CheckFormat, SURFACE_OPENGL);
+    switch(RType) {
+        case D3DRTYPE_VERTEXBUFFER:
+        case D3DRTYPE_INDEXBUFFER:
+            WineD3DRType = WINED3DRTYPE_BUFFER;
+            break;
+
+        default:
+            WineD3DRType = RType;
+            break;
+    }
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat),
+            Usage, WineD3DRType, wined3dformat_from_d3dformat(CheckFormat), SURFACE_OPENGL);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -209,6 +233,6 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType, SurfaceFormat,
-                                               Windowed, MultiSampleType, pQualityLevels);
+    hr = IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType,
+            wined3dformat_from_d3dformat(SurfaceFormat), Windowed, MultiSampleType, pQualityLevels);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -223,6 +247,7 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType, AdapterFormat,
-                                           RenderTargetFormat, DepthStencilFormat);
+    hr = IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType,
+            wined3dformat_from_d3dformat(AdapterFormat), wined3dformat_from_d3dformat(RenderTargetFormat),
+            wined3dformat_from_d3dformat(DepthStencilFormat));
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -235,6 +260,6 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3D_CheckDeviceFormatConversion(This->WineD3D, Adapter, DeviceType, SourceFormat,
-                                                TargetFormat);
+    hr = IWineD3D_CheckDeviceFormatConversion(This->WineD3D, Adapter, DeviceType,
+            wined3dformat_from_d3dformat(SourceFormat), wined3dformat_from_d3dformat(TargetFormat));
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -296,4 +321,6 @@
         D3DPTEXTURECAPS_MIPMAP         | D3DPTEXTURECAPS_MIPVOLUMEMAP  | D3DPTEXTURECAPS_MIPCUBEMAP      |
         D3DPTEXTURECAPS_CUBEMAP_POW2   | D3DPTEXTURECAPS_VOLUMEMAP_POW2| D3DPTEXTURECAPS_NOPROJECTEDBUMPENV;
+
+    pCaps->MaxVertexShaderConst = min(D3D9_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);
 }
 
@@ -337,28 +364,4 @@
     LeaveCriticalSection(&d3d9_cs);
     return ret;
-}
-
-/* Internal function called back during the CreateDevice to create a render target */
-HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Lockable,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
-    HRESULT res = D3D_OK;
-    IDirect3DSurface9Impl *d3dSurface = NULL;
-    TRACE("(%p) call back\n", device);
-    res = IDirect3DDevice9_CreateRenderTarget((IDirect3DDevice9 *)device, Width, Height, 
-                                         (D3DFORMAT)Format, MultiSample, MultisampleQuality, Lockable,
-                                         (IDirect3DSurface9 **)&d3dSurface, pSharedHandle);
-
-    if (SUCCEEDED(res)) {
-        *ppSurface = d3dSurface->wineD3DSurface;
-        d3dSurface->container = pSuperior;
-        d3dSurface->isImplicit = TRUE;
-        /* Implicit surfaces are created with an refcount of 0 */
-        IDirect3DSurface9_Release((IDirect3DSurface9 *)d3dSurface);
-    } else {
-        *ppSurface = NULL;
-    }
-    return res;
 }
 
@@ -373,58 +376,4 @@
 }
 
-static HRESULT WINAPI D3D9CB_CreateAdditionalSwapChain(IUnknown *device,
-                                                       WINED3DPRESENT_PARAMETERS* pPresentationParameters,
-                                                       IWineD3DSwapChain ** ppSwapChain) {
-    HRESULT res = D3D_OK;
-    IDirect3DSwapChain9Impl *d3dSwapChain = NULL;
-    D3DPRESENT_PARAMETERS localParameters;
-    TRACE("(%p) call back\n", device);
-
-    /* Copy the presentation parameters */
-    localParameters.BackBufferWidth                     = pPresentationParameters->BackBufferWidth;
-    localParameters.BackBufferHeight                    = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                    = pPresentationParameters->BackBufferFormat;
-    localParameters.BackBufferCount                     = pPresentationParameters->BackBufferCount;
-    localParameters.MultiSampleType                     = pPresentationParameters->MultiSampleType;
-    localParameters.MultiSampleQuality                  = pPresentationParameters->MultiSampleQuality;
-    localParameters.SwapEffect                          = pPresentationParameters->SwapEffect;
-    localParameters.hDeviceWindow                       = pPresentationParameters->hDeviceWindow;
-    localParameters.Windowed                            = pPresentationParameters->Windowed;
-    localParameters.EnableAutoDepthStencil              = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat              = pPresentationParameters->AutoDepthStencilFormat;
-    localParameters.Flags                               = pPresentationParameters->Flags;
-    localParameters.FullScreen_RefreshRateInHz          = pPresentationParameters->FullScreen_RefreshRateInHz;
-    localParameters.PresentationInterval                = pPresentationParameters->PresentationInterval;
-
-    res = IDirect3DDevice9_CreateAdditionalSwapChain((IDirect3DDevice9 *)device, &localParameters, (IDirect3DSwapChain9 **)&d3dSwapChain);
-
-    if (SUCCEEDED(res)) {
-        *ppSwapChain = d3dSwapChain->wineD3DSwapChain;
-        d3dSwapChain->isImplicit = TRUE;
-        /* Implicit swap chains are created with an refcount of 0 */
-        IDirect3DSwapChain9_Release((IDirect3DSwapChain9 *)d3dSwapChain);
-    } else {
-        *ppSwapChain = NULL;
-    }
-
-    /* Copy back the presentation parameters */
-    pPresentationParameters->BackBufferWidth            = localParameters.BackBufferWidth;
-    pPresentationParameters->BackBufferHeight           = localParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat           = localParameters.BackBufferFormat;
-    pPresentationParameters->BackBufferCount            = localParameters.BackBufferCount;
-    pPresentationParameters->MultiSampleType            = localParameters.MultiSampleType;
-    pPresentationParameters->MultiSampleQuality         = localParameters.MultiSampleQuality;
-    pPresentationParameters->SwapEffect                 = localParameters.SwapEffect;
-    pPresentationParameters->hDeviceWindow              = localParameters.hDeviceWindow;
-    pPresentationParameters->Windowed                   = localParameters.Windowed;
-    pPresentationParameters->EnableAutoDepthStencil     = localParameters.EnableAutoDepthStencil;
-    pPresentationParameters->AutoDepthStencilFormat     = localParameters.AutoDepthStencilFormat;
-    pPresentationParameters->Flags                      = localParameters.Flags;
-    pPresentationParameters->FullScreen_RefreshRateInHz = localParameters.FullScreen_RefreshRateInHz;
-    pPresentationParameters->PresentationInterval       = localParameters.PresentationInterval;
-
-    return res;
-}
-
 ULONG WINAPI D3D9CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain) {
     IDirect3DSwapChain9Impl* swapChainParent;
@@ -437,26 +386,4 @@
 }
 
-/* Internal function called back during the CreateDevice to create a render target */
-HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
-                                         WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
-                                         DWORD MultisampleQuality, BOOL Discard,
-                                         IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
-    HRESULT res = D3D_OK;
-    IDirect3DSurface9Impl *d3dSurface = NULL;
-    TRACE("(%p) call back\n", device);
-
-    res = IDirect3DDevice9_CreateDepthStencilSurface((IDirect3DDevice9 *)device, Width, Height, 
-                                         (D3DFORMAT)Format, MultiSample, MultisampleQuality, Discard, 
-                                         (IDirect3DSurface9 **)&d3dSurface, pSharedHandle);
-    if (SUCCEEDED(res)) {
-        *ppSurface = d3dSurface->wineD3DSurface;
-        d3dSurface->container = device;
-        d3dSurface->isImplicit = TRUE;
-        /* Implicit surfaces are created with an refcount of 0 */
-        IDirect3DSurface9_Release((IDirect3DSurface9 *)d3dSurface);
-    }
-    return res;
-}
-
 ULONG WINAPI D3D9CB_DestroyDepthStencilSurface(IWineD3DSurface *pSurface) {
     IDirect3DSurface9Impl* surfaceParent;
@@ -476,5 +403,6 @@
     IDirect3D9Impl       *This   = (IDirect3D9Impl *)iface;
     IDirect3DDevice9Impl *object = NULL;
-    WINED3DPRESENT_PARAMETERS localParameters;
+    WINED3DPRESENT_PARAMETERS *localParameters;
+    UINT i, count = 1;
     HRESULT hr;
     TRACE("(%p) Relay\n", This);
@@ -495,4 +423,5 @@
 
     object->lpVtbl = &Direct3DDevice9_Vtbl;
+    object->device_parent_vtbl = &d3d9_wined3d_device_parent_vtbl;
     object->ref = 1;
     *ppReturnedDeviceInterface = (IDirect3DDevice9 *)object;
@@ -500,6 +429,6 @@
     /* Allocate an associated WineD3DDevice object */
     EnterCriticalSection(&d3d9_cs);
-    hr =IWineD3D_CreateDevice(This->WineD3D, Adapter, DeviceType, hFocusWindow, BehaviourFlags, &object->WineD3DDevice, (IUnknown *)object);
-
+    hr = IWineD3D_CreateDevice(This->WineD3D, Adapter, DeviceType, hFocusWindow, BehaviourFlags,
+            (IUnknown *)object, (IWineD3DDeviceParent *)&object->device_parent_vtbl, &object->WineD3DDevice);
     if (hr != D3D_OK) {
         HeapFree(GetProcessHeap(), 0, object);
@@ -511,19 +440,11 @@
     TRACE("(%p) : Created Device %p\n", This, object);
 
-    localParameters.BackBufferWidth                     = pPresentationParameters->BackBufferWidth;
-    localParameters.BackBufferHeight                    = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                    = pPresentationParameters->BackBufferFormat;
-    localParameters.BackBufferCount                     = pPresentationParameters->BackBufferCount;
-    localParameters.MultiSampleType                     = pPresentationParameters->MultiSampleType;
-    localParameters.MultiSampleQuality                  = pPresentationParameters->MultiSampleQuality;
-    localParameters.SwapEffect                          = pPresentationParameters->SwapEffect;
-    localParameters.hDeviceWindow                       = pPresentationParameters->hDeviceWindow;
-    localParameters.Windowed                            = pPresentationParameters->Windowed;
-    localParameters.EnableAutoDepthStencil              = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat              = pPresentationParameters->AutoDepthStencilFormat;
-    localParameters.Flags                               = pPresentationParameters->Flags;
-    localParameters.FullScreen_RefreshRateInHz          = pPresentationParameters->FullScreen_RefreshRateInHz;
-    localParameters.PresentationInterval                = pPresentationParameters->PresentationInterval;
-    localParameters.AutoRestoreDisplayMode              = TRUE;
+    if (BehaviourFlags & D3DCREATE_ADAPTERGROUP_DEVICE)
+    {
+        WINED3DCAPS caps;
+
+        IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, &caps);
+        count = caps.NumberOfAdaptersInGroup;
+    }
 
     if(BehaviourFlags & D3DCREATE_MULTITHREADED) {
@@ -531,21 +452,25 @@
     }
 
-    hr = IWineD3DDevice_Init3D(object->WineD3DDevice, &localParameters, D3D9CB_CreateAdditionalSwapChain);
-
-    pPresentationParameters->BackBufferWidth            = localParameters.BackBufferWidth;
-    pPresentationParameters->BackBufferHeight           = localParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat           = localParameters.BackBufferFormat;
-    pPresentationParameters->BackBufferCount            = localParameters.BackBufferCount;
-    pPresentationParameters->MultiSampleType            = localParameters.MultiSampleType;
-    pPresentationParameters->MultiSampleQuality         = localParameters.MultiSampleQuality;
-    pPresentationParameters->SwapEffect                 = localParameters.SwapEffect;
-    pPresentationParameters->hDeviceWindow              = localParameters.hDeviceWindow;
-    pPresentationParameters->Windowed                   = localParameters.Windowed;
-    pPresentationParameters->EnableAutoDepthStencil     = localParameters.EnableAutoDepthStencil;
-    pPresentationParameters->AutoDepthStencilFormat     = localParameters.AutoDepthStencilFormat;
-    pPresentationParameters->Flags                      = localParameters.Flags;
-    pPresentationParameters->FullScreen_RefreshRateInHz = localParameters.FullScreen_RefreshRateInHz;
-    pPresentationParameters->PresentationInterval       = localParameters.PresentationInterval;
-
+    localParameters = HeapAlloc(GetProcessHeap(), 0, sizeof(*localParameters) * count);
+    for (i = 0; i < count; ++i)
+    {
+        localParameters[i].BackBufferWidth = pPresentationParameters[i].BackBufferWidth;
+        localParameters[i].BackBufferHeight = pPresentationParameters[i].BackBufferHeight;
+        localParameters[i].BackBufferFormat = wined3dformat_from_d3dformat(pPresentationParameters[i].BackBufferFormat);
+        localParameters[i].BackBufferCount = pPresentationParameters[i].BackBufferCount;
+        localParameters[i].MultiSampleType = pPresentationParameters[i].MultiSampleType;
+        localParameters[i].MultiSampleQuality = pPresentationParameters[i].MultiSampleQuality;
+        localParameters[i].SwapEffect = pPresentationParameters[i].SwapEffect;
+        localParameters[i].hDeviceWindow = pPresentationParameters[i].hDeviceWindow;
+        localParameters[i].Windowed = pPresentationParameters[i].Windowed;
+        localParameters[i].EnableAutoDepthStencil = pPresentationParameters[i].EnableAutoDepthStencil;
+        localParameters[i].AutoDepthStencilFormat = wined3dformat_from_d3dformat(pPresentationParameters[i].AutoDepthStencilFormat);
+        localParameters[i].Flags = pPresentationParameters[i].Flags;
+        localParameters[i].FullScreen_RefreshRateInHz = pPresentationParameters[i].FullScreen_RefreshRateInHz;
+        localParameters[i].PresentationInterval = pPresentationParameters[i].PresentationInterval;
+        localParameters[i].AutoRestoreDisplayMode = TRUE;
+    }
+
+    hr = IWineD3DDevice_Init3D(object->WineD3DDevice, localParameters);
     if (hr != D3D_OK) {
         FIXME("(%p) D3D Initialization failed for WineD3DDevice %p\n", This, object->WineD3DDevice);
@@ -553,4 +478,23 @@
         *ppReturnedDeviceInterface = NULL;
     }
+
+    for (i = 0; i < count; ++i)
+    {
+        pPresentationParameters[i].BackBufferWidth = localParameters[i].BackBufferWidth;
+        pPresentationParameters[i].BackBufferHeight = localParameters[i].BackBufferHeight;
+        pPresentationParameters[i].BackBufferFormat = d3dformat_from_wined3dformat(localParameters[i].BackBufferFormat);
+        pPresentationParameters[i].BackBufferCount = localParameters[i].BackBufferCount;
+        pPresentationParameters[i].MultiSampleType = localParameters[i].MultiSampleType;
+        pPresentationParameters[i].MultiSampleQuality = localParameters[i].MultiSampleQuality;
+        pPresentationParameters[i].SwapEffect = localParameters[i].SwapEffect;
+        pPresentationParameters[i].hDeviceWindow = localParameters[i].hDeviceWindow;
+        pPresentationParameters[i].Windowed = localParameters[i].Windowed;
+        pPresentationParameters[i].EnableAutoDepthStencil = localParameters[i].EnableAutoDepthStencil;
+        pPresentationParameters[i].AutoDepthStencilFormat = d3dformat_from_wined3dformat(localParameters[i].AutoDepthStencilFormat);
+        pPresentationParameters[i].Flags = localParameters[i].Flags;
+        pPresentationParameters[i].FullScreen_RefreshRateInHz = localParameters[i].FullScreen_RefreshRateInHz;
+        pPresentationParameters[i].PresentationInterval = localParameters[i].PresentationInterval;
+    }
+    HeapFree(GetProcessHeap(), 0, localParameters);
 
     /* Initialize the converted declaration array. This creates a valid pointer and when adding decls HeapReAlloc
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/indexbuffer.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/indexbuffer.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/indexbuffer.c	(revision 19678)
@@ -68,5 +68,5 @@
     if (ref == 0) {
         EnterCriticalSection(&d3d9_cs);
-        IWineD3DIndexBuffer_Release(This->wineD3DIndexBuffer);
+        IWineD3DBuffer_Release(This->wineD3DIndexBuffer);
         LeaveCriticalSection(&d3d9_cs);
         IDirect3DDevice9Ex_Release(This->parentDevice);
@@ -79,9 +79,15 @@
 static HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDevice(LPDIRECT3DINDEXBUFFER9 iface, IDirect3DDevice9** ppDevice) {
     IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d9_cs);
-    hr = IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DBuffer_GetDevice(This->wineD3DIndexBuffer, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -94,5 +100,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DIndexBuffer_SetPrivateData(This->wineD3DIndexBuffer, refguid, pData, SizeOfData, Flags);
+    hr = IWineD3DBuffer_SetPrivateData(This->wineD3DIndexBuffer, refguid, pData, SizeOfData, Flags);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -105,5 +111,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DIndexBuffer_GetPrivateData(This->wineD3DIndexBuffer, refguid, pData, pSizeOfData);
+    hr = IWineD3DBuffer_GetPrivateData(This->wineD3DIndexBuffer, refguid, pData, pSizeOfData);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -116,5 +122,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DIndexBuffer_FreePrivateData(This->wineD3DIndexBuffer, refguid);
+    hr = IWineD3DBuffer_FreePrivateData(This->wineD3DIndexBuffer, refguid);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -127,5 +133,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    ret = IWineD3DIndexBuffer_SetPriority(This->wineD3DIndexBuffer, PriorityNew);
+    ret = IWineD3DBuffer_SetPriority(This->wineD3DIndexBuffer, PriorityNew);
     LeaveCriticalSection(&d3d9_cs);
     return ret;
@@ -138,5 +144,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    ret = IWineD3DIndexBuffer_GetPriority(This->wineD3DIndexBuffer);
+    ret = IWineD3DBuffer_GetPriority(This->wineD3DIndexBuffer);
     LeaveCriticalSection(&d3d9_cs);
     return ret;
@@ -148,5 +154,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    IWineD3DIndexBuffer_PreLoad(This->wineD3DIndexBuffer);
+    IWineD3DBuffer_PreLoad(This->wineD3DIndexBuffer);
     LeaveCriticalSection(&d3d9_cs);
 }
@@ -154,11 +160,7 @@
 static D3DRESOURCETYPE WINAPI IDirect3DIndexBuffer9Impl_GetType(LPDIRECT3DINDEXBUFFER9 iface) {
     IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
-    D3DRESOURCETYPE ret;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d9_cs);
-    ret = IWineD3DIndexBuffer_GetType(This->wineD3DIndexBuffer);
-    LeaveCriticalSection(&d3d9_cs);
-    return ret;
+    TRACE("(%p)\n", This);
+
+    return D3DRTYPE_INDEXBUFFER;
 }
 
@@ -170,5 +172,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DIndexBuffer_Lock(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
+    hr = IWineD3DBuffer_Map(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -181,5 +183,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DIndexBuffer_Unlock(This->wineD3DIndexBuffer);
+    hr = IWineD3DBuffer_Unmap(This->wineD3DIndexBuffer);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -189,9 +191,19 @@
     IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;
     HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DIndexBuffer_GetDesc(This->wineD3DIndexBuffer, (WINED3DINDEXBUFFER_DESC *) pDesc);
-    LeaveCriticalSection(&d3d9_cs);
+    WINED3DBUFFER_DESC desc;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DBuffer_GetDesc(This->wineD3DIndexBuffer, &desc);
+    LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) {
+        pDesc->Format = d3dformat_from_wined3dformat(This->format);
+        pDesc->Usage = desc.Usage;
+        pDesc->Pool = desc.Pool;
+        pDesc->Size = desc.Size;
+        pDesc->Type = D3DRTYPE_INDEXBUFFER;
+    }
+
     return hr;
 }
@@ -239,6 +251,10 @@
     object->lpVtbl = &Direct3DIndexBuffer9_Vtbl;
     object->ref = 1;
+    object->format = wined3dformat_from_d3dformat(Format);
     TRACE("Calling wined3d create index buffer\n");
-    hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage & WINED3DUSAGE_MASK, Format, (WINED3DPOOL) Pool, &object->wineD3DIndexBuffer, pSharedHandle, (IUnknown *)object);
+    EnterCriticalSection(&d3d9_cs);
+    hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage & WINED3DUSAGE_MASK,
+            (WINED3DPOOL)Pool, &object->wineD3DIndexBuffer, (IUnknown *)object);
+    LeaveCriticalSection(&d3d9_cs);
     if (hrc != D3D_OK) {
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/pixelshader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/pixelshader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/pixelshader.c	(revision 19678)
@@ -180,9 +180,19 @@
     EnterCriticalSection(&d3d9_cs);
     hrc = IWineD3DDevice_GetPixelShader(This->WineD3DDevice, &object);
-    if (hrc == D3D_OK && object != NULL) {
-       hrc = IWineD3DPixelShader_GetParent(object, (IUnknown **)ppShader);
-       IWineD3DPixelShader_Release(object);
-    } else {
-        *ppShader = NULL;
+    if (SUCCEEDED(hrc))
+    {
+        if (object)
+        {
+            hrc = IWineD3DPixelShader_GetParent(object, (IUnknown **)ppShader);
+            IWineD3DPixelShader_Release(object);
+        }
+        else
+        {
+            *ppShader = NULL;
+        }
+    }
+    else
+    {
+        WARN("(%p) : Call to IWineD3DDevice_GetPixelShader failed %u (device %p)\n", This, hrc, This->WineD3DDevice);
     }
     LeaveCriticalSection(&d3d9_cs);
@@ -205,6 +215,13 @@
 HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT Register, float* pConstantData, UINT Vector4fCount) {
     IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DDevice_GetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, Vector4fCount);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DDevice_GetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, Vector4fCount);
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/query.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/query.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/query.c	(revision 19678)
@@ -173,5 +173,5 @@
     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DQuery9Impl));
     if (NULL == object) {
-        FIXME("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n");
+        ERR("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n");
         return D3DERR_OUTOFVIDEOMEMORY;
     }
@@ -186,5 +186,5 @@
 
         /* free up object */
-        FIXME("(%p) call to IWineD3DDevice_CreateQuery failed\n", This);
+        WARN("(%p) call to IWineD3DDevice_CreateQuery failed\n", This);
         HeapFree(GetProcessHeap(), 0, object);
     } else {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/resource.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/resource.c	(revision 19677)
+++ 	(revision )
@@ -1,144 +1,0 @@
-/*
- * IDirect3DResource9 implementation
- *
- * Copyright 2002-2004 Jason Edmeades
- *                     Raphael Junqueira
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/*
- * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
- * other than GPL or LGPL is available it will apply instead, Sun elects to use only
- * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
- * a choice of LGPL license versions is made available with the language indicating
- * that LGPLv2 or any later version may be used, or where a choice of which version
- * of the LGPL is applied is otherwise unspecified.
- */
-
-#include "config.h"
-#include "d3d9_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
-
-/* IDirect3DResource9 IUnknown parts follow: */
-static HRESULT WINAPI IDirect3DResource9Impl_QueryInterface(LPDIRECT3DRESOURCE9 iface, REFIID riid, LPVOID* ppobj) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-
-    if (IsEqualGUID(riid, &IID_IUnknown)
-        || IsEqualGUID(riid, &IID_IDirect3DResource9)) {
-        IDirect3DResource9_AddRef(iface);
-        *ppobj = This;
-        return S_OK;
-    }
-
-    WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
-    *ppobj = NULL;
-    return E_NOINTERFACE;
-}
-
-static ULONG WINAPI IDirect3DResource9Impl_AddRef(LPDIRECT3DRESOURCE9 iface) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    ULONG ref = InterlockedIncrement(&This->ref);
-
-    TRACE("(%p) : AddRef from %d\n", This, ref - 1);
-
-    return ref;
-}
-
-static ULONG WINAPI IDirect3DResource9Impl_Release(LPDIRECT3DRESOURCE9 iface) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    ULONG ref = InterlockedDecrement(&This->ref);
-
-    TRACE("(%p) : ReleaseRef to %d\n", This, ref);
-
-    if (ref == 0) {
-        IWineD3DResource_Release(This->wineD3DResource);
-        HeapFree(GetProcessHeap(), 0, This);
-    }
-    return ref;
-}
-
-/* IDirect3DResource9 Interface follow: */
-HRESULT WINAPI IDirect3DResource9Impl_GetDevice(LPDIRECT3DRESOURCE9 iface, IDirect3DDevice9** ppDevice) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    IWineD3DDevice *myDevice = NULL;
-
-    TRACE("(%p) Relay\n", This);
-
-    IWineD3DResource_GetDevice(This->wineD3DResource, &myDevice);
-    IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice);
-    IWineD3DDevice_Release(myDevice);
-    return D3D_OK;
-}
-
-static HRESULT WINAPI IDirect3DResource9Impl_SetPrivateData(LPDIRECT3DRESOURCE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DResource_SetPrivateData(This->wineD3DResource, refguid, pData, SizeOfData, Flags);
-}
-
-static HRESULT WINAPI IDirect3DResource9Impl_GetPrivateData(LPDIRECT3DRESOURCE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DResource_GetPrivateData(This->wineD3DResource, refguid, pData, pSizeOfData);
-}
-
-static HRESULT WINAPI IDirect3DResource9Impl_FreePrivateData(LPDIRECT3DRESOURCE9 iface, REFGUID refguid) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DResource_FreePrivateData(This->wineD3DResource, refguid);
-}
-
-static DWORD  WINAPI IDirect3DResource9Impl_SetPriority(LPDIRECT3DRESOURCE9 iface, DWORD PriorityNew) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DResource_SetPriority(This->wineD3DResource, PriorityNew);
-}
-
-static DWORD WINAPI IDirect3DResource9Impl_GetPriority(LPDIRECT3DRESOURCE9 iface) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DResource_GetPriority(This->wineD3DResource);
-}
-
-static void WINAPI IDirect3DResource9Impl_PreLoad(LPDIRECT3DRESOURCE9 iface) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    IWineD3DResource_PreLoad(This->wineD3DResource);
-    return;
-}
-
-static D3DRESOURCETYPE WINAPI IDirect3DResource9Impl_GetType(LPDIRECT3DRESOURCE9 iface) {
-    IDirect3DResource9Impl *This = (IDirect3DResource9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DResource_GetType(This->wineD3DResource);
-}
-
-
-const IDirect3DResource9Vtbl Direct3DResource9_Vtbl =
-{
-    IDirect3DResource9Impl_QueryInterface,
-    IDirect3DResource9Impl_AddRef,
-    IDirect3DResource9Impl_Release,
-    IDirect3DResource9Impl_GetDevice,
-    IDirect3DResource9Impl_SetPrivateData,
-    IDirect3DResource9Impl_GetPrivateData,
-    IDirect3DResource9Impl_FreePrivateData,
-    IDirect3DResource9Impl_SetPriority,
-    IDirect3DResource9Impl_GetPriority,
-    IDirect3DResource9Impl_PreLoad,
-    IDirect3DResource9Impl_GetType
-};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/stateblock.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/stateblock.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/stateblock.c	(revision 19678)
@@ -79,9 +79,15 @@
 static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(LPDIRECT3DSTATEBLOCK9 iface, IDirect3DDevice9** ppDevice) {
     IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface;
+    IWineD3DDevice *wined3d_device;
     HRESULT hr;
     TRACE("(%p) Relay\n", This);
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
+    hr = IWineD3DStateBlock_GetDevice(This->wineD3DStateBlock, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -185,5 +191,5 @@
     LeaveCriticalSection(&d3d9_cs);
     if(hr!= D3D_OK){
-       FIXME("IWineD3DDevice_EndStateBlock returned an error\n");
+       WARN("IWineD3DDevice_EndStateBlock returned an error\n");
        return hr;
     }    
@@ -198,5 +204,5 @@
     object->parentDevice = iface;
     *ppSB=(IDirect3DStateBlock9*)object;
-    TRACE("(%p)Returning %p %p\n", This, *ppSB, wineD3DStateBlock);
+    TRACE("(%p) Returning *ppSB %p, wineD3DStateBlock %p\n", This, *ppSB, wineD3DStateBlock);
     return D3D_OK;
 }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/surface.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/surface.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/surface.c	(revision 19678)
@@ -102,9 +102,15 @@
 static HRESULT WINAPI IDirect3DSurface9Impl_GetDevice(LPDIRECT3DSURFACE9 iface, IDirect3DDevice9** ppDevice) {
     IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;
+    IWineD3DDevice *wined3d_device;
     HRESULT hr;
     TRACE("(%p)->(%p)\n", This, ppDevice);
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
+    hr = IWineD3DSurface_GetDevice(This->wineD3DSurface, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -211,9 +217,10 @@
     WINED3DSURFACE_DESC    wined3ddesc;
     UINT                   tmpInt = -1;
+    WINED3DFORMAT format;
     HRESULT hr;
     TRACE("(%p) Relay\n", This);
 
     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
-    wined3ddesc.Format              = (WINED3DFORMAT *)&pDesc->Format;
+    wined3ddesc.Format              = &format;
     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
     wined3ddesc.Usage               = &pDesc->Usage;
@@ -228,4 +235,7 @@
     hr = IWineD3DSurface_GetDesc(This->wineD3DSurface, &wined3ddesc);
     LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
+
     return hr;
 }
@@ -251,5 +261,9 @@
     hr = IWineD3DSurface_UnlockRect(This->wineD3DSurface);
     LeaveCriticalSection(&d3d9_cs);
-    return hr;
+    switch(hr)
+    {
+        case WINEDDERR_NOTLOCKED:       return D3DERR_INVALIDCALL;
+        default:                        return hr;
+    }
 }
 
@@ -273,5 +287,8 @@
     hr = IWineD3DSurface_ReleaseDC(This->wineD3DSurface, hdc);
     LeaveCriticalSection(&d3d9_cs);
-    return hr;
+    switch(hr) {
+        case WINEDDERR_NODC:    return WINED3DERR_INVALIDCALL;
+        default:                return hr;
+    }
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/swapchain.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/swapchain.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/swapchain.c	(revision 19678)
@@ -84,6 +84,13 @@
 static HRESULT WINAPI IDirect3DSwapChain9Impl_Present(LPDIRECT3DSWAPCHAIN9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, DWORD dwFlags) {
     IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DSwapChain_Present(This->wineD3DSwapChain, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DSwapChain_Present(This->wineD3DSwapChain, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
@@ -136,4 +143,7 @@
     hr = IWineD3DSwapChain_GetDisplayMode(This->wineD3DSwapChain, (WINED3DDISPLAYMODE *) pMode);
     LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
+
     return hr;
 }
@@ -169,5 +179,5 @@
     pPresentationParameters->BackBufferWidth            = winePresentParameters.BackBufferWidth;
     pPresentationParameters->BackBufferHeight           = winePresentParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat           = winePresentParameters.BackBufferFormat;
+    pPresentationParameters->BackBufferFormat           = d3dformat_from_wined3dformat(winePresentParameters.BackBufferFormat);
     pPresentationParameters->BackBufferCount            = winePresentParameters.BackBufferCount;
     pPresentationParameters->MultiSampleType            = winePresentParameters.MultiSampleType;
@@ -177,4 +187,5 @@
     pPresentationParameters->Windowed                   = winePresentParameters.Windowed;
     pPresentationParameters->EnableAutoDepthStencil     = winePresentParameters.EnableAutoDepthStencil;
+    pPresentationParameters->AutoDepthStencilFormat     = d3dformat_from_wined3dformat(winePresentParameters.AutoDepthStencilFormat);
     pPresentationParameters->Flags                      = winePresentParameters.Flags;
     pPresentationParameters->FullScreen_RefreshRateInHz = winePresentParameters.FullScreen_RefreshRateInHz;
@@ -225,5 +236,5 @@
     localParameters.BackBufferWidth                     = pPresentationParameters->BackBufferWidth;
     localParameters.BackBufferHeight                    = pPresentationParameters->BackBufferHeight;
-    localParameters.BackBufferFormat                    = pPresentationParameters->BackBufferFormat;
+    localParameters.BackBufferFormat                    = wined3dformat_from_d3dformat(pPresentationParameters->BackBufferFormat);
     localParameters.BackBufferCount                     = pPresentationParameters->BackBufferCount;
     localParameters.MultiSampleType                     = pPresentationParameters->MultiSampleType;
@@ -233,16 +244,18 @@
     localParameters.Windowed                            = pPresentationParameters->Windowed;
     localParameters.EnableAutoDepthStencil              = pPresentationParameters->EnableAutoDepthStencil;
-    localParameters.AutoDepthStencilFormat              = pPresentationParameters->AutoDepthStencilFormat;
+    localParameters.AutoDepthStencilFormat              = wined3dformat_from_d3dformat(pPresentationParameters->AutoDepthStencilFormat);
     localParameters.Flags                               = pPresentationParameters->Flags;
     localParameters.FullScreen_RefreshRateInHz          = pPresentationParameters->FullScreen_RefreshRateInHz;
     localParameters.PresentationInterval                = pPresentationParameters->PresentationInterval;
-
-    EnterCriticalSection(&d3d9_cs);
-    hrc = IWineD3DDevice_CreateSwapChain(This->WineD3DDevice, &localParameters, &object->wineD3DSwapChain, (IUnknown*)object, D3D9CB_CreateRenderTarget, D3D9CB_CreateDepthStencilSurface, SURFACE_OPENGL);
+    localParameters.AutoRestoreDisplayMode              = TRUE;
+
+    EnterCriticalSection(&d3d9_cs);
+    hrc = IWineD3DDevice_CreateSwapChain(This->WineD3DDevice, &localParameters,
+            &object->wineD3DSwapChain, (IUnknown*)object, SURFACE_OPENGL);
     LeaveCriticalSection(&d3d9_cs);
 
     pPresentationParameters->BackBufferWidth            = localParameters.BackBufferWidth;
     pPresentationParameters->BackBufferHeight           = localParameters.BackBufferHeight;
-    pPresentationParameters->BackBufferFormat           = localParameters.BackBufferFormat;
+    pPresentationParameters->BackBufferFormat           = d3dformat_from_wined3dformat(localParameters.BackBufferFormat);
     pPresentationParameters->BackBufferCount            = localParameters.BackBufferCount;
     pPresentationParameters->MultiSampleType            = localParameters.MultiSampleType;
@@ -252,5 +265,5 @@
     pPresentationParameters->Windowed                   = localParameters.Windowed;
     pPresentationParameters->EnableAutoDepthStencil     = localParameters.EnableAutoDepthStencil;
-    pPresentationParameters->AutoDepthStencilFormat     = localParameters.AutoDepthStencilFormat;
+    pPresentationParameters->AutoDepthStencilFormat     = d3dformat_from_wined3dformat(localParameters.AutoDepthStencilFormat);
     pPresentationParameters->Flags                      = localParameters.Flags;
     pPresentationParameters->FullScreen_RefreshRateInHz = localParameters.FullScreen_RefreshRateInHz;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/texture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/texture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/texture.c	(revision 19678)
@@ -81,9 +81,15 @@
 static HRESULT WINAPI IDirect3DTexture9Impl_GetDevice(LPDIRECT3DTEXTURE9 iface, IDirect3DDevice9** ppDevice) {
     IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d9_cs);
-    hr = IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DTexture_GetDevice(This->wineD3DTexture, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -237,8 +243,10 @@
     UINT                   tmpInt = -1;
     HRESULT                hr;
+    WINED3DFORMAT format;
+
     TRACE("(%p) Relay\n", This);
 
     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
-    wined3ddesc.Format              = (WINED3DFORMAT *)&pDesc->Format;
+    wined3ddesc.Format              = &format;
     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
     wined3ddesc.Usage               = &pDesc->Usage;
@@ -253,4 +261,7 @@
     hr = IWineD3DTexture_GetLevelDesc(This->wineD3DTexture, Level, &wined3ddesc);
     LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
+
     return hr;
 }
@@ -349,5 +360,5 @@
 
     if (NULL == object) {
-        FIXME("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n");
+        ERR("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n");
         return D3DERR_OUTOFVIDEOMEMORY;
     }
@@ -357,11 +368,10 @@
     EnterCriticalSection(&d3d9_cs);
     hrc = IWineD3DDevice_CreateTexture(This->WineD3DDevice, Width, Height, Levels, Usage & WINED3DUSAGE_MASK,
-                                 (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DTexture, pSharedHandle, (IUnknown *)object, D3D9CB_CreateSurface);
-    LeaveCriticalSection(&d3d9_cs);
-
+            wined3dformat_from_d3dformat(Format), Pool, &object->wineD3DTexture, (IUnknown *)object);
+    LeaveCriticalSection(&d3d9_cs);
     if (FAILED(hrc)) {
 
         /* free up object */
-        FIXME("(%p) call to IWineD3DDevice_CreateTexture failed\n", This);
+        WARN("(%p) call to IWineD3DDevice_CreateTexture failed\n", This);
         HeapFree(GetProcessHeap(), 0, object);
    } else {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexbuffer.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexbuffer.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexbuffer.c	(revision 19678)
@@ -69,5 +69,5 @@
     if (ref == 0) {
         EnterCriticalSection(&d3d9_cs);
-        IWineD3DVertexBuffer_Release(This->wineD3DVertexBuffer);
+        IWineD3DBuffer_Release(This->wineD3DVertexBuffer);
         LeaveCriticalSection(&d3d9_cs);
         IDirect3DDevice9Ex_Release(This->parentDevice);
@@ -80,9 +80,15 @@
 static HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDevice(LPDIRECT3DVERTEXBUFFER9 iface, IDirect3DDevice9** ppDevice) {
     IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
-    HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d9_cs);
-    hr = IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DBuffer_GetDevice(This->wineD3DVertexBuffer, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -91,6 +97,13 @@
 static HRESULT WINAPI IDirect3DVertexBuffer9Impl_SetPrivateData(LPDIRECT3DVERTEXBUFFER9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
     IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVertexBuffer_SetPrivateData(This->wineD3DVertexBuffer, refguid, pData, SizeOfData, Flags);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DBuffer_SetPrivateData(This->wineD3DVertexBuffer, refguid, pData, SizeOfData, Flags);
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
@@ -101,5 +114,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DVertexBuffer_GetPrivateData(This->wineD3DVertexBuffer, refguid, pData, pSizeOfData);
+    hr = IWineD3DBuffer_GetPrivateData(This->wineD3DVertexBuffer, refguid, pData, pSizeOfData);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -112,5 +125,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DVertexBuffer_FreePrivateData(This->wineD3DVertexBuffer, refguid);
+    hr = IWineD3DBuffer_FreePrivateData(This->wineD3DVertexBuffer, refguid);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -123,5 +136,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DVertexBuffer_SetPriority(This->wineD3DVertexBuffer, PriorityNew);
+    hr = IWineD3DBuffer_SetPriority(This->wineD3DVertexBuffer, PriorityNew);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -134,5 +147,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DVertexBuffer_GetPriority(This->wineD3DVertexBuffer);
+    hr = IWineD3DBuffer_GetPriority(This->wineD3DVertexBuffer);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -144,5 +157,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    IWineD3DVertexBuffer_PreLoad(This->wineD3DVertexBuffer);
+    IWineD3DBuffer_PreLoad(This->wineD3DVertexBuffer);
     LeaveCriticalSection(&d3d9_cs);
     return ;
@@ -151,11 +164,7 @@
 static D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer9Impl_GetType(LPDIRECT3DVERTEXBUFFER9 iface) {
     IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
-    D3DRESOURCETYPE ret;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d9_cs);
-    ret = IWineD3DVertexBuffer_GetType(This->wineD3DVertexBuffer);
-    LeaveCriticalSection(&d3d9_cs);
-    return ret;
+    TRACE("(%p)\n", This);
+
+    return D3DRTYPE_VERTEXBUFFER;
 }
 
@@ -167,5 +176,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DVertexBuffer_Lock(This->wineD3DVertexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
+    hr = IWineD3DBuffer_Map(This->wineD3DVertexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -178,5 +187,5 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DVertexBuffer_Unlock(This->wineD3DVertexBuffer);
+    hr = IWineD3DBuffer_Unmap(This->wineD3DVertexBuffer);
     LeaveCriticalSection(&d3d9_cs);
     return hr;
@@ -186,9 +195,21 @@
     IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface;
     HRESULT hr;
-    TRACE("(%p) Relay\n", This);
-
-    EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DVertexBuffer_GetDesc(This->wineD3DVertexBuffer, (WINED3DVERTEXBUFFER_DESC *) pDesc);
-    LeaveCriticalSection(&d3d9_cs);
+    WINED3DBUFFER_DESC desc;
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DBuffer_GetDesc(This->wineD3DVertexBuffer, &desc);
+    LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) {
+        pDesc->Format = D3DFMT_VERTEXDATA;
+        pDesc->Usage = desc.Usage;
+        pDesc->Pool = desc.Pool;
+        pDesc->Size = desc.Size;
+        pDesc->Type = D3DRTYPE_VERTEXBUFFER;
+        pDesc->FVF = This->fvf;
+    }
+
+
     return hr;
 }
@@ -234,6 +255,8 @@
     object->lpVtbl = &Direct3DVertexBuffer9_Vtbl;
     object->ref = 1;
-    EnterCriticalSection(&d3d9_cs);
-    hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage & WINED3DUSAGE_MASK, FVF, (WINED3DPOOL) Pool, &(object->wineD3DVertexBuffer), pSharedHandle, (IUnknown *)object);
+    object->fvf = FVF;
+    EnterCriticalSection(&d3d9_cs);
+    hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage & WINED3DUSAGE_MASK,
+            0 /* fvf for ddraw only */, (WINED3DPOOL) Pool, &(object->wineD3DVertexBuffer), (IUnknown *)object);
     LeaveCriticalSection(&d3d9_cs);
     
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexdeclaration.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexdeclaration.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexdeclaration.c	(revision 19678)
@@ -36,4 +36,5 @@
 typedef struct _D3DDECLTYPE_INFO {
     D3DDECLTYPE d3dType;
+    WINED3DFORMAT format;
     int         size;
     int         typesize;
@@ -41,21 +42,21 @@
 
 static D3DDECLTYPE_INFO const d3d_dtype_lookup[D3DDECLTYPE_UNUSED] = {
-   {D3DDECLTYPE_FLOAT1,    1, sizeof(float)},
-   {D3DDECLTYPE_FLOAT2,    2, sizeof(float)},
-   {D3DDECLTYPE_FLOAT3,    3, sizeof(float)},
-   {D3DDECLTYPE_FLOAT4,    4, sizeof(float)},
-   {D3DDECLTYPE_D3DCOLOR,  4, sizeof(BYTE)},
-   {D3DDECLTYPE_UBYTE4,    4, sizeof(BYTE)},
-   {D3DDECLTYPE_SHORT2,    2, sizeof(short int)},
-   {D3DDECLTYPE_SHORT4,    4, sizeof(short int)},
-   {D3DDECLTYPE_UBYTE4N,   4, sizeof(BYTE)},
-   {D3DDECLTYPE_SHORT2N,   2, sizeof(short int)},
-   {D3DDECLTYPE_SHORT4N,   4, sizeof(short int)},
-   {D3DDECLTYPE_USHORT2N,  2, sizeof(short int)},
-   {D3DDECLTYPE_USHORT4N,  4, sizeof(short int)},
-   {D3DDECLTYPE_UDEC3,     3, sizeof(short int)},
-   {D3DDECLTYPE_DEC3N,     3, sizeof(short int)},
-   {D3DDECLTYPE_FLOAT16_2, 2, sizeof(short int)},
-   {D3DDECLTYPE_FLOAT16_4, 4, sizeof(short int)}};
+   {D3DDECLTYPE_FLOAT1,    WINED3DFMT_R32_FLOAT,          1, sizeof(float)},
+   {D3DDECLTYPE_FLOAT2,    WINED3DFMT_R32G32_FLOAT,       2, sizeof(float)},
+   {D3DDECLTYPE_FLOAT3,    WINED3DFMT_R32G32B32_FLOAT,    3, sizeof(float)},
+   {D3DDECLTYPE_FLOAT4,    WINED3DFMT_R32G32B32A32_FLOAT, 4, sizeof(float)},
+   {D3DDECLTYPE_D3DCOLOR,  WINED3DFMT_A8R8G8B8,           4, sizeof(BYTE)},
+   {D3DDECLTYPE_UBYTE4,    WINED3DFMT_R8G8B8A8_UINT,      4, sizeof(BYTE)},
+   {D3DDECLTYPE_SHORT2,    WINED3DFMT_R16G16_SINT,        2, sizeof(short int)},
+   {D3DDECLTYPE_SHORT4,    WINED3DFMT_R16G16B16A16_SINT,  4, sizeof(short int)},
+   {D3DDECLTYPE_UBYTE4N,   WINED3DFMT_R8G8B8A8_UNORM,     4, sizeof(BYTE)},
+   {D3DDECLTYPE_SHORT2N,   WINED3DFMT_R16G16_SNORM,       2, sizeof(short int)},
+   {D3DDECLTYPE_SHORT4N,   WINED3DFMT_R16G16B16A16_SNORM, 4, sizeof(short int)},
+   {D3DDECLTYPE_USHORT2N,  WINED3DFMT_R16G16_UNORM,       2, sizeof(short int)},
+   {D3DDECLTYPE_USHORT4N,  WINED3DFMT_R16G16B16A16_UNORM, 4, sizeof(short int)},
+   {D3DDECLTYPE_UDEC3,     WINED3DFMT_R10G10B10A2_UINT,   3, sizeof(short int)},
+   {D3DDECLTYPE_DEC3N,     WINED3DFMT_R10G10B10A2_SNORM,  3, sizeof(short int)},
+   {D3DDECLTYPE_FLOAT16_2, WINED3DFMT_R16G16_FLOAT,       2, sizeof(short int)},
+   {D3DDECLTYPE_FLOAT16_4, WINED3DFMT_R16G16B16A16_FLOAT, 4, sizeof(short int)}};
 
 #define D3D_DECL_SIZE(type)          d3d_dtype_lookup[type].size
@@ -105,4 +106,8 @@
             elements[idx].Type = D3DDECLTYPE_FLOAT4;
             elements[idx].Usage = D3DDECLUSAGE_POSITIONT;
+        }
+        else if (!has_blend && (fvf & D3DFVF_XYZW) == D3DFVF_XYZW) {
+            elements[idx].Type = D3DDECLTYPE_FLOAT4;
+            elements[idx].Usage = D3DDECLUSAGE_POSITION;
         }
         else {
@@ -307,7 +312,9 @@
 };
 
-static UINT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9* d3d9_elements, WINED3DVERTEXELEMENT **wined3d_elements) {
+static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9* d3d9_elements,
+        WINED3DVERTEXELEMENT **wined3d_elements, UINT *element_count)
+{
     const D3DVERTEXELEMENT9* element;
-    UINT element_count = 1;
+    UINT count = 1;
     UINT i;
 
@@ -315,22 +322,37 @@
 
     element = d3d9_elements;
-    while (element++->Stream != 0xff && element_count++ < 128);
-
-    if (element_count == 128) {
-        return 0;
-    }
-
-    *wined3d_elements = HeapAlloc(GetProcessHeap(), 0, element_count * sizeof(WINED3DVERTEXELEMENT));
+    while (element++->Stream != 0xff && count++ < 128);
+
+    if (count == 128) return E_FAIL;
+
+    /* Skip the END element */
+    --count;
+
+    *wined3d_elements = HeapAlloc(GetProcessHeap(), 0, count * sizeof(WINED3DVERTEXELEMENT));
     if (!*wined3d_elements) {
         FIXME("Memory allocation failed\n");
-        return 0;
-    }
-
-    for (i = 0; i < element_count; ++i) {
-        CopyMemory(*wined3d_elements + i, d3d9_elements + i, sizeof(D3DVERTEXELEMENT9));
-        (*wined3d_elements)[i].Reg = -1;
-    }
-
-    return element_count;
+        return D3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    for (i = 0; i < count; ++i)
+    {
+        if (d3d9_elements[i].Type >= (sizeof(d3d_dtype_lookup) / sizeof(*d3d_dtype_lookup)))
+        {
+            WARN("Invalid element type %#x.\n", d3d9_elements[i].Type);
+            HeapFree(GetProcessHeap(), 0, *wined3d_elements);
+            return E_FAIL;
+        }
+        (*wined3d_elements)[i].format = d3d_dtype_lookup[d3d9_elements[i].Type].format;
+        (*wined3d_elements)[i].input_slot = d3d9_elements[i].Stream;
+        (*wined3d_elements)[i].offset = d3d9_elements[i].Offset;
+        (*wined3d_elements)[i].output_slot = ~0U;
+        (*wined3d_elements)[i].method = d3d9_elements[i].Method;
+        (*wined3d_elements)[i].usage = d3d9_elements[i].Usage;
+        (*wined3d_elements)[i].usage_idx = d3d9_elements[i].UsageIndex;
+    }
+
+    *element_count = count;
+
+    return D3D_OK;
 }
 
@@ -341,6 +363,7 @@
     IDirect3DVertexDeclaration9Impl *object = NULL;
     WINED3DVERTEXELEMENT* wined3d_elements;
+    UINT wined3d_element_count;
     UINT element_count;
-    HRESULT hr = D3D_OK;
+    HRESULT hr;
 
     TRACE("(%p) : Relay\n", iface);
@@ -350,8 +373,9 @@
     }
 
-    element_count = convert_to_wined3d_declaration(pVertexElements, &wined3d_elements);
-    if (!element_count) {
-        FIXME("(%p) : Error parsing vertex declaration\n", This);
-        return D3DERR_INVALIDCALL;
+    hr = convert_to_wined3d_declaration(pVertexElements, &wined3d_elements, &wined3d_element_count);
+    if (FAILED(hr))
+    {
+        WARN("(%p) : Error parsing vertex declaration\n", This);
+        return hr;
     }
 
@@ -367,4 +391,5 @@
     object->ref = 0;
 
+    element_count = wined3d_element_count + 1;
     object->elements = HeapAlloc(GetProcessHeap(), 0, element_count * sizeof(D3DVERTEXELEMENT9));
     if (!object->elements) {
@@ -378,5 +403,6 @@
 
     EnterCriticalSection(&d3d9_cs);
-    hr = IWineD3DDevice_CreateVertexDeclaration(This->WineD3DDevice, &object->wineD3DVertexDeclaration, (IUnknown *)object, wined3d_elements, element_count);
+    hr = IWineD3DDevice_CreateVertexDeclaration(This->WineD3DDevice, &object->wineD3DVertexDeclaration,
+            (IUnknown *)object, wined3d_elements, wined3d_element_count);
     LeaveCriticalSection(&d3d9_cs);
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexshader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexshader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexshader.c	(revision 19678)
@@ -176,8 +176,18 @@
     EnterCriticalSection(&d3d9_cs);
     hrc = IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &pShader);
-    if(hrc == D3D_OK && pShader != NULL){
-       hrc = IWineD3DVertexShader_GetParent(pShader, (IUnknown **)ppShader);
-       IWineD3DVertexShader_Release(pShader);
-    } else {
+    if (SUCCEEDED(hrc))
+    {
+        if (pShader)
+        {
+            hrc = IWineD3DVertexShader_GetParent(pShader, (IUnknown **)ppShader);
+            IWineD3DVertexShader_Release(pShader);
+        }
+        else
+        {
+            *ppShader = NULL;
+        }
+    }
+    else
+    {
         WARN("(%p) : Call to IWineD3DDevice_GetVertexShader failed %u (device %p)\n", This, hrc, This->WineD3DDevice);
     }
@@ -192,4 +202,10 @@
     TRACE("(%p) : Relay\n", This);
 
+    if(Register + Vector4fCount > D3D9_MAX_VERTEX_SHADER_CONSTANTF) {
+        WARN("Trying to access %u constants, but d3d9 only supports %u\n",
+             Register + Vector4fCount, D3D9_MAX_VERTEX_SHADER_CONSTANTF);
+        return D3DERR_INVALIDCALL;
+    }
+
     EnterCriticalSection(&d3d9_cs);
     hr = IWineD3DDevice_SetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, Vector4fCount);
@@ -202,4 +218,10 @@
     HRESULT hr;
 
+    if(Register + Vector4fCount > D3D9_MAX_VERTEX_SHADER_CONSTANTF) {
+        WARN("Trying to access %u constants, but d3d9 only supports %u\n",
+             Register + Vector4fCount, D3D9_MAX_VERTEX_SHADER_CONSTANTF);
+        return D3DERR_INVALIDCALL;
+    }
+
     TRACE("(%p) : Relay\n", This);
     EnterCriticalSection(&d3d9_cs);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volume.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volume.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volume.c	(revision 19678)
@@ -82,5 +82,7 @@
 
         if (ref == 0) {
+            EnterCriticalSection(&d3d9_cs);
             IWineD3DVolume_Release(This->wineD3DVolume);
+            LeaveCriticalSection(&d3d9_cs);
             HeapFree(GetProcessHeap(), 0, This);
         }
@@ -94,8 +96,15 @@
     IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
     IWineD3DDevice       *myDevice = NULL;
+
+    TRACE("iface %p, ppDevice %p\n", iface, ppDevice);
+
+    EnterCriticalSection(&d3d9_cs);
 
     IWineD3DVolume_GetDevice(This->wineD3DVolume, &myDevice);
     IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice);
     IWineD3DDevice_Release(myDevice);
+
+    LeaveCriticalSection(&d3d9_cs);
+
     return D3D_OK;
 }
@@ -103,18 +112,45 @@
 static HRESULT WINAPI IDirect3DVolume9Impl_SetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
     IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolume_SetPrivateData(This->wineD3DVolume, refguid, pData, SizeOfData, Flags);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolume_SetPrivateData(This->wineD3DVolume, refguid, pData, SizeOfData, Flags);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolume9Impl_GetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID  refguid, void* pData, DWORD* pSizeOfData) {
     IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolume_GetPrivateData(This->wineD3DVolume, refguid, pData, pSizeOfData);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolume_GetPrivateData(This->wineD3DVolume, refguid, pData, pSizeOfData);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolume9Impl_FreePrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid) {
     IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolume_FreePrivateData(This->wineD3DVolume, refguid);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolume_FreePrivateData(This->wineD3DVolume, refguid);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
@@ -142,9 +178,11 @@
     WINED3DVOLUME_DESC     wined3ddesc;
     UINT                   tmpInt = -1;
+    WINED3DFORMAT format;
+    HRESULT hr;
 
     TRACE("(%p) Relay\n", This);
 
     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
-    wined3ddesc.Format              = (WINED3DFORMAT *)&pDesc->Format;
+    wined3ddesc.Format              = &format;
     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
     wined3ddesc.Usage               = &pDesc->Usage;
@@ -155,20 +193,47 @@
     wined3ddesc.Depth               = &pDesc->Depth;
 
-    return IWineD3DVolume_GetDesc(This->wineD3DVolume, &wined3ddesc);
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolume_GetDesc(This->wineD3DVolume, &wined3ddesc);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolume9Impl_LockBox(LPDIRECT3DVOLUME9 iface, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) {
     IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
+    HRESULT hr;
+
     TRACE("(%p) relay %p %p %p %d\n", This, This->wineD3DVolume, pLockedVolume, pBox, Flags);
-    return IWineD3DVolume_LockBox(This->wineD3DVolume, (WINED3DLOCKED_BOX *)pLockedVolume, (CONST WINED3DBOX *)pBox, Flags);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolume_LockBox(This->wineD3DVolume, (WINED3DLOCKED_BOX *)pLockedVolume,
+            (const WINED3DBOX *)pBox, Flags);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolume9Impl_UnlockBox(LPDIRECT3DVOLUME9 iface) {
     IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface;
+    HRESULT hr;
+
     TRACE("(%p) relay %p\n", This, This->wineD3DVolume);
-    return IWineD3DVolume_UnlockBox(This->wineD3DVolume);
-}
-
-static const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl =
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolume_UnlockBox(This->wineD3DVolume);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
+}
+
+const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl =
 {
     /* IUnknown */
@@ -187,40 +252,4 @@
 };
 
-
-/* Internal function called back during the CreateVolumeTexture */
-HRESULT WINAPI D3D9CB_CreateVolume(IUnknown  *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
-                                   WINED3DFORMAT  Format, WINED3DPOOL Pool, DWORD Usage,
-                                   IWineD3DVolume **ppVolume,
-                                   HANDLE   * pSharedHandle) {
-    IDirect3DVolume9Impl *object;
-    IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)pDevice;
-    HRESULT hrc = D3D_OK;
-    
-    /* Allocate the storage for the device */
-    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DVolume9Impl));
-    if (NULL == object) {
-        FIXME("Allocation of memory failed\n");
-        *ppVolume = NULL;
-        return D3DERR_OUTOFVIDEOMEMORY;
-    }
-
-    object->lpVtbl = &Direct3DVolume9_Vtbl;
-    object->ref = 1;
-    hrc = IWineD3DDevice_CreateVolume(This->WineD3DDevice, Width, Height, Depth, Usage & WINED3DUSAGE_MASK, Format, 
-                                       Pool, &object->wineD3DVolume, pSharedHandle, (IUnknown *)object);
-    if (hrc != D3D_OK) {
-        /* free up object */ 
-        FIXME("(%p) call to IWineD3DDevice_CreateVolume failed\n", This);
-        HeapFree(GetProcessHeap(), 0, object);
-        *ppVolume = NULL;
-    } else {
-        *ppVolume = object->wineD3DVolume;
-        object->container = pSuperior;
-        object->forwardReference = pSuperior;
-    }
-    TRACE("(%p) Created volume %p\n", This, *ppVolume);
-    return hrc;
-}
-
 ULONG WINAPI D3D9CB_DestroyVolume(IWineD3DVolume *pVolume) {
     IDirect3DVolume9Impl* volumeParent;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volumetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volumetexture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volumetexture.c	(revision 19678)
@@ -68,5 +68,7 @@
 
     if (ref == 0) {
+        EnterCriticalSection(&d3d9_cs);
         IWineD3DVolumeTexture_Destroy(This->wineD3DVolumeTexture, D3D9CB_DestroyVolume);
+        LeaveCriticalSection(&d3d9_cs);
         IDirect3DDevice9Ex_Release(This->parentDevice);
         HeapFree(GetProcessHeap(), 0, This);
@@ -78,48 +80,121 @@
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE9 iface, IDirect3DDevice9** ppDevice) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IDirect3DResource9Impl_GetDevice((LPDIRECT3DRESOURCE9) This, ppDevice);
+    IWineD3DDevice *wined3d_device;
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+    hr = IWineD3DStateBlock_GetDevice(This->wineD3DVolumeTexture, &wined3d_device);
+    if (SUCCEEDED(hr))
+    {
+        IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice);
+        IWineD3DDevice_Release(wined3d_device);
+    }
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_SetPrivateData(This->wineD3DVolumeTexture, refguid, pData, SizeOfData, Flags);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_SetPrivateData(This->wineD3DVolumeTexture, refguid, pData, SizeOfData, Flags);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_GetPrivateData(This->wineD3DVolumeTexture, refguid, pData, pSizeOfData);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_GetPrivateData(This->wineD3DVolumeTexture, refguid, pData, pSizeOfData);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_FreePrivateData(This->wineD3DVolumeTexture, refguid);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_FreePrivateData(This->wineD3DVolumeTexture, refguid);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE9 iface, DWORD PriorityNew) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_SetPriority(This->wineD3DVolumeTexture, PriorityNew);
+    DWORD priority;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    priority = IWineD3DVolumeTexture_SetPriority(This->wineD3DVolumeTexture, PriorityNew);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return priority;
 }
 
 static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE9 iface) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_GetPriority(This->wineD3DVolumeTexture);
+    DWORD priority;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    priority = IWineD3DVolumeTexture_GetPriority(This->wineD3DVolumeTexture);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return priority;
 }
 
 static void WINAPI IDirect3DVolumeTexture9Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE9 iface) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
     IWineD3DVolumeTexture_PreLoad(This->wineD3DVolumeTexture);
+
+    LeaveCriticalSection(&d3d9_cs);
 }
 
 static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture9Impl_GetType(LPDIRECT3DVOLUMETEXTURE9 iface) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_GetType(This->wineD3DVolumeTexture);
+    D3DRESOURCETYPE type;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    type = IWineD3DVolumeTexture_GetType(This->wineD3DVolumeTexture);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return type;
 }
 
@@ -127,36 +202,87 @@
 static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE9 iface, DWORD LODNew) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_SetLOD(This->wineD3DVolumeTexture, LODNew);
+    DWORD lod;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    lod = IWineD3DVolumeTexture_SetLOD(This->wineD3DVolumeTexture, LODNew);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return lod;
 }
 
 static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE9 iface) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_GetLOD(This->wineD3DVolumeTexture);
+    DWORD lod;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    lod = IWineD3DVolumeTexture_GetLOD(This->wineD3DVolumeTexture);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return lod;
 }
 
 static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE9 iface) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_GetLevelCount(This->wineD3DVolumeTexture);
+    DWORD level_count;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    level_count = IWineD3DVolumeTexture_GetLevelCount(This->wineD3DVolumeTexture);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return level_count;
 }
 
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetAutoGenFilterType(LPDIRECT3DVOLUMETEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_SetAutoGenFilterType(This->wineD3DVolumeTexture, (WINED3DTEXTUREFILTERTYPE) FilterType);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_SetAutoGenFilterType(This->wineD3DVolumeTexture, (WINED3DTEXTUREFILTERTYPE) FilterType);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static D3DTEXTUREFILTERTYPE WINAPI IDirect3DVolumeTexture9Impl_GetAutoGenFilterType(LPDIRECT3DVOLUMETEXTURE9 iface) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return (D3DTEXTUREFILTERTYPE) IWineD3DVolumeTexture_GetAutoGenFilterType(This->wineD3DVolumeTexture);
+    D3DTEXTUREFILTERTYPE filter_type;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    filter_type = (D3DTEXTUREFILTERTYPE)IWineD3DVolumeTexture_GetAutoGenFilterType(This->wineD3DVolumeTexture);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return filter_type;
 }
 
 static void WINAPI IDirect3DVolumeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DVOLUMETEXTURE9 iface) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
     IWineD3DVolumeTexture_GenerateMipSubLevels(This->wineD3DVolumeTexture);
+
+    LeaveCriticalSection(&d3d9_cs);
 }
 
@@ -166,9 +292,11 @@
     WINED3DVOLUME_DESC     wined3ddesc;
     UINT                   tmpInt = -1;
+    WINED3DFORMAT format;
+    HRESULT hr;
 
     TRACE("(%p) Relay\n", This);
 
     /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
-    wined3ddesc.Format              = (WINED3DFORMAT *)&pDesc->Format;
+    wined3ddesc.Format              = &format;
     wined3ddesc.Type                = (WINED3DRESOURCETYPE *)&pDesc->Type;
     wined3ddesc.Usage               = &pDesc->Usage;
@@ -179,5 +307,13 @@
     wined3ddesc.Depth               = &pDesc->Depth;
 
-    return IWineD3DVolumeTexture_GetLevelDesc(This->wineD3DVolumeTexture, Level, &wined3ddesc);
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_GetLevelDesc(This->wineD3DVolumeTexture, Level, &wined3ddesc);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    if (SUCCEEDED(hr)) pDesc->Format = d3dformat_from_wined3dformat(format);
+
+    return hr;
 }
 
@@ -188,4 +324,6 @@
 
     TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
 
     hrc = IWineD3DVolumeTexture_GetVolumeLevel(This->wineD3DVolumeTexture, Level, &myVolume);
@@ -194,4 +332,7 @@
        IWineD3DVolumeTexture_Release(myVolume);
     }
+
+    LeaveCriticalSection(&d3d9_cs);
+
     return hrc;
 }
@@ -199,18 +340,46 @@
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_LockBox(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
+    HRESULT hr;
+
     TRACE("(%p) Relay %p %p %p %d\n", This, This->wineD3DVolumeTexture, pLockedVolume, pBox,Flags);
-    return IWineD3DVolumeTexture_LockBox(This->wineD3DVolumeTexture, Level, (WINED3DLOCKED_BOX *)pLockedVolume, (CONST WINED3DBOX *)pBox, Flags);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_LockBox(This->wineD3DVolumeTexture, Level, (WINED3DLOCKED_BOX *)pLockedVolume,
+            (const WINED3DBOX *)pBox, Flags);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
+    HRESULT hr;
+
     TRACE("(%p) Relay %p %d\n", This, This->wineD3DVolumeTexture, Level);
-    return IWineD3DVolumeTexture_UnlockBox(This->wineD3DVolumeTexture, Level);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_UnlockBox(This->wineD3DVolumeTexture, Level);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE9 iface, CONST D3DBOX* pDirtyBox) {
     IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DVolumeTexture_AddDirtyBox(This->wineD3DVolumeTexture, (CONST WINED3DBOX *)pDirtyBox);
+    HRESULT hr;
+
+    TRACE("(%p) Relay\n", This);
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hr = IWineD3DVolumeTexture_AddDirtyBox(This->wineD3DVolumeTexture, (CONST WINED3DBOX *)pDirtyBox);
+
+    LeaveCriticalSection(&d3d9_cs);
+
+    return hr;
 }
 
@@ -262,5 +431,5 @@
     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DVolumeTexture9Impl));
     if (NULL == object) {
-        FIXME("(%p) allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n", This);
+        ERR("(%p) allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n", This);
         return D3DERR_OUTOFVIDEOMEMORY;
     }
@@ -268,13 +437,17 @@
     object->lpVtbl = &Direct3DVolumeTexture9_Vtbl;
     object->ref = 1;
-    hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels, Usage & WINED3DUSAGE_MASK,
-                                 (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DVolumeTexture, pSharedHandle,
-                                 (IUnknown *)object, D3D9CB_CreateVolume);
-
+
+    EnterCriticalSection(&d3d9_cs);
+
+    hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels,
+            Usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(Format),
+            Pool, &object->wineD3DVolumeTexture, (IUnknown *)object);
+
+    LeaveCriticalSection(&d3d9_cs);
 
     if (hrc != D3D_OK) {
 
         /* free up object */
-        FIXME("(%p) call to IWineD3DDevice_CreateVolumeTexture failed\n", This);
+        WARN("(%p) call to IWineD3DDevice_CreateVolumeTexture failed\n", This);
         HeapFree(GetProcessHeap(), 0, object);
     } else {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/Makefile.in
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/Makefile.in	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/Makefile.in	(revision 19678)
@@ -6,5 +6,6 @@
 
 PRIVATE_IDL_H_SRCS = \
-	wine/wined3d.idl
+	wine/wined3d.idl \
+	wine/winedxgi.idl
 
 PUBLIC_IDL_H_SRCS = \
@@ -19,4 +20,5 @@
 	comcat.idl \
 	control.idl \
+	ctxtcall.idl \
 	d3d10.idl \
 	ddstream.idl \
@@ -42,4 +44,5 @@
 	mmstream.idl \
 	mscoree.idl \
+	msctf.idl \
 	mshtmhst.idl \
 	mshtml.idl \
@@ -58,4 +61,5 @@
 	oleidl.idl \
 	optary.idl \
+	perhist.idl \
 	propidl.idl \
 	pstore.idl \
@@ -68,4 +72,5 @@
 	shtypes.idl \
 	strmif.idl \
+	textstor.idl \
 	tom.idl \
 	unknwn.idl \
@@ -76,4 +81,5 @@
 	wine/svcctl.idl \
 	wtypes.idl \
+	wuapi.idl \
 	xmldom.idl \
 	xmldso.idl
@@ -87,4 +93,5 @@
 	accctrl.h \
 	aclapi.h \
+	aclui.h \
 	adshlp.h \
 	advpub.h \
@@ -116,5 +123,7 @@
 	cvconst.h \
 	d3d.h \
+	d3d10effect.h \
 	d3d10misc.h \
+	d3d10shader.h \
 	d3d8.h \
 	d3d8caps.h \
@@ -139,4 +148,5 @@
 	d3dx9math.h \
 	d3dx9math.inl \
+	d3dx9mesh.h \
 	d3dx9shader.h \
 	d3dx9tex.h \
@@ -228,4 +238,5 @@
 	hlguids.h \
 	htmlhelp.h \
+	http.h \
 	i_cryptasn1tls.h \
 	icm.h \
@@ -234,4 +245,5 @@
 	imagehlp.h \
 	imm.h \
+	in6addr.h \
 	initguid.h \
 	intshcut.h \
@@ -259,4 +271,5 @@
 	lmuseflg.h \
 	lmwksta.h \
+	loadperf.h \
 	lzexpand.h \
 	mapi.h \
@@ -288,6 +301,8 @@
 	msiquery.h \
 	mssip.h \
+	mstcpip.h \
 	msvcrt/conio.h \
 	msvcrt/crtdbg.h \
+	msvcrt/crtdefs.h \
 	msvcrt/ctype.h \
 	msvcrt/direct.h \
@@ -305,4 +320,5 @@
 	msvcrt/mbctype.h \
 	msvcrt/mbstring.h \
+	msvcrt/memory.h \
 	msvcrt/process.h \
 	msvcrt/search.h \
@@ -442,4 +458,5 @@
 	winreg.h \
 	winresrc.h \
+	winsafer.h \
 	winscard.h \
 	winsmcrd.h \
@@ -458,4 +475,6 @@
 	wnaspi32.h \
 	wownt32.h \
+	ws2def.h \
+	ws2ipdef.h \
 	ws2spi.h \
 	ws2tcpip.h \
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/aclapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/aclapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/aclapi.h	(revision 19678)
@@ -37,4 +37,6 @@
 extern "C" {
 #endif
+
+typedef void (*FN_PROGRESS)(LPWSTR,DWORD,PPROG_INVOKE_SETTING,PVOID,BOOL);
 
 WINADVAPI DWORD  WINAPI GetExplicitEntriesFromAclA( PACL, PULONG, PEXPLICIT_ACCESS_A* );
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/aclui.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/aclui.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/aclui.h	(revision 19678)
@@ -0,0 +1,246 @@
+/*
+ * Copyright (C) 2009 Nikolay Sivov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_ACLUI_H
+#define __WINE_ACLUI_H
+
+#include <objbase.h>
+#include <commctrl.h>
+#include <accctrl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif  /* __cplusplus */
+
+typedef struct _SI_OBJECT_INFO
+{
+    DWORD       dwFlags;
+    HINSTANCE   hInstance;
+    LPWSTR      pszServerName;
+    LPWSTR      pszObjectName;
+    LPWSTR      pszPageTitle;
+    GUID        guidObjectType;
+} SI_OBJECT_INFO, *PSI_OBJECT_INFO;
+
+#define SI_EDIT_PERMS                0x00000000
+#define SI_EDIT_OWNER                0x00000001
+#define SI_EDIT_AUDITS               0x00000002
+#define SI_CONTAINER                 0x00000004
+#define SI_READONLY                  0x00000008
+#define SI_ADVANCED                  0x00000010
+#define SI_RESET                     0x00000020
+#define SI_OWNER_READONLY            0x00000040
+#define SI_EDIT_PROPERTIES           0x00000080
+#define SI_OWNER_RECURSE             0x00000100
+#define SI_NO_ACL_PROTECT            0x00000200
+#define SI_NO_TREE_APPLY             0x00000400
+#define SI_PAGE_TITLE                0x00000800
+#define SI_SERVER_IS_DC              0x00001000
+#define SI_RESET_DACL_TREE           0x00004000
+#define SI_RESET_SACL_TREE           0x00008000
+#define SI_OBJECT_GUID               0x00010000
+#define SI_EDIT_EFFECTIVE            0x00020000
+#define SI_RESET_DACL                0x00040000
+#define SI_RESET_SACL                0x00080000
+#define SI_RESET_OWNER               0x00100000
+#define SI_NO_ADDITIONAL_PERMISSION  0x00200000
+#define SI_VIEW_ONLY                 0x00400000
+#define SI_PERMS_ELEVATION_REQUIRED  0x01000000
+#define SI_AUDITS_ELEVATION_REQUIRED 0x02000000
+#define SI_OWNER_ELEVATION_REQUIRED  0x04000000
+#define SI_MAY_WRITE                 0x10000000
+
+#define SI_EDIT_ALL     (SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS)
+
+typedef struct _SI_ACCESS
+{
+    const GUID *pguid;
+    ACCESS_MASK mask;
+    LPCWSTR     pszName;
+    DWORD       dwFlags;
+} SI_ACCESS, *PSI_ACCESS;
+
+#define SI_ACCESS_SPECIFIC  0x00010000
+#define SI_ACCESS_GENERAL   0x00020000
+#define SI_ACCESS_CONTAINER 0x00040000
+#define SI_ACCESS_PROPERTY  0x00080000
+
+typedef struct _SI_INHERIT_TYPE
+{
+    const GUID *pguid;
+    ULONG       dwFlags;
+    LPCWSTR     pszName;
+} SI_INHERIT_TYPE, *PSI_INHERIT_TYPE;
+
+typedef enum _SI_PAGE_TYPE
+{
+    SI_PAGE_PERM,
+    SI_PAGE_ADVPERM,
+    SI_PAGE_AUDIT,
+    SI_PAGE_OWNER,
+    SI_PAGE_EFFECTIVE,
+    SI_PAGE_TAKEOWNERSHIP
+} SI_PAGE_TYPE;
+
+#define PSPCB_SI_INITDIALOG (WM_USER + 1)
+
+#undef INTERFACE
+#define INTERFACE ISecurityInformation
+DECLARE_INTERFACE_IID_(ISecurityInformation, IUnknown, "965fc360-16ff-11d0-91cb-00aa00bbb723")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation methods */
+    STDMETHOD(GetObjectInformation) (THIS_ PSI_OBJECT_INFO pObjectInfo ) PURE;
+    STDMETHOD(GetSecurity) (THIS_ SECURITY_INFORMATION RequestedInformation,
+                            PSECURITY_DESCRIPTOR *ppSecurityDescriptor,
+                            BOOL fDefault ) PURE;
+    STDMETHOD(SetSecurity) (THIS_ SECURITY_INFORMATION SecurityInformation,
+                            PSECURITY_DESCRIPTOR pSecurityDescriptor ) PURE;
+    STDMETHOD(GetAccessRights) (THIS_ const GUID* pguidObjectType,
+                                DWORD dwFlags,
+                                PSI_ACCESS *ppAccess,
+                                ULONG *pcAccesses,
+                                ULONG *piDefaultAccess ) PURE;
+    STDMETHOD(MapGeneric) (THIS_ const GUID *pguidObjectType,
+                           UCHAR *pAceFlags,
+                           ACCESS_MASK *pMask) PURE;
+    STDMETHOD(GetInheritTypes) (THIS_ PSI_INHERIT_TYPE *ppInheritTypes,
+                                ULONG *pcInheritTypes ) PURE;
+    STDMETHOD(PropertySheetPageCallback)(THIS_ HWND hwnd, UINT uMsg, SI_PAGE_TYPE uPage ) PURE;
+};
+typedef ISecurityInformation *LPSECURITYINFO;
+
+#undef INTERFACE
+#define INTERFACE ISecurityInformation2
+DECLARE_INTERFACE_IID_(ISecurityInformation2, IUnknown, "c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation2 methods */
+    STDMETHOD_(BOOL,IsDaclCanonical) (THIS_ PACL pDacl) PURE;
+    STDMETHOD(LookupSids) (THIS_ ULONG cSids, PSID *rgpSids, LPDATAOBJECT *ppdo) PURE;
+};
+typedef ISecurityInformation2 *LPSECURITYINFO2;
+
+#define CFSTR_ACLUI_SID_INFO_LIST   TEXT("CFSTR_ACLUI_SID_INFO_LIST")
+
+typedef struct _SID_INFO
+{
+    PSID    pSid;
+    PWSTR   pwzCommonName;
+    PWSTR   pwzClass;
+    PWSTR   pwzUPN;
+} SID_INFO, *PSID_INFO;
+
+typedef struct _SID_INFO_LIST
+{
+    ULONG       cItems;
+    SID_INFO    aSidInfo[ANYSIZE_ARRAY];
+} SID_INFO_LIST, *PSID_INFO_LIST;
+
+
+#undef INTERFACE
+#define INTERFACE IEffectivePermission
+DECLARE_INTERFACE_IID_(IEffectivePermission, IUnknown, "3853dc76-9f35-407c-88a1-d19344365fbc")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation methods */
+    STDMETHOD(GetEffectivePermission) (THIS_
+                                       const GUID* pguidObjectType,
+                                       PSID pUserSid,
+                                       LPCWSTR pszServerName,
+                                       PSECURITY_DESCRIPTOR pSD,
+                                       POBJECT_TYPE_LIST *ppObjectTypeList,
+                                       ULONG *pcObjectTypeListLength,
+                                       PACCESS_MASK *ppGrantedAccessList,
+                                       ULONG *pcGrantedAccessListLength) PURE;
+};
+typedef IEffectivePermission *LPEFFECTIVEPERMISSION;
+
+#undef INTERFACE
+#define INTERFACE ISecurityObjectTypeInfo
+DECLARE_INTERFACE_IID_(ISecurityObjectTypeInfo, IUnknown, "fc3066eb-79ef-444b-9111-d18a75ebf2fa")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation methods */
+    STDMETHOD(GetInheritSource)(THIS_ SECURITY_INFORMATION si,
+                                PACL pACL,
+#ifndef WINE_NO_UNICODE_MACROS
+                                PINHERITED_FROM *ppInheritArray
+#else
+                                PINHERITED_FROMW *ppInheritArray
+#endif
+                                ) PURE;
+};
+typedef ISecurityObjectTypeInfo *LPSecurityObjectTypeInfo;
+
+
+#undef INTERFACE
+#define INTERFACE ISecurityInformation3
+DECLARE_INTERFACE_IID_(ISecurityInformation3, IUnknown, "e2cdc9cc-31bd-4f8f-8c8b-b641af516a1a")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation3 methods */
+    STDMETHOD(GetFullResourceName) (THIS_ LPWSTR *ppszResourceName) PURE;
+    STDMETHOD(OpenElevatedEditor) (THIS_ HWND hWnd, SI_PAGE_TYPE uPage) PURE;
+};
+typedef ISecurityInformation3 *LPSECURITYINFO3;
+
+DEFINE_GUID(IID_ISecurityInformation, 0x965fc360, 0x16ff, 0x11d0, 0x91, 0xcb, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x23);
+DEFINE_GUID(IID_ISecurityInformation2, 0xc3ccfdb4, 0x6f88, 0x11d2, 0xa3, 0xce, 0x0, 0xc0, 0x4f, 0xb1, 0x78, 0x2a);
+DEFINE_GUID(IID_IEffectivePermission, 0x3853dc76, 0x9f35, 0x407c, 0x88, 0xa1, 0xd1, 0x93, 0x44, 0x36, 0x5f, 0xbc);
+DEFINE_GUID(IID_ISecurityObjectTypeInfo, 0xfc3066eb, 0x79ef, 0x444b, 0x91, 0x11, 0xd1, 0x8a, 0x75, 0xeb, 0xf2, 0xfa);
+DEFINE_GUID(IID_ISecurityInformation3, 0xe2cdc9cc, 0x31bd, 0x4f8f, 0x8c, 0x8b, 0xb6, 0x41, 0xaf, 0x51, 0x6a, 0x1a);
+
+HPROPSHEETPAGE WINAPI CreateSecurityPage(LPSECURITYINFO psi);
+BOOL WINAPI EditSecurity(HWND owner, LPSECURITYINFO psi);
+HRESULT WINAPI EditSecurityAdvanced(HWND owner, LPSECURITYINFO psi, SI_PAGE_TYPE uSIPage);
+
+#ifdef __cplusplus
+}
+#endif  /* __cplusplus */
+
+#endif /* __WINE_ACLUI_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activaut.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activaut.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activaut.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef DO_NO_IMPORTS
 import "ocidl.idl";
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activdbg.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activdbg.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activdbg.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "ocidl.idl";
 import "activscp.idl";
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activscp.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activscp.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/activscp.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -269,5 +278,5 @@
 pointer_default(unique)
 ]
-interface IActiveScriptParse : IUnknown
+interface IActiveScriptParse32 : IUnknown
 {
     HRESULT InitNew(void);
@@ -300,4 +309,48 @@
 }
 
+[
+   object,
+   uuid(c7ef7658-e1ee-480e-97ea-d52cb4d76d17),
+   pointer_default(unique)
+]
+interface IActiveScriptParse64 : IUnknown
+{
+    HRESULT InitNew(void);
+
+    HRESULT AddScriptlet(
+            [in] LPCOLESTR pstrDefaultName,
+            [in] LPCOLESTR pstrCode,
+            [in] LPCOLESTR pstrItemName,
+            [in] LPCOLESTR pstrSubItemName,
+            [in] LPCOLESTR pstrEventName,
+            [in] LPCOLESTR pstrDelimiter,
+            [in] DWORDLONG dwSourceContextCookie,
+            [in] ULONG ulStartingLineNumber,
+            [in] DWORD dwFlags,
+            [out] BSTR *pbstrName,
+            [out] EXCEPINFO *pexcepinfo
+    );
+
+    HRESULT ParseScriptText(
+            [in] LPCOLESTR pstrCode,
+            [in] LPCOLESTR pstrItemName,
+            [in] IUnknown *punkContext,
+            [in] LPCOLESTR pstrDelimiter,
+            [in] DWORDLONG dwSourceContextCookie,
+            [in] ULONG ulStartingLineNumber,
+            [in] DWORD dwFlags,
+            [out] VARIANT *pvarResult,
+            [out] EXCEPINFO *pexcepinfo
+    );
+}
+
+cpp_quote("#ifdef _WIN64")
+cpp_quote("#define IActiveScriptParse IActiveScriptParse64")
+cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse64")
+cpp_quote("#else")
+cpp_quote("#define IActiveScriptParse IActiveScriptParse32")
+cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse32")
+cpp_quote("#endif")
+
 cpp_quote("typedef IActiveScriptParse *PIActiveScriptParse;")
 
@@ -307,5 +360,5 @@
 pointer_default(unique)
 ]
-interface IActiveScriptParseProcedureOld : IUnknown
+interface IActiveScriptParseProcedureOld32 : IUnknown
 {
     HRESULT ParseProcedureText(
@@ -323,9 +376,37 @@
 
 [
+    object,
+    uuid(21f57128-08c9-4638-ba12-22d15d88dc5c),
+    pointer_default(unique)
+]
+interface IActiveScriptParseProcedureOld64 : IUnknown
+{
+    HRESULT ParseProcedureText(
+            [in] LPCOLESTR pstrCode,
+            [in] LPCOLESTR pstrFormalParams,
+            [in] LPCOLESTR pstrItemName,
+            [in] IUnknown *punkContext,
+            [in] LPCOLESTR pstrDelimiter,
+            [in] DWORDLONG dwSourceContextCookie,
+            [in] ULONG ulStartingLineNumber,
+            [in] DWORD dwFlags,
+            [out] IDispatch **ppdisp
+    );
+}
+
+cpp_quote("#ifdef _WIN64")
+cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld64")
+cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld64")
+cpp_quote("#else")
+cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld32")
+cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld32")
+cpp_quote("#endif")
+
+[
 object,
 uuid(AA5B6A80-B834-11d0-932F-00A0C90DCAA9),
 pointer_default(unique)
 ]
-interface IActiveScriptParseProcedure : IUnknown
+interface IActiveScriptParseProcedure32 : IUnknown
 {
     HRESULT ParseProcedureText(
@@ -342,4 +423,33 @@
     );
 }
+
+[
+    object,
+    uuid(c64713b6-e029-4cc5-9200-438b72890b6a),
+    pointer_default(unique)
+]
+interface IActiveScriptParseProcedure64 : IUnknown
+{
+    HRESULT ParseProcedureText(
+            [in] LPCOLESTR pstrCode,
+            [in] LPCOLESTR pstrFormalParams,
+            [in] LPCOLESTR pstrProcedureName,
+            [in] LPCOLESTR pstrItemName,
+            [in] IUnknown *punkContext,
+            [in] LPCOLESTR pstrDelimiter,
+            [in] DWORDLONG dwSourceContextCookie,
+            [in] ULONG ulStartingLineNumber,
+            [in] DWORD dwFlags,
+            [out] IDispatch **ppdisp
+    );
+}
+
+cpp_quote("#ifdef _WIN64")
+cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure64")
+cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure64")
+cpp_quote("#else")
+cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure32")
+cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure32")
+cpp_quote("#endif")
 
 [
@@ -348,7 +458,24 @@
     pointer_default(unique)
 ]
-interface IActiveScriptParseProcedure2 : IActiveScriptParseProcedure
-{
-}
+interface IActiveScriptParseProcedure2_32 : IActiveScriptParseProcedure32
+{
+}
+
+[
+    object,
+    uuid(fe7c4271-210c-448d-9f54-76dab7047b28),
+    pointer_default(unique)
+]
+interface IActiveScriptParseProcedure2_64 : IActiveScriptParseProcedure64
+{
+}
+
+cpp_quote("#ifdef _WIN64")
+cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_64")
+cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_64")
+cpp_quote("#else")
+cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_32")
+cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_32")
+cpp_quote("#endif")
 
 [
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/amstream.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/amstream.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/amstream.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "unknwn.idl";
 import "mmstream.idl";
@@ -316,2 +325,3 @@
 cpp_quote("DEFINE_GUID(CLSID_AMAudioData,         0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
 cpp_quote("DEFINE_GUID(CLSID_AMMediaTypeStream,   0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0x0d, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
+cpp_quote("DEFINE_GUID(CLSID_MediaStreamFilter,   0x49c47ce0, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/amvideo.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/amvideo.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/amvideo.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "objidl.idl";
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/austream.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/austream.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/austream.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/axcore.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/axcore.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/axcore.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #define CHARS_IN_GUID 39
 cpp_quote("#define CHARS_IN_GUID 39")
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/axextend.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/axextend.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/axextend.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -318,5 +327,5 @@
 {
     QualityMessageType Type;
-    long               Proportion;
+    LONG               Proportion;
     REFERENCE_TIME       Late;
     REFERENCE_TIME       TimeStamp;
@@ -487,5 +496,5 @@
 {
     HRESULT Notify(
-        [in] long EventCode,
+        [in] LONG EventCode,
         [in] LONG_PTR EventParam1,
         [in] LONG_PTR EventParam2
@@ -829,9 +838,9 @@
 interface IAMVideoProcAmp : IUnknown
 {
-    HRESULT GetRange( [in] long Property, [out] long *pMin, [out] long *pMax,
-                     [out] long *pSteppingDelta, [out] long *pDefault,
-                     [out] long *pCapsFlags);
-    HRESULT Set( [in] long Property, [in] long lValue, [in] long Flags);
-    HRESULT Get( [in] long Property, [out] long *lValue, [out] long *Flags);
+    HRESULT GetRange( [in] LONG Property, [out] LONG *pMin, [out] LONG *pMax,
+                     [out] LONG *pSteppingDelta, [out] LONG *pDefault,
+                     [out] LONG *pCapsFlags);
+    HRESULT Set( [in] LONG Property, [in] LONG lValue, [in] LONG Flags);
+    HRESULT Get( [in] LONG Property, [out] LONG *lValue, [out] LONG *Flags);
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/basetsd.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/basetsd.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/basetsd.h	(revision 19678)
@@ -69,5 +69,5 @@
 #  endif
 #  ifndef __int64
-#    ifdef _WIN64
+#    if defined(_WIN64) && !defined(__MINGW64__)
 #      define __int64 long
 #    else
@@ -126,4 +126,6 @@
 #define MAXUINT_PTR 0xffffffffffffffff
 
+typedef __int64 SHANDLE_PTR;
+typedef unsigned __int64 HANDLE_PTR;
 typedef int HALF_PTR, *PHALF_PTR;
 typedef unsigned int UHALF_PTR, *PUHALF_PTR;
@@ -219,4 +221,6 @@
 #define MAXUINT_PTR 0xffffffff
 
+typedef long SHANDLE_PTR;
+typedef unsigned long HANDLE_PTR;
 typedef signed short HALF_PTR, *PHALF_PTR;
 typedef unsigned short UHALF_PTR, *PUHALF_PTR;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/bits.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/bits.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/bits.idl	(revision 19678)
@@ -20,4 +20,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef DO_NO_IMPORTS
 import "unknwn.idl";
@@ -31,4 +40,8 @@
 cpp_quote("#define BG_NOTIFY_JOB_MODIFICATION 0x0008")
 
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
+cpp_quote("#undef EnumJobs")
+cpp_quote("#undef GetJob")
+cpp_quote("#endif")
 
 #define BG_ENUM_SIZEIS(maxcount) maxcount
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/bits1_5.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/bits1_5.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/bits1_5.idl	(revision 19678)
@@ -18,4 +18,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/cfgmgr32.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/cfgmgr32.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/cfgmgr32.h	(revision 19678)
@@ -30,4 +30,11 @@
 
 /* FIXME: #include <cfg.h> */
+
+/* cfgmgr32 doesn't use the normal convention, it adds an underscore before A/W */
+#ifdef WINE_NO_UNICODE_MACROS
+# define DECL_WINELIB_CFGMGR32_TYPE_AW(type)  /* nothing */
+#else
+# define DECL_WINELIB_CFGMGR32_TYPE_AW(type)  typedef WINELIB_NAME_AW(type##_) type;
+#endif
 
 #define CMAPI
@@ -107,4 +114,9 @@
 typedef DWORD DEVNODE, *PDEVNODE;
 typedef HANDLE HMACHINE, *PHMACHINE;
+typedef CHAR *DEVNODEID_A, *DEVINSTID_A;
+typedef WCHAR *DEVNODEID_W, *DEVINSTID_W;
+
+DECL_WINELIB_CFGMGR32_TYPE_AW(DEVNODEID)
+DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID)
 
 #ifdef __cplusplus
@@ -115,4 +127,7 @@
 CMAPI CONFIGRET WINAPI CM_Connect_MachineW(PCWSTR,PHMACHINE);
 #define     CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine)
+CMAPI CONFIGRET WINAPI CM_Create_DevNodeA(PDEVINST,DEVINSTID_A,DEVINST,ULONG);
+CMAPI CONFIGRET WINAPI CM_Create_DevNodeW(PDEVINST,DEVINSTID_W,DEVINST,ULONG);
+#define     CM_Create_DevNode WINELIB_NAME_AW(CM_Create_DevNode)
 CMAPI CONFIGRET WINAPI CM_Disconnect_Machine(HMACHINE);
 CMAPI CONFIGRET WINAPI CM_Get_Device_IDA(DEVINST,PSTR,ULONG,ULONG);
@@ -127,4 +142,7 @@
 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size(PULONG,DEVINST,ULONG);
 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex(PULONG,DEVINST,ULONG,HMACHINE);
+CMAPI CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST,DEVINSTID_A,ULONG);
+CMAPI CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST,DEVINSTID_W,ULONG);
+#define     CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode)
 
 #ifdef __cplusplus
@@ -132,3 +150,5 @@
 #endif
 
+#undef DECL_WINELIB_CFGMGR32_TYPE_AW
+
 #endif /* _CFGMGR32_H_ */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/clusapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/clusapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/clusapi.h	(revision 19678)
@@ -33,5 +33,13 @@
 #endif
 
+typedef struct _HCLUSTER *HCLUSTER;
+typedef struct _HCLUSENUM *HCLUSENUM;
+
+BOOL WINAPI CloseCluster(HCLUSTER hCluster);
 DWORD WINAPI GetNodeClusterState(LPCWSTR lpszNodeName, LPDWORD pdwClusterState);
+HCLUSTER WINAPI OpenCluster(LPCWSTR lpszClusterName);
+HCLUSENUM WINAPI ClusterOpenEnum(HCLUSTER hCluster, DWORD dwType);
+DWORD WINAPI ClusterEnum(HCLUSENUM hEnum, DWORD dwIndex, LPDWORD lpdwType, LPWSTR lpszName, LPDWORD lpcchName);
+DWORD WINAPI ClusterCloseEnum(HCLUSENUM hEnum);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/comcat.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/comcat.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/comcat.idl	(revision 19678)
@@ -16,4 +16,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commctrl.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commctrl.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commctrl.h	(revision 19678)
@@ -1109,5 +1109,5 @@
 #define TBSTYLE_EX_MIXEDBUTTONS         0x00000008
 #define TBSTYLE_EX_HIDECLIPPEDBUTTONS   0x00000010 /* don't show partially obscured buttons */
-#define TBSTYLE_EX_DOUBLEBUFFER         0x00000080 /* Double Buffer the toolbar ??? */
+#define TBSTYLE_EX_DOUBLEBUFFER         0x00000080 /* Double Buffer the toolbar */
 
 #define TBIF_IMAGE              0x00000001
@@ -1223,10 +1223,12 @@
 
 /* undocumented messages in Toolbar */
+#ifdef __WINESRC__
 #define TB_UNKWN45D              (WM_USER+93)
-#define TB_UNKWN45E              (WM_USER+94)
-#define TB_UNKWN460              (WM_USER+96)
-#define TB_UNKWN462              (WM_USER+98)
-#define TB_UNKWN463              (WM_USER+99)
+#define TB_SETHOTITEM2           (WM_USER+94)
+#define TB_SETLISTGAP            (WM_USER+96)
+#define TB_GETIMAGELISTCOUNT     (WM_USER+98)
+#define TB_GETIDEALSIZE          (WM_USER+99)
 #define TB_UNKWN464              (WM_USER+100)
+#endif
 
 #define TB_GETMETRICS            (WM_USER+101)
@@ -1607,5 +1609,5 @@
 HWND WINAPI
 CreateToolbarEx(HWND, DWORD, UINT, INT,
-                HINSTANCE, UINT, LPCTBBUTTON,
+                HINSTANCE, UINT_PTR, LPCTBBUTTON,
                 INT, INT, INT, INT, INT, UINT);
 
@@ -2389,8 +2391,8 @@
 #define TVIF_DI_SETITEM	      0x1000
 
-#define TVI_ROOT              ((HTREEITEM)0xffff0000)     /* -65536 */
-#define TVI_FIRST             ((HTREEITEM)0xffff0001)     /* -65535 */
-#define TVI_LAST              ((HTREEITEM)0xffff0002)     /* -65534 */
-#define TVI_SORT              ((HTREEITEM)0xffff0003)     /* -65533 */
+#define TVI_ROOT              ((HTREEITEM)-65536)
+#define TVI_FIRST             ((HTREEITEM)-65535)
+#define TVI_LAST              ((HTREEITEM)-65534)
+#define TVI_SORT              ((HTREEITEM)-65533)
 
 #define TVIS_FOCUSED          0x0001
@@ -3155,4 +3157,5 @@
 #define LVM_SETITEMCOUNT        (LVM_FIRST+47)
 #define LVM_SORTITEMS           (LVM_FIRST+48)
+#define LVM_SORTITEMSEX         (LVM_FIRST+81)
 #define LVM_SETITEMPOSITION32   (LVM_FIRST+49)
 #define LVM_GETSELECTEDCOUNT    (LVM_FIRST+50)
@@ -3722,5 +3725,5 @@
   SNDMSGA(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEMA)&_LVi);}
 #define ListView_GetItemState(hwnd,i,mask) \
-    (BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
+    (UINT)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
 #define ListView_GetCountPerPage(hwnd) \
     (BOOL)SNDMSGW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
@@ -3750,4 +3753,6 @@
 #define ListView_GetTextColor(hwnd)  \
     (COLORREF)SNDMSGA((hwnd), LVM_GETTEXTCOLOR, 0, 0)
+#define ListView_GetTextBkColor(hwnd) \
+    (COLORREF)SNDMSGA((hwnd), LVM_GETTEXTBKCOLOR, 0, 0)
 #define ListView_GetBkColor(hwnd)  \
     (COLORREF)SNDMSGA((hwnd), LVM_GETBKCOLOR, 0, 0)
@@ -3780,4 +3785,7 @@
 #define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
     (BOOL)SNDMSGA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
+#define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
+  (BOOL)SNDMSGA((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
+
 #define ListView_SetItemPosition(hwndLV, i, x, y) \
     (BOOL)SNDMSGA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
@@ -4252,5 +4260,5 @@
 {
     UINT mask;
-    int iItem;
+    INT_PTR iItem;
     LPSTR pszText;
     int cchTextMax;
@@ -4266,5 +4274,5 @@
 {
     UINT mask;
-    int iItem;
+    INT_PTR iItem;
     LPWSTR pszText;
     int cchTextMax;
@@ -4467,5 +4475,5 @@
     ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
 #define MAKEIPADDRESS(b1,b2,b3,b4) \
-    ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
+    ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
 
 #define FIRST_IPADDRESS(x)	(((x)>>24)&0xff)
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commctrl.rh
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commctrl.rh	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commctrl.rh	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commdlg.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commdlg.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/commdlg.h	(revision 19678)
@@ -36,5 +36,7 @@
 
 #include <prsht.h>
+#ifndef _WIN64
 #include <pshpack1.h>
+#endif
 
 #ifndef SNDMSG
@@ -80,5 +82,5 @@
 #define OPEN_DIALOG  2
 
-typedef UINT (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
+typedef UINT_PTR (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
 
 typedef struct tagOFNA {
@@ -157,5 +159,24 @@
 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
 
-typedef UINT (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
+typedef struct _OFNOTIFYEXA
+{
+        NMHDR           hdr;
+        LPOPENFILENAMEA lpOFN;
+        LPVOID          psf;
+        LPVOID          pidl;
+} OFNOTIFYEXA, *LPOFNOTIFYEXA;
+
+typedef struct _OFNOTIFYEXW
+{
+        NMHDR           hdr;
+        LPOPENFILENAMEW lpOFN;
+        LPVOID          psf;
+        LPVOID          pidl;
+} OFNOTIFYEXW, *LPOFNOTIFYEXW;
+
+DECL_WINELIB_TYPE_AW(OFNOTIFYEX)
+DECL_WINELIB_TYPE_AW(LPOFNOTIFYEX)
+
+typedef UINT_PTR (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
 
 typedef struct {
@@ -199,5 +220,5 @@
 #define CC_ANYCOLOR              0x00000100
 
-typedef UINT (CALLBACK *LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
+typedef UINT_PTR (CALLBACK *LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
 
 typedef struct {
@@ -422,5 +443,4 @@
 #define HELPMSGSTRING   WINELIB_NAME_AW(HELPMSGSTRING)
 
-
 #define CD_LBSELNOITEMS -1
 #define CD_LBSELCHANGE   0
@@ -438,4 +458,5 @@
 #define CDN_FILEOK              (CDN_FIRST - 0x0005)
 #define CDN_TYPECHANGE          (CDN_FIRST - 0x0006)
+#define CDN_INCLUDEITEM         (CDN_FIRST - 0x0007)
 
 #define CDM_FIRST               (WM_USER + 100)
@@ -780,5 +801,7 @@
 
 
+#ifndef _WIN64
 #include <poppack.h>
+#endif
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/config.h.in
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/config.h.in	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/config.h.in	(revision 19678)
@@ -0,0 +1,1192 @@
+/* include/config.h.in.  Generated from configure.ac by autoheader.  */
+
+#define __WINE_CONFIG_H
+
+/* Define to 1 if you have the <alias.h> header file. */
+#undef HAVE_ALIAS_H
+
+/* Define if you have ALSA 1.x including devel headers */
+#undef HAVE_ALSA
+
+/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
+#undef HAVE_ALSA_ASOUNDLIB_H
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#undef HAVE_ARPA_NAMESER_H
+
+/* Define to 1 if you have the `asctime_r' function. */
+#undef HAVE_ASCTIME_R
+
+/* Define to 1 if you have the <asm/types.h> header file. */
+#undef HAVE_ASM_TYPES_H
+
+/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
+#undef HAVE_AUDIOUNIT_AUDIOUNIT_H
+
+/* Define to 1 if you have the <audio/audiolib.h> header file. */
+#undef HAVE_AUDIO_AUDIOLIB_H
+
+/* Define to 1 if you have the <audio/soundlib.h> header file. */
+#undef HAVE_AUDIO_SOUNDLIB_H
+
+/* Define to 1 if you have the <capi20.h> header file. */
+#undef HAVE_CAPI20_H
+
+/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
+#undef HAVE_CARBON_CARBON_H
+
+/* Define to 1 if you have the `chsize' function. */
+#undef HAVE_CHSIZE
+
+/* Define to 1 if you have the <CoreAudio/CoreAudio.h> header file. */
+#undef HAVE_COREAUDIO_COREAUDIO_H
+
+/* Define to 1 if you have the <cups/cups.h> header file. */
+#undef HAVE_CUPS_CUPS_H
+
+/* Define to 1 if you have the <curses.h> header file. */
+#undef HAVE_CURSES_H
+
+/* Define if you have the daylight variable */
+#undef HAVE_DAYLIGHT
+
+/* Define to 1 if you have the <dbus/dbus.h> header file. */
+#undef HAVE_DBUS_DBUS_H
+
+/* Define to 1 if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <DiskArbitration/DiskArbitration.h> header
+   file. */
+#undef HAVE_DISKARBITRATION_DISKARBITRATION_H
+
+/* Define to 1 if you have the `dladdr' function. */
+#undef HAVE_DLADDR
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the `dlopen' function. */
+#undef HAVE_DLOPEN
+
+/* Define to 1 if you have the <elf.h> header file. */
+#undef HAVE_ELF_H
+
+/* Define to 1 if you have the `epoll_create' function. */
+#undef HAVE_EPOLL_CREATE
+
+/* Define if you have EsounD sound server */
+#undef HAVE_ESD
+
+/* Define to 1 if you have the `ffs' function. */
+#undef HAVE_FFS
+
+/* Define to 1 if you have the `finite' function. */
+#undef HAVE_FINITE
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the <fontconfig/fontconfig.h> header file. */
+#undef HAVE_FONTCONFIG_FONTCONFIG_H
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if you have the `fpclass' function. */
+#undef HAVE_FPCLASS
+
+/* Define if FreeType 2 is installed */
+#undef HAVE_FREETYPE
+
+/* Define to 1 if you have the <freetype/freetype.h> header file. */
+#undef HAVE_FREETYPE_FREETYPE_H
+
+/* Define to 1 if you have the <freetype/ftglyph.h> header file. */
+#undef HAVE_FREETYPE_FTGLYPH_H
+
+/* Define to 1 if you have the <freetype/ftlcdfil.h> header file. */
+#undef HAVE_FREETYPE_FTLCDFIL_H
+
+/* Define to 1 if you have the <freetype/ftmodapi.h> header file. */
+#undef HAVE_FREETYPE_FTMODAPI_H
+
+/* Define to 1 if you have the <freetype/ftnames.h> header file. */
+#undef HAVE_FREETYPE_FTNAMES_H
+
+/* Define to 1 if you have the <freetype/ftoutln.h> header file. */
+#undef HAVE_FREETYPE_FTOUTLN_H
+
+/* Define to 1 if you have the <freetype/ftsnames.h> header file. */
+#undef HAVE_FREETYPE_FTSNAMES_H
+
+/* Define if you have the <freetype/fttrigon.h> header file. */
+#undef HAVE_FREETYPE_FTTRIGON_H
+
+/* Define to 1 if you have the <freetype/fttypes.h> header file. */
+#undef HAVE_FREETYPE_FTTYPES_H
+
+/* Define to 1 if you have the <freetype/ftwinfnt.h> header file. */
+#undef HAVE_FREETYPE_FTWINFNT_H
+
+/* Define to 1 if you have the <freetype/internal/sfnt.h> header file. */
+#undef HAVE_FREETYPE_INTERNAL_SFNT_H
+
+/* Define to 1 if you have the <freetype/ttnameid.h> header file. */
+#undef HAVE_FREETYPE_TTNAMEID_H
+
+/* Define to 1 if you have the <freetype/tttables.h> header file. */
+#undef HAVE_FREETYPE_TTTABLES_H
+
+/* Define to 1 if the system has the type `fsblkcnt_t'. */
+#undef HAVE_FSBLKCNT_T
+
+/* Define to 1 if the system has the type `fsfilcnt_t'. */
+#undef HAVE_FSFILCNT_T
+
+/* Define to 1 if you have the `fstatfs' function. */
+#undef HAVE_FSTATFS
+
+/* Define to 1 if you have the `fstatvfs' function. */
+#undef HAVE_FSTATVFS
+
+/* Define to 1 if you have the <ft2build.h> header file. */
+#undef HAVE_FT2BUILD_H
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `FT_Load_Sfnt_Table' function. */
+#undef HAVE_FT_LOAD_SFNT_TABLE
+
+/* Define to 1 if the system has the type `FT_TrueTypeEngineType'. */
+#undef HAVE_FT_TRUETYPEENGINETYPE
+
+/* Define to 1 if you have the `futimes' function. */
+#undef HAVE_FUTIMES
+
+/* Define to 1 if you have the `futimesat' function. */
+#undef HAVE_FUTIMESAT
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getdirentries' function. */
+#undef HAVE_GETDIRENTRIES
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#undef HAVE_GETNAMEINFO
+
+/* Define to 1 if you have the `getnetbyname' function. */
+#undef HAVE_GETNETBYNAME
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long' function. */
+#undef HAVE_GETOPT_LONG
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getprotobyname' function. */
+#undef HAVE_GETPROTOBYNAME
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#undef HAVE_GETPROTOBYNUMBER
+
+/* Define to 1 if you have the `getpwuid' function. */
+#undef HAVE_GETPWUID
+
+/* Define to 1 if you have the `getservbyport' function. */
+#undef HAVE_GETSERVBYPORT
+
+/* Define to 1 if you have the `gettid' function. */
+#undef HAVE_GETTID
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the `getuid' function. */
+#undef HAVE_GETUID
+
+/* Define to 1 if you have the <GL/glext.h> header file. */
+#undef HAVE_GL_GLEXT_H
+
+/* Define to 1 if you have the <GL/glu.h> header file. */
+#undef HAVE_GL_GLU_H
+
+/* Define to 1 if you have the <GL/glx.h> header file. */
+#undef HAVE_GL_GLX_H
+
+/* Define to 1 if you have the <GL/gl.h> header file. */
+#undef HAVE_GL_GL_H
+
+/* Define if we have libgphoto2 development environment */
+#undef HAVE_GPHOTO2
+
+/* Define to 1 if you have the <grp.h> header file. */
+#undef HAVE_GRP_H
+
+/* Define to 1 if you have the <hal/libhal.h> header file. */
+#undef HAVE_HAL_LIBHAL_H
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define to 1 if you have the <inet/mib2.h> header file. */
+#undef HAVE_INET_MIB2_H
+
+/* Define to 1 if you have the `inet_network' function. */
+#undef HAVE_INET_NETWORK
+
+/* Define to 1 if you have the `inet_ntop' function. */
+#undef HAVE_INET_NTOP
+
+/* Define to 1 if you have the `inet_pton' function. */
+#undef HAVE_INET_PTON
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `IOHIDManagerCreate' function. */
+#undef HAVE_IOHIDMANAGERCREATE
+
+/* Define to 1 if you have the <IOKit/hid/IOHIDLib.h> header file. */
+#undef HAVE_IOKIT_HID_IOHIDLIB_H
+
+/* Define to 1 if you have the <IOKit/IOKitLib.h> header file. */
+#undef HAVE_IOKIT_IOKITLIB_H
+
+/* Define to 1 if you have the <io.h> header file. */
+#undef HAVE_IO_H
+
+/* Define to 1 if you have the `isinf' function. */
+#undef HAVE_ISINF
+
+/* Define to 1 if you have the `isnan' function. */
+#undef HAVE_ISNAN
+
+/* Define to 1 if you have the <jack/jack.h> header file. */
+#undef HAVE_JACK_JACK_H
+
+/* Define to 1 if you have the <jpeglib.h> header file. */
+#undef HAVE_JPEGLIB_H
+
+/* Define to 1 if you have the `kqueue' function. */
+#undef HAVE_KQUEUE
+
+/* Define to 1 if you have the <kstat.h> header file. */
+#undef HAVE_KSTAT_H
+
+/* Define to 1 if you have the <lber.h> header file. */
+#undef HAVE_LBER_H
+
+/* Define if you have the LittleCMS development environment */
+#undef HAVE_LCMS
+
+/* Define to 1 if you have the <lcms.h> header file. */
+#undef HAVE_LCMS_H
+
+/* Define to 1 if you have the <lcms/lcms.h> header file. */
+#undef HAVE_LCMS_LCMS_H
+
+/* Define if you have the OpenLDAP development environment */
+#undef HAVE_LDAP
+
+/* Define to 1 if you have the `ldap_count_references' function. */
+#undef HAVE_LDAP_COUNT_REFERENCES
+
+/* Define to 1 if you have the `ldap_first_reference' function. */
+#undef HAVE_LDAP_FIRST_REFERENCE
+
+/* Define to 1 if you have the <ldap.h> header file. */
+#undef HAVE_LDAP_H
+
+/* Define to 1 if you have the `ldap_next_reference' function. */
+#undef HAVE_LDAP_NEXT_REFERENCE
+
+/* Define to 1 if you have the `ldap_parse_reference' function. */
+#undef HAVE_LDAP_PARSE_REFERENCE
+
+/* Define to 1 if you have the `ldap_parse_sortresponse_control' function. */
+#undef HAVE_LDAP_PARSE_SORTRESPONSE_CONTROL
+
+/* Define to 1 if you have the `ldap_parse_sort_control' function. */
+#undef HAVE_LDAP_PARSE_SORT_CONTROL
+
+/* Define to 1 if you have the `ldap_parse_vlvresponse_control' function. */
+#undef HAVE_LDAP_PARSE_VLVRESPONSE_CONTROL
+
+/* Define to 1 if you have the `ldap_parse_vlv_control' function. */
+#undef HAVE_LDAP_PARSE_VLV_CONTROL
+
+/* Define if you have libaudioIO */
+#undef HAVE_LIBAUDIOIO
+
+/* Define to 1 if you have the <libaudioio.h> header file. */
+#undef HAVE_LIBAUDIOIO_H
+
+/* Define to 1 if you have the `i386' library (-li386). */
+#undef HAVE_LIBI386
+
+/* Define to 1 if you have the `kstat' library (-lkstat). */
+#undef HAVE_LIBKSTAT
+
+/* Define to 1 if you have the `ossaudio' library (-lossaudio). */
+#undef HAVE_LIBOSSAUDIO
+
+/* Define if you have the libxml2 library */
+#undef HAVE_LIBXML2
+
+/* Define to 1 if you have the <libxml/parser.h> header file. */
+#undef HAVE_LIBXML_PARSER_H
+
+/* Define if you have the X Shape extension */
+#undef HAVE_LIBXSHAPE
+
+/* Define to 1 if you have the <libxslt/pattern.h> header file. */
+#undef HAVE_LIBXSLT_PATTERN_H
+
+/* Define to 1 if you have the <libxslt/transform.h> header file. */
+#undef HAVE_LIBXSLT_TRANSFORM_H
+
+/* Define if you have the X Shm extension */
+#undef HAVE_LIBXXSHM
+
+/* Define to 1 if you have the <link.h> header file. */
+#undef HAVE_LINK_H
+
+/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
+#undef HAVE_LINUX_22_JOYSTICK_API
+
+/* Define to 1 if you have the <linux/capi.h> header file. */
+#undef HAVE_LINUX_CAPI_H
+
+/* Define to 1 if you have the <linux/cdrom.h> header file. */
+#undef HAVE_LINUX_CDROM_H
+
+/* Define to 1 if you have the <linux/compiler.h> header file. */
+#undef HAVE_LINUX_COMPILER_H
+
+/* Define if Linux-style gethostbyname_r and gethostbyaddr_r are available */
+#undef HAVE_LINUX_GETHOSTBYNAME_R_6
+
+/* Define to 1 if you have the <linux/hdreg.h> header file. */
+#undef HAVE_LINUX_HDREG_H
+
+/* Define to 1 if you have the <linux/input.h> header file. */
+#undef HAVE_LINUX_INPUT_H
+
+/* Define to 1 if you have the <linux/ioctl.h> header file. */
+#undef HAVE_LINUX_IOCTL_H
+
+/* Define to 1 if you have the <linux/ipx.h> header file. */
+#undef HAVE_LINUX_IPX_H
+
+/* Define to 1 if you have the <linux/joystick.h> header file. */
+#undef HAVE_LINUX_JOYSTICK_H
+
+/* Define to 1 if you have the <linux/major.h> header file. */
+#undef HAVE_LINUX_MAJOR_H
+
+/* Define to 1 if you have the <linux/param.h> header file. */
+#undef HAVE_LINUX_PARAM_H
+
+/* Define to 1 if you have the <linux/serial.h> header file. */
+#undef HAVE_LINUX_SERIAL_H
+
+/* Define to 1 if you have the <linux/types.h> header file. */
+#undef HAVE_LINUX_TYPES_H
+
+/* Define to 1 if you have the <linux/ucdrom.h> header file. */
+#undef HAVE_LINUX_UCDROM_H
+
+/* Define to 1 if you have the <linux/videodev.h> header file. */
+#undef HAVE_LINUX_VIDEODEV_H
+
+/* Define to 1 if the system has the type `long long'. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
+/* Define to 1 if you have the <machine/cpu.h> header file. */
+#undef HAVE_MACHINE_CPU_H
+
+/* Define to 1 if you have the <machine/limits.h> header file. */
+#undef HAVE_MACHINE_LIMITS_H
+
+/* Define to 1 if you have the <machine/soundcard.h> header file. */
+#undef HAVE_MACHINE_SOUNDCARD_H
+
+/* Define to 1 if you have the <mach/machine.h> header file. */
+#undef HAVE_MACH_MACHINE_H
+
+/* Define to 1 if you have the <mach/mach.h> header file. */
+#undef HAVE_MACH_MACH_H
+
+/* Define to 1 if you have the <mach-o/dyld_images.h> header file. */
+#undef HAVE_MACH_O_DYLD_IMAGES_H
+
+/* Define to 1 if you have the <mach-o/nlist.h> header file. */
+#undef HAVE_MACH_O_NLIST_H
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the <mntent.h> header file. */
+#undef HAVE_MNTENT_H
+
+/* Define to 1 if the system has the type `mode_t'. */
+#undef HAVE_MODE_T
+
+/* Define to 1 if you have the `mousemask' function. */
+#undef HAVE_MOUSEMASK
+
+/* Define if you have NAS including devel headers */
+#undef HAVE_NAS
+
+/* Define to 1 if you have the <ncurses.h> header file. */
+#undef HAVE_NCURSES_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/icmp_var.h> header file. */
+#undef HAVE_NETINET_ICMP_VAR_H
+
+/* Define to 1 if you have the <netinet/if_ether.h> header file. */
+#undef HAVE_NETINET_IF_ETHER_H
+
+/* Define to 1 if you have the <netinet/if_inarp.h> header file. */
+#undef HAVE_NETINET_IF_INARP_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <netinet/in_pcb.h> header file. */
+#undef HAVE_NETINET_IN_PCB_H
+
+/* Define to 1 if you have the <netinet/in_systm.h> header file. */
+#undef HAVE_NETINET_IN_SYSTM_H
+
+/* Define to 1 if you have the <netinet/ip.h> header file. */
+#undef HAVE_NETINET_IP_H
+
+/* Define to 1 if you have the <netinet/ip_icmp.h> header file. */
+#undef HAVE_NETINET_IP_ICMP_H
+
+/* Define to 1 if you have the <netinet/ip_var.h> header file. */
+#undef HAVE_NETINET_IP_VAR_H
+
+/* Define to 1 if you have the <netinet/tcp_fsm.h> header file. */
+#undef HAVE_NETINET_TCP_FSM_H
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#undef HAVE_NETINET_TCP_H
+
+/* Define to 1 if you have the <netinet/tcp_timer.h> header file. */
+#undef HAVE_NETINET_TCP_TIMER_H
+
+/* Define to 1 if you have the <netinet/tcp_var.h> header file. */
+#undef HAVE_NETINET_TCP_VAR_H
+
+/* Define to 1 if you have the <netinet/udp.h> header file. */
+#undef HAVE_NETINET_UDP_H
+
+/* Define to 1 if you have the <netinet/udp_var.h> header file. */
+#undef HAVE_NETINET_UDP_VAR_H
+
+/* Define to 1 if you have the <netipx/ipx.h> header file. */
+#undef HAVE_NETIPX_IPX_H
+
+/* Define to 1 if you have the <net/if_arp.h> header file. */
+#undef HAVE_NET_IF_ARP_H
+
+/* Define to 1 if you have the <net/if_dl.h> header file. */
+#undef HAVE_NET_IF_DL_H
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
+/* Define to 1 if you have the <net/if_types.h> header file. */
+#undef HAVE_NET_IF_TYPES_H
+
+/* Define to 1 if you have the <net/route.h> header file. */
+#undef HAVE_NET_ROUTE_H
+
+/* Define to 1 if `_msg_ptr' is member of `ns_msg'. */
+#undef HAVE_NS_MSG__MSG_PTR
+
+/* Define to 1 if the system has the type `off_t'. */
+#undef HAVE_OFF_T
+
+/* Define if mkdir takes only one argument */
+#undef HAVE_ONE_ARG_MKDIR
+
+/* Define if OpenGL is present on the system */
+#undef HAVE_OPENGL
+
+/* Define to 1 if you have the <openssl/err.h> header file. */
+#undef HAVE_OPENSSL_ERR_H
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#undef HAVE_OPENSSL_SSL_H
+
+/* Define to 1 if you have the `pclose' function. */
+#undef HAVE_PCLOSE
+
+/* Define to 1 if the system has the type `pid_t'. */
+#undef HAVE_PID_T
+
+/* Define to 1 if you have the <png.h> header file. */
+#undef HAVE_PNG_H
+
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define to 1 if you have the `popen' function. */
+#undef HAVE_POPEN
+
+/* Define if we can use ppdev.h for parallel port access */
+#undef HAVE_PPDEV
+
+/* Define to 1 if you have the `prctl' function. */
+#undef HAVE_PRCTL
+
+/* Define to 1 if you have the `pread' function. */
+#undef HAVE_PREAD
+
+/* Define to 1 if you have the <process.h> header file. */
+#undef HAVE_PROCESS_H
+
+/* Define to 1 if you have the `pthread_attr_get_np' function. */
+#undef HAVE_PTHREAD_ATTR_GET_NP
+
+/* Define to 1 if you have the `pthread_getattr_np' function. */
+#undef HAVE_PTHREAD_GETATTR_NP
+
+/* Define to 1 if you have the `pthread_get_stackaddr_np' function. */
+#undef HAVE_PTHREAD_GET_STACKADDR_NP
+
+/* Define to 1 if you have the `pthread_get_stacksize_np' function. */
+#undef HAVE_PTHREAD_GET_STACKSIZE_NP
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the <pthread_np.h> header file. */
+#undef HAVE_PTHREAD_NP_H
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
+/* Define to 1 if you have the `pwrite' function. */
+#undef HAVE_PWRITE
+
+/* Define to 1 if you have the `readdir' function. */
+#undef HAVE_READDIR
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define to 1 if the system has the type `request_sense'. */
+#undef HAVE_REQUEST_SENSE
+
+/* Define if you have the resolver library and header */
+#undef HAVE_RESOLV
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the `sched_yield' function. */
+#undef HAVE_SCHED_YIELD
+
+/* Define to 1 if `cmd' is member of `scsireq_t'. */
+#undef HAVE_SCSIREQ_T_CMD
+
+/* Define to 1 if you have the <scsi/scsi.h> header file. */
+#undef HAVE_SCSI_SCSI_H
+
+/* Define to 1 if you have the <scsi/scsi_ioctl.h> header file. */
+#undef HAVE_SCSI_SCSI_IOCTL_H
+
+/* Define to 1 if you have the <scsi/sg.h> header file. */
+#undef HAVE_SCSI_SG_H
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `sendmsg' function. */
+#undef HAVE_SENDMSG
+
+/* Define to 1 if you have the `setproctitle' function. */
+#undef HAVE_SETPROCTITLE
+
+/* Define to 1 if you have the `setrlimit' function. */
+#undef HAVE_SETRLIMIT
+
+/* Define to 1 if you have the `settimeofday' function. */
+#undef HAVE_SETTIMEOFDAY
+
+/* Define to 1 if `interface_id' is member of `sg_io_hdr_t'. */
+#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
+
+/* Define if sigaddset is supported */
+#undef HAVE_SIGADDSET
+
+/* Define to 1 if you have the `sigaltstack' function. */
+#undef HAVE_SIGALTSTACK
+
+/* Define to 1 if `si_fd' is member of `siginfo_t'. */
+#undef HAVE_SIGINFO_T_SI_FD
+
+/* Define to 1 if you have the `sigprocmask' function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define to 1 if the system has the type `sigset_t'. */
+#undef HAVE_SIGSET_T
+
+/* Define to 1 if the system has the type `size_t'. */
+#undef HAVE_SIZE_T
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the `socketpair' function. */
+#undef HAVE_SOCKETPAIR
+
+/* Define to 1 if you have the <soundcard.h> header file. */
+#undef HAVE_SOUNDCARD_H
+
+/* Define to 1 if you have the `spawnvp' function. */
+#undef HAVE_SPAWNVP
+
+/* Define to 1 if the system has the type `ssize_t'. */
+#undef HAVE_SSIZE_T
+
+/* Define to 1 if you have the `statfs' function. */
+#undef HAVE_STATFS
+
+/* Define to 1 if you have the `statvfs' function. */
+#undef HAVE_STATVFS
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the <stropts.h> header file. */
+#undef HAVE_STROPTS_H
+
+/* Define to 1 if you have the `strtold' function. */
+#undef HAVE_STRTOLD
+
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* Define to 1 if `direction' is member of `struct ff_effect'. */
+#undef HAVE_STRUCT_FF_EFFECT_DIRECTION
+
+/* Define to 1 if `icps_outhist' is member of `struct icmpstat'. */
+#undef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST
+
+/* Define to 1 if `msg_accrights' is member of `struct msghdr'. */
+#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
+
+/* Define to 1 if `mt_blkno' is member of `struct mtget'. */
+#undef HAVE_STRUCT_MTGET_MT_BLKNO
+
+/* Define to 1 if `mt_blksiz' is member of `struct mtget'. */
+#undef HAVE_STRUCT_MTGET_MT_BLKSIZ
+
+/* Define to 1 if `mt_gstat' is member of `struct mtget'. */
+#undef HAVE_STRUCT_MTGET_MT_GSTAT
+
+/* Define to 1 if `name' is member of `struct option'. */
+#undef HAVE_STRUCT_OPTION_NAME
+
+/* Define to 1 if `sin6_scope_id' is member of `struct sockaddr_in6'. */
+#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
+
+/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
+#undef HAVE_STRUCT_SOCKADDR_SA_LEN
+
+/* Define to 1 if `sun_len' is member of `struct sockaddr_un'. */
+#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
+
+/* Define to 1 if `f_bavail' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_BAVAIL
+
+/* Define to 1 if `f_bfree' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_BFREE
+
+/* Define to 1 if `f_favail' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_FAVAIL
+
+/* Define to 1 if `f_ffree' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_FFREE
+
+/* Define to 1 if `f_frsize' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_FRSIZE
+
+/* Define to 1 if `f_namelen' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_NAMELEN
+
+/* Define to 1 if `f_blocks' is member of `struct statvfs'. */
+#undef HAVE_STRUCT_STATVFS_F_BLOCKS
+
+/* Define to 1 if `st_atim' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM
+
+/* Define to 1 if `st_blocks' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLOCKS
+
+/* Define to 1 if `st_ctim' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_CTIM
+
+/* Define to 1 if `st_mtim' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_MTIM
+
+/* Define to 1 if the system has the type `struct xinpgen'. */
+#undef HAVE_STRUCT_XINPGEN
+
+/* Define to 1 if you have the `symlink' function. */
+#undef HAVE_SYMLINK
+
+/* Define to 1 if you have the <syscall.h> header file. */
+#undef HAVE_SYSCALL_H
+
+/* Define to 1 if you have the <sys/asoundlib.h> header file. */
+#undef HAVE_SYS_ASOUNDLIB_H
+
+/* Define to 1 if you have the <sys/cdio.h> header file. */
+#undef HAVE_SYS_CDIO_H
+
+/* Define to 1 if you have the <sys/elf32.h> header file. */
+#undef HAVE_SYS_ELF32_H
+
+/* Define to 1 if you have the <sys/epoll.h> header file. */
+#undef HAVE_SYS_EPOLL_H
+
+/* Define to 1 if you have the <sys/errno.h> header file. */
+#undef HAVE_SYS_ERRNO_H
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+#undef HAVE_SYS_EVENT_H
+
+/* Define to 1 if you have the <sys/exec_elf.h> header file. */
+#undef HAVE_SYS_EXEC_ELF_H
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+#undef HAVE_SYS_FILIO_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#undef HAVE_SYS_IPC_H
+
+/* Define to 1 if you have the <sys/limits.h> header file. */
+#undef HAVE_SYS_LIMITS_H
+
+/* Define to 1 if you have the <sys/link.h> header file. */
+#undef HAVE_SYS_LINK_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/modem.h> header file. */
+#undef HAVE_SYS_MODEM_H
+
+/* Define to 1 if you have the <sys/mount.h> header file. */
+#undef HAVE_SYS_MOUNT_H
+
+/* Define to 1 if you have the <sys/msg.h> header file. */
+#undef HAVE_SYS_MSG_H
+
+/* Define to 1 if you have the <sys/mtio.h> header file. */
+#undef HAVE_SYS_MTIO_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_H
+
+/* Define to 1 if you have the <sys/prctl.h> header file. */
+#undef HAVE_SYS_PRCTL_H
+
+/* Define to 1 if you have the <sys/protosw.h> header file. */
+#undef HAVE_SYS_PROTOSW_H
+
+/* Define to 1 if you have the <sys/ptrace.h> header file. */
+#undef HAVE_SYS_PTRACE_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/scsiio.h> header file. */
+#undef HAVE_SYS_SCSIIO_H
+
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#undef HAVE_SYS_SHM_H
+
+/* Define to 1 if you have the <sys/signal.h> header file. */
+#undef HAVE_SYS_SIGNAL_H
+
+/* Define to 1 if you have the <sys/socketvar.h> header file. */
+#undef HAVE_SYS_SOCKETVAR_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H
+
+/* Define to 1 if you have the <sys/soundcard.h> header file. */
+#undef HAVE_SYS_SOUNDCARD_H
+
+/* Define to 1 if you have the <sys/statfs.h> header file. */
+#undef HAVE_SYS_STATFS_H
+
+/* Define to 1 if you have the <sys/statvfs.h> header file. */
+#undef HAVE_SYS_STATVFS_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/strtio.h> header file. */
+#undef HAVE_SYS_STRTIO_H
+
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+#undef HAVE_SYS_SYSCALL_H
+
+/* Define to 1 if you have the <sys/sysctl.h> header file. */
+#undef HAVE_SYS_SYSCTL_H
+
+/* Define to 1 if you have the <sys/thr.h> header file. */
+#undef HAVE_SYS_THR_H
+
+/* Define to 1 if you have the <sys/tihdr.h> header file. */
+#undef HAVE_SYS_TIHDR_H
+
+/* Define to 1 if you have the <sys/timeout.h> header file. */
+#undef HAVE_SYS_TIMEOUT_H
+
+/* Define to 1 if you have the <sys/times.h> header file. */
+#undef HAVE_SYS_TIMES_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#undef HAVE_SYS_UIO_H
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H
+
+/* Define to 1 if you have the <sys/user.h> header file. */
+#undef HAVE_SYS_USER_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <sys/vfs.h> header file. */
+#undef HAVE_SYS_VFS_H
+
+/* Define to 1 if you have the <sys/vm86.h> header file. */
+#undef HAVE_SYS_VM86_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#undef HAVE_TCGETATTR
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `thr_kill2' function. */
+#undef HAVE_THR_KILL2
+
+/* Define to 1 if you have the `timegm' function. */
+#undef HAVE_TIMEGM
+
+/* Define if you have the timezone variable */
+#undef HAVE_TIMEZONE
+
+/* Define to 1 if you have the <ucontext.h> header file. */
+#undef HAVE_UCONTEXT_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `usleep' function. */
+#undef HAVE_USLEEP
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
+#undef HAVE_VALGRIND_MEMCHECK_H
+
+/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
+#undef HAVE_VALGRIND_VALGRIND_H
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if you have the `wait4' function. */
+#undef HAVE_WAIT4
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <X11/extensions/shape.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SHAPE_H
+
+/* Define to 1 if you have the <X11/extensions/Xcomposite.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XCOMPOSITE_H
+
+/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XF86VMODE_H
+
+/* Define to 1 if you have the <X11/extensions/Xinerama.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XINERAMA_H
+
+/* Define to 1 if you have the <X11/extensions/XInput.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XINPUT_H
+
+/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XRANDR_H
+
+/* Define to 1 if you have the <X11/extensions/Xrender.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XRENDER_H
+
+/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XSHM_H
+
+/* Define to 1 if you have the <X11/Xcursor/Xcursor.h> header file. */
+#undef HAVE_X11_XCURSOR_XCURSOR_H
+
+/* Define to 1 if you have the <X11/XKBlib.h> header file. */
+#undef HAVE_X11_XKBLIB_H
+
+/* Define to 1 if you have the <X11/Xlib.h> header file. */
+#undef HAVE_X11_XLIB_H
+
+/* Define to 1 if you have the <X11/Xutil.h> header file. */
+#undef HAVE_X11_XUTIL_H
+
+/* Define to 1 if `callback' is member of `XICCallback'. */
+#undef HAVE_XICCALLBACK_CALLBACK
+
+/* Define if you have the XKB extension */
+#undef HAVE_XKB
+
+/* Define if libxml2 has the xmlNewDocPI function */
+#undef HAVE_XMLNEWDOCPI
+
+/* Define if libxml2 has the xmlReadMemory function */
+#undef HAVE_XMLREADMEMORY
+
+/* Define if Xrender has the XRenderSetPictureTransform function */
+#undef HAVE_XRENDERSETPICTURETRANSFORM
+
+/* Define to 1 if you have the `_pclose' function. */
+#undef HAVE__PCLOSE
+
+/* Define to 1 if you have the `_popen' function. */
+#undef HAVE__POPEN
+
+/* Define to 1 if you have the `_snprintf' function. */
+#undef HAVE__SNPRINTF
+
+/* Define to 1 if you have the `_spawnvp' function. */
+#undef HAVE__SPAWNVP
+
+/* Define to 1 if you have the `_strdup' function. */
+#undef HAVE__STRDUP
+
+/* Define to 1 if you have the `_stricmp' function. */
+#undef HAVE__STRICMP
+
+/* Define to 1 if you have the `_strnicmp' function. */
+#undef HAVE__STRNICMP
+
+/* Define to 1 if you have the `_strtoi64' function. */
+#undef HAVE__STRTOI64
+
+/* Define to 1 if you have the `_strtoui64' function. */
+#undef HAVE__STRTOUI64
+
+/* Define to 1 if you have the `_vsnprintf' function. */
+#undef HAVE__VSNPRINTF
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to the soname of the libcapi20 library. */
+#undef SONAME_LIBCAPI20
+
+/* Define to the soname of the libcrypto library. */
+#undef SONAME_LIBCRYPTO
+
+/* Define to the soname of the libcups library. */
+#undef SONAME_LIBCUPS
+
+/* Define to the soname of the libcurses library. */
+#undef SONAME_LIBCURSES
+
+/* Define to the soname of the libfontconfig library. */
+#undef SONAME_LIBFONTCONFIG
+
+/* Define to the soname of the libfreetype library. */
+#undef SONAME_LIBFREETYPE
+
+/* Define to the soname of the libGL library. */
+#undef SONAME_LIBGL
+
+/* Define to the soname of the libGLU library. */
+#undef SONAME_LIBGLU
+
+/* Define to the soname of the libgnutls library. */
+#undef SONAME_LIBGNUTLS
+
+/* Define to the soname of the libhal library. */
+#undef SONAME_LIBHAL
+
+/* Define to the soname of the libjack library. */
+#undef SONAME_LIBJACK
+
+/* Define to the soname of the libjpeg library. */
+#undef SONAME_LIBJPEG
+
+/* Define to the soname of the libncurses library. */
+#undef SONAME_LIBNCURSES
+
+/* Define to the soname of the libodbc library. */
+#undef SONAME_LIBODBC
+
+/* Define to the soname of the libpng library. */
+#undef SONAME_LIBPNG
+
+/* Define to the soname of the libsane library. */
+#undef SONAME_LIBSANE
+
+/* Define to the soname of the libssl library. */
+#undef SONAME_LIBSSL
+
+/* Define to the soname of the libX11 library. */
+#undef SONAME_LIBX11
+
+/* Define to the soname of the libXcomposite library. */
+#undef SONAME_LIBXCOMPOSITE
+
+/* Define to the soname of the libXcursor library. */
+#undef SONAME_LIBXCURSOR
+
+/* Define to the soname of the libXext library. */
+#undef SONAME_LIBXEXT
+
+/* Define to the soname of the libXi library. */
+#undef SONAME_LIBXI
+
+/* Define to the soname of the libXinerama library. */
+#undef SONAME_LIBXINERAMA
+
+/* Define to the soname of the libXrandr library. */
+#undef SONAME_LIBXRANDR
+
+/* Define to the soname of the libXrender library. */
+#undef SONAME_LIBXRENDER
+
+/* Define to the soname of the libxslt library. */
+#undef SONAME_LIBXSLT
+
+/* Define to the soname of the libXxf86vm library. */
+#undef SONAME_LIBXXF86VM
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
+/* Define to a macro to generate an assembly function directive */
+#undef __ASM_FUNC
+
+/* Define to a macro to generate an assembly name from a C symbol */
+#undef __ASM_NAME
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/control.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/control.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/control.idl	(revision 19678)
@@ -18,4 +18,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "oaidl.idl";
 
@@ -28,5 +37,5 @@
 interface IMediaPosition;
 
-typedef long OAFilterState;
+typedef LONG OAFilterState;
 typedef LONG_PTR OAHWND;
 typedef LONG_PTR OAEVENT;
@@ -69,8 +78,8 @@
 interface IBasicAudio : IDispatch
 {
-    [propput] HRESULT Volume( [in] long lVolume );
-    [propget] HRESULT Volume( [out] long *plVolume );
-    [propput] HRESULT Balance( [in] long lBalance );
-    [propget] HRESULT Balance( [out] long *plBalance );
+    [propput] HRESULT Volume( [in] LONG lVolume );
+    [propget] HRESULT Volume( [out] LONG *plVolume );
+    [propput] HRESULT Balance( [in] LONG lBalance );
+    [propget] HRESULT Balance( [out] LONG *plBalance );
 }
 
@@ -88,41 +97,41 @@
     [propput] HRESULT Caption( [in] BSTR strCaption );
     [propget] HRESULT Caption( [out] BSTR *strCaption );
-    [propput] HRESULT WindowStyle( [in] long WindowStyle );
-    [propget] HRESULT WindowStyle( [out] long *WindowStyle );
-    [propput] HRESULT WindowStyleEx( [in] long WindowStyleEx );
-    [propget] HRESULT WindowStyleEx( [out] long *WindowStyleEx );
-    [propput] HRESULT AutoShow( [in] long AutoShow );
-    [propget] HRESULT AutoShow( [out] long *AutoShow );
-    [propput] HRESULT WindowState( [in] long WindowState );
-    [propget] HRESULT WindowState( [out] long *WindowState );
-    [propput] HRESULT BackgroundPalette( [in] long BackgroundPalette );
-    [propget] HRESULT BackgroundPalette( [out] long *pBackgroundPalette );
-    [propput] HRESULT Visible( [in] long Visible );
-    [propget] HRESULT Visible( [out] long *pVisible );
-    [propput] HRESULT Left( [in] long Left );
-    [propget] HRESULT Left( [out] long *pLeft );
-    [propput] HRESULT Width( [in] long Width );
-    [propget] HRESULT Width( [out] long *pWidth );
-    [propput] HRESULT Top( [in] long Top );
-    [propget] HRESULT Top( [out] long *pTop );
-    [propput] HRESULT Height( [in] long Height );
-    [propget] HRESULT Height( [out] long *pHeight );
+    [propput] HRESULT WindowStyle( [in] LONG WindowStyle );
+    [propget] HRESULT WindowStyle( [out] LONG *WindowStyle );
+    [propput] HRESULT WindowStyleEx( [in] LONG WindowStyleEx );
+    [propget] HRESULT WindowStyleEx( [out] LONG *WindowStyleEx );
+    [propput] HRESULT AutoShow( [in] LONG AutoShow );
+    [propget] HRESULT AutoShow( [out] LONG *AutoShow );
+    [propput] HRESULT WindowState( [in] LONG WindowState );
+    [propget] HRESULT WindowState( [out] LONG *WindowState );
+    [propput] HRESULT BackgroundPalette( [in] LONG BackgroundPalette );
+    [propget] HRESULT BackgroundPalette( [out] LONG *pBackgroundPalette );
+    [propput] HRESULT Visible( [in] LONG Visible );
+    [propget] HRESULT Visible( [out] LONG *pVisible );
+    [propput] HRESULT Left( [in] LONG Left );
+    [propget] HRESULT Left( [out] LONG *pLeft );
+    [propput] HRESULT Width( [in] LONG Width );
+    [propget] HRESULT Width( [out] LONG *pWidth );
+    [propput] HRESULT Top( [in] LONG Top );
+    [propget] HRESULT Top( [out] LONG *pTop );
+    [propput] HRESULT Height( [in] LONG Height );
+    [propget] HRESULT Height( [out] LONG *pHeight );
     [propput] HRESULT Owner( [in] OAHWND Owner );
     [propget] HRESULT Owner( [out] OAHWND *Owner );
     [propput] HRESULT MessageDrain( [in] OAHWND Drain );
     [propget] HRESULT MessageDrain( [out] OAHWND *Drain );
-    [propget] HRESULT BorderColor( [out] long *Color );
-    [propput] HRESULT BorderColor( [in] long Color );
-    [propget] HRESULT FullScreenMode( [out] long *FullScreenMode );
-    [propput] HRESULT FullScreenMode( [in] long FullScreenMode );
-    HRESULT SetWindowForeground( [in] long Focus );
-    HRESULT NotifyOwnerMessage( [in] OAHWND hwnd, [in] long uMsg, [in] LONG_PTR wParam, [in] LONG_PTR lParam );
-    HRESULT SetWindowPosition( [in] long Left, [in] long Top, [in] long Width, [in] long Height );
-    HRESULT GetWindowPosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
-    HRESULT GetMinIdealImageSize( [out] long *pWidth, [out] long *pHeight );
-    HRESULT GetMaxIdealImageSize( [out] long *pWidth, [out] long *pHeight );
-    HRESULT GetRestorePosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
-    HRESULT HideCursor( [in] long HideCursor );
-    HRESULT IsCursorHidden( [out] long *CursorHidden );
+    [propget] HRESULT BorderColor( [out] LONG *Color );
+    [propput] HRESULT BorderColor( [in] LONG Color );
+    [propget] HRESULT FullScreenMode( [out] LONG *FullScreenMode );
+    [propput] HRESULT FullScreenMode( [in] LONG FullScreenMode );
+    HRESULT SetWindowForeground( [in] LONG Focus );
+    HRESULT NotifyOwnerMessage( [in] OAHWND hwnd, [in] LONG uMsg, [in] LONG_PTR wParam, [in] LONG_PTR lParam );
+    HRESULT SetWindowPosition( [in] LONG Left, [in] LONG Top, [in] LONG Width, [in] LONG Height );
+    HRESULT GetWindowPosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
+    HRESULT GetMinIdealImageSize( [out] LONG *pWidth, [out] LONG *pHeight );
+    HRESULT GetMaxIdealImageSize( [out] LONG *pWidth, [out] LONG *pHeight );
+    HRESULT GetRestorePosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
+    HRESULT HideCursor( [in] LONG HideCursor );
+    HRESULT IsCursorHidden( [out] LONG *CursorHidden );
 }
 
@@ -139,37 +148,37 @@
 {
     [propget] HRESULT AvgTimePerFrame( [out] REFTIME *pAvgTimePerFrame );
-    [propget] HRESULT BitRate( [out] long *pBitRate );
-    [propget] HRESULT BitErrorRate( [out] long *pBitErrorRate );
-    [propget] HRESULT VideoWidth( [out] long *pVideoWidth );
-    [propget] HRESULT VideoHeight( [out] long *pVideoHeight );
-    [propput] HRESULT SourceLeft( [in] long SourceLeft );
-    [propget] HRESULT SourceLeft( [out] long *pSourceLeft );
-    [propput] HRESULT SourceWidth( [in] long SourceWidth );
-    [propget] HRESULT SourceWidth( [out] long *pSourceWidth );
-    [propput] HRESULT SourceTop( [in] long SourceTop );
-    [propget] HRESULT SourceTop( [out] long *pSourceTop );
-    [propput] HRESULT SourceHeight( [in] long SourceHeight );
-    [propget] HRESULT SourceHeight( [out] long *pSourceHeight );
-    [propput] HRESULT DestinationLeft( [in] long DestinationLeft );
-    [propget] HRESULT DestinationLeft( [out] long *pDestinationLeft );
-    [propput] HRESULT DestinationWidth( [in] long DestinationWidth );
-    [propget] HRESULT DestinationWidth( [out] long *pDestinationWidth );
-    [propput] HRESULT DestinationTop( [in] long DestinationTop );
-    [propget] HRESULT DestinationTop( [out] long *pDestinationTop );
-    [propput] HRESULT DestinationHeight( [in] long DestinationHeight );
-    [propget] HRESULT DestinationHeight( [out] long *pDestinationHeight );
-    HRESULT SetSourcePosition( [in] long Left, [in] long Top, [in] long Width, [in] long Height );
-    HRESULT GetSourcePosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
+    [propget] HRESULT BitRate( [out] LONG *pBitRate );
+    [propget] HRESULT BitErrorRate( [out] LONG *pBitErrorRate );
+    [propget] HRESULT VideoWidth( [out] LONG *pVideoWidth );
+    [propget] HRESULT VideoHeight( [out] LONG *pVideoHeight );
+    [propput] HRESULT SourceLeft( [in] LONG SourceLeft );
+    [propget] HRESULT SourceLeft( [out] LONG *pSourceLeft );
+    [propput] HRESULT SourceWidth( [in] LONG SourceWidth );
+    [propget] HRESULT SourceWidth( [out] LONG *pSourceWidth );
+    [propput] HRESULT SourceTop( [in] LONG SourceTop );
+    [propget] HRESULT SourceTop( [out] LONG *pSourceTop );
+    [propput] HRESULT SourceHeight( [in] LONG SourceHeight );
+    [propget] HRESULT SourceHeight( [out] LONG *pSourceHeight );
+    [propput] HRESULT DestinationLeft( [in] LONG DestinationLeft );
+    [propget] HRESULT DestinationLeft( [out] LONG *pDestinationLeft );
+    [propput] HRESULT DestinationWidth( [in] LONG DestinationWidth );
+    [propget] HRESULT DestinationWidth( [out] LONG *pDestinationWidth );
+    [propput] HRESULT DestinationTop( [in] LONG DestinationTop );
+    [propget] HRESULT DestinationTop( [out] LONG *pDestinationTop );
+    [propput] HRESULT DestinationHeight( [in] LONG DestinationHeight );
+    [propget] HRESULT DestinationHeight( [out] LONG *pDestinationHeight );
+    HRESULT SetSourcePosition( [in] LONG Left, [in] LONG Top, [in] LONG Width, [in] LONG Height );
+    HRESULT GetSourcePosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
     HRESULT SetDefaultSourcePosition();
-    HRESULT SetDestinationPosition( [in] long Left, [in] long Top, [in] long Width, [in] long Height );
-    HRESULT GetDestinationPosition( [out] long *pLeft, [out] long *pTop, [out] long *pWidth, [out] long *pHeight );
+    HRESULT SetDestinationPosition( [in] LONG Left, [in] LONG Top, [in] LONG Width, [in] LONG Height );
+    HRESULT GetDestinationPosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
     HRESULT SetDefaultDestinationPosition();
-    HRESULT GetVideoSize( [out] long *pWidth, [out] long *pHeight );
-    HRESULT GetVideoPaletteEntries( [in] long StartIndex,
-                                    [in] long Entries,
-                                    [out] long *pRetrieved,
-                                    [out, size_is(Entries), length_is(*pRetrieved)] long *pPalette );
-    HRESULT GetCurrentImage( [in, out] long *pBufferSize,
-                             [out, size_is(*pBufferSize), length_is(*pBufferSize)] long *pDIBImage );
+    HRESULT GetVideoSize( [out] LONG *pWidth, [out] LONG *pHeight );
+    HRESULT GetVideoPaletteEntries( [in] LONG StartIndex,
+                                    [in] LONG Entries,
+                                    [out] LONG *pRetrieved,
+                                    [out, size_is(Entries), length_is(*pRetrieved)] LONG *pPalette );
+    HRESULT GetCurrentImage( [in, out] LONG *pBufferSize,
+                             [out, size_is(*pBufferSize), length_is(*pBufferSize)] LONG *pDIBImage );
     HRESULT IsUsingDefaultSource();
     HRESULT IsUsingDefaultDestination();
@@ -199,9 +208,9 @@
 {
     HRESULT GetEventHandle( [out] OAEVENT *hEvent );
-    HRESULT GetEvent( [out] long *lEventCode, [out] LONG_PTR *lParam1, [out] LONG_PTR *lParam2, [in] long msTimeout );
-    HRESULT WaitForCompletion( [in] long msTimeout, [out] long *pEvCode );
-    HRESULT CancelDefaultHandling( [in] long lEvCode );
-    HRESULT RestoreDefaultHandling( [in] long lEvCode );
-    HRESULT FreeEventParams( [in] long lEvCode, [in] LONG_PTR lParam1, [in] LONG_PTR lParam2 );
+    HRESULT GetEvent( [out] LONG *lEventCode, [out] LONG_PTR *lParam1, [out] LONG_PTR *lParam2, [in] LONG msTimeout );
+    HRESULT WaitForCompletion( [in] LONG msTimeout, [out] LONG *pEvCode );
+    HRESULT CancelDefaultHandling( [in] LONG lEvCode );
+    HRESULT RestoreDefaultHandling( [in] LONG lEvCode );
+    HRESULT FreeEventParams( [in] LONG lEvCode, [in] LONG_PTR lParam1, [in] LONG_PTR lParam2 );
 }
 
@@ -217,7 +226,7 @@
 interface IMediaEventEx : IMediaEvent
 {
-    HRESULT SetNotifyWindow( [in] OAHWND hwnd, [in] long lMsg, [in] LONG_PTR lInstanceData );
-    HRESULT SetNotifyFlags( [in] long lNoNotifyFlags );
-    HRESULT GetNotifyFlags( [out] long *lplNoNotifyFlags );
+    HRESULT SetNotifyWindow( [in] OAHWND hwnd, [in] LONG lMsg, [in] LONG_PTR lInstanceData );
+    HRESULT SetNotifyFlags( [in] LONG lNoNotifyFlags );
+    HRESULT GetNotifyFlags( [out] LONG *lplNoNotifyFlags );
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/corerror.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/corerror.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/corerror.h	(revision 19678)
@@ -131,3 +131,5 @@
 #define FUSION_E_INVALID_NAME           EMAKEHR(0x1047)
 
+#define CLDB_E_FILE_OLDVER              EMAKEHR(0x1107)
+
 #endif	/* __WINE_CORERROR_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/cryptuiapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/cryptuiapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/cryptuiapi.h	(revision 19678)
@@ -25,4 +25,5 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __CRYPTUIAPI_H__
 #define __CRYPTUIAPI_H__
@@ -281,4 +282,5 @@
         PCCTL_CONTEXT  pCTLContext;
         PCCRL_CONTEXT  pCRLContext;
+        HCERTSTORE     hCertStore;
     } DUMMYUNIONNAME;
     DWORD       cStores;
@@ -345,4 +347,91 @@
  HCERTSTORE hDestCertStore);
 
+/* Definitions missing from PSDK's cryptuiapi.h, but documented on MSDN. */
+typedef BOOL (WINAPI *PFNCCERTDISPLAYPROC)(PCCERT_CONTEXT pCertContext,
+ HWND hWndSelCertDlg, void *pvCallbackData);
+
+/* Values for CRYPTUI_SELECTCERTIFICATE_STRUCT's dwFlags */
+#define CRYPTUI_SELECTCERT_MULTISELECT 0x00000001
+
+typedef struct _CRYPTUI_SELECTCERTIFICATE_STRUCTA
+{
+    DWORD               dwSize;
+    HWND                hwndParent;
+    DWORD               dwFlags;
+    LPCWSTR             szTitle;
+    DWORD               dwDontUseColumn;
+    LPCWSTR             szDisplayString;
+    PFNCFILTERPROC      pFilterCallback;
+    PFNCCERTDISPLAYPROC pDisplayCallback;
+    void               *pvCallbackData;
+    DWORD               cStores;
+    HCERTSTORE         *rghStores;
+    DWORD               cPropSheetPages;
+    LPCPROPSHEETPAGEW   rgPropSheetPages;
+    HCERTSTORE          hSelectedCertStore;
+} CRYPTUI_SELECTCERTIFICATE_STRUCTA, *PCRYPTUI_SELECTCERTIFICATE_STRUCTA;
+typedef const CRYPTUI_SELECTCERTIFICATE_STRUCTA *
+ PCCRYPTUI_SELECTCERTIFICATE_STRUCTA;
+
+typedef struct _CRYPTUI_SELECTCERTIFICATE_STRUCTW
+{
+    DWORD               dwSize;
+    HWND                hwndParent;
+    DWORD               dwFlags;
+    LPCWSTR             szTitle;
+    DWORD               dwDontUseColumn;
+    LPCWSTR             szDisplayString;
+    PFNCFILTERPROC      pFilterCallback;
+    PFNCCERTDISPLAYPROC pDisplayCallback;
+    void               *pvCallbackData;
+    DWORD               cStores;
+    HCERTSTORE         *rghStores;
+    DWORD               cPropSheetPages;
+    LPCPROPSHEETPAGEW   rgPropSheetPages;
+    HCERTSTORE          hSelectedCertStore;
+} CRYPTUI_SELECTCERTIFICATE_STRUCTW, *PCRYPTUI_SELECTCERTIFICATE_STRUCTW;
+typedef const CRYPTUI_SELECTCERTIFICATE_STRUCTW *
+ PCCRYPTUI_SELECTCERTIFICATE_STRUCTW;
+
+PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateA(
+ PCCRYPTUI_SELECTCERTIFICATE_STRUCTA pcsc);
+PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateW(
+ PCCRYPTUI_SELECTCERTIFICATE_STRUCTW pcsc);
+
+typedef struct tagCRYPTUI_VIEWSIGNERINFO_STRUCTA
+{
+    DWORD             dwSize;
+    HWND              hwndParent;
+    DWORD             dwFlags;
+    LPCSTR            szTitle;
+    CMSG_SIGNER_INFO *pSignerInfo;
+    HCRYPTMSG         hMsg;
+    LPCSTR            pszOID;
+    DWORD_PTR         dwReserved;
+    DWORD             cStores;
+    HCERTSTORE       *rghStores;
+    DWORD             cPropSheetPages;
+    LPCPROPSHEETPAGEA rgPropSheetPages;
+} CRYPTUI_VIEWSIGNERINFO_STRUCTA, *PCRYPTUI_VIEWSIGNERINFO_STRUCTA;
+
+typedef struct tagCRYPTUI_VIEWSIGNERINFO_STRUCTW
+{
+    DWORD             dwSize;
+    HWND              hwndParent;
+    DWORD             dwFlags;
+    LPCWSTR           szTitle;
+    CMSG_SIGNER_INFO *pSignerInfo;
+    HCRYPTMSG         hMsg;
+    LPCSTR            pszOID;
+    DWORD_PTR         dwReserved;
+    DWORD             cStores;
+    HCERTSTORE       *rghStores;
+    DWORD             cPropSheetPages;
+    LPCPROPSHEETPAGEW rgPropSheetPages;
+} CRYPTUI_VIEWSIGNERINFO_STRUCTW, *PCRYPTUI_VIEWSIGNERINFO_STRUCTW;
+
+BOOL WINAPI CryptUIDlgViewSignerInfoA(CRYPTUI_VIEWSIGNERINFO_STRUCTA *pcvsi);
+BOOL WINAPI CryptUIDlgViewSignerInfoW(CRYPTUI_VIEWSIGNERINFO_STRUCTW *pcvsi);
+
 #include <poppack.h>
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ctxtcall.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ctxtcall.idl	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ctxtcall.idl	(revision 19678)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008 Louis Lenders
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+import "wtypes.idl";
+import "objidl.idl";
+import "unknwn.idl";
+
+typedef struct tagComCallData
+{
+    DWORD dwDispid;
+    DWORD dwReserved;
+    void  *pUserDefined;
+} ComCallData;
+
+/***************************************************************************
+ * IContextCallback
+ */
+[
+  local,
+  object,
+  uuid(000001da-0000-0000-c000-000000000046),
+  pointer_default(unique)
+]
+interface IContextCallback : IUnknown
+{
+    typedef HRESULT (__stdcall *PFNCONTEXTCALL)(ComCallData *pParam);
+
+    HRESULT ContextCallback(
+            [in] PFNCONTEXTCALL pCallback,
+            [in] ComCallData *pParam,
+            [in] REFIID riid,
+            [in] int iMethod,
+            [in] IUnknown *pUnk);
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -1534,6 +1543,6 @@
 }
 
-cpp_quote("#include <d3d10misc.h>")
-/* TODO: Include "d310effect.h" as soon as it exists */
-/* TODO: Include "d310shader.h" as soon as it exists */
+cpp_quote("#include \"d3d10misc.h\"")
+cpp_quote("#include \"d3d10shader.h\"")
+cpp_quote("#include \"d3d10effect.h\"")
 /* TODO: Include "d310sdklayers.h" as soon as it exists */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10effect.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10effect.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10effect.h	(revision 19678)
@@ -0,0 +1,298 @@
+/*
+ * Copyright 2009 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_D3D10EFFECT_H
+#define __WINE_D3D10EFFECT_H
+
+#include "d3d10.h"
+
+#define D3D10_EFFECT_VARIABLE_POOLED                0x1
+#define D3D10_EFFECT_VARIABLE_ANNOTATION            0x2
+#define D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT   0x4
+
+#ifndef D3D10_BYTES_FROM_BITS
+#define D3D10_BYTES_FROM_BITS(x) (((x) + 7) >> 3)
+#endif
+
+typedef struct _D3D10_EFFECT_TYPE_DESC
+{
+    LPCSTR TypeName;
+    D3D10_SHADER_VARIABLE_CLASS Class;
+    D3D10_SHADER_VARIABLE_TYPE Type;
+    UINT Elements;
+    UINT Members;
+    UINT Rows;
+    UINT Columns;
+    UINT PackedSize;
+    UINT UnpackedSize;
+    UINT Stride;
+} D3D10_EFFECT_TYPE_DESC;
+
+typedef struct _D3D10_EFFECT_VARIABLE_DESC
+{
+    LPCSTR Name;
+    LPCSTR Semantic;
+    UINT Flags;
+    UINT Annotations;
+    UINT BufferOffset;
+    UINT ExplicitBindPoint;
+} D3D10_EFFECT_VARIABLE_DESC;
+
+typedef struct _D3D10_TECHNIQUE_DESC
+{
+    LPCSTR Name;
+    UINT Passes;
+    UINT Annotations;
+} D3D10_TECHNIQUE_DESC;
+
+typedef struct _D3D10_STATE_BLOCK_MASK
+{
+    BYTE VS;
+    BYTE VSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
+    BYTE VSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
+    BYTE VSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
+    BYTE GS;
+    BYTE GSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
+    BYTE GSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
+    BYTE GSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
+    BYTE PS;
+    BYTE PSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
+    BYTE PSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
+    BYTE PSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
+    BYTE IAVertexBuffers[D3D10_BYTES_FROM_BITS(D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT)];
+    BYTE IAIndexBuffer;
+    BYTE IAInputLayout;
+    BYTE IAPrimitiveTopology;
+    BYTE OMRenderTargets;
+    BYTE OMDepthStencilState;
+    BYTE OMBlendState;
+    BYTE RSViewports;
+    BYTE RSScissorRects;
+    BYTE RSRasterizerState;
+    BYTE SOBuffers;
+    BYTE Predication;
+} D3D10_STATE_BLOCK_MASK;
+
+typedef struct _D3D10_EFFECT_DESC
+{
+    BOOL IsChildEffect;
+    UINT ConstantBuffers;
+    UINT SharedConstantBuffers;
+    UINT GlobalVariables;
+    UINT SharedGlobalVariables;
+    UINT Techniques;
+} D3D10_EFFECT_DESC;
+
+typedef struct _D3D10_PASS_DESC
+{
+    LPCSTR Name;
+    UINT Annotations;
+    BYTE *pIAInputSignature;
+    SIZE_T IAInputSignatureSize;
+    UINT StencilRef;
+    UINT SampleMask;
+    FLOAT BlendFactor[4];
+} D3D10_PASS_DESC;
+
+typedef struct _D3D10_PASS_SHADER_DESC
+{
+    struct ID3D10EffectShaderVariable *pShaderVariable;
+    UINT ShaderIndex;
+} D3D10_PASS_SHADER_DESC;
+
+DEFINE_GUID(IID_ID3D10EffectType, 0x4e9e1ddc, 0xcd9d, 0x4772, 0xa8, 0x37, 0x00, 0x18, 0x0b, 0x9b, 0x88, 0xfd);
+
+#define INTERFACE ID3D10EffectType
+DECLARE_INTERFACE(ID3D10EffectType)
+{
+    STDMETHOD_(BOOL, IsValid)(THIS) PURE;
+    STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_TYPE_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeBySemantic)(THIS_ LPCSTR semantic) PURE;
+    STDMETHOD_(LPCSTR, GetMemberName)(THIS_ UINT index) PURE;
+    STDMETHOD_(LPCSTR, GetMemberSemantic)(THIS_ UINT index) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D10EffectVariable, 0xae897105, 0x00e6, 0x45bf, 0xbb, 0x8e, 0x28, 0x1d, 0xd6, 0xdb, 0x8e, 0x1b);
+
+#define INTERFACE ID3D10EffectVariable
+DECLARE_INTERFACE(ID3D10EffectVariable)
+{
+    STDMETHOD_(BOOL, IsValid)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectType *, GetType)(THIS) PURE;
+    STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_VARIABLE_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetMemberBySemantic)(THIS_ LPCSTR semantic) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetElement)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetParentConstantBuffer)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectScalarVariable *, AsScalar)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectVectorVariable *, AsVector)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectMatrixVariable *, AsMatrix)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectStringVariable *, AsString)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectShaderResourceVariable *, AsShaderResource)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectRenderTargetViewVariable *, AsRenderTargetView)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectDepthStencilViewVariable *, AsDepthStencilView)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectConstantBuffer *, AsConstantBuffer)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectShaderVariable *, AsShader)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectBlendVariable *, AsBlend)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectDepthStencilVariable *, AsDepthStencil)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectRasterizerVariable *, AsRasterizer)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectSamplerVariable *, AsSampler)(THIS) PURE;
+    STDMETHOD(SetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
+    STDMETHOD(GetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D10EffectConstantBuffer, 0x56648f4d, 0xcc8b, 0x4444, 0xa5, 0xad, 0xb5, 0xa3, 0xd7, 0x6e, 0x91, 0xb3);
+
+#define INTERFACE ID3D10EffectConstantBuffer
+DECLARE_INTERFACE_(ID3D10EffectConstantBuffer, ID3D10EffectVariable)
+{
+    /* ID3D10EffectVariable methods */
+    STDMETHOD_(BOOL, IsValid)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectType *, GetType)(THIS) PURE;
+    STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_VARIABLE_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetMemberBySemantic)(THIS_ LPCSTR semantic) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetElement)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetParentConstantBuffer)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectScalarVariable *, AsScalar)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectVectorVariable *, AsVector)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectMatrixVariable *, AsMatrix)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectStringVariable *, AsString)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectShaderResourceVariable *, AsShaderResource)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectRenderTargetViewVariable *, AsRenderTargetView)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectDepthStencilViewVariable *, AsDepthStencilView)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectConstantBuffer *, AsConstantBuffer)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectShaderVariable *, AsShader)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectBlendVariable *, AsBlend)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectDepthStencilVariable *, AsDepthStencil)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectRasterizerVariable *, AsRasterizer)(THIS) PURE;
+    STDMETHOD_(struct ID3D10EffectSamplerVariable *, AsSampler)(THIS) PURE;
+    STDMETHOD(SetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
+    STDMETHOD(GetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
+    /* ID3D10EffectConstantBuffer methods */
+    STDMETHOD(SetConstantBuffer)(THIS_ ID3D10Buffer *buffer) PURE;
+    STDMETHOD(GetConstantBuffer)(THIS_ ID3D10Buffer **buffer) PURE;
+    STDMETHOD(SetTextureBuffer)(THIS_ ID3D10ShaderResourceView *view) PURE;
+    STDMETHOD(GetTextureBuffer)(THIS_ ID3D10ShaderResourceView **view) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D10EffectTechnique, 0xdb122ce8, 0xd1c9, 0x4292, 0xb2, 0x37, 0x24, 0xed, 0x3d, 0xe8, 0xb1, 0x75);
+
+#define INTERFACE ID3D10EffectTechnique
+DECLARE_INTERFACE(ID3D10EffectTechnique)
+{
+    STDMETHOD_(BOOL, IsValid)(THIS) PURE;
+    STDMETHOD(GetDesc)(THIS_ D3D10_TECHNIQUE_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectPass *, GetPassByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectPass *, GetPassByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD(ComputeStateBlockMask)(THIS_ D3D10_STATE_BLOCK_MASK *mask) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D10Effect, 0x51b0ca8b, 0xec0b, 0x4519, 0x87, 0x0d, 0x8e, 0xe1, 0xcb, 0x50, 0x17, 0xc7);
+
+#define INTERFACE ID3D10Effect
+DECLARE_INTERFACE_(ID3D10Effect, IUnknown)
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *object) PURE;
+    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG, Release)(THIS) PURE;
+    /* ID3D10Effect methods */
+    STDMETHOD_(BOOL, IsValid)(THIS) PURE;
+    STDMETHOD_(BOOL, IsPool)(THIS) PURE;
+    STDMETHOD(GetDevice)(THIS_ ID3D10Device **device) PURE;
+    STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetConstantBufferByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetVariableByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetVariableBySemantic)(THIS_ LPCSTR semantic) PURE;
+    STDMETHOD_(struct ID3D10EffectTechnique *, GetTechniqueByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectTechnique *, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD(Optimize)(THIS) PURE;
+    STDMETHOD_(BOOL, IsOptimized)(THIS) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D10EffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
+
+#define INTERFACE ID3D10EffectPool
+DECLARE_INTERFACE_(ID3D10EffectPool, IUnknown)
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *object) PURE;
+    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG, Release)(THIS) PURE;
+    /* ID3D10EffectPool methods */
+    STDMETHOD_(struct ID3D10Effect *, AsEffect)(THIS) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D10EffectPass, 0x5cfbeb89, 0x1a06, 0x46e0, 0xb2, 0x82, 0xe3, 0xf9, 0xbf, 0xa3, 0x6a, 0x54);
+
+#define INTERFACE ID3D10EffectPass
+DECLARE_INTERFACE(ID3D10EffectPass)
+{
+    STDMETHOD_(BOOL, IsValid)(THIS) PURE;
+    STDMETHOD(GetDesc)(THIS_ D3D10_PASS_DESC *desc) PURE;
+    STDMETHOD(GetVertexShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
+    STDMETHOD(GetGeometryShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
+    STDMETHOD(GetPixelShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
+    STDMETHOD(Apply)(THIS_ UINT flags) PURE;
+    STDMETHOD(ComputeStateBlockMask)(THIS_ D3D10_STATE_BLOCK_MASK *mask) PURE;
+};
+#undef INTERFACE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HRESULT WINAPI D3D10CreateEffectFromMemory(void *data, SIZE_T data_size, UINT flags,
+        ID3D10Device *device, ID3D10EffectPool *effect_pool, ID3D10Effect **effect);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_D3D10EFFECT_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10shader.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10shader.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10shader.h	(revision 19678)
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2009 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_D3D10SHADER_H
+#define __WINE_D3D10SHADER_H
+
+#include "d3d10.h"
+
+#define D3D10_SHADER_DEBUG                          0x0001
+#define D3D10_SHADER_SKIP_VALIDATION                0x0002
+#define D3D10_SHADER_SKIP_OPTIMIZATION              0x0004
+#define D3D10_SHADER_PACK_MATRIX_ROW_MAJOR          0x0008
+#define D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR       0x0010
+#define D3D10_SHADER_PARTIAL_PRECISION              0x0020
+#define D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT       0x0040
+#define D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT       0x0080
+#define D3D10_SHADER_NO_PRESHADER                   0x0100
+#define D3D10_SHADER_AVOID_FLOW_CONTROL             0x0200
+#define D3D10_SHADER_PREFER_FLOW_CONTROL            0x0300
+#define D3D10_SHADER_ENABLE_STRICTNESS              0x0400
+#define D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x0800
+#define D3D10_SHADER_IEEE_STRICTNESS                0x1000
+
+typedef enum _D3D10_SHADER_VARIABLE_CLASS
+{
+    D3D10_SVC_SCALAR,
+    D3D10_SVC_VECTOR,
+    D3D10_SVC_MATRIX_ROWS,
+    D3D10_SVC_MATRIX_COLUMNS,
+    D3D10_SVC_OBJECT,
+    D3D10_SVC_STRUCT,
+    D3D10_SVC_FORCE_DWORD = 0x7fffffff
+} D3D10_SHADER_VARIABLE_CLASS, *LPD3D10_SHADER_VARIABLE_CLASS;
+
+typedef enum _D3D10_SHADER_VARIABLE_TYPE
+{
+    D3D10_SVT_VOID = 0,
+    D3D10_SVT_BOOL = 1,
+    D3D10_SVT_INT = 2,
+    D3D10_SVT_FLOAT = 3,
+    D3D10_SVT_STRING = 4,
+    D3D10_SVT_TEXTURE = 5,
+    D3D10_SVT_TEXTURE1D = 6,
+    D3D10_SVT_TEXTURE2D = 7,
+    D3D10_SVT_TEXTURE3D = 8,
+    D3D10_SVT_TEXTURECUBE = 9,
+    D3D10_SVT_SAMPLER = 10,
+    D3D10_SVT_PIXELSHADER = 15,
+    D3D10_SVT_VERTEXSHADER = 16,
+    D3D10_SVT_UINT = 19,
+    D3D10_SVT_UINT8 = 20,
+    D3D10_SVT_GEOMETRYSHADER = 21,
+    D3D10_SVT_RASTERIZER = 22,
+    D3D10_SVT_DEPTHSTENCIL = 23,
+    D3D10_SVT_BLEND = 24,
+    D3D10_SVT_BUFFER = 25,
+    D3D10_SVT_CBUFFER = 26,
+    D3D10_SVT_TBUFFER = 27,
+    D3D10_SVT_TEXTURE1DARRAY = 28,
+    D3D10_SVT_TEXTURE2DARRAY = 29,
+    D3D10_SVT_RENDERTARGETVIEW = 30,
+    D3D10_SVT_DEPTHSTENCILVIEW = 31,
+    D3D10_SVT_TEXTURE2DMS = 32,
+    D3D10_SVT_TEXTURE2DMSARRAY = 33,
+    D3D10_SVT_TEXTURECUBEARRAY = 34,
+    D3D10_SVT_FORCE_DWORD = 0x7fffffff
+} D3D10_SHADER_VARIABLE_TYPE, *LPD3D10_SHADER_VARIABLE_TYPE;
+
+typedef struct _D3D10_SHADER_MACRO
+{
+    LPCSTR Name;
+    LPCSTR Definition;
+} D3D10_SHADER_MACRO, *LPD3D10_SHADER_MACRO;
+
+#endif /* __WINE_D3D10SHADER_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d9types.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d9types.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d9types.h	(revision 19678)
@@ -138,5 +138,5 @@
 
 #define D3DFVF_RESERVED0           0x0001
-#define D3DFVF_POSITION_MASK       0x000E
+#define D3DFVF_POSITION_MASK       0x400E
 #define D3DFVF_XYZ                 0x0002
 #define D3DFVF_XYZRHW              0x0004
@@ -1140,19 +1140,7 @@
     D3DTSS_BUMPENVMAT11          = 10,
     D3DTSS_TEXCOORDINDEX         = 11,
-#if 1 /* TODO: remove once samplerstates are implemented.  */
-    D3DTSS_ADDRESSU              = 13,
-    D3DTSS_ADDRESSV              = 14,
-    D3DTSS_BORDERCOLOR           = 15,
-    D3DTSS_MAGFILTER             = 16,
-    D3DTSS_MINFILTER             = 17,
-    D3DTSS_MIPFILTER             = 18,
-    D3DTSS_MIPMAPLODBIAS         = 19,
-    D3DTSS_MAXMIPLEVEL           = 20,
-    D3DTSS_MAXANISOTROPY         = 21,
-#endif
     D3DTSS_BUMPENVLSCALE         = 22,
     D3DTSS_BUMPENVLOFFSET        = 23,
     D3DTSS_TEXTURETRANSFORMFLAGS = 24,
-    D3DTSS_ADDRESSW              = 25,
     D3DTSS_COLORARG0             = 26,
     D3DTSS_ALPHAARG0             = 27,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dtypes.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dtypes.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dtypes.h	(revision 19678)
@@ -65,8 +65,8 @@
 
 #define D3DRGB(r, g, b) \
-    (0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
+    (0xff000000 | ( ((LONG)((r) * 255)) << 16) | (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255))
 #define D3DRGBA(r, g, b, a) \
-    (   (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
-    |   (((long)((g) * 255)) << 8) | (long)((b) * 255) \
+    (   (((LONG)((a) * 255)) << 24) | (((LONG)((r) * 255)) << 16) \
+    |   (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255) \
     )
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dvec.inl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dvec.inl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dvec.inl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8math.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8math.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8math.h	(revision 19678)
@@ -280,4 +280,6 @@
 D3DXCOLOR* WINAPI D3DXColorAdjustContrast(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s);
 D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s);
+
+FLOAT WINAPI D3DXFresnelTerm(FLOAT costheta, FLOAT refractionindex);
 
 D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *pout, FLOAT scaling, CONST D3DXVECTOR3 *rotationcenter, CONST D3DXQUATERNION *rotation, CONST D3DXVECTOR3 *translation);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8math.inl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8math.inl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8math.inl	(revision 19678)
@@ -18,4 +18,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __D3DX8MATH_INL__
 #define __D3DX8MATH_INL__
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8mesh.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8mesh.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx8mesh.h	(revision 19678)
@@ -40,4 +40,7 @@
 BOOL    WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *);
 BOOL    WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *);
+BOOL    CDECL  D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, FLOAT *, FLOAT *, FLOAT *);
+HRESULT WINAPI D3DXComputeBoundingBox(PVOID, DWORD, DWORD, D3DXVECTOR3 *, D3DXVECTOR3 *);
+HRESULT WINAPI D3DXComputeBoundingSphere(PVOID, DWORD, DWORD, D3DXVECTOR3 *, FLOAT *);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9.h	(revision 19678)
@@ -31,7 +31,14 @@
 #include <limits.h>
 
+#define D3DX_DEFAULT         ((UINT)-1)
+#define D3DX_DEFAULT_NONPOW2 ((UINT)-2)
+#define D3DX_DEFAULT_FLOAT   FLT_MAX
+#define D3DX_FROM_FILE       ((UINT)-3)
+#define D3DFMT_FROM_FILE     ((D3DFORMAT)-3)
+
 #include "d3d9.h"
 #include "d3dx9math.h"
 #include "d3dx9core.h"
+#include "d3dx9mesh.h"
 #include "d3dx9shader.h"
 #include "d3dx9tex.h"
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9core.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9core.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9core.h	(revision 19678)
@@ -26,8 +26,8 @@
  */
 
+#include <d3dx9.h>
+
 #ifndef __WINE_D3DX9CORE_H
 #define __WINE_D3DX9CORE_H
-
-#include <d3dx9.h>
 
 /**********************************************
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9math.inl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9math.inl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9math.inl	(revision 19678)
@@ -18,4 +18,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __D3DX9MATH_INL__
 #define __D3DX9MATH_INL__
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9mesh.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9mesh.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9mesh.h	(revision 19678)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 David Adam
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#include <d3dx9.h>
+
+#ifndef __WINE_D3DX9MESH_H
+#define __WINE_D3DX9MESH_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*);
+UINT    WINAPI D3DXGetFVFVertexSize(DWORD);
+BOOL    WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *);
+BOOL    WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *);
+HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, D3DXVECTOR3 *);
+HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, FLOAT *);
+BOOL    WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3*, FLOAT *, FLOAT *, FLOAT *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_D3DX9MESH_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9shader.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9shader.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9shader.h	(revision 19678)
@@ -26,8 +26,8 @@
  */
 
+#include "d3dx9.h"
+
 #ifndef __D3DX9SHADER_H__
 #define __D3DX9SHADER_H__
-
-#include "d3dx9.h"
 
 typedef LPCSTR D3DXHANDLE;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbghelp.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbghelp.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbghelp.h	(revision 19678)
@@ -35,4 +35,10 @@
 #endif /* defined(__cplusplus) */
 
+#ifdef _WIN64
+#ifndef _IMAGEHLP64
+#define _IMAGEHLP64
+#endif
+#endif
+
 #define IMAGEAPI WINAPI
 #define DBHLPAPI IMAGEAPI
@@ -68,4 +74,8 @@
 } ADDRESS_MODE;
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define ADDRESS ADDRESS64
+#define LPADDRESS LPADDRESS64
+#else
 typedef struct _tagADDRESS
 {
@@ -74,4 +84,5 @@
     ADDRESS_MODE                Mode;
 } ADDRESS, *LPADDRESS;
+#endif
 
 typedef struct _tagADDRESS64
@@ -112,4 +123,10 @@
 } SYM_TYPE;
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
+#define IMAGEHLP_SYMBOLW IMAGEHLP_SYMBOLW64
+#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
+#define PIMAGEHLP_SYMBOLW PIMAGEHLP_SYMBOLW64
+#else
 typedef struct _IMAGEHLP_SYMBOL
 {
@@ -122,4 +139,15 @@
 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
 
+typedef struct _IMAGEHLP_SYMBOLW
+{
+    DWORD                       SizeOfStruct;
+    DWORD                       Address;
+    DWORD                       Size;
+    DWORD                       Flags;
+    DWORD                       MaxNameLength;
+    WCHAR                       Name[1];
+} IMAGEHLP_SYMBOLW, *PIMAGEHLP_SYMBOLW;
+#endif
+
 typedef struct _IMAGEHLP_SYMBOL64
 {
@@ -142,4 +170,10 @@
 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64;
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define IMAGEHLP_MODULE IMAGEHLP_MODULE64
+#define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
+#define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
+#define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
+#else
 typedef struct _IMAGEHLP_MODULE
 {
@@ -169,4 +203,5 @@
     WCHAR                       LoadedImageName[256];
 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
+#endif
 
 typedef struct _IMAGEHLP_MODULE64
@@ -224,4 +259,10 @@
 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define IMAGEHLP_LINE IMAGEHLP_LINE64
+#define PIMAGEHLP_LINE PIMAGEHLP_LINE64
+#define IMAGEHLP_LINEW IMAGEHLP_LINEW64
+#define PIMAGEHLP_LINEW PIMAGEHLP_LINEW64
+#else
 typedef struct _IMAGEHLP_LINE
 {
@@ -241,4 +282,5 @@
     DWORD                       Address;
 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW;
+#endif
 
 typedef struct _IMAGEHLP_LINE64
@@ -321,4 +363,8 @@
 } IMAGEHLP_CBA_EVENTW, *PIMAGEHLP_CBA_EVENTW;
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
+#define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
+#else
 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
 {
@@ -331,4 +377,5 @@
     HANDLE                      hFile;
 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
+#endif
 
 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
@@ -356,4 +403,8 @@
 } IMAGEHLP_DEFERRED_SYMBOL_LOADW64, *PIMAGEHLP_DEFERRED_SYMBOL_LOADW64;
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
+#define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
+#else
 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
 {
@@ -363,4 +414,5 @@
     DWORD                       SelectedSymbol;
 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
+#endif
 
 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64
@@ -802,23 +854,15 @@
 #define SLMFLAG_NO_SYMBOLS      0x4
 
-typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
-BOOL   WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
 BOOL   WINAPI EnumerateLoadedModules64(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(PCWSTR, DWORD64, ULONG, PVOID);
 BOOL   WINAPI EnumerateLoadedModulesW64(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PCSTR, ULONG, PVOID);
-BOOL    WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PCSTR, DWORD64, PVOID);
 BOOL    WINAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID);
 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(PCWSTR, DWORD64, PVOID);
 BOOL    WINAPI SymEnumerateModulesW64(HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID);
-BOOL    WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
-BOOL    WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
 BOOL    WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64);
 BOOL    WINAPI SymGetModuleInfoW64(HANDLE, DWORD64, PIMAGEHLP_MODULEW64);
-DWORD   WINAPI SymGetModuleBase(HANDLE, DWORD);
 DWORD64 WINAPI SymGetModuleBase64(HANDLE, DWORD64);
-DWORD   WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
 DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
 DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
@@ -826,5 +870,4 @@
 DWORD64 WINAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD,
                                 PMODLOAD_DATA, DWORD);
-BOOL    WINAPI SymUnloadModule(HANDLE, DWORD);
 BOOL    WINAPI SymUnloadModule64(HANDLE, DWORD64);
 
@@ -1005,14 +1048,10 @@
 BOOL WINAPI SymFromName(HANDLE, PCSTR, PSYMBOL_INFO);
 BOOL WINAPI SymFromNameW(HANDLE, PCWSTR, PSYMBOL_INFOW);
-BOOL WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL);
 BOOL WINAPI SymGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64);
-BOOL WINAPI SymGetSymFromName(HANDLE, PCSTR, PIMAGEHLP_SYMBOL);
 BOOL WINAPI SymGetSymFromName64(HANDLE, PCSTR, PIMAGEHLP_SYMBOL64);
 BOOL WINAPI SymGetTypeFromName(HANDLE, ULONG64, PCSTR, PSYMBOL_INFO);
 BOOL WINAPI SymGetTypeFromNameW(HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW);
-BOOL WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL);
 BOOL WINAPI SymGetSymNext64(HANDLE, PIMAGEHLP_SYMBOL64);
 BOOL WINAPI SymGetSymNextW64(HANDLE, PIMAGEHLP_SYMBOLW64);
-BOOL WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL);
 BOOL WINAPI SymGetSymPrev64(HANDLE, PIMAGEHLP_SYMBOL64);
 BOOL WINAPI SymGetSymPrevW64(HANDLE, PIMAGEHLP_SYMBOLW64);
@@ -1022,8 +1061,4 @@
 BOOL WINAPI SymEnumSymbolsW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMERATESYMBOLS_CALLBACKW,
                             PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR, ULONG, ULONG, PVOID);
-BOOL WINAPI SymEnumerateSymbols(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACK, PVOID);
-BOOL WINAPI SymEnumerateSymbolsW(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACKW, PVOID);
 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PCWSTR, DWORD64, ULONG, PVOID);
@@ -1032,10 +1067,7 @@
 BOOL WINAPI SymEnumSymbolsForAddr(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
 BOOL WINAPI SymEnumSymbolsForAddrW(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
-typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID);
-BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE, ULONG, ULONG64, ULONG64);
 BOOL WINAPI SymRegisterCallback64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
 BOOL WINAPI SymRegisterCallbackW64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
-BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
 BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64, PSTR, DWORD);
 BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL);
@@ -1064,17 +1096,10 @@
                                PVOID);
 BOOL WINAPI SymEnumSourceFilesW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMSOURCEFILES_CALLBACKW, PVOID);
-BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
-BOOL WINAPI SymGetLineFromAddrW(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW);
 BOOL WINAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64);
 BOOL WINAPI SymGetLineFromAddrW64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64);
-BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
-BOOL WINAPI SymGetLinePrevW(HANDLE, PIMAGEHLP_LINEW);
 BOOL WINAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64);
 BOOL WINAPI SymGetLinePrevW64(HANDLE, PIMAGEHLP_LINEW64);
-BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
-BOOL WINAPI SymGetLineNextW(HANDLE, PIMAGEHLP_LINEW);
 BOOL WINAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64);
 BOOL WINAPI SymGetLineNextW64(HANDLE, PIMAGEHLP_LINEW64);
-BOOL WINAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE);
 BOOL WINAPI SymGetLineFromName64(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64);
 BOOL WINAPI SymGetLineFromNameW64(HANDLE, PCWSTR, PCWSTR, DWORD, PLONG, PIMAGEHLP_LINEW64);
@@ -1186,4 +1211,8 @@
  *************************/
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define KDHELP KDHELP64
+#define PKDHELP PKDHELP64
+#else
 typedef struct _KDHELP
 {
@@ -1196,4 +1225,5 @@
     DWORD       SystemRangeStart;
 } KDHELP, *PKDHELP;
+#endif
 
 typedef struct _KDHELP64
@@ -1210,4 +1240,8 @@
 } KDHELP64, *PKDHELP64;
 
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+#define STACKFRAME STACKFRAME64
+#define LPSTACKFRAME LPSTACKFRAME64
+#else
 typedef struct _STACKFRAME
 {
@@ -1224,4 +1258,5 @@
     ADDRESS     AddrBStore;
 } STACKFRAME, *LPSTACKFRAME;
+#endif
 
 typedef struct _STACKFRAME64
@@ -1240,15 +1275,4 @@
 } STACKFRAME64, *LPSTACKFRAME64;
 
-typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)
-    (HANDLE, DWORD, PVOID, DWORD, PDWORD);
-typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD);
-typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD);
-typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS);
-BOOL WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID,
-                      PREAD_PROCESS_MEMORY_ROUTINE,
-                      PFUNCTION_TABLE_ACCESS_ROUTINE,
-                      PGET_MODULE_BASE_ROUTINE,
-                      PTRANSLATE_ADDRESS_ROUTINE);
-
 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)
     (HANDLE, DWORD64, PVOID, DWORD, PDWORD);
@@ -1262,11 +1286,8 @@
                         PTRANSLATE_ADDRESS_ROUTINE64);
 
-PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD);
 PVOID WINAPI SymFunctionTableAccess64(HANDLE, DWORD64);
 
-typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE, DWORD, PVOID);
 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE, ULONG64, ULONG64);
 
-BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID);
 BOOL WINAPI SymRegisterFunctionEntryCallback64(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64);
 
@@ -1369,4 +1390,90 @@
 #define SSRVACTION_EVENT        3
 
+/* 32-bit functions */
+
+#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+
+#define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
+#define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
+#define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
+#define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
+#define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
+#define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
+#define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
+#define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
+#define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64
+#define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
+
+#define EnumerateLoadedModules EnumerateLoadedModules64
+#define StackWalk StackWalk64
+#define SymEnumerateModules SymEnumerateModules64
+#define SymEnumerateSymbols SymEnumerateSymbols64
+#define SymEnumerateSymbolsW SymEnumerateSymbolsW64
+#define SymFunctionTableAccess SymFunctionTableAccess64
+#define SymGetLineFromAddr SymGetLineFromAddr64
+#define SymGetLineFromAddrW SymGetLineFromAddrW64
+#define SymGetLineFromName SymGetLineFromName64
+#define SymGetLineNext SymGetLineNext64
+#define SymGetLineNextW SymGetLineNextW64
+#define SymGetLinePrev SymGetLinePrev64
+#define SymGetLinePrevW SymGetLinePrevW64
+#define SymGetModuleBase SymGetModuleBase64
+#define SymGetModuleInfo SymGetModuleInfo64
+#define SymGetModuleInfoW SymGetModuleInfoW64
+#define SymGetSymFromAddr SymGetSymFromAddr64
+#define SymGetSymFromName SymGetSymFromName64
+#define SymGetSymNext SymGetSymNext64
+#define SymGetSymNextW SymGetSymNextW64
+#define SymGetSymPrev SymGetSymPrev64
+#define SymGetSymPrevW SymGetSymPrevW64
+#define SymLoadModule SymLoadModule64
+#define SymRegisterCallback SymRegisterCallback64
+#define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
+#define SymUnDName SymUnDName64
+#define SymUnloadModule SymUnloadModule64
+
+#else
+
+typedef BOOL  (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
+typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD);
+typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD);
+typedef BOOL  (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE, DWORD, PVOID, DWORD, PDWORD);
+typedef BOOL  (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PCSTR, ULONG, PVOID);
+typedef BOOL  (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
+typedef BOOL  (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR, ULONG, ULONG, PVOID);
+typedef BOOL  (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID);
+typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE, DWORD, PVOID);
+typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS);
+
+BOOL    WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
+BOOL    WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID, PREAD_PROCESS_MEMORY_ROUTINE, PFUNCTION_TABLE_ACCESS_ROUTINE, PGET_MODULE_BASE_ROUTINE, PTRANSLATE_ADDRESS_ROUTINE);
+BOOL    WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
+BOOL    WINAPI SymEnumerateSymbols(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACK, PVOID);
+BOOL    WINAPI SymEnumerateSymbolsW(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACKW, PVOID);
+PVOID   WINAPI SymFunctionTableAccess(HANDLE, DWORD);
+BOOL    WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
+BOOL    WINAPI SymGetLineFromAddrW(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW);
+BOOL    WINAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE);
+BOOL    WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
+BOOL    WINAPI SymGetLineNextW(HANDLE, PIMAGEHLP_LINEW);
+BOOL    WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
+BOOL    WINAPI SymGetLinePrevW(HANDLE, PIMAGEHLP_LINEW);
+DWORD   WINAPI SymGetModuleBase(HANDLE, DWORD);
+BOOL    WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
+BOOL    WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
+BOOL    WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL);
+BOOL    WINAPI SymGetSymFromName(HANDLE, PCSTR, PIMAGEHLP_SYMBOL);
+BOOL    WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL);
+BOOL    WINAPI SymGetSymNextW(HANDLE, PIMAGEHLP_SYMBOLW);
+BOOL    WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL);
+BOOL    WINAPI SymGetSymPrevW(HANDLE, PIMAGEHLP_SYMBOLW);
+DWORD   WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
+BOOL    WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
+BOOL    WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID);
+BOOL    WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
+BOOL    WINAPI SymUnloadModule(HANDLE, DWORD);
+
+#endif
+
 #ifdef __cplusplus
 } /* extern "C" */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbinit.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbinit.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbinit.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 [
     object,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbprop.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbprop.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbprop.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbs.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbs.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dbs.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddeml.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddeml.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddeml.h	(revision 19678)
@@ -324,6 +324,7 @@
     UINT  wCountryID;
     INT   iCodePage;
-    DWORD   dwLangID;
-    DWORD   dwSecurity;
+    DWORD dwLangID;
+    DWORD dwSecurity;
+    SECURITY_QUALITY_OF_SERVICE qos;
 } CONVCONTEXT, *PCONVCONTEXT;
 
@@ -331,5 +332,5 @@
 {
     DWORD		cb;
-    DWORD 		hUser;
+    DWORD_PTR 		hUser;
     HCONV		hConvPartner;
     HSZ			hszSvcPartner;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/hidsdi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/hidsdi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/hidsdi.h	(revision 19678)
@@ -37,5 +37,7 @@
 #endif
 
+BOOLEAN WINAPI HidD_GetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength);
 void WINAPI HidD_GetHidGuid(LPGUID guid);
+BOOLEAN WINAPI HidD_SetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength);
 
 #endif  /* __WINE_HIDSDI_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/imm.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/imm.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/imm.h	(revision 19678)
@@ -124,5 +124,5 @@
 
 #define IMMGWL_IMC                      0
-#define IMMGWL_PRIVATE                  (sizeof(LONG))
+#define IMMGWL_PRIVATE                  (sizeof(LONG_PTR))
 
 /* IME Property bits */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/wdm.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/wdm.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddk/wdm.h	(revision 19678)
@@ -141,4 +141,13 @@
 typedef struct _OBJECT_TYPE *POBJECT_TYPE;
 typedef struct _OBJECT_HANDLE_INFORMATION *POBJECT_HANDLE_INFORMATION;
+
+typedef struct _FAST_MUTEX
+{
+    LONG Count;
+    PKTHREAD Owner;
+    ULONG Contention;
+    KEVENT Gate;
+    ULONG OldIrql;
+} FAST_MUTEX, *PFAST_MUTEX;
 
 #define MAXIMUM_VOLUME_LABEL_LENGTH       (32 * sizeof(WCHAR))
@@ -1002,4 +1011,11 @@
 } KSHARED_USER_DATA, *PKSHARED_USER_DATA;
 
+typedef enum _MM_SYSTEM_SIZE
+{
+    MmSmallSystem,
+    MmMediumSystem,
+    MmLargeSystem
+} MM_SYSTEMSIZE;
+
 NTSTATUS WINAPI ObCloseHandle(IN HANDLE handle);
 
@@ -1027,4 +1043,5 @@
 void      WINAPI ExFreePoolWithTag(PVOID,ULONG);
 
+NTSTATUS  WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*);
 PIRP      WINAPI IoAllocateIrp(CCHAR,BOOLEAN);
 NTSTATUS  WINAPI IoCreateDevice(DRIVER_OBJECT*,ULONG,UNICODE_STRING*,DEVICE_TYPE,ULONG,BOOLEAN,DEVICE_OBJECT**);
@@ -1037,4 +1054,5 @@
 PEPROCESS WINAPI IoGetCurrentProcess(void);
 NTSTATUS  WINAPI IoGetDeviceObjectPointer(UNICODE_STRING*,ACCESS_MASK,PFILE_OBJECT*,PDEVICE_OBJECT*);
+PVOID     WINAPI IoGetDriverObjectExtension(PDRIVER_OBJECT,PVOID);
 PDEVICE_OBJECT WINAPI IoGetRelatedDeviceObject(PFILE_OBJECT);
 void      WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
@@ -1047,4 +1065,5 @@
 PVOID     WINAPI MmAllocateNonCachedMemory(SIZE_T);
 void      WINAPI MmFreeNonCachedMemory(PVOID,SIZE_T);
+MM_SYSTEMSIZE WINAPI MmQuerySystemSize(void);
 
 NTSTATUS  WINAPI ObReferenceObjectByHandle(HANDLE,ACCESS_MASK,POBJECT_TYPE,KPROCESSOR_MODE,PVOID*,POBJECT_HANDLE_INFORMATION);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddraw.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddraw.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddraw.h	(revision 19678)
@@ -1684,5 +1684,5 @@
 /*** IDirectDraw4 methods ***/
 #define IDirectDraw4_GetSurfaceFromDC(p,a,b)    (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
-#define IDirectDraw4_RestoreAllSurfaces(pc)     (p)->lpVtbl->RestoreAllSurfaces(p)
+#define IDirectDraw4_RestoreAllSurfaces(p)      (p)->lpVtbl->RestoreAllSurfaces(p)
 #define IDirectDraw4_TestCooperativeLevel(p)    (p)->lpVtbl->TestCooperativeLevel(p)
 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
@@ -2284,6 +2284,6 @@
     STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE;
-    STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
-    STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
+    STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE;
+    STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpfnCallback) PURE;
     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4 *lplpDDAttachedSurface) PURE;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddstream.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddstream.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ddstream.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/devenum.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/devenum.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/devenum.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dimm.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dimm.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dimm.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef DO_NO_IMPORTS
 import "unknwn.idl";
@@ -24,6 +33,4 @@
 
 cpp_quote("#if 0")
-
-typedef WORD LANGID;
 
 typedef struct {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dinput.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dinput.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dinput.h	(revision 19678)
@@ -1368,5 +1368,5 @@
 #define IDirectInputEffect_Start(p,a,b)           (p)->lpVtbl->Start(p,a,b)
 #define IDirectInputEffect_Stop(p)                (p)->lpVtbl->Stop(p)
-#define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->lpVtbl->GetEffectStatus(p,a)
+#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->lpVtbl->GetEffectStatus(p,a)
 #define IDirectInputEffect_Download(p)            (p)->lpVtbl->Download(p)
 #define IDirectInputEffect_Unload(p)              (p)->lpVtbl->Unload(p)
@@ -1384,5 +1384,5 @@
 #define IDirectInputEffect_Start(p,a,b)           (p)->Start(a,b)
 #define IDirectInputEffect_Stop(p)                (p)->Stop()
-#define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->GetEffectStatus(a)
+#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->GetEffectStatus(a)
 #define IDirectInputEffect_Download(p)            (p)->Download()
 #define IDirectInputEffect_Unload(p)              (p)->Unload()
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dispex.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dispex.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dispex.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmdls.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmdls.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmdls.h	(revision 19678)
@@ -17,5 +17,5 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-
+ 
 /*
  * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
@@ -26,5 +26,5 @@
  * of the LGPL is applied is otherwise unspecified.
  */
- 
+
 #ifndef __WINE_DMUSIC_DLS_H
 #define __WINE_DMUSIC_DLS_H
@@ -35,8 +35,8 @@
  * Typedef definitions
  */
-typedef long GCENT;
-typedef long PCENT;
-typedef long PERCENT;
-typedef long TCENT;
+typedef LONG GCENT;
+typedef LONG PCENT;
+typedef LONG PERCENT;
+typedef LONG TCENT;
 
 typedef LONGLONG REFERENCE_TIME, *LPREFERENCE_TIME;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmerror.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmerror.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmerror.h	(revision 19678)
@@ -38,5 +38,5 @@
 #ifndef MAKE_HRESULT
 #define MAKE_HRESULT(sev,fac,code) \
-    ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
+    ((HRESULT) (((ULONG)(sev)<<31) | ((ULONG)(fac)<<16) | ((ULONG)(code))) )
 #endif
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmplugin.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmplugin.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmplugin.h	(revision 19678)
@@ -102,5 +102,5 @@
  */
 typedef struct _DMUS_PMSG DMUS_PMSG;
-typedef long MUSIC_TIME;
+typedef LONG MUSIC_TIME;
 
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusicc.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusicc.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusicc.h	(revision 19678)
@@ -340,5 +340,5 @@
 	DWORD dwLostNotes;
 	DWORD dwFreeMemory;
-	long  lPeakVolume;
+	LONG  lPeakVolume;
 };
 
@@ -351,5 +351,5 @@
 	DWORD dwLostNotes;
 	DWORD dwFreeMemory;
-	long  lPeakVolume;
+	LONG  lPeakVolume;
 	DWORD dwSynthMemUse;
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusicf.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusicf.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusicf.h	(revision 19678)
@@ -637,5 +637,5 @@
 struct _DMUS_IO_TOOL_HEADER {
 	GUID   guidClassID;
-	long   lIndex;
+	LONG   lIndex;
 	DWORD  cPChannels;
 	FOURCC ckid;
@@ -695,10 +695,10 @@
 
 struct _DMUS_IO_WAVE_TRACK_HEADER {
-	long  lVolume;
+	LONG  lVolume;
 	DWORD dwFlags;
 };
 
 struct _DMUS_IO_WAVE_PART_HEADER {
-    long  lVolume;
+    LONG  lVolume;
     DWORD dwVariations;
     DWORD dwPChannel;
@@ -709,6 +709,6 @@
 
 struct _DMUS_IO_WAVE_ITEM_HEADER  {
-	long           lVolume;
-	long           lPitch;
+	LONG           lVolume;
+	LONG           lPitch;
 	DWORD          dwVariations;
 	REFERENCE_TIME rtTime;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusici.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusici.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusici.h	(revision 19678)
@@ -217,5 +217,5 @@
 /*
  * typedef __int64 REFERENCE_TIME,  *LPREFERENCE_TIME;
- * typedef long    MUSIC_TIME,      *LPMUSIC_TIME;
+ * typedef LONG    MUSIC_TIME,      *LPMUSIC_TIME;
  */
 
@@ -717,7 +717,7 @@
 	REFERENCE_TIME rtStartOffset;
 	REFERENCE_TIME rtDuration;
-	long           lOffset;
-	long           lVolume;
-	long           lPitch;
+	LONG           lOffset;
+	LONG           lVolume;
+	LONG           lPitch;
 	BYTE           bFlags;
 };
@@ -1209,5 +1209,5 @@
     STDMETHOD(GetObjectInPath)(THIS_ DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, WORD dwIndex, REFGUID iidInterface, void **ppObject) PURE;
     STDMETHOD(Activate)(THIS_ BOOL fActivate) PURE;
-    STDMETHOD(SetVolume)(THIS_ long lVolume, DWORD dwDuration) PURE;
+    STDMETHOD(SetVolume)(THIS_ LONG lVolume, DWORD dwDuration) PURE;
     STDMETHOD(ConvertPChannel)(THIS_ DWORD dwPChannelIn, DWORD *pdwPChannelOut) PURE;
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusics.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusics.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dmusics.h	(revision 19678)
@@ -166,5 +166,5 @@
     STDMETHOD(GetAppend)(THIS_ DWORD *pdwAppend) PURE;
     /*** IDirectMusicSynth8 methods ***/
-    STDMETHOD(PlayVoice)(THIS_ REFERENCE_TIME rt, DWORD dwVoiceId, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwDLId, long prPitch, long vrVolume, SAMPLE_TIME stVoiceStart, SAMPLE_TIME stLoopStart, SAMPLE_TIME stLoopEnd) PURE;
+    STDMETHOD(PlayVoice)(THIS_ REFERENCE_TIME rt, DWORD dwVoiceId, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwDLId, LONG prPitch, LONG vrVolume, SAMPLE_TIME stVoiceStart, SAMPLE_TIME stLoopStart, SAMPLE_TIME stLoopEnd) PURE;
     STDMETHOD(StopVoice)(THIS_ REFERENCE_TIME rt, DWORD dwVoiceId) PURE;
     STDMETHOD(GetVoiceState)(THIS_ DWORD dwVoice[], DWORD cbVoice, DMUS_VOICE_STATE dwVoiceState[]) PURE;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/docobj.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/docobj.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/docobj.idl	(revision 19678)
@@ -16,4 +16,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/downloadmgr.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/downloadmgr.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/downloadmgr.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dwmapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dwmapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dwmapi.h	(revision 19678)
@@ -42,4 +42,5 @@
 
 DWMAPI DwmEnableComposition(UINT);
+DWMAPI DwmEnableMMCSS(BOOL);
 DWMAPI DwmExtendFrameIntoClientArea(HWND,const MARGINS*);
 DWMAPI DwmGetColorizationColor(DWORD*,BOOL);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxgi.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxgi.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxgi.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "dxgitype.idl";
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxgitype.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxgitype.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxgitype.idl	(revision 19678)
@@ -16,4 +16,14 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "oaidl.idl";
 import "ocidl.idl";
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dyngraph.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dyngraph.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dyngraph.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/exdisp.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/exdisp.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/exdisp.idl	(revision 19678)
@@ -21,4 +21,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "ocidl.idl";
 import "docobj.idl";
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fci.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fci.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fci.h	(revision 19678)
@@ -44,8 +44,8 @@
  */
 
-typedef unsigned long CHECKSUM;
-
-typedef unsigned long UOFF;
-typedef unsigned long COFF;
+typedef ULONG CHECKSUM;
+
+typedef ULONG UOFF;
+typedef ULONG COFF;
 
 /**********************************************************************/
@@ -191,6 +191,6 @@
 #define FNFCICLOSE(fn) int __cdecl fn(INT_PTR hf, int *err, void *pv)
 
-typedef long (__cdecl *PFNFCISEEK) (INT_PTR hf, long dist, int seektype, int *err, void *pv);
-#define FNFCISEEK(fn) long __cdecl fn(INT_PTR hf, long dist, int seektype, int *err, void *pv)
+typedef LONG (__cdecl *PFNFCISEEK) (INT_PTR hf, LONG dist, int seektype, int *err, void *pv);
+#define FNFCISEEK(fn) LONG __cdecl fn(INT_PTR hf, LONG dist, int seektype, int *err, void *pv)
 
 typedef int  (__cdecl *PFNFCIDELETE) (char *pszFile, int *err, void *pv);
@@ -204,10 +204,10 @@
 typedef int (__cdecl *PFNFCIFILEPLACED)(PCCAB pccab,
 					char *pszFile,
-					long  cbFile,
+					LONG  cbFile,
 					BOOL  fContinuation,
 					void *pv);
 #define FNFCIFILEPLACED(fn) int __cdecl fn(PCCAB pccab, \
 					   char *pszFile, \
-					   long  cbFile, \
+                                           LONG  cbFile, \
 					   BOOL  fContinuation, \
 					   void *pv)
@@ -230,9 +230,9 @@
 #define statusCabinet  2  /* Write out a completed cabinet callback */
 
-typedef long (__cdecl *PFNFCISTATUS)(UINT typeStatus,
+typedef LONG (__cdecl *PFNFCISTATUS)(UINT typeStatus,
 				     ULONG cb1,
 				     ULONG cb2,
 				     void *pv);
-#define FNFCISTATUS(fn) long __cdecl fn(UINT typeStatus, \
+#define FNFCISTATUS(fn) LONG __cdecl fn(UINT typeStatus, \
 					ULONG  cb1, \
 					ULONG  cb2, \
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fdi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fdi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fdi.h	(revision 19678)
@@ -42,8 +42,8 @@
  */
 
-typedef unsigned long CHECKSUM;
-
-typedef unsigned long UOFF;
-typedef unsigned long COFF;
+typedef ULONG CHECKSUM;
+
+typedef ULONG UOFF;
+typedef ULONG COFF;
 
 /**********************************************************************/
@@ -153,5 +153,5 @@
 
 typedef struct {
-    long    cbCabinet;  /* Total length of cabinet file */
+    LONG    cbCabinet;  /* Total length of cabinet file */
     USHORT  cFolders;   /* Count of folders in cabinet */
     USHORT  cFiles;     /* Count of files in cabinet */
@@ -227,6 +227,6 @@
 #define FNCLOSE(fn) int __cdecl fn(INT_PTR hf)
 
-typedef long (__cdecl *PFNSEEK) (INT_PTR hf, long dist, int seektype);
-#define FNSEEK(fn) long __cdecl fn(INT_PTR hf, long dist, int seektype)
+typedef LONG (__cdecl *PFNSEEK) (INT_PTR hf, LONG dist, int seektype);
+#define FNSEEK(fn) LONG __cdecl fn(INT_PTR hf, LONG dist, int seektype)
 
 typedef int (__cdecl *PFNFDIDECRYPT)(PFDIDECRYPT pfdid);
@@ -234,5 +234,5 @@
 
 typedef struct {
-    long  cb;
+    LONG  cb;
     char *psz1;
     char *psz2;
@@ -271,5 +271,5 @@
 typedef struct {
     char ach[2];  /* Set to { '*', '\0' } */
-    long cbFile;  /* Required spill file size */
+    LONG cbFile;  /* Required spill file size */
 } FDISPILLFILE, *PFDISPILLFILE;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fusion.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fusion.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/fusion.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusenums.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusenums.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusenums.h	(revision 19678)
@@ -365,4 +365,65 @@
     MetafileFrameUnitMillimeter = UnitMillimeter,
     MetafileFrameUnitGdi
+};
+
+enum HatchStyle
+{
+	HatchStyleHorizontal = 0,
+	HatchStyleVertical = 1,
+	HatchStyleForwardDiagonal = 2,
+	HatchStyleBackwardDiagonal = 3,
+	HatchStyleCross = 4,
+	HatchStyleDiagonalCross = 5,
+	HatchStyle05Percent = 6,
+	HatchStyle10Percent = 7,
+	HatchStyle20Percent = 8,
+	HatchStyle25Percent = 9,
+	HatchStyle30Percent = 10,
+	HatchStyle40Percent = 11,
+	HatchStyle50Percent = 12,
+	HatchStyle60Percent = 13,
+	HatchStyle70Percent = 14,
+	HatchStyle75Percent = 15,
+	HatchStyle80Percent = 16,
+	HatchStyle90Percent = 17,
+	HatchStyleLightDownwardDiagonal = 18,
+	HatchStyleLightUpwardDiagonal = 19,
+	HatchStyleDarkDownwardDiagonal = 20,
+	HatchStyleDarkUpwardDiagonal = 21,
+	HatchStyleWideDownwardDiagonal = 22,
+	HatchStyleWideUpwardDiagonal = 23,
+	HatchStyleLightVertical = 24,
+	HatchStyleLightHorizontal = 25,
+	HatchStyleNarrowVertical = 26,
+	HatchStyleNarrowHorizontal = 27,
+	HatchStyleDarkVertical = 28,
+	HatchStyleDarkHorizontal = 29,
+	HatchStyleDashedDownwardDiagonal = 30,
+	HatchStyleDashedUpwardDiagonal = 31,
+	HatchStyleDashedHorizontal = 32,
+	HatchStyleDashedVertical = 33,
+	HatchStyleSmallConfetti = 34,
+	HatchStyleLargeConfetti = 35,
+	HatchStyleZigZag = 36,
+	HatchStyleWave = 37,
+	HatchStyleDiagonalBrick = 38,
+	HatchStyleHorizontalBrick = 39,
+	HatchStyleWeave = 40,
+	HatchStylePlaid = 41,
+	HatchStyleDivot = 42,
+	HatchStyleDottedGrid = 43,
+	HatchStyleDottedDiamond = 44,
+	HatchStyleShingle = 45,
+	HatchStyleTrellis = 46,
+	HatchStyleSphere = 47,
+	HatchStyleSmallGrid = 48,
+	HatchStyleSmallCheckerBoard = 49,
+	HatchStyleLargeCheckerBoard = 50,
+	HatchStyleOutlinedDiamond = 51,
+	HatchStyleSolidDiamond = 52,
+	HatchStyleTotal = 53,
+	HatchStyleLargeGrid = HatchStyleCross,
+	HatchStyleMin = HatchStyleHorizontal,
+	HatchStyleMax = HatchStyleTotal - 1
 };
 
@@ -405,4 +466,5 @@
 typedef enum MetafileFrameUnit MetafileFrameUnit;
 typedef enum PenType PenType;
+typedef enum HatchStyle HatchStyle;
 
 #endif /* end of c typedefs */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusflat.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusflat.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusflat.h	(revision 19678)
@@ -59,4 +59,5 @@
 GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT,INT,GpGraphics*,GpBitmap**);
 GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP, HPALETTE, GpBitmap**);
+GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON, GpBitmap**);
 GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE,GDIPCONST WCHAR*,GpBitmap**);
 GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,
@@ -91,4 +92,5 @@
 GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**);
 GpStatus WINGDIPAPI GdipDeleteFont(GpFont*);
+GpStatus WINGDIPAPI GdipGetLogFontA(GpFont*,GpGraphics*,LOGFONTA*);
 GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*);
 GpStatus WINGDIPAPI GdipGetFamily(GpFont*, GpFontFamily**);
@@ -101,4 +103,5 @@
 
 /* FontCollection */
+GpStatus WINGDIPAPI GdipNewInstalledFontCollection(GpFontCollection**);
 GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection**);
 GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection**);
@@ -199,4 +202,6 @@
 GpStatus WINGDIPAPI GdipFillRegion(GpGraphics*,GpBrush*,GpRegion*);
 GpStatus WINGDIPAPI GdipGetClip(GpGraphics*,GpRegion*);
+GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics*,GpRectF*);
+GpStatus WINGDIPAPI GdipGetClipBoundsI(GpGraphics*,GpRect*);
 GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics*,CompositingMode*);
 GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*);
@@ -206,4 +211,5 @@
 GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**);
 GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*);
+GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics*,ARGB*);
 GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*);
 GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*);
@@ -230,4 +236,5 @@
 GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*);
 GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder);
+GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics*,HRGN,CombineMode);
 GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics*,GpPath*,CombineMode);
 GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics*,REAL,REAL,REAL,REAL,CombineMode);
@@ -248,4 +255,6 @@
 GpStatus WINGDIPAPI GdipTransformPointsI(GpGraphics*, GpCoordinateSpace, GpCoordinateSpace,
                                          GpPoint *, INT);
+GpStatus WINGDIPAPI GdipTranslateClip(GpGraphics*,REAL,REAL);
+GpStatus WINGDIPAPI GdipTranslateClipI(GpGraphics*,INT,INT);
 GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder);
 
@@ -265,4 +274,6 @@
 GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL);
 GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL);
+GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath*,GDIPCONST GpPointF*,INT,INT,INT,REAL);
+GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath*,GDIPCONST GpPoint*,INT,INT,INT,REAL);
 GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
 GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT);
@@ -327,4 +338,5 @@
 GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage*,PixelFormat*);
 GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage*,GUID*);
+GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage*,UINT,UINT,GpImage**,GetThumbnailImageAbort,VOID*);
 GpStatus WINGDIPAPI GdipGetImageType(GpImage*,ImageType*);
 GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage*,REAL*);
@@ -338,4 +350,5 @@
 GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage*,UINT*);
 GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage*,GUID*,UINT);
+GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage*,RotateFlipType);
 GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage*,GDIPCONST GUID*,UINT);
 GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR*,GpImage**);
@@ -381,4 +394,6 @@
 GpStatus WINGDIPAPI GdipSetLineBlend(GpLineGradient*,GDIPCONST REAL*,
     GDIPCONST REAL*,INT);
+GpStatus WINGDIPAPI GdipGetLineBlend(GpLineGradient*,REAL*,REAL*,INT);
+GpStatus WINGDIPAPI GdipGetLineBlendCount(GpLineGradient*,INT*);
 GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient*,ARGB,ARGB);
 GpStatus WINGDIPAPI GdipSetLineGammaCorrection(GpLineGradient*,BOOL);
@@ -568,4 +583,5 @@
 GpStatus WINGDIPAPI GdipSetStringFormatTabStops(GpStringFormat*,REAL,INT,GDIPCONST REAL*);
 GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming);
+GpStatus WINGDIPAPI GdipSetStringFormatFlags(GpStringFormat*, INT);
 GpStatus WINGDIPAPI GdipStringFormatGetGenericDefault(GpStringFormat **);
 GpStatus WINGDIPAPI GdipStringFormatGetGenericTypographic(GpStringFormat **);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusgpstubs.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusgpstubs.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusgpstubs.h	(revision 19678)
@@ -33,4 +33,5 @@
 class GpGraphics {};
 class GpBrush {};
+class GpHatch : public GpBrush {};
 class GpSolidFill : public GpBrush {};
 class GpPath {};
@@ -59,4 +60,5 @@
 typedef struct GpPen GpPen;
 typedef struct GpBrush GpBrush;
+typedef struct GpHatch GpHatch;
 typedef struct GpSolidFill GpSolidFill;
 typedef struct GpPath GpPath;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusimaging.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusimaging.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/gdiplusimaging.h	(revision 19678)
@@ -48,4 +48,31 @@
 };
 
+enum RotateFlipType
+{
+    RotateNoneFlipNone = 0,
+    Rotate180FlipXY    = RotateNoneFlipNone,
+
+    Rotate90FlipNone   = 1,
+    Rotate270FlipXY    = Rotate90FlipNone,
+
+    Rotate180FlipNone  = 2,
+    RotateNoneFlipXY   = Rotate180FlipNone,
+
+    Rotate270FlipNone  = 3,
+    Rotate90FlipXY     = Rotate270FlipNone,
+
+    RotateNoneFlipX    = 4,
+    Rotate180FlipY     = RotateNoneFlipX,
+
+    Rotate90FlipX      = 5,
+    Rotate270FlipY     = Rotate90FlipX,
+
+    Rotate180FlipX     = 6,
+    RotateNoneFlipY    = Rotate180FlipX,
+
+    Rotate270FlipX     = 7,
+    Rotate90FlipY      = Rotate270FlipX
+};
+
 #ifdef __cplusplus
 class EncoderParameter
@@ -118,4 +145,5 @@
 
 typedef enum ImageLockMode ImageLockMode;
+typedef enum RotateFlipType RotateFlipType;
 
 typedef struct EncoderParameter
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/hlink.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/hlink.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/hlink.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/htiframe.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/htiframe.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/htiframe.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/http.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/http.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/http.h	(revision 19678)
@@ -0,0 +1,73 @@
+/*
+ * HTTP Server API definitions
+ *
+ * Copyright (C) 2009 Andrey Turkin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_HTTP_H
+#define __WINE_HTTP_H
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _HTTPAPI_VERSION
+{
+    USHORT HttpApiMajorVersion;
+    USHORT HttpApiMinorVersion;
+} HTTPAPI_VERSION, *PHTTPAPI_VERSION;
+
+#define HTTPAPI_VERSION_1 {1,0}
+#define HTTPAPI_VERSION_2 {2,0}
+
+/* HttpInitialize and HttpTerminate flags */
+#define HTTP_INITIALIZE_SERVER 0x00000001
+#define HTTP_INITIALIZE_CONFIG 0x00000002
+
+typedef enum _HTTP_SERVICE_CONFIG_ID
+{
+    HttpServiceConfigIPListenList,
+    HttpServiceConfigSSLCertInfo,
+    HttpServiceConfigUrlAclInfo,
+    HttpServiceConfigTimeout,
+    HttpServiceConfigMax
+} HTTP_SERVICE_CONFIG_ID, *PHTTP_SERVICE_CONFIG_ID;
+
+ULONG WINAPI HttpInitialize(HTTPAPI_VERSION,ULONG,PVOID);
+ULONG WINAPI HttpTerminate(ULONG,PVOID);
+
+ULONG WINAPI HttpDeleteServiceConfiguration(HANDLE,HTTP_SERVICE_CONFIG_ID,PVOID,ULONG,LPOVERLAPPED);
+ULONG WINAPI HttpQueryServiceConfiguration(HANDLE,HTTP_SERVICE_CONFIG_ID,PVOID,ULONG,PVOID,ULONG,PULONG,LPOVERLAPPED);
+ULONG WINAPI HttpSetServiceConfiguration(HANDLE,HTTP_SERVICE_CONFIG_ID,PVOID,ULONG,LPOVERLAPPED);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* __WINE_HTTP_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/iads.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/iads.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/iads.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/icftypes.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/icftypes.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/icftypes.idl	(revision 19678)
@@ -18,4 +18,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/imnact.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/imnact.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/imnact.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/imnxport.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/imnxport.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/imnxport.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/in6addr.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/in6addr.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/in6addr.h	(revision 19678)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2009 Jeff Latimer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __IN6ADDR__
+#define __IN6ADDR__
+
+#ifdef USE_WS_PREFIX
+#define WS(x)    WS_##x
+#else
+#define WS(x)    x
+#endif
+
+typedef struct WS(in6_addr) {
+    union {
+        WS(u_char)  Byte[16];
+        WS(u_short) Word[8];
+    } u;
+} IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR;
+
+#define in_addr6    WS(in6_addr)
+
+#ifdef USE_WS_PREFIX
+#define WS__S6_un   u
+#define WS__S6_u8   Byte
+#define WS_s6_addr  WS__S6_un.WS__S6_u8
+#else
+#define _S6_un      u
+#define _S6_u8      Byte
+#define s6_addr     _S6_un._S6_u8
+#endif
+
+#define s6_bytes    u.Byte
+#define s6_words    u.Word
+
+#undef WS
+
+#endif /* __IN6ADDR__ */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/indexsrv.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/indexsrv.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/indexsrv.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ipexport.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ipexport.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ipexport.h	(revision 19678)
@@ -31,7 +31,7 @@
 #define __WINE_IPEXPORT_H
 
-typedef unsigned long   IPAddr;
-typedef unsigned long   IPMask;
-typedef unsigned long   IP_STATUS;
+typedef ULONG IPAddr;
+typedef ULONG IPMask;
+typedef ULONG IP_STATUS;
 
 struct ip_option_information
@@ -61,6 +61,6 @@
 {
     IPAddr                       Address;
-    unsigned long                Status;
-    unsigned long                RoundTripTime;
+    ULONG                        Status;
+    ULONG                        RoundTripTime;
     unsigned short               DataSize;
     unsigned short               Reserved;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ipifcons.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ipifcons.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ipifcons.h	(revision 19678)
@@ -25,6 +25,36 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef WINE_IPIFCONS_H__
 #define WINE_IPIFCONS_H__
+
+#define IF_TYPE_OTHER                   1
+#define IF_TYPE_REGULAR_1822            2
+#define IF_TYPE_HDH_1822                3
+#define IF_TYPE_DDN_X25                 4
+#define IF_TYPE_RFC877_X25              5
+#define IF_TYPE_ETHERNET_CSMACD         6
+#define IF_TYPE_IS088023_CSMACD         7
+#define IF_TYPE_ISO88024_TOKENBUS       8
+#define IF_TYPE_ISO88025_TOKENRING      9
+#define IF_TYPE_ISO88026_MAN            10
+#define IF_TYPE_STARLAN                 11
+#define IF_TYPE_PROTEON_10MBIT          12
+#define IF_TYPE_PROTEON_80MBIT          13
+#define IF_TYPE_HYPERCHANNEL            14
+#define IF_TYPE_FDDI                    15
+#define IF_TYPE_LAP_B                   16
+#define IF_TYPE_SDLC                    17
+#define IF_TYPE_DS1                     18
+#define IF_TYPE_E1                      19
+#define IF_TYPE_BASIC_ISDN              20
+#define IF_TYPE_PRIMARY_ISDN            21
+#define IF_TYPE_PROP_POINT2POINT_SERIAL 22
+#define IF_TYPE_PPP                     23
+#define IF_TYPE_SOFTWARE_LOOPBACK       24
+#define IF_TYPE_EON                     25
+#define IF_TYPE_ETHERNET_3MBIT          26
+#define IF_TYPE_NSIP                    27
+#define IF_TYPE_SLIP                    28
 
 #define MIB_IF_TYPE_OTHER               1
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/iptypes.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/iptypes.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/iptypes.h	(revision 19678)
@@ -94,3 +94,138 @@
 } FIXED_INFO, *PFIXED_INFO;
 
+typedef enum {
+    IpPrefixOriginOther = 0,
+    IpPrefixOriginManual,
+    IpPrefixOriginWellKnown,
+    IpPrefixOriginDhcp,
+    IpPrefixOriginRouterAdvertisement,
+    IpPrefixOriginUnchanged = 16
+} IP_PREFIX_ORIGIN;
+
+typedef enum {
+    IpSuffixOriginOther = 0,
+    IpSuffixOriginManual,
+    IpSuffixOriginWellKnown,
+    IpSuffixOriginDhcp,
+    IpSuffixOriginLinkLayerAddress,
+    IpSuffixOriginRandom,
+    IpSuffixOriginUnchanged = 16
+} IP_SUFFIX_ORIGIN;
+
+typedef enum {
+    IfOperStatusUp = 1,
+    IfOperStatusDown,
+    IfOperStatusTesting,
+    IfOperStatusUnknown,
+    IfOperStatusDormant,
+    IfOperStatusNotPresent,
+    IfOperStatusLowerLayerDown
+} IF_OPER_STATUS;
+
+typedef enum {
+    IpDadStateInvalid = 0,
+    IpDadStateTentative,
+    IpDadStateDuplicate,
+    IpDadStateDeprecated,
+    IpDadStatePreferred
+} IP_DAD_STATE;
+
+#ifdef _WINSOCK2API_
+
+typedef struct _IP_ADAPTER_UNICAST_ADDRESS {
+    union {
+        struct {
+            ULONG Length;
+            DWORD Flags;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME;
+    struct _IP_ADAPTER_UNICAST_ADDRESS *Next;
+    SOCKET_ADDRESS                      Address;
+    IP_PREFIX_ORIGIN                    PrefixOrigin;
+    IP_SUFFIX_ORIGIN                    SuffixOrigin;
+    IP_DAD_STATE                        DadState;
+    ULONG                               ValidLifetime;
+    ULONG                               PreferredLifetime;
+    ULONG                               LeaseLifetime;
+} IP_ADAPTER_UNICAST_ADDRESS, *PIP_ADAPTER_UNICAST_ADDRESS;
+
+typedef struct _IP_ADAPTER_ANYCAST_ADDRESS {
+    union {
+        ULONGLONG Alignment;
+        struct {
+            ULONG Length;
+            DWORD Flags;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME;
+    struct _IP_ADAPTER_ANYCAST_ADDRESS *Next;
+    SOCKET_ADDRESS                      Address;
+} IP_ADAPTER_ANYCAST_ADDRESS, *PIP_ADAPTER_ANYCAST_ADDRESS;
+
+typedef struct _IP_ADAPTER_MULTICAST_ADDRESS {
+    union {
+        ULONGLONG Alignment;
+        struct {
+            ULONG Length;
+            DWORD Flags;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME;
+    struct _IP_ADAPTER_MULTICAST_ADDRESS *Next;
+    SOCKET_ADDRESS                       Address;
+} IP_ADAPTER_MULTICAST_ADDRESS, *PIP_ADAPTER_MULTICAST_ADDRESS;
+
+typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS {
+    union {
+        ULONGLONG Alignment;
+        struct {
+            ULONG Length;
+            DWORD Reserved;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME;
+    struct _IP_ADAPTER_DNS_SERVER_ADDRESS *Next;
+    SOCKET_ADDRESS                         Address;
+} IP_ADAPTER_DNS_SERVER_ADDRESS, *PIP_ADAPTER_DNS_SERVER_ADDRESS;
+
+typedef struct _IP_ADAPTER_PREFIX {
+    union {
+        ULONGLONG Alignment;
+        struct {
+            ULONG Length;
+            DWORD Flags;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME;
+    struct _IP_ADAPTER_PREFIX *Next;
+    SOCKET_ADDRESS             Address;
+    ULONG                      PrefixLength;
+} IP_ADAPTER_PREFIX, *PIP_ADAPTER_PREFIX;
+
+typedef struct _IP_ADAPTER_ADDRESSES {
+    union {
+        ULONGLONG Alignment;
+        struct {
+            ULONG Length;
+            DWORD IfIndex;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME;
+    struct _IP_ADAPTER_ADDRESSES   *Next;
+    PCHAR                           AdapterName;
+    PIP_ADAPTER_UNICAST_ADDRESS     FirstUnicastAddress;
+    PIP_ADAPTER_ANYCAST_ADDRESS     FirstAnycastAddress;
+    PIP_ADAPTER_MULTICAST_ADDRESS   FirstMulticastAddress;
+    PIP_ADAPTER_DNS_SERVER_ADDRESS  FirstDnsServerAddress;
+    PWCHAR                          DnsSuffix;
+    PWCHAR                          Description;
+    PWCHAR                          FriendlyName;
+    BYTE                            PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
+    DWORD                           PhysicalAddressLength;
+    DWORD                           Flags;
+    DWORD                           Mtu;
+    DWORD                           IfType;
+    IF_OPER_STATUS                  OperStatus;
+    DWORD                           Ipv6IfIndex;
+    DWORD                           ZoneIndices[16];
+    PIP_ADAPTER_PREFIX              FirstPrefix;
+} IP_ADAPTER_ADDRESSES, *PIP_ADAPTER_ADDRESSES;
+
+#endif /* _WINSOCK2API_ */
+
 #endif /* WINE_IPTYPES_H_*/
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/loadperf.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/loadperf.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/loadperf.h	(revision 19678)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009 Andrey Turkin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_LOADPERF_H
+#define __WINE_LOADPERF_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DWORD WINAPI InstallPerfDllA(LPCSTR, LPCSTR, ULONG_PTR);
+DWORD WINAPI InstallPerfDllW(LPCWSTR, LPCWSTR, ULONG_PTR);
+#define      InstallPerfDll WINELIB_NAME_AW(InstallPerfDll);
+
+DWORD WINAPI LoadPerfCounterTextStringsA(LPCSTR, BOOL);
+DWORD WINAPI LoadPerfCounterTextStringsW(LPCWSTR, BOOL);
+#define      LoadPerfCounterTextStrings WINELIB_NAME_AW(LoadPerfCounterTextStrings)
+
+DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR, BOOL);
+DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR, BOOL);
+#define      UnloadPerfCounterTextStrings WINELIB_NAME_AW(UnloadPerfCounterTextStrings)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_LOADPERF_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mapi.h	(revision 19678)
@@ -37,5 +37,5 @@
 #ifndef __LHANDLE
 #define __LHANDLE
-typedef unsigned long           LHANDLE, *LPLHANDLE;
+typedef ULONG                   LHANDLE, *LPLHANDLE;
 #endif
 #define lhSessionNull           ((LHANDLE)0)
@@ -43,7 +43,7 @@
 #ifndef WINE_FLAGS_DEFINED
 #define WINE_FLAGS_DEFINED
-typedef unsigned long           FLAGS;
-#endif
-typedef unsigned long*          LPULONG;
+typedef ULONG                   FLAGS;
+#endif
+typedef ULONG                  *LPULONG;
 
 typedef struct
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mapix.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mapix.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mapix.h	(revision 19678)
@@ -46,5 +46,5 @@
 #ifndef WINE_FLAGS_DEFINED
 #define WINE_FLAGS_DEFINED
-typedef unsigned long           FLAGS;
+typedef ULONG                   FLAGS;
 #endif
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mediaobj.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mediaobj.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mediaobj.idl	(revision 19678)
@@ -16,4 +16,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mimeinfo.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mimeinfo.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mimeinfo.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mimeole.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mimeole.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mimeole.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mlang.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mlang.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mlang.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef DO_NO_IMPORTS
 import "unknwn.idl";
@@ -23,8 +32,6 @@
 interface IStream;
 
-/* FIXME: LANGID is defined in winnt.h and mlang.h in the platform SDK */
-cpp_quote("#ifndef _WINNT_")
-typedef WORD LANGID;
-cpp_quote("#endif")
+cpp_quote("#define CPIOD_PEEK          0x40000000")
+cpp_quote("#define CPIOD_FORCE_PROMPT  0x80000000")
 
 [
@@ -40,8 +47,8 @@
     HRESULT GetStrCodePages(      
         [in, size_is(cchSrc)] const WCHAR *pszSrc,
-        [in] long cchSrc,
+        [in] LONG cchSrc,
         [in] DWORD dwPriorityCodePages,
         [out] DWORD *pdwCodePages,
-        [out] long *pcchCodePages);
+        [out] LONG *pcchCodePages);
     HRESULT CodePageToCodePages(      
         [in] UINT uCodePage,
@@ -231,9 +238,9 @@
 #ifdef NEWMLSTR
     HRESULT LockMLStr(
-        [in] long lPos,
+        [in] LONG lPos,
         [in] DWORD dwFlags,
         [out] DWORD* pdwCookie,
-        [out] long* plActualPos,
-        [out] long* plActualLen);
+        [out] LONG* plActualPos,
+        [out] LONG* plActualLen);
 
     HRESULT UnlockMLStr(
@@ -244,11 +251,11 @@
 #endif
     HRESULT GetLength(
-        [out, retval] long* plLen);
+        [out, retval] LONG* plLen);
     HRESULT SetMLStr(
-        [in] long lDestPos,
-        [in] long lDestLen,
+        [in] LONG lDestPos,
+        [in] LONG lDestLen,
         [in] IUnknown *pSrcMLStr,
-        [in] long lSrcPos,
-        [in] long lSrcLen);
+        [in] LONG lSrcPos,
+        [in] LONG lSrcLen);
 #ifdef NEWMLSTR
     HRESULT RegisterAttr(
@@ -265,12 +272,12 @@
 #else
     HRESULT GetMLStr(
-        [in] long lSrcPos,
-        [in] long lSrcLen,
+        [in] LONG lSrcPos,
+        [in] LONG lSrcLen,
         [in] IUnknown *pUnkOuter,
         [in] DWORD dwClsContext,
         [in] const IID* piid,
         [out] IUnknown** ppDestMLStr,
-        [out] long* plDestPos,
-        [out] long* plDestLen);
+        [out] LONG* plDestPos,
+        [out] LONG* plDestLen);
 #endif
 }
@@ -285,18 +292,18 @@
     HRESULT BreakLineML(
         [in] IMLangString* pSrcMLStr,
-        [in] long lSrcPos,
-        [in] long lSrcLen,
-        [in] long cMinColumns,
-        [in] long cMaxColumns,
-        [out] long* plLineLen,
-        [out] long* plSkipLen);
+        [in] LONG lSrcPos,
+        [in] LONG lSrcLen,
+        [in] LONG cMinColumns,
+        [in] LONG cMaxColumns,
+        [out] LONG* plLineLen,
+        [out] LONG* plSkipLen);
 
     HRESULT BreakLineW(
         [in] LCID locale,
         [in, size_is(cchSrc)] const WCHAR* pszSrc,
-        [in] long cchSrc,
-        [in] long cMaxColumns,
-        [out] long* pcchLine,
-        [out] long* pcchSkip );
+        [in] LONG cchSrc,
+        [in] LONG cMaxColumns,
+        [out] LONG* pcchLine,
+        [out] LONG* pcchSkip );
 
     HRESULT BreakLineA(
@@ -304,8 +311,8 @@
         [in] UINT uCodePage,
         [in, size_is(cchSrc)] const CHAR* pszSrc,
-        [in] long cchSrc,
-        [in] long cMaxColumns,
-        [out] long* pcchLine,
-        [out] long* pcchSkip);
+        [in] LONG cchSrc,
+        [in] LONG cMaxColumns,
+        [out] LONG* pcchLine,
+        [out] LONG* pcchSkip);
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmddk.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmddk.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmddk.h	(revision 19678)
@@ -390,17 +390,10 @@
 
 typedef struct {
-	DWORD   		dwCallback;
-	DWORD   		dwInstance;
-	HMIDIOUT		hMidi;
-	DWORD   		dwFlags;
-} PORTALLOC, *LPPORTALLOC;
-
-typedef struct {
 	HWAVE			hWave;
 	LPWAVEFORMATEX		lpFormat;
-	DWORD			dwCallback;
-	DWORD			dwInstance;
+	DWORD_PTR		dwCallback;
+	DWORD_PTR		dwInstance;
 	UINT			uMappedDeviceID;
-        DWORD			dnDevNode;
+	DWORD_PTR		dnDevNode;
 } WAVEOPENDESC, *LPWAVEOPENDESC;
 
@@ -412,7 +405,7 @@
 typedef struct {
 	HMIDI			hMidi;
-	DWORD			dwCallback;
-	DWORD			dwInstance;
-        DWORD          		dnDevNode;
+	DWORD_PTR		dwCallback;
+	DWORD_PTR		dwInstance;
+	DWORD_PTR		dnDevNode;
         DWORD          		cIds;
         MIDIOPENSTRMID 		rgIds;
@@ -425,4 +418,5 @@
 	DWORD_PTR		dwCallback;
 	DWORD_PTR		dwInstance;
+	DWORD_PTR		dnDevNode;
 } MIXEROPENDESC, *LPMIXEROPENDESC;
 
@@ -443,6 +437,6 @@
 DECL_WINELIB_TYPE_AW(LPMCI_OPEN_DRIVER_PARMS)
 
-DWORD 			WINAPI	mciGetDriverData(UINT uDeviceID);
-BOOL			WINAPI	mciSetDriverData(UINT uDeviceID, DWORD dwData);
+DWORD_PTR		WINAPI	mciGetDriverData(UINT uDeviceID);
+BOOL			WINAPI	mciSetDriverData(UINT uDeviceID, DWORD_PTR dwData);
 UINT			WINAPI	mciDriverYield(UINT uDeviceID);
 BOOL			WINAPI	mciDriverNotify(HWND hwndCallback, UINT uDeviceID,
@@ -463,5 +457,5 @@
                            DWORD wMsg, DWORD_PTR dwUser, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
 
-typedef VOID (*LPTASKCALLBACK)(DWORD dwInst);
+typedef VOID (*LPTASKCALLBACK)(DWORD_PTR dwInst);
 
 #define TASKERR_NOTASKSUPPORT 1
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmstream.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmstream.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmstream.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmsystem.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmsystem.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mmsystem.h	(revision 19678)
@@ -295,4 +295,17 @@
 #define SND_APPLICATION     	0x00000080L /* look for application specific association */
 
+#define SND_ALIAS_START         0
+
+#define sndAlias(ch0, ch1)              (SND_ALIAS_START + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8)))
+
+#define SND_ALIAS_SYSTEMASTERISK        sndAlias('S', '*')
+#define SND_ALIAS_SYSTEMQUESTION        sndAlias('S', '?')
+#define SND_ALIAS_SYSTEMHAND            sndAlias('S', 'H')
+#define SND_ALIAS_SYSTEMEXIT            sndAlias('S', 'E')
+#define SND_ALIAS_SYSTEMSTART           sndAlias('S', 'S')
+#define SND_ALIAS_SYSTEMWELCOME         sndAlias('S', 'W')
+#define SND_ALIAS_SYSTEMEXCLAMATION     sndAlias('S', '!')
+#define SND_ALIAS_SYSTEMDEFAULT         sndAlias('S', 'D')
+
 /* waveform audio error return values */
 #define WAVERR_BADFORMAT      (WAVERR_BASE + 0)    /* unsupported wave format */
@@ -323,9 +336,9 @@
     DWORD       dwBufferLength;
     DWORD       dwBytesRecorded;
-    DWORD       dwUser;
+    DWORD_PTR   dwUser;
     DWORD       dwFlags;
     DWORD       dwLoops;
     struct wavehdr_tag *lpNext;
-    DWORD       reserved;
+    DWORD_PTR   reserved;
 } WAVEHDR, *PWAVEHDR, *NPWAVEHDR, *LPWAVEHDR;
 
@@ -714,5 +727,5 @@
     DWORD	dwFlags;
     struct midihdr_tag *lpNext;
-    DWORD	reserved;
+    DWORD_PTR	reserved;
     DWORD	dwOffset;
     DWORD_PTR	dwReserved[8];
@@ -1235,5 +1248,5 @@
     DWORD	dwLineID;
     DWORD	fdwLine;
-    DWORD	dwUser;
+    DWORD_PTR	dwUser;
     DWORD	dwComponentType;
     DWORD	cChannels;
@@ -1258,5 +1271,5 @@
     DWORD	dwLineID;
     DWORD	fdwLine;
-    DWORD	dwUser;
+    DWORD_PTR	dwUser;
     DWORD	dwComponentType;
     DWORD	cChannels;
@@ -1987,5 +2000,5 @@
 typedef struct tagMCI_STATUS_PARMS {
        DWORD_PTR dwCallback;
-	DWORD   dwReturn;
+       DWORD_PTR dwReturn;
 	DWORD   dwItem;
 	DWORD   dwTrack;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msacm.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msacm.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msacm.h	(revision 19678)
@@ -35,4 +35,6 @@
 #endif /* defined(__cplusplus) */
 
+#include <pshpack1.h>
+
 #define ACMAPI              WINAPI
 
@@ -250,5 +252,5 @@
 
 typedef BOOL (CALLBACK *ACMDRIVERENUMCB)(
-  HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport
+  HACMDRIVERID hadid, DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
@@ -547,19 +549,27 @@
 DECL_WINELIB_TYPE_AW(LPACMFORMATTAGDETAILS)
 
+#ifdef _WIN64
+#  define _ACMSTREAMHEADERRESERVE 15
+#else
+#  define _ACMSTREAMHEADERRESERVE 10
+#endif
+
 typedef struct _ACMSTREAMHEADER
 {
-  DWORD  cbStruct;
-  DWORD  fdwStatus;
-  DWORD  dwUser;
-  LPBYTE pbSrc;
-  DWORD  cbSrcLength;
-  DWORD  cbSrcLengthUsed;
-  DWORD  dwSrcUser;
-  LPBYTE pbDst;
-  DWORD  cbDstLength;
-  DWORD  cbDstLengthUsed;
-  DWORD  dwDstUser;
-  DWORD  dwReservedDriver[10];
+  DWORD     cbStruct;
+  DWORD     fdwStatus;
+  DWORD_PTR dwUser;
+  LPBYTE    pbSrc;
+  DWORD     cbSrcLength;
+  DWORD     cbSrcLengthUsed;
+  DWORD_PTR dwSrcUser;
+  LPBYTE    pbDst;
+  DWORD     cbDstLength;
+  DWORD     cbDstLengthUsed;
+  DWORD_PTR dwDstUser;
+  DWORD     dwReservedDriver[_ACMSTREAMHEADERRESERVE];
 } ACMSTREAMHEADER, *PACMSTREAMHEADER, *LPACMSTREAMHEADER;
+
+#undef _ACMSTREAMHEADERRESERVE
 
 /***********************************************************************
@@ -569,10 +579,10 @@
 typedef BOOL (CALLBACK *ACMFILTERENUMCBA)(
   HACMDRIVERID hadid, PACMFILTERDETAILSA pafd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
 typedef BOOL (CALLBACK *ACMFILTERENUMCBW)(
   HACMDRIVERID hadid, PACMFILTERDETAILSW pafd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
@@ -581,10 +591,10 @@
 typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBA)(
   HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
 typedef BOOL (CALLBACK *ACMFILTERTAGENUMCBW)(
   HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
@@ -593,10 +603,10 @@
 typedef BOOL (CALLBACK *ACMFORMATENUMCBA)(
   HACMDRIVERID hadid, PACMFORMATDETAILSA pafd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
 typedef BOOL (CALLBACK *ACMFORMATENUMCBW)(
   HACMDRIVERID hadid, PACMFORMATDETAILSW pafd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
@@ -605,10 +615,10 @@
 typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA)(
   HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
 typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW)(
   HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd,
-  DWORD dwInstance, DWORD fdwSupport
+  DWORD_PTR dwInstance, DWORD fdwSupport
 );
 
@@ -641,5 +651,5 @@
 
 MMRESULT WINAPI acmDriverEnum(
-  ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 MMRESULT WINAPI acmDriverID(
@@ -676,9 +686,9 @@
 MMRESULT WINAPI acmFilterEnumA(
   HACMDRIVER had, PACMFILTERDETAILSA pafd,
-  ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMFILTERENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 MMRESULT WINAPI acmFilterEnumW(
   HACMDRIVER had, PACMFILTERDETAILSW pafd,
-  ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 #define acmFilterEnum WINELIB_NAME_AW(acmFilterEnum)
@@ -694,9 +704,9 @@
 MMRESULT WINAPI acmFilterTagEnumA(
   HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
-  ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMFILTERTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 MMRESULT WINAPI acmFilterTagEnumW(
   HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
-  ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMFILTERTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 #define acmFilterTagEnum WINELIB_NAME_AW(acmFilterTagEnum)
@@ -720,9 +730,9 @@
 MMRESULT WINAPI acmFormatEnumA(
   HACMDRIVER had, PACMFORMATDETAILSA pafd,
-  ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMFORMATENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 MMRESULT WINAPI acmFormatEnumW(
   HACMDRIVER had, PACMFORMATDETAILSW pafd,
-  ACMFORMATENUMCBW fnCallback, DWORD dwInstance,  DWORD fdwEnum
+  ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance,  DWORD fdwEnum
 );
 #define acmFormatEnum WINELIB_NAME_AW(acmFormatEnum)
@@ -742,9 +752,9 @@
 MMRESULT WINAPI acmFormatTagEnumA(
   HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
-  ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMFORMATTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 MMRESULT WINAPI acmFormatTagEnumW(
   HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
-  ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
+  ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum
 );
 #define acmFormatTagEnum WINELIB_NAME_AW(acmFormatTagEnum)
@@ -766,6 +776,6 @@
 MMRESULT WINAPI acmStreamOpen(
   PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
-  PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
-  DWORD dwInstance, DWORD fdwOpen
+  PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD_PTR dwCallback,
+  DWORD_PTR dwInstance, DWORD fdwOpen
 );
 MMRESULT WINAPI acmStreamPrepareHeader(
@@ -783,4 +793,6 @@
 );
 
+#include <poppack.h>
+
 #ifdef __cplusplus
 } /* extern "C" */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msacmdrv.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msacmdrv.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msacmdrv.h	(revision 19678)
@@ -48,5 +48,5 @@
 
 #define MAKE_ACM_VERSION(mjr, mnr, bld) \
-  (((long)(mjr)<<24) | ((long)(mnr)<<16) | ((long)bld))
+  (((LONG)(mjr)<<24) | ((LONG)(mnr)<<16) | ((LONG)bld))
 
 #define ACMDRVOPENDESC_SECTIONNAME_CHARS
@@ -110,9 +110,9 @@
   PWAVEFORMATEX   pwfxDst;
   PWAVEFILTER     pwfltr;
-  DWORD           dwCallback;
-  DWORD           dwInstance;
+  DWORD_PTR       dwCallback;
+  DWORD_PTR       dwInstance;
   DWORD           fdwOpen;
   DWORD           fdwDriver;
-  DWORD           dwDriver;
+  DWORD_PTR       dwDriver;
   HACMSTREAM    has;
 } ACMDRVSTREAMINSTANCE, *PACMDRVSTREAMINSTANCE;
@@ -120,28 +120,28 @@
 typedef struct _ACMDRVSTREAMHEADER *PACMDRVSTREAMHEADER;
 typedef struct _ACMDRVSTREAMHEADER {
-  DWORD  cbStruct;
-  DWORD  fdwStatus;
-  DWORD  dwUser;
-  LPBYTE pbSrc;
-  DWORD  cbSrcLength;
-  DWORD  cbSrcLengthUsed;
-  DWORD  dwSrcUser;
-  LPBYTE pbDst;
-  DWORD  cbDstLength;
-  DWORD  cbDstLengthUsed;
-  DWORD  dwDstUser;
+  DWORD                cbStruct;
+  DWORD                fdwStatus;
+  DWORD_PTR            dwUser;
+  LPBYTE               pbSrc;
+  DWORD                cbSrcLength;
+  DWORD                cbSrcLengthUsed;
+  DWORD_PTR            dwSrcUser;
+  LPBYTE               pbDst;
+  DWORD                cbDstLength;
+  DWORD                cbDstLengthUsed;
+  DWORD_PTR            dwDstUser;
 
-  DWORD fdwConvert;
+  DWORD                fdwConvert;
   PACMDRVSTREAMHEADER *padshNext;
-  DWORD fdwDriver;
-  DWORD dwDriver;
+  DWORD                fdwDriver;
+  DWORD_PTR            dwDriver;
 
   /* Internal fields for ACM */
-  DWORD  fdwPrepared;
-  DWORD  dwPrepared;
-  LPBYTE pbPreparedSrc;
-  DWORD  cbPreparedSrcLength;
-  LPBYTE pbPreparedDst;
-  DWORD  cbPreparedDstLength;
+  DWORD                fdwPrepared;
+  DWORD_PTR            dwPrepared;
+  LPBYTE               pbPreparedSrc;
+  DWORD                cbPreparedSrcLength;
+  LPBYTE               pbPreparedDst;
+  DWORD                cbPreparedDstLength;
 } ACMDRVSTREAMHEADER;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mscat.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mscat.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mscat.h	(revision 19678)
@@ -38,8 +38,44 @@
 #endif
 
+#define CRYPTCAT_OPEN_CREATENEW             0x00000001
+#define CRYPTCAT_OPEN_ALWAYS                0x00000002
+#define CRYPTCAT_OPEN_EXISTING              0x00000004
+#define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES   0x00010000
+#define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES   0x00020000
+#define CRYPTCAT_OPEN_VERIFYSIGHASH         0x10000000
+#define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG  0x20000000
+#define CRYPTCAT_OPEN_SORTED                0x40000000
+#define CRYPTCAT_OPEN_FLAGS_MASK            0xffff0000
+
+#define CRYPTCAT_E_AREA_HEADER              0x00000000
+#define CRYPTCAT_E_AREA_MEMBER              0x00010000
+#define CRYPTCAT_E_AREA_ATTRIBUTE           0x00020000
+
+#define CRYPTCAT_E_CDF_UNSUPPORTED          0x00000001
+#define CRYPTCAT_E_CDF_DUPLICATE            0x00000002
+#define CRYPTCAT_E_CDF_TAGNOTFOUND          0x00000004
+
+#define CRYPTCAT_E_CDF_MEMBER_FILE_PATH     0x00010001
+#define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA  0x00010002
+#define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND  0x00010004
+
+#define CRYPTCAT_E_CDF_BAD_GUID_CONV        0x00020001
+#define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES    0x00020002
+#define CRYPTCAT_E_CDF_ATTR_TYPECOMBO       0x00020004
 
 #include <pshpack8.h>
 
-typedef struct CRYPTCATMEMBER_ {
+typedef struct CRYPTCATATTRIBUTE_
+{
+    DWORD cbStruct;
+    LPWSTR pwszReferenceTag;
+    DWORD dwAttrTypeAndAction;
+    DWORD cbValue;
+    BYTE *pbValue;
+    DWORD dwReserved;
+} CRYPTCATATTRIBUTE;
+
+typedef struct CRYPTCATMEMBER_
+{
     DWORD cbStruct;
     LPWSTR pwszReferenceTag;
@@ -55,6 +91,24 @@
 } CRYPTCATMEMBER;
 
+typedef struct CATALOG_INFO_
+{
+    DWORD cbStruct;
+    WCHAR wszCatalogFile[MAX_PATH];
+} CATALOG_INFO;
+
+typedef struct CRYPTCATCDF_
+{
+    DWORD cbStruct;
+    HANDLE hFile;
+    DWORD dwCurFilePos;
+    DWORD dwLastMemberOffset;
+    BOOL fEOF;
+    LPWSTR pwszResultDir;
+    HANDLE hCATStore;
+} CRYPTCATCDF;
+
 #include <poppack.h>
 
+typedef void (WINAPI *PFN_CDF_PARSE_ERROR_CALLBACK)(DWORD, DWORD, WCHAR *);
 
 BOOL      WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD);
@@ -65,6 +119,20 @@
 BOOL      WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD);
 BOOL      WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD);
-BOOL      WINAPI CryptCATClose(HANDLE);
-CRYPTCATMEMBER* WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER*);
+BOOL      WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD);
+BOOL      WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD);
+BOOL      WINAPI CryptCATCDFClose(CRYPTCATCDF *);
+CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *, CRYPTCATATTRIBUTE *,
+                                                        PFN_CDF_PARSE_ERROR_CALLBACK);
+LPWSTR              WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *, LPWSTR,
+                                                            PFN_CDF_PARSE_ERROR_CALLBACK,
+                                                            CRYPTCATMEMBER **, BOOL, LPVOID);
+CRYPTCATCDF       * WINAPI CryptCATCDFOpen(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK);
+BOOL                WINAPI CryptCATClose(HANDLE);
+CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateAttr(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *);
+CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateCatAttr(HANDLE, CRYPTCATATTRIBUTE *);
+CRYPTCATMEMBER    * WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER *);
+CRYPTCATATTRIBUTE * WINAPI CryptCATGetAttrInfo(HANDLE, CRYPTCATMEMBER *, LPWSTR);
+CRYPTCATATTRIBUTE * WINAPI CryptCATGetCatAttrInfo(HANDLE, LPWSTR);
+CRYPTCATMEMBER    * WINAPI CryptCATGetMemberInfo(HANDLE, LPWSTR);
 HANDLE    WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD);
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mscoree.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mscoree.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mscoree.idl	(revision 19678)
@@ -18,4 +18,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "unknwn.idl";
 cpp_quote("/* FIXME: #include <gcghost.h> */")
@@ -28,4 +37,6 @@
 cpp_quote("HRESULT     WINAPI GetRequestedRuntimeInfo(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,DWORD,LPWSTR,DWORD,DWORD*,LPWSTR,DWORD,DWORD*);")
 cpp_quote("HRESULT     WINAPI LoadLibraryShim(LPCWSTR,LPCWSTR,LPVOID,HMODULE*);")
+cpp_quote("typedef HRESULT (__stdcall *FLockClrVersionCallback)();")
+cpp_quote("HRESULT     WINAPI LockClrVersion(FLockClrVersionCallback,FLockClrVersionCallback*,FLockClrVersionCallback*);")
 
 typedef void* HDOMAINENUM;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msctf.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msctf.idl	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msctf.idl	(revision 19678)
@@ -0,0 +1,710 @@
+/*
+ * Copyright 2008 Aric Stewart, CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef DO_NO_IMPORTS
+import "oaidl.idl";
+import "comcat.idl";
+import "textstor.idl";
+/* import "ctfutb.idl"; */
+#endif
+cpp_quote("#include <winuser.h>")
+
+cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
+cpp_quote("#define TF_E_ALREADY_EXISTS  MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
+cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
+cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
+cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
+
+/* GUIDs for Categories */
+cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
+cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
+cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
+cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
+
+typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)]  DWORD TfEditCookie;
+typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
+typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
+
+cpp_quote("#define TF_MOD_ALT                   0x0001")
+cpp_quote("#define TF_MOD_CONTROL               0x0002")
+cpp_quote("#define TF_MOD_SHIFT                 0x0004")
+cpp_quote("#define TF_MOD_RALT                  0x0008")
+cpp_quote("#define TF_MOD_RCONTROL              0x0010")
+cpp_quote("#define TF_MOD_RSHIFT                0x0020")
+cpp_quote("#define TF_MOD_LALT                  0x0040")
+cpp_quote("#define TF_MOD_LCONTROL              0x0080")
+cpp_quote("#define TF_MOD_LSHIFT                0x0100")
+cpp_quote("#define TF_MOD_ON_KEYUP              0x0200")
+cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER   0x0400")
+
+interface ITfDocumentMgr;
+interface ITfContext;
+interface IEnumTfDocumentMgrs;
+interface IEnumTfContexts;
+interface ITfFunctionProvider;
+interface IEnumTfFunctionProviders;
+interface ITfCompartmentMgr;
+interface ITfEditSession;
+interface ITfRange;
+interface ITfContextView;
+interface IEnumTfContextViews;
+interface ITfProperty;
+interface ITfReadOnlyProperty;
+interface IEnumTfProperties;
+interface ITfRangeBackup;
+interface IEnumTfLanguageProfiles;
+interface ITfEditRecord;
+interface ITfCompositionView;
+interface ITfKeyEventSink;
+
+typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
+{
+    CLSID clsid;
+    LANGID langid;
+    GUID catid;
+    BOOL fActive;
+    GUID guidProfile;
+} TF_LANGUAGEPROFILE;
+
+typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
+{
+    UINT uVKey;
+    UINT uModifiers;
+} TF_PRESERVEDKEY;
+
+[
+    object,
+    uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
+    pointer_default(unique)
+]
+interface ITfThreadMgr: IUnknown
+{
+    HRESULT Activate(
+        [out] TfClientId *ptid);
+
+    HRESULT Deactivate();
+
+    HRESULT CreateDocumentMgr(
+        [out] ITfDocumentMgr **ppdim);
+
+    HRESULT EnumDocumentMgrs(
+        [out] IEnumTfDocumentMgrs **ppEnum);
+
+    HRESULT GetFocus(
+        [out] ITfDocumentMgr **ppdimFocus);
+
+    HRESULT SetFocus(
+        [in] ITfDocumentMgr *pdimFocus);
+
+    HRESULT AssociateFocus(
+        [in] HWND hwnd,
+        [in, unique] ITfDocumentMgr *pdimNew,
+        [out] ITfDocumentMgr **ppdimPrev);
+
+    HRESULT IsThreadFocus(
+        [out] BOOL *pfThreadFocus);
+
+    HRESULT GetFunctionProvider(
+        [in] REFCLSID clsid,
+        [out] ITfFunctionProvider **ppFuncProv);
+
+    HRESULT EnumFunctionProviders(
+        [out] IEnumTfFunctionProviders **ppEnum);
+
+    HRESULT GetGlobalCompartment(
+        [out] ITfCompartmentMgr **ppCompMgr);
+};
+
+
+[
+    object,
+    uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
+    pointer_default(unique)
+]
+interface ITfDocumentMgr: IUnknown
+{
+    HRESULT CreateContext(
+        [in] TfClientId tidOwner,
+        [in] DWORD dwFlags,
+        [in, unique] IUnknown *punk,
+        [out] ITfContext **ppic,
+        [out] TfEditCookie *pecTextStore);
+
+    HRESULT Push(
+        [in] ITfContext *pic);
+
+    const DWORD TF_POPF_ALL = 0x0001;
+
+    HRESULT Pop(
+        [in] DWORD dwFlags);
+
+    HRESULT GetTop(
+        [out] ITfContext **ppic);
+
+    HRESULT GetBase(
+        [out] ITfContext **ppic);
+
+    HRESULT EnumContexts(
+        [out] IEnumTfContexts **ppEnum);
+};
+
+[
+    object,
+    uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
+    pointer_default(unique)
+]
+interface ITfContext : IUnknown
+{
+    const DWORD TF_ES_ASYNCDONTCARE = 0x0;
+    const DWORD TF_ES_SYNC          = 0x1;
+    const DWORD TF_ES_READ          = 0x2;
+    const DWORD TF_ES_READWRITE     = 0x6;
+    const DWORD TF_ES_ASYNC         = 0x8;
+
+    HRESULT RequestEditSession(
+        [in] TfClientId tid,
+        [in] ITfEditSession *pes,
+        [in] DWORD dwFlags,
+        [out] HRESULT *phrSession);
+
+    HRESULT InWriteSession(
+        [in] TfClientId tid,
+        [out] BOOL *pfWriteSession);
+
+    typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
+
+    typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
+    {
+        TfActiveSelEnd ase;
+        BOOL fInterimChar;
+    } TF_SELECTIONSTYLE;
+
+    typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
+    {
+        ITfRange *range;
+        TF_SELECTIONSTYLE style;
+    } TF_SELECTION;
+
+    const ULONG TF_DEFAULT_SELECTION =  TS_DEFAULT_SELECTION;
+
+    HRESULT GetSelection(
+        [in] TfEditCookie ec,
+        [in] ULONG ulIndex,
+        [in] ULONG ulCount,
+        [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
+        [out] ULONG *pcFetched);
+
+    HRESULT SetSelection(
+        [in] TfEditCookie ec,
+        [in] ULONG ulCount,
+        [in, size_is(ulCount)] const TF_SELECTION *pSelection);
+
+    HRESULT GetStart(
+        [in] TfEditCookie ec,
+        [out] ITfRange **ppStart);
+
+    HRESULT GetEnd(
+        [in] TfEditCookie ec,
+        [out] ITfRange **ppEnd);
+
+    typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
+    const DWORD TF_SD_READONLY    = TS_SD_READONLY;
+    const DWORD TF_SD_LOADING     = TS_SD_LOADING;
+    const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
+    const DWORD TF_SS_REGIONS     = TS_SS_REGIONS;
+    const DWORD TF_SS_TRANSITORY  = TS_SS_TRANSITORY;
+
+
+    HRESULT GetActiveView(
+        [out] ITfContextView **ppView);
+
+    HRESULT EnumViews(
+        [out] IEnumTfContextViews **ppEnum);
+
+    HRESULT GetStatus(
+        [out] TF_STATUS *pdcs);
+
+    HRESULT GetProperty(
+        [in] REFGUID guidProp,
+        [out] ITfProperty **ppProp);
+
+    HRESULT GetAppProperty(
+        [in] REFGUID guidProp,
+        [out] ITfReadOnlyProperty **ppProp);
+
+    HRESULT TrackProperties(
+        [in, size_is(cProp)] const GUID **prgProp,
+        [in] ULONG cProp,
+        [in, size_is(cAppProp)] const GUID **prgAppProp,
+        [in] ULONG cAppProp,
+        [out] ITfReadOnlyProperty **ppProperty);
+
+    HRESULT EnumProperties(
+        [out] IEnumTfProperties **ppEnum);
+
+    HRESULT GetDocumentMgr(
+        [out] ITfDocumentMgr **ppDm);
+
+    HRESULT CreateRangeBackup(
+        [in] TfEditCookie ec,
+        [in] ITfRange *pRange,
+        [out] ITfRangeBackup **ppBackup);
+
+};
+
+[
+  object,
+  uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
+  pointer_default(unique)
+]
+interface ITfSource : IUnknown
+{
+    HRESULT AdviseSink(
+        [in] REFIID riid,
+        [in, iid_is(riid)] IUnknown *punk,
+        [out] DWORD *pdwCookie);
+
+    HRESULT UnadviseSink(
+        [in] DWORD dwCookie);
+};
+
+[
+  object,
+  local,
+  uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
+  pointer_default(unique)
+]
+interface ITfInputProcessorProfiles : IUnknown
+{
+    HRESULT Register(
+        [in] REFCLSID rclsid);
+
+    HRESULT Unregister(
+        [in] REFCLSID rclsid);
+
+    HRESULT AddLanguageProfile(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfile,
+        [in, size_is(cchDesc)] const WCHAR *pchDesc,
+        [in] ULONG cchDesc,
+        [in, size_is(cchFile)] const WCHAR *pchIconFile,
+        [in] ULONG cchFile,
+        [in] ULONG uIconIndex);
+
+    HRESULT RemoveLanguageProfile(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfile);
+
+    HRESULT EnumInputProcessorInfo(
+        [out] IEnumGUID **ppEnum);
+
+    HRESULT GetDefaultLanguageProfile(
+        [in] LANGID langid,
+        [in] REFGUID catid,
+        [out] CLSID *pclsid,
+        [out] GUID *pguidProfile);
+
+    HRESULT SetDefaultLanguageProfile(
+        [in] LANGID langid,
+        [in] REFCLSID rclsid,
+        [in] REFGUID guidProfiles);
+
+    HRESULT ActivateLanguageProfile(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfiles);
+
+    HRESULT GetActiveLanguageProfile(
+        [in] REFCLSID rclsid,
+        [out] LANGID *plangid,
+        [out] GUID *pguidProfile);
+
+    HRESULT GetLanguageProfileDescription(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfile,
+        [out] BSTR *pbstrProfile);
+
+    HRESULT GetCurrentLanguage(
+        [out] LANGID *plangid);
+
+    HRESULT ChangeCurrentLanguage(
+        [in] LANGID langid);
+
+    HRESULT GetLanguageList(
+        [out] LANGID **ppLangId,
+        [out] ULONG *pulCount);
+
+    HRESULT EnumLanguageProfiles(
+        [in] LANGID langid,
+        [out] IEnumTfLanguageProfiles **ppEnum);
+
+    HRESULT EnableLanguageProfile(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfile,
+        [in] BOOL fEnable);
+
+    HRESULT IsEnabledLanguageProfile(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfile,
+        [out] BOOL *pfEnable);
+
+    HRESULT EnableLanguageProfileByDefault(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfile,
+        [in] BOOL fEnable);
+
+    HRESULT SubstituteKeyboardLayout(
+        [in] REFCLSID rclsid,
+        [in] LANGID langid,
+        [in] REFGUID guidProfile,
+        [in] HKL hKL);
+};
+
+[
+  object,
+  local,
+  uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
+  pointer_default(unique)
+]
+interface ITfCategoryMgr : IUnknown
+{
+    HRESULT RegisterCategory([in] REFCLSID rclsid,
+                             [in] REFGUID rcatid,
+                             [in] REFGUID rguid);
+
+    HRESULT UnregisterCategory([in] REFCLSID rclsid,
+                               [in] REFGUID rcatid,
+                               [in] REFGUID rguid);
+
+    HRESULT EnumCategoriesInItem([in] REFGUID rguid,
+                                 [out] IEnumGUID **ppEnum);
+
+    HRESULT EnumItemsInCategory([in] REFGUID rcatid,
+                                [out] IEnumGUID **ppEnum);
+
+    HRESULT FindClosestCategory([in] REFGUID rguid,
+                                [out] GUID *pcatid,
+                                [in, size_is(ulCount)] const GUID **ppcatidList,
+                                [in] ULONG ulCount);
+
+    HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
+                                    [in] REFGUID rguid,
+                                    [in, size_is(cch)] const WCHAR *pchDesc,
+                                    [in] ULONG cch);
+
+    HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
+                                      [in] REFGUID rguid);
+
+    HRESULT GetGUIDDescription([in] REFGUID rguid,
+                               [out] BSTR *pbstrDesc);
+
+    HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
+                              [in] REFGUID rguid,
+                              [in] DWORD dw);
+
+    HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
+                                [in] REFGUID rguid);
+
+    HRESULT GetGUIDDWORD([in] REFGUID rguid,
+                         [out] DWORD *pdw);
+
+    HRESULT RegisterGUID([in] REFGUID rguid,
+                         [out] TfGuidAtom *pguidatom);
+
+    HRESULT GetGUID([in] TfGuidAtom guidatom,
+                    [out] GUID *pguid);
+
+    HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
+                              [in] REFGUID rguid,
+                              [out] BOOL *pfEqual);
+};
+
+[
+  object,
+  uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
+  pointer_default(unique)
+]
+interface ITfTextEditSink : IUnknown
+{
+    HRESULT OnEndEdit(
+        [in] ITfContext *pic,
+        [in] TfEditCookie ecReadOnly,
+        [in] ITfEditRecord *pEditRecord);
+};
+
+[
+    object,
+    uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
+    pointer_default(unique)
+]
+interface ITfContextOwnerCompositionSink : IUnknown
+{
+    HRESULT OnStartComposition(
+        [in] ITfCompositionView *pComposition,
+        [out] BOOL *pfOk);
+
+    HRESULT OnUpdateComposition(
+        [in] ITfCompositionView *pComposition,
+        [in] ITfRange *pRangeNew);
+
+    HRESULT OnEndComposition(
+        [in] ITfCompositionView *pComposition);
+};
+
+[
+  object,
+  uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
+  pointer_default(unique)
+]
+interface IEnumTfLanguageProfiles : IUnknown
+{
+    HRESULT Clone(
+        [out] IEnumTfLanguageProfiles **ppEnum);
+
+    HRESULT Next(
+        [in] ULONG ulCount,
+        [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
+        [out] ULONG *pcFetch);
+
+    HRESULT Reset();
+
+    HRESULT Skip(
+        [in] ULONG ulCount);
+};
+
+[
+  object,
+  local,
+  uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
+  pointer_default(unique)
+]
+interface ITfTextInputProcessor : IUnknown
+{
+    HRESULT Activate(
+        [in] ITfThreadMgr *ptim,
+        [in] TfClientId tid);
+
+    HRESULT Deactivate();
+};
+
+[
+  object,
+  uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
+  pointer_default(unique)
+]
+interface ITfThreadMgrEventSink : IUnknown
+{
+    HRESULT OnInitDocumentMgr(
+        [in] ITfDocumentMgr *pdim);
+
+    HRESULT OnUninitDocumentMgr(
+        [in] ITfDocumentMgr *pdim);
+
+    HRESULT OnSetFocus(
+        [in] ITfDocumentMgr *pdimFocus,
+        [in] ITfDocumentMgr *pdimPrevFocus);
+
+    HRESULT OnPushContext(
+        [in] ITfContext *pic);
+
+    HRESULT OnPopContext(
+        [in] ITfContext *pic);
+};
+
+[
+  object,
+  local,
+  uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
+  pointer_default(unique)
+]
+interface ITfKeystrokeMgr : IUnknown
+{
+    HRESULT AdviseKeyEventSink(
+        [in] TfClientId tid,
+        [in] ITfKeyEventSink *pSink,
+        [in] BOOL fForeground);
+
+    HRESULT UnadviseKeyEventSink(
+        [in] TfClientId tid);
+
+    HRESULT GetForeground(
+        [out] CLSID *pclsid);
+
+    HRESULT TestKeyDown(
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT TestKeyUp(
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT KeyDown(
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT KeyUp(
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT GetPreservedKey(
+        [in] ITfContext *pic,
+        [in] const TF_PRESERVEDKEY *pprekey,
+        [out] GUID *pguid);
+
+    HRESULT IsPreservedKey(
+        [in] REFGUID rguid,
+        [in] const TF_PRESERVEDKEY *pprekey,
+        [out] BOOL *pfRegistered);
+
+    HRESULT PreserveKey(
+        [in] TfClientId tid,
+        [in] REFGUID rguid,
+        [in] const TF_PRESERVEDKEY *prekey,
+        [in, size_is(cchDesc)] const WCHAR *pchDesc,
+        [in] ULONG cchDesc);
+
+    HRESULT UnpreserveKey(
+        [in] REFGUID rguid,
+        [in] const TF_PRESERVEDKEY *pprekey);
+
+    HRESULT SetPreservedKeyDescription(
+        [in] REFGUID rguid,
+        [in, size_is(cchDesc)] const WCHAR *pchDesc,
+        [in] ULONG cchDesc);
+
+    HRESULT GetPreservedKeyDescription(
+        [in] REFGUID rguid,
+        [out] BSTR *pbstrDesc);
+
+    HRESULT SimulatePreservedKey(
+        [in] ITfContext *pic,
+        [in] REFGUID rguid,
+        [out] BOOL *pfEaten);
+};
+
+[
+  object,
+  local,
+  uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
+  pointer_default(unique)
+]
+interface ITfKeyEventSink : IUnknown
+{
+    HRESULT OnSetFocus(
+        [in] BOOL fForeground);
+
+    HRESULT OnTestKeyDown(
+        [in] ITfContext *pic,
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT OnTestKeyUp(
+        [in] ITfContext *pic,
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT OnKeyDown(
+        [in] ITfContext *pic,
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT OnKeyUp(
+        [in] ITfContext *pic,
+        [in] WPARAM wParam,
+        [in] LPARAM lParam,
+        [out] BOOL *pfEaten);
+
+    HRESULT OnPreservedKey(
+        [in] ITfContext *pic,
+        [in] REFGUID rguid,
+        [out] BOOL *pfEaten);
+};
+
+[
+  object,
+  local,
+  uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
+  pointer_default(unique)
+]
+interface ITfMessagePump : IUnknown
+{
+    HRESULT PeekMessageA(
+        [out] LPMSG pMsg,
+        [in] HWND hwnd,
+        [in] UINT wMsgFilterMin,
+        [in] UINT wMsgFilterMax,
+        [in] UINT wRemoveMsg,
+        [out] BOOL *pfResult);
+
+    HRESULT GetMessageA(
+        [out] LPMSG pMsg,
+        [in] HWND hwnd,
+        [in] UINT wMsgFilterMin,
+        [in] UINT wMsgFilterMax,
+        [out] BOOL *pfResult);
+
+    HRESULT PeekMessageW(
+        [out] LPMSG pMsg,
+        [in] HWND hwnd,
+        [in] UINT wMsgFilterMin,
+        [in] UINT wMsgFilterMax,
+        [in] UINT wRemoveMsg,
+        [out] BOOL *pfResult);
+
+    HRESULT GetMessageW(
+        [out] LPMSG pMsg,
+        [in] HWND hwnd,
+        [in] UINT wMsgFilterMin,
+        [in] UINT wMsgFilterMax,
+        [out] BOOL *pfResult);
+};
+
+[
+  object,
+  local,
+  uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
+  pointer_default(unique)
+]
+interface ITfClientId : IUnknown
+{
+    HRESULT GetClientId(
+        [in] REFCLSID rclsid,
+        [out] TfClientId *ptid);
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtmdid.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtmdid.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtmdid.h	(revision 19678)
@@ -84,6 +84,8 @@
 #define DISPID_STYLESHEET       DISPID_NORMAL_FIRST
 #define DISPID_STYLERULE        DISPID_NORMAL_FIRST
+#define DISPID_STYLEPAGE        DISPID_NORMAL_FIRST
 #define DISPID_STYLESHEETS_COL  DISPID_NORMAL_FIRST
 #define DISPID_STYLERULES_COL   DISPID_NORMAL_FIRST
+#define DISPID_STYLEPAGES_COL   DISPID_NORMAL_FIRST
 #define DISPID_MIMETYPES_COL    DISPID_NORMAL_FIRST
 #define DISPID_PLUGINS_COL      DISPID_NORMAL_FIRST
@@ -419,4 +421,9 @@
 #define DISPID_INTERNAL_CATTRIBUTECOLLPTRCACHE  (DISPID_A_FIRST+210)
 #define DISPID_A_MINHEIGHT                   (DISPID_A_FIRST+211)
+#define DISPID_INTERNAL_INVOKECONTEXTDOCUMENT   (DISPID_A_FIRST+212)
+#define DISPID_A_INTERPOLATION               (DISPID_A_FIRST+213)
+#define DISPID_A_MAXHEIGHT                   (DISPID_A_FIRST+214)
+#define DISPID_A_MINWIDTH                    (DISPID_A_FIRST+215)
+#define DISPID_A_MAXWIDTH                    (DISPID_A_FIRST+216)
 
 #define DISPID_WINDOWOBJECT          (-5500)
@@ -1502,4 +1509,30 @@
 #define DISPID_IHTMLBOOKMARKCOLLECTION_ITEM      DISPID_VALUE
 
+/* HTMLWindowEvents */
+#define DISPID_HTMLWINDOWEVENTS_ONLOAD           DISPID_EVMETH_ONLOAD
+#define DISPID_HTMLWINDOWEVENTS_ONUNLOAD         DISPID_EVMETH_ONUNLOAD
+#define DISPID_HTMLWINDOWEVENTS_ONHELP           DISPID_EVMETH_ONHELP
+#define DISPID_HTMLWINDOWEVENTS_ONFOCUS          DISPID_EVMETH_ONFOCUS
+#define DISPID_HTMLWINDOWEVENTS_ONBLUR           DISPID_EVMETH_ONBLUR
+#define DISPID_HTMLWINDOWEVENTS_ONERROR          DISPID_EVMETH_ONERROR
+#define DISPID_HTMLWINDOWEVENTS_ONRESIZE         DISPID_EVMETH_ONRESIZE
+#define DISPID_HTMLWINDOWEVENTS_ONSCROLL         DISPID_EVMETH_ONSCROLL
+#define DISPID_HTMLWINDOWEVENTS_ONBEFOREUNLOAD   DISPID_EVMETH_ONBEFOREUNLOAD
+#define DISPID_HTMLWINDOWEVENTS_ONBEFOREPRINT    DISPID_EVMETH_ONBEFOREPRINT
+#define DISPID_HTMLWINDOWEVENTS_ONAFTERPRINT     DISPID_EVMETH_ONAFTERPRINT
+
+/* HTMLWindowEvents2 */
+#define DISPID_HTMLWINDOWEVENTS2_ONLOAD          DISPID_EVMETH_ONLOAD
+#define DISPID_HTMLWINDOWEVENTS2_ONUNLOAD        DISPID_EVMETH_ONUNLOAD
+#define DISPID_HTMLWINDOWEVENTS2_ONHELP          DISPID_EVMETH_ONHELP
+#define DISPID_HTMLWINDOWEVENTS2_ONFOCUS         DISPID_EVMETH_ONFOCUS
+#define DISPID_HTMLWINDOWEVENTS2_ONBLUR          DISPID_EVMETH_ONBLUR
+#define DISPID_HTMLWINDOWEVENTS2_ONERROR         DISPID_EVMETH_ONERROR
+#define DISPID_HTMLWINDOWEVENTS2_ONRESIZE        DISPID_EVMETH_ONRESIZE
+#define DISPID_HTMLWINDOWEVENTS2_ONSCROLL        DISPID_EVMETH_ONSCROLL
+#define DISPID_HTMLWINDOWEVENTS2_ONBEFOREUNLOAD  DISPID_EVMETH_ONBEFOREUNLOAD
+#define DISPID_HTMLWINDOWEVENTS2_ONBEFOREPRINT   DISPID_EVMETH_ONBEFOREPRINT
+#define DISPID_HTMLWINDOWEVENTS2_ONAFTERPRINT    DISPID_EVMETH_ONAFTERPRINT
+
 /* IHTMLWindow2 */
 #define DISPID_IHTMLWINDOW2_HISTORY              2
@@ -1575,4 +1608,7 @@
 #define DISPID_IHTMLWINDOW4_FRAMEELEMENT  1181
 
+/* IHTMLWindow5 */
+#define DISPID_IHTMLWINDOW5_XMLHTTPREQUEST 1190
+
 /* IHTMLImageElementFactory */
 #define DISPID_IHTMLIMAGEELEMENTFACTORY_CREATE                    DISPID_VALUE
@@ -1803,7 +1839,19 @@
 #define DISPID_IHTMLSTYLESHEET_DISABLED           STDPROPID_XOBJ_DISABLED
 
+/* IHTMLStyleSheet2 */
+#define DISPID_IHTMLSTYLESHEET2_PAGES             (DISPID_STYLESHEET+16)
+#define DISPID_IHTMLSTYLESHEET2_ADDPAGERULE       (DISPID_STYLESHEET+17)
+
 /* IHTMLStyleSheetRulesCollection */
 #define DISPID_IHTMLSTYLESHEETRULESCOLLECTION_LENGTH   (DISPID_STYLERULES_COL+1)
 #define DISPID_IHTMLSTYLESHEETRULESCOLLECTION_ITEM     DISPID_VALUE
+
+/* IHTMLStyleSheetPage */
+#define DISPID_IHTMLSTYLESHEETPAGE_SELECTOR       (DISPID_STYLEPAGE+1)
+#define DISPID_IHTMLSTYLESHEETPAGE_PSEUDOCLASS    (DISPID_STYLEPAGE+2)
+
+/* IHTMLStyleSheetPagesCollection */
+#define DISPID_IHTMLSTYLESHEETPAGESCOLLECTION_LENGTH      (DISPID_STYLEPAGES_COL+1)
+#define DISPID_IHTMLSTYLESHEETPAGESCOLLECTION_ITEM        DISPID_VALUE
 
 /* IHTMLStyleSheetRule */
@@ -2261,4 +2309,10 @@
 #define DISPID_IHTMLCURRENTSTYLE3_WHITESPACE    DISPID_A_WHITESPACE
 
+/* IHTMLCurrentStyle4 */
+#define DISPID_IHTMLCURRENTSTYLE4_MSINTERPOLATIONMODE       DISPID_A_INTERPOLATION
+#define DISPID_IHTMLCURRENTSTYLE4_MAXHEIGHT                 DISPID_A_MAXHEIGHT
+#define DISPID_IHTMLCURRENTSTYLE4_MINWIDTH                  DISPID_A_MINWIDTH
+#define DISPID_IHTMLCURRENTSTYLE4_MAXWIDTH                  DISPID_A_MAXWIDTH
+
 /* HTMLTextContainerEvents2 */
 #define DISPID_HTMLTEXTCONTAINEREVENTS2_ONCHANGE       DISPID_EVMETH_ONCHANGE
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtmhst.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtmhst.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtmhst.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtml.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtml.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mshtml.idl	(revision 19678)
@@ -18,4 +18,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #include <mshtmdid.h>
 #include <mshtmcid.h>
@@ -33,4 +42,8 @@
 cpp_quote("#define SID_SHTMLWindow IID_IHTMLWindow2")
 cpp_quote("#define SID_SElementBehaviorFactory IID_IElementBehaviorFactory")
+
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
+cpp_quote("#undef FindText")
+cpp_quote("#endif")
 
 typedef enum {
@@ -105,5 +118,5 @@
 {
     [propget, id(DISPID_IHTMLFILTERSCOLLECTION_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLFILTERSCOLLECTION__NEWENUM)]
@@ -596,26 +609,26 @@
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELTOP), bindable, displaybind, hidden]
-    HRESULT pixelTop([in] long v);
+    HRESULT pixelTop([in] LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELTOP), bindable, displaybind, hidden]
-    HRESULT pixelTop([retval, out] long *p);
+    HRESULT pixelTop([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELLEFT), bindable, displaybind, hidden]
-    HRESULT pixelLeft([in] long v);
+    HRESULT pixelLeft([in] LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELLEFT), bindable, displaybind, hidden]
-    HRESULT pixelLeft([retval, out] long *p);
+    HRESULT pixelLeft([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELWIDTH), bindable, displaybind, hidden]
-    HRESULT pixelWidth([in] long v);
+    HRESULT pixelWidth([in] LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELWIDTH), bindable, displaybind, hidden]
-    HRESULT pixelWidth([retval, out] long *p);
+    HRESULT pixelWidth([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELHEIGHT), bindable, displaybind, hidden]
-    HRESULT pixelHeight([in] long v);
+    HRESULT pixelHeight([in] LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELHEIGHT), bindable, displaybind, hidden]
-    HRESULT pixelHeight([retval, out] long *p);
+    HRESULT pixelHeight([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLSTYLE_POSTOP), bindable, displaybind]
@@ -760,14 +773,14 @@
 
     [propput, id(DISPID_IHTMLSTYLE2_PIXELBOTTOM), displaybind, bindable, hidden]
-    HRESULT pixelBottom([in] long v);
+    HRESULT pixelBottom([in] LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE2_PIXELBOTTOM), displaybind, bindable, hidden]
-    HRESULT pixelBottom([out, retval] long *p);
+    HRESULT pixelBottom([out, retval] LONG *p);
 
     [propput, id(DISPID_IHTMLSTYLE2_PIXELRIGHT), displaybind, bindable, hidden]
-    HRESULT pixelRight([in] long v);
+    HRESULT pixelRight([in] LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE2_PIXELRIGHT), displaybind, bindable, hidden]
-    HRESULT pixelRight([out, retval] long *p);
+    HRESULT pixelRight([out, retval] LONG *p);
 
     [propput, id(DISPID_IHTMLSTYLE2_POSBOTTOM), displaybind, bindable]
@@ -1867,26 +1880,26 @@
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELTOP), displaybind, bindable, hidden]
-    void pixelTop(long v);
+    void pixelTop(LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELTOP), displaybind, bindable, hidden]
-    long pixelTop();
+    LONG pixelTop();
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELLEFT), displaybind, bindable, hidden]
-    void pixelLeft(long v);
+    void pixelLeft(LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELLEFT), displaybind, bindable, hidden]
-    long pixelLeft();
+    LONG pixelLeft();
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELWIDTH), displaybind, bindable, hidden]
-    void pixelWidth(long v);
+    void pixelWidth(LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELWIDTH), displaybind, bindable, hidden]
-    long pixelWidth();
+    LONG pixelWidth();
 
     [propput, id(DISPID_IHTMLSTYLE_PIXELHEIGHT), displaybind, bindable, hidden]
-    void pixelHeight(long v);
+    void pixelHeight(LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE_PIXELHEIGHT), displaybind, bindable, hidden]
-    long pixelHeight();
+    LONG pixelHeight();
 
     [propput, id(DISPID_IHTMLSTYLE_POSTOP), displaybind, bindable]
@@ -2012,14 +2025,14 @@
 
     [propput, id(DISPID_IHTMLSTYLE2_PIXELBOTTOM), displaybind, bindable, hidden]
-    void pixelBottom(long v);
+    void pixelBottom(LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE2_PIXELBOTTOM), displaybind, bindable, hidden]
-    long pixelBottom();
+    LONG pixelBottom();
 
     [propput, id(DISPID_IHTMLSTYLE2_PIXELRIGHT), displaybind, bindable, hidden]
-    void pixelRight(long v);
+    void pixelRight(LONG v);
 
     [propget, id(DISPID_IHTMLSTYLE2_PIXELRIGHT), displaybind, bindable, hidden]
-    long pixelRight();
+    LONG pixelRight();
 
     [propput, id(DISPID_IHTMLSTYLE2_POSBOTTOM), displaybind, bindable]
@@ -2244,4 +2257,141 @@
     [propget, id(DISPID_IHTMLSTYLE4_MINHEIGHT), displaybind, bindable]
     VARIANT minHeight();
+}
+
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f656-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLStyle3 : IDispatch
+{
+    [propput, id(DISPID_IHTMLSTYLE3_LAYOUTFLOW), displaybind, bindable]
+    HRESULT layoutFlow([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_LAYOUTFLOW), displaybind, bindable]
+    HRESULT layoutFlow([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_ZOOM), displaybind, bindable]
+    HRESULT zoom([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_ZOOM), displaybind, bindable]
+    HRESULT zoom([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_WORDWRAP), displaybind, bindable]
+    HRESULT wordWrap([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_WORDWRAP), displaybind, bindable]
+    HRESULT wordWrap([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_TEXTUNDERLINEPOSITION), displaybind, bindable]
+    HRESULT textUnderlinePosition([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_TEXTUNDERLINEPOSITION), displaybind, bindable]
+    HRESULT textUnderlinePosition([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARBASECOLOR), displaybind, bindable]
+    HRESULT scrollbarBaseColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARBASECOLOR), displaybind, bindable]
+    HRESULT scrollbarBaseColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARFACECOLOR), displaybind, bindable]
+    HRESULT scrollbarFaceColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARFACECOLOR), displaybind, bindable]
+    HRESULT scrollbarFaceColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBAR3DLIGHTCOLOR), displaybind, bindable]
+    HRESULT scrollbar3dLightColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBAR3DLIGHTCOLOR), displaybind, bindable]
+    HRESULT scrollbar3dLightColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARSHADOWCOLOR), displaybind, bindable]
+    HRESULT scrollbarShadowColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARSHADOWCOLOR), displaybind, bindable]
+    HRESULT scrollbarShadowColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARHIGHLIGHTCOLOR), displaybind, bindable]
+    HRESULT scrollbarHighlightColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARHIGHLIGHTCOLOR), displaybind, bindable]
+    HRESULT scrollbarHighlightColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARDARKSHADOWCOLOR), displaybind, bindable]
+    HRESULT scrollbarDarkShadowColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARDARKSHADOWCOLOR), displaybind, bindable]
+    HRESULT scrollbarDarkShadowColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARARROWCOLOR), displaybind, bindable]
+    HRESULT scrollbarArrowColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARARROWCOLOR), displaybind, bindable]
+    HRESULT scrollbarArrowColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARTRACKCOLOR), displaybind, bindable]
+    HRESULT scrollbarTrackColor([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARTRACKCOLOR), displaybind, bindable]
+    HRESULT scrollbarTrackColor([retval, out] VARIANT * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_WRITINGMODE), displaybind, bindable]
+    HRESULT writingMode([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_WRITINGMODE), displaybind, bindable]
+    HRESULT writingMode([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_TEXTALIGNLAST), displaybind, bindable]
+    HRESULT textAlignLast([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_TEXTALIGNLAST), displaybind, bindable]
+    HRESULT textAlignLast([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLSTYLE3_TEXTKASHIDASPACE), displaybind, bindable]
+    HRESULT textKashidaSpace([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE3_TEXTKASHIDASPACE), displaybind, bindable]
+    HRESULT textKashidaSpace([retval, out] VARIANT * p);
+}
+
+/*****************************************************************************
+ *    IHTMLSytyle4 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f816-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLStyle4 : IDispatch
+{
+    [propput, id(DISPID_IHTMLSTYLE4_TEXTOVERFLOW), displaybind, bindable]
+    HRESULT textOverflow([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLE4_TEXTOVERFLOW), displaybind, bindable]
+    HRESULT textOverflow([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLSTYLE4_MINHEIGHT), displaybind, bindable]
+    HRESULT minHeight([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLSTYLE4_MINHEIGHT), displaybind, bindable]
+    HRESULT minHeight([retval, out] VARIANT * p);
+}
+
+[
+    noncreatable,
+    uuid(3050f285-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLStyle
+{
+    [default] dispinterface DispHTMLStyle;
+    interface IHTMLStyle;
+    interface IHTMLStyle2;
+    interface IHTMLStyle3;
+    interface IHTMLStyle4;
+    /* interface IHTMLStyle5; */
 }
 
@@ -2294,8 +2444,8 @@
 
     [propput, id(DISPID_IHTMLRENDERSTYLE_RENDERINGPRIORITY), displaybind, bindable]
-    HRESULT renderingPriority([in] long v);
+    HRESULT renderingPriority([in] LONG v);
 
     [propget, id(DISPID_IHTMLRENDERSTYLE_RENDERINGPRIORITY), displaybind, bindable]
-    HRESULT renderingPriority([retval, out] long *p);
+    HRESULT renderingPriority([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLRENDERSTYLE_DEFAULTTEXTSELECTION), displaybind, bindable]
@@ -2601,4 +2751,118 @@
 
 /*****************************************************************************
+ *    IHTMLCurrentStyle2 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f658-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLCurrentStyle2 : IDispatch
+{
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_LAYOUTFLOW), displaybind, bindable]
+    HRESULT layoutFlow([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_WORDWRAP), displaybind, bindable]
+    HRESULT wordWrap([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_TEXTUNDERLINEPOSITION), displaybind, bindable]
+    HRESULT textUnderlinePosition([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_HASLAYOUT), displaybind, bindable]
+    HRESULT hasLayout([retval, out] VARIANT_BOOL * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBARBASECOLOR), displaybind, bindable]
+    HRESULT scrollbarBaseColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBARFACECOLOR), displaybind, bindable]
+    HRESULT scrollbarFaceColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBAR3DLIGHTCOLOR), displaybind, bindable]
+    HRESULT scrollbar3dLightColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBARSHADOWCOLOR), displaybind, bindable]
+    HRESULT scrollbarShadowColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBARHIGHLIGHTCOLOR), displaybind, bindable]
+    HRESULT scrollbarHighlightColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBARDARKSHADOWCOLOR), displaybind, bindable]
+    HRESULT scrollbarDarkShadowColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBARARROWCOLOR), displaybind, bindable]
+    HRESULT scrollbarArrowColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_SCROLLBARTRACKCOLOR), displaybind, bindable]
+    HRESULT scrollbarTrackColor([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_WRITINGMODE), displaybind, bindable]
+    HRESULT writingMode([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_ZOOM), displaybind, bindable]
+    HRESULT zoom([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_FILTER), displaybind, bindable]
+    HRESULT filter([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_TEXTALIGNLAST), displaybind, bindable]
+    HRESULT textAlignLast([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_TEXTKASHIDASPACE), displaybind, bindable]
+    HRESULT textKashidaSpace([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE2_ISBLOCK), displaybind, bindable, hidden, restricted, nonbrowsable]
+    HRESULT isBlock([retval, out] VARIANT_BOOL * p);
+}
+
+/*****************************************************************************
+ *    IHTMLCurrentStyle3 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f818-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLCurrentStyle3 : IDispatch
+{
+    [propget, id(DISPID_IHTMLCURRENTSTYLE3_TEXTOVERFLOW), displaybind, bindable]
+    HRESULT textOverflow([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE3_MINHEIGHT), displaybind, bindable]
+    HRESULT minHeight([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE3_WORDSPACING), displaybind, bindable]
+    HRESULT wordSpacing([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE3_WHITESPACE), displaybind, bindable]
+    HRESULT whiteSpace([retval, out] BSTR * p);
+}
+
+/*****************************************************************************
+ *    IHTMLCurrentStyle4 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f33b-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLCurrentStyle4 : IDispatch
+{
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MSINTERPOLATIONMODE), displaybind, bindable]
+    HRESULT msInterpolationMode([retval, out] BSTR * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MAXHEIGHT), displaybind, bindable]
+    HRESULT maxHeight([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MINWIDTH), displaybind, bindable]
+    HRESULT minWidth([retval, out] VARIANT * p);
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MAXWIDTH), displaybind, bindable]
+    HRESULT maxWidth([retval, out] VARIANT * p);
+};
+
+/*****************************************************************************
  *    DispHTMLCurrentStyle dispinterface
  */
@@ -2951,4 +3215,29 @@
     [propget, id(DISPID_IHTMLCURRENTSTYLE3_WHITESPACE), displaybind, bindable]
     BSTR whiteSpace();
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MSINTERPOLATIONMODE), displaybind, bindable]
+    BSTR msInterpolationMode();
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MAXHEIGHT), displaybind, bindable]
+    VARIANT maxHeight();
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MINWIDTH), displaybind, bindable]
+    VARIANT minWidth();
+
+    [propget, id(DISPID_IHTMLCURRENTSTYLE4_MAXWIDTH), displaybind, bindable]
+    VARIANT maxWidth();
+}
+
+[
+    noncreatable,
+    uuid(3050f3dc-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLCurrentStyle
+{
+    [default] dispinterface DispHTMLCurrentStyle;
+    interface IHTMLCurrentStyle;
+    interface IHTMLCurrentStyle2;
+    interface IHTMLCurrentStyle3;
+    interface IHTMLCurrentStyle4;
 }
 
@@ -2965,26 +3254,26 @@
 {
     [propput, id(DISPID_IHTMLRECT_LEFT)]
-    HRESULT left([in] long v);
+    HRESULT left([in] LONG v);
 
     [propget, id(DISPID_IHTMLRECT_LEFT)]
-    HRESULT left([retval, out] long *p);
+    HRESULT left([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLRECT_TOP)]
-    HRESULT top([in] long v);
+    HRESULT top([in] LONG v);
 
     [propget, id(DISPID_IHTMLRECT_TOP)]
-    HRESULT top([retval, out] long *p);
+    HRESULT top([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLRECT_RIGHT)]
-    HRESULT right([in] long v);
+    HRESULT right([in] LONG v);
 
     [propget, id(DISPID_IHTMLRECT_RIGHT)]
-    HRESULT right([retval, out] long *p);
+    HRESULT right([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLRECT_BOTTOM)]
-    HRESULT bottom([in] long v);
+    HRESULT bottom([in] LONG v);
 
     [propget, id(DISPID_IHTMLRECT_BOTTOM)]
-    HRESULT bottom([retval, out] long *p);
+    HRESULT bottom([retval, out] LONG *p);
 }
 
@@ -3001,5 +3290,5 @@
 {
     [propget, id(DISPID_IHTMLRECTCOLLECTION_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLRECTCOLLECTION__NEWENUM), hidden, restricted]
@@ -3024,5 +3313,5 @@
 {
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    HRESULT nodeType([retval, out] long *p);
+    HRESULT nodeType([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -3162,10 +3451,50 @@
 
     [propget, id(DISPID_IHTMLDOMTEXTNODE_LENGTH)]
-    HRESULT length([out, retval] long *p);
+    HRESULT length([out, retval] LONG *p);
 
     [id(DISPID_IHTMLDOMTEXTNODE_SPLITTEXT)]
     HRESULT splitText(
-            [in] long offset,
+            [in] LONG offset,
             [out, retval] IHTMLDOMNode **pRetNode);
+}
+
+/*****************************************************************************
+ *    IHTMLDOMTextNode2 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f809-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLDOMTextNode2 : IDispatch
+{
+    [id(DISPID_IHTMLDOMTEXTNODE2_SUBSTRINGDATA)]
+    HRESULT substringData([in] LONG offset,[in] LONG Count,[retval, out] BSTR* pbstrsubString);
+
+    [id(DISPID_IHTMLDOMTEXTNODE2_APPENDDATA)]
+    HRESULT appendData([in] BSTR bstrstring);
+
+    [id(DISPID_IHTMLDOMTEXTNODE2_INSERTDATA)]
+    HRESULT insertData([in] LONG offset,[in] BSTR bstrstring);
+
+    [id(DISPID_IHTMLDOMTEXTNODE2_DELETEDATA)]
+    HRESULT deleteData([in] LONG offset,[in] LONG Count);
+
+    [id(DISPID_IHTMLDOMTEXTNODE2_REPLACEDATA)]
+    HRESULT replaceData([in] LONG offset,[in] LONG Count,[in] BSTR bstrstring);
+}
+
+[
+    noncreatable,
+    uuid(3050f4ba-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLDOMTextNode
+{
+    [default]           dispinterface DispHTMLDOMTextNode;
+                        interface IHTMLDOMTextNode;
+                        interface IHTMLDOMTextNode2;
+                        interface IHTMLDOMNode;
+                        interface IHTMLDOMNode2;
 }
 
@@ -3209,13 +3538,13 @@
 
     [propget, id(DISPID_IHTMLDOMTEXTNODE_LENGTH)]
-    long length();
+    LONG length();
 
     [id(DISPID_IHTMLDOMTEXTNODE_SPLITTEXT)]
-    IHTMLDOMNode *splitText([in] long offset);
+    IHTMLDOMNode *splitText([in] LONG offset);
 
     [id(DISPID_IHTMLDOMTEXTNODE2_SUBSTRINGDATA)]
     BSTR substringData(
-            [in] long offset,
-            [in] long Count);
+            [in] LONG offset,
+            [in] LONG Count);
 
     [id(DISPID_IHTMLDOMTEXTNODE2_APPENDDATA)]
@@ -3224,20 +3553,20 @@
     [id(DISPID_IHTMLDOMTEXTNODE2_INSERTDATA)]
     void insertData(
-            [in] long offset,
+            [in] LONG offset,
             [in] BSTR bstrstring);
 
     [id(DISPID_IHTMLDOMTEXTNODE2_DELETEDATA)]
     void deleteData(
-            [in] long offset,
-            [in] long Count);
+            [in] LONG offset,
+            [in] LONG Count);
 
     [id(DISPID_IHTMLDOMTEXTNODE2_REPLACEDATA)]
     void replaceData(
-            [in] long offset,
-            [in] long Count,
+            [in] LONG offset,
+            [in] LONG Count,
             [in] BSTR bstrstring);
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -3318,5 +3647,5 @@
 {
     [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION_LENGTH)]
-    HRESULT length([out, retval] long *p);
+    HRESULT length([out, retval] LONG *p);
 
     [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION__NEWENUM), hidden, restricted]
@@ -3325,5 +3654,5 @@
     [id(DISPID_IHTMLDOMCHILDRENCOLLECTION_ITEM)]
     HRESULT item(
-            [in] long index,
+            [in] LONG index,
             [out, retval] IDispatch **ppItem);
 }
@@ -3341,5 +3670,5 @@
 methods:
     [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION_LENGTH)]
-    long length();
+    LONG length();
 
     [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION__NEWENUM), hidden, restricted]
@@ -3347,5 +3676,5 @@
 
     [id(DISPID_IHTMLDOMCHILDRENCOLLECTION_ITEM)]
-    IDispatch *item([in] long index);
+    IDispatch *item([in] LONG index);
 }
 
@@ -3498,5 +3827,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX)]
-    HRESULT sourceIndex([retval, out] long *p);
+    HRESULT sourceIndex([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -3510,14 +3839,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    HRESULT offsetLeft([retval, out] long *p);
+    HRESULT offsetLeft([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    HRESULT offsetTop([retval, out] long *p);
+    HRESULT offsetTop([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    HRESULT offsetWidth([retval, out] long *p);
+    HRESULT offsetWidth([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    HRESULT offsetHeight([retval, out] long *p);
+    HRESULT offsetHeight([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -3664,6 +3993,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     HRESULT componentFromPoint(
-        [in] long x,
-        [in] long y,
+        [in] LONG x,
+        [in] LONG y,
         [retval, out] BSTR *component);
 
@@ -3823,14 +4152,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    HRESULT clientHeight([retval, out] long *p);
+    HRESULT clientHeight([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    HRESULT clientWidth([retval, out] long *p);
+    HRESULT clientWidth([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    HRESULT clientTop([retval, out] long *p);
+    HRESULT clientTop([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    HRESULT clientLeft([retval, out] long *p);
+    HRESULT clientLeft([retval, out] LONG *p);
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -3882,20 +4211,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    HRESULT scrollHeight([retval, out] long *p);
+    HRESULT scrollHeight([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    HRESULT scrollWidth([retval, out] long *p);
+    HRESULT scrollWidth([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    HRESULT scrollTop([in] long v);
+    HRESULT scrollTop([in] LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    HRESULT scrollTop([retval, out] long *p);
+    HRESULT scrollTop([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    HRESULT scrollLeft([in] long v);
+    HRESULT scrollLeft([in] LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    HRESULT scrollLeft([retval, out] long *p);
+    HRESULT scrollLeft([retval, out] LONG *p);
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -3941,9 +4270,9 @@
         [in] BSTR bstrUrl,
         [optional, in] VARIANT *pvarFactory,
-        [retval, out] long *pCookie);
+        [retval, out] LONG *pCookie);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
     HRESULT removeBehavior(
-        [in] long cookie,
+        [in] LONG cookie,
         [retval, out] VARIANT_BOOL *pfResult);
 
@@ -3967,5 +4296,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    HRESULT readyStateValue([retval, out] long *p);
+    HRESULT readyStateValue([retval, out] LONG *p);
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -4334,5 +4663,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -4346,14 +4675,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -4492,6 +4821,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -4646,14 +4975,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -4704,20 +5033,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -4752,10 +5081,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -4778,5 +5107,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -4953,5 +5282,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -4959,5 +5288,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -5070,10 +5399,42 @@
 {
     [propget, id(DISPID_IHTMLSTYLESHEETRULESCOLLECTION_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [id(DISPID_IHTMLSTYLESHEETRULESCOLLECTION_ITEM)]
     HRESULT item(
-        [in] long index,
+        [in] LONG index,
         [retval, out] IHTMLStyleSheetRule **ppHTMLStyleSheetRule);
+}
+
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f7ee-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLStyleSheetPage : IDispatch
+{
+    [propget, id(DISPID_IHTMLSTYLESHEETPAGE_SELECTOR)]
+    HRESULT selector([retval, out] BSTR *p);
+
+    [propget, id(DISPID_IHTMLSTYLESHEETPAGE_PSEUDOCLASS)]
+    HRESULT pseudoClass([retval, out] BSTR *p);
+}
+
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f7f0-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLStyleSheetPagesCollection : IDispatch
+{
+    [propget, id(DISPID_IHTMLSTYLESHEETPAGESCOLLECTION_LENGTH)]
+    HRESULT length([retval, out] LONG *p);
+
+    [id(DISPID_IHTMLSTYLESHEETPAGESCOLLECTION_ITEM)]
+    HRESULT item(
+        [in] LONG index,
+        [retval, out] IHTMLStyleSheetPage **ppHTMLStyleSheetPage);
 }
 
@@ -5128,6 +5489,6 @@
     HRESULT addImport(
         [in] BSTR bstrURL,
-        [defaultvalue(-1), in] long lIndex,
-        [retval, out] long *plIndex);
+        [defaultvalue(-1), in] LONG lIndex,
+        [retval, out] LONG *plIndex);
 
     [id(DISPID_IHTMLSTYLESHEET_ADDRULE)]
@@ -5135,12 +5496,12 @@
         [in] BSTR bstrSelector,
         [in] BSTR bstrStyle,
-        [defaultvalue(-1), in] long lIndex,
-        [retval, out] long *plNewIndex);
+        [defaultvalue(-1), in] LONG lIndex,
+        [retval, out] LONG *plNewIndex);
 
     [id(DISPID_IHTMLSTYLESHEET_REMOVEIMPORT)]
-    HRESULT removeImport([in] long lIndex);
+    HRESULT removeImport([in] LONG lIndex);
 
     [id(DISPID_IHTMLSTYLESHEET_REMOVERULE)]
-    HRESULT removeRule([in] long lIndex);
+    HRESULT removeRule([in] LONG lIndex);
 
     [propput, id(DISPID_IHTMLSTYLESHEET_MEDIA)]
@@ -5158,4 +5519,123 @@
     [propget, id(DISPID_IHTMLSTYLESHEET_RULES)]
     HRESULT rules([retval, out] IHTMLStyleSheetRulesCollection **p);
+}
+
+/*****************************************************************************
+ *    IHTMLStyleSheet2 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f3d1-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLStyleSheet2 : IDispatch
+{
+    [propget, id(DISPID_IHTMLSTYLESHEET2_PAGES)]
+    HRESULT pages([retval, out] IHTMLStyleSheetPagesCollection **p);
+
+    [id(DISPID_IHTMLSTYLESHEET2_ADDPAGERULE)]
+    HRESULT addPageRule(
+        [in] BSTR bstrSelector,
+        [in] BSTR bstrStyle,
+        [defaultvalue(-1), in] LONG lIndex,
+        [retval, out] LONG *plNewIndex);
+}
+
+[
+    hidden,
+    uuid(3050f58d-98b5-11cf-bb82-00aa00bdce0b)
+]
+dispinterface DispHTMLStyleSheet
+{
+properties:
+methods:
+    [propput, id(DISPID_IHTMLSTYLESHEET_TITLE)]
+    void title(BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_TITLE)]
+    BSTR title();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_PARENTSTYLESHEET)]
+    IHTMLStyleSheet* parentStyleSheet();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_OWNINGELEMENT)]
+    IHTMLElement* owningElement();
+
+    [propput, id(DISPID_IHTMLSTYLESHEET_DISABLED)]
+    void disabled(VARIANT_BOOL v);
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_DISABLED)]
+    VARIANT_BOOL disabled();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_READONLY)]
+    VARIANT_BOOL readOnly();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_IMPORTS)]
+    IHTMLStyleSheetsCollection* imports();
+
+    [propput, id(DISPID_IHTMLSTYLESHEET_HREF)]
+    void href(BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_HREF)]
+    BSTR href();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_TYPE)]
+    BSTR type();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_ID)]
+    BSTR id();
+
+    [id(DISPID_IHTMLSTYLESHEET_ADDIMPORT)]
+    LONG addImport(
+        [in] BSTR bstrURL,
+        [defaultvalue(-1), in] LONG lIndex);
+
+    [id(DISPID_IHTMLSTYLESHEET_ADDRULE)]
+    LONG addRule(
+        [in] BSTR bstrSelector,
+        [in] BSTR bstrStyle,
+        [defaultvalue(-1), in] LONG lIndex);
+
+    [id(DISPID_IHTMLSTYLESHEET_REMOVEIMPORT)]
+    void removeImport([in] LONG lIndex);
+
+    [id(DISPID_IHTMLSTYLESHEET_REMOVERULE)]
+    void removeRule([in] LONG lIndex);
+
+    [propput, id(DISPID_IHTMLSTYLESHEET_MEDIA)]
+    void media(BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_MEDIA)]
+    BSTR media();
+
+    [propput, id(DISPID_IHTMLSTYLESHEET_CSSTEXT)]
+    void cssText(BSTR v);
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_CSSTEXT)]
+    BSTR cssText();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET_RULES)]
+    IHTMLStyleSheetRulesCollection* rules();
+
+    [propget, id(DISPID_IHTMLSTYLESHEET2_PAGES)]
+    IHTMLStyleSheetPagesCollection* pages();
+
+    [id(DISPID_IHTMLSTYLESHEET2_ADDPAGERULE)]
+    LONG addPageRule(
+        [in] BSTR bstrSelector,
+        [in] BSTR bstrStyle,
+        [defaultvalue(-1), in] LONG lIndex);
+}
+
+[
+    noncreatable,
+    uuid(3050f2e4-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLStyleSheet
+{
+    [default]           dispinterface DispHTMLStyleSheet;
+                        interface IHTMLStyleSheet;
+                        interface IHTMLStyleSheet2;
 }
 
@@ -5172,5 +5652,5 @@
 {
     [propget, id(DISPID_IHTMLSTYLESHEETSCOLLECTION_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSTYLESHEETSCOLLECTION__NEWENUM)]
@@ -5233,18 +5713,18 @@
     HRESULT move(
         [in] BSTR Unit,
-        [defaultvalue(1), in] long Count,
-        [retval, out] long *ActualCount);
+        [defaultvalue(1), in] LONG Count,
+        [retval, out] LONG *ActualCount);
 
     [id(DISPID_IHTMLTXTRANGE_MOVESTART)]
     HRESULT moveStart(
         [in] BSTR Unit,
-        [defaultvalue(1), in] long Count,
-        [retval, out] long *ActualCount);
+        [defaultvalue(1), in] LONG Count,
+        [retval, out] LONG *ActualCount);
 
     [id(DISPID_IHTMLTXTRANGE_MOVEEND)]
     HRESULT moveEnd(
         [in] BSTR Unit,
-        [defaultvalue(1), in] long Count,
-        [retval, out] long *ActualCount);
+        [defaultvalue(1), in] LONG Count,
+        [retval, out] LONG *ActualCount);
 
     [id(DISPID_IHTMLTXTRANGE_SELECT)]
@@ -5266,17 +5746,17 @@
         [in] BSTR how,
         [in] IHTMLTxtRange *SourceRange,
-        [retval, out] long *ret);
+        [retval, out] LONG *ret);
 
     [id(DISPID_IHTMLTXTRANGE_FINDTEXT)]
     HRESULT findText(
         [in] BSTR String,
-        [defaultvalue(1073741823), in] long count,
-        [defaultvalue(0), in] long Flags,
+        [defaultvalue(1073741823), in] LONG count,
+        [defaultvalue(0), in] LONG Flags,
         [retval, out] VARIANT_BOOL *Success);
 
     [id(DISPID_IHTMLTXTRANGE_MOVETOPOINT)]
     HRESULT moveToPoint(
-        [in] long x,
-        [in] long y);
+        [in] LONG x,
+        [in] LONG y);
 
     [id(DISPID_IHTMLTXTRANGE_GETBOOKMARK)]
@@ -5329,4 +5809,13 @@
         [in] BSTR cmdID,
         [retval, out] VARIANT_BOOL *pfRet);
+}
+
+[
+    noncreatable,
+    uuid(3050f37f-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLStyleSheetsCollection
+{
+    [default]           interface IHTMLStyleSheetsCollection;
 }
 
@@ -5400,8 +5889,8 @@
 
     [propput, id(DISPID_IHTMLFORMELEMENT_LENGTH)]
-    HRESULT length([in] long v);
+    HRESULT length([in] LONG v);
 
     [propget, id(DISPID_IHTMLFORMELEMENT_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLFORMELEMENT__NEWENUM)]
@@ -5435,20 +5924,20 @@
 
     [propget, id(DISPID_IHTMLTEXTCONTAINER_SCROLLHEIGHT), displaybind, bindable]
-    HRESULT scrollHeight([retval, out] long *p);
+    HRESULT scrollHeight([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLTEXTCONTAINER_SCROLLWIDTH), displaybind, bindable]
-    HRESULT scrollWidth([retval, out] long *p);
+    HRESULT scrollWidth([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLTEXTCONTAINER_SCROLLTOP), displaybind, bindable]
-    HRESULT scrollTop([in] long v);
+    HRESULT scrollTop([in] LONG v);
 
     [propget, id(DISPID_IHTMLTEXTCONTAINER_SCROLLTOP), displaybind, bindable]
-    HRESULT scrollTop([retval, out] long *p);
+    HRESULT scrollTop([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLTEXTCONTAINER_SCROLLLEFT), displaybind, bindable]
-    HRESULT scrollLeft([in] long v);
+    HRESULT scrollLeft([in] LONG v);
 
     [propget, id(DISPID_IHTMLTEXTCONTAINER_SCROLLLEFT), displaybind, bindable]
-    HRESULT scrollLeft([retval, out] long *p);
+    HRESULT scrollLeft([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLTEXTCONTAINER_ONSCROLL), displaybind, bindable]
@@ -5513,14 +6002,14 @@
 
     [propput, id(DISPID_IHTMLIMGELEMENT_VSPACE)]
-    HRESULT vspace([in] long v);
+    HRESULT vspace([in] LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_VSPACE)]
-    HRESULT vspace([retval, out] long *p);
+    HRESULT vspace([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLIMGELEMENT_HSPACE)]
-    HRESULT hspace([in] long v);
+    HRESULT hspace([in] LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_HSPACE)]
-    HRESULT hspace([retval, out] long *p);
+    HRESULT hspace([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLIMGELEMENT_ALT)]
@@ -5597,14 +6086,14 @@
 
     [propput, id(DISPID_IHTMLIMGELEMENT_WIDTH)]
-    HRESULT width([in] long v);
+    HRESULT width([in] LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_WIDTH)]
-    HRESULT width([retval, out] long *p);
+    HRESULT width([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLIMGELEMENT_HEIGHT)]
-    HRESULT height([in] long v);
+    HRESULT height([in] LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_HEIGHT)]
-    HRESULT height([retval, out] long *p);
+    HRESULT height([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLIMGELEMENT_START)]
@@ -5775,5 +6264,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -5787,14 +6276,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -5933,6 +6422,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -6087,14 +6576,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -6145,20 +6634,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -6193,10 +6682,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -6219,5 +6708,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -6394,5 +6883,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -6400,5 +6889,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -6527,14 +7016,14 @@
 
     [propput, id(DISPID_IHTMLIMGELEMENT_VSPACE), displaybind, bindable]
-    void vspace(long v);
+    void vspace(LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_VSPACE), displaybind, bindable]
-    long vspace();
+    LONG vspace();
 
     [propput, id(DISPID_IHTMLIMGELEMENT_HSPACE), displaybind, bindable]
-    void hspace(long v);
+    void hspace(LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_HSPACE), displaybind, bindable]
-    long hspace();
+    LONG hspace();
 
     [propput, id(DISPID_IHTMLIMGELEMENT_ALT), displaybind, bindable]
@@ -6608,14 +7097,14 @@
 
     [propput, id(DISPID_IHTMLIMGELEMENT_WIDTH)]
-    void width(long v);
+    void width(LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_WIDTH)]
-    long width();
+    LONG width();
 
     [propput, id(DISPID_IHTMLIMGELEMENT_HEIGHT)]
-    void height(long v);
+    void height(LONG v);
 
     [propget, id(DISPID_IHTMLIMGELEMENT_HEIGHT)]
-    long height();
+    LONG height();
 
     [propput, id(DISPID_IHTMLIMGELEMENT_START), displaybind, bindable]
@@ -6644,8 +7133,35 @@
 {
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    HRESULT uniqueNumber([retval, out] long * p);
+    HRESULT uniqueNumber([retval, out] LONG * p);
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
     HRESULT uniqueID([retval, out] BSTR * p);
+};
+
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f3f2-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLDatabinding : IDispatch
+{
+    [propput, id(DISPID_IHTMLDATABINDING_DATAFLD)]
+    HRESULT dataFld([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLDATABINDING_DATAFLD)]
+    HRESULT dataFld([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLDATABINDING_DATASRC)]
+    HRESULT dataSrc([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLDATABINDING_DATASRC)]
+    HRESULT dataSrc([retval, out] BSTR * p);
+
+    [propput, id(DISPID_IHTMLDATABINDING_DATAFORMATAS)]
+    HRESULT dataFormatAs([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLDATABINDING_DATAFORMATAS)]
+    HRESULT dataFormatAs([retval, out] BSTR * p);
 };
 
@@ -6704,14 +7220,14 @@
 
     [propget, id(DISPID_IHTMLCONTROLELEMENT_CLIENTHEIGHT), displaybind, bindable]
-    HRESULT clientHeight([retval, out] long * p);
+    HRESULT clientHeight([retval, out] LONG * p);
 
     [propget, id(DISPID_IHTMLCONTROLELEMENT_CLIENTWIDTH), displaybind, bindable]
-    HRESULT clientWidth([retval, out] long * p);
+    HRESULT clientWidth([retval, out] LONG * p);
 
     [propget, id(DISPID_IHTMLCONTROLELEMENT_CLIENTTOP), displaybind, bindable]
-    HRESULT clientTop([retval, out] long * p);
+    HRESULT clientTop([retval, out] LONG * p);
 
     [propget, id(DISPID_IHTMLCONTROLELEMENT_CLIENTLEFT), displaybind, bindable]
-    HRESULT clientLeft([retval, out] long * p);
+    HRESULT clientLeft([retval, out] LONG * p);
 };
 
@@ -6995,5 +7511,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -7007,14 +7523,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -7151,5 +7667,5 @@
 
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
-    BSTR componentFromPoint([in] long x,[in] long y);
+    BSTR componentFromPoint([in] LONG x,[in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -7304,14 +7820,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -7361,20 +7877,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -7405,8 +7921,8 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior([in] BSTR bstrUrl,[optional, in] VARIANT* pvarFactory);
+    LONG addBehavior([in] BSTR bstrUrl,[optional, in] VARIANT* pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -7429,5 +7945,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -7602,5 +8118,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -7608,5 +8124,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -7963,8 +8479,8 @@
 
     [propput, id(DISPID_IHTMLELEMENTCOLLECTION_LENGTH)]
-    HRESULT length([in] long v);
+    HRESULT length([in] LONG v);
 
     [propget, id(DISPID_IHTMLELEMENTCOLLECTION_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLELEMENTCOLLECTION__NEWENUM)]
@@ -7998,8 +8514,8 @@
 
     [propput, id(DISPID_IHTMLELEMENTCOLLECTION_LENGTH)]
-    void length(long v);
+    void length(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENTCOLLECTION_LENGTH)]
-    long length();
+    LONG length();
 
     [propget, id(DISPID_IHTMLELEMENTCOLLECTION__NEWENUM), hidden, restricted]
@@ -8034,8 +8550,8 @@
 {
     [propput, id(DISPID_IHTMLSELECTELEMENT_SIZE), displaybind, bindable]
-    HRESULT size([in] long v);
+    HRESULT size([in] LONG v);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_SIZE), displaybind, bindable]
-    HRESULT size([retval, out] long *p);
+    HRESULT size([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLSELECTELEMENT_MULTIPLE), displaybind, bindable]
@@ -8061,8 +8577,8 @@
 
     [propput, id(DISPID_IHTMLSELECTELEMENT_SELECTEDINDEX)]
-    HRESULT selectedIndex([in] long v);
+    HRESULT selectedIndex([in] LONG v);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_SELECTEDINDEX)]
-    HRESULT selectedIndex([retval, out] long *p);
+    HRESULT selectedIndex([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_TYPE), displaybind, bindable]
@@ -8090,11 +8606,11 @@
 
     [id(DISPID_IHTMLSELECTELEMENT_REMOVE)]
-    HRESULT remove([defaultvalue(-1), in] long index);
+    HRESULT remove([defaultvalue(-1), in] LONG index);
 
     [propput, id(DISPID_IHTMLSELECTELEMENT_LENGTH)]
-    HRESULT length([in] long v);
+    HRESULT length([in] LONG v);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT__NEWENUM), hidden, restricted]
@@ -8255,5 +8771,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -8267,14 +8783,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -8413,6 +8929,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -8567,14 +9083,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -8625,20 +9141,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -8673,10 +9189,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -8699,5 +9215,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -8874,5 +9390,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -8880,5 +9396,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -8965,8 +9481,8 @@
 
     [propput, id(DISPID_IHTMLSELECTELEMENT_SIZE), displaybind, bindable]
-    void size(long v);
+    void size(LONG v);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_SIZE), displaybind, bindable]
-    long size();
+    LONG size();
 
     [propput, id(DISPID_IHTMLSELECTELEMENT_MULTIPLE), displaybind, bindable]
@@ -8992,8 +9508,8 @@
 
     [propput, id(DISPID_IHTMLSELECTELEMENT_SELECTEDINDEX)]
-    void selectedIndex(long v);
+    void selectedIndex(LONG v);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_SELECTEDINDEX)]
-    long selectedIndex();
+    LONG selectedIndex();
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_TYPE), displaybind, bindable]
@@ -9015,11 +9531,11 @@
 
     [id(DISPID_IHTMLSELECTELEMENT_REMOVE)]
-    void remove([in, defaultvalue(-1)] long index);
+    void remove([in, defaultvalue(-1)] LONG index);
 
     [propput, id(DISPID_IHTMLSELECTELEMENT_LENGTH)]
-    void length(long v);
+    void length(LONG v);
 
     [propget, id(DISPID_IHTMLSELECTELEMENT_LENGTH)]
-    long length();
+    LONG length();
 
     [propget, id(DISPID_IHTMLSELECTELEMENT__NEWENUM), hidden, restricted]
@@ -9272,5 +9788,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -9284,14 +9800,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -9430,6 +9946,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -9584,14 +10100,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -9642,20 +10158,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -9690,10 +10206,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -9716,5 +10232,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -9891,5 +10407,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -9897,5 +10413,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -10066,14 +10582,14 @@
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_SIZE), displaybind, bindable]
-    HRESULT size([in] long v);
+    HRESULT size([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_SIZE), displaybind, bindable]
-    HRESULT size([retval, out] long *p);
+    HRESULT size([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_MAXLENGTH), displaybind, bindable]
-    HRESULT maxLength([in] long v);
+    HRESULT maxLength([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_MAXLENGTH), displaybind, bindable]
-    HRESULT maxLength([retval, out] long *p);
+    HRESULT maxLength([retval, out] LONG *p);
 
     [id(DISPID_IHTMLINPUTELEMENT_SELECT)]
@@ -10132,14 +10648,14 @@
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_VSPACE), displaybind, bindable]
-    HRESULT vspace([in] long v);
+    HRESULT vspace([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_VSPACE), displaybind, bindable]
-    HRESULT vspace([retval, out] long *p);
+    HRESULT vspace([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_HSPACE), displaybind, bindable]
-    HRESULT hspace([in] long v);
+    HRESULT hspace([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_HSPACE), displaybind, bindable]
-    HRESULT hspace([retval, out] long *p);
+    HRESULT hspace([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_ALT), displaybind, bindable]
@@ -10210,14 +10726,14 @@
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_WIDTH)]
-    HRESULT width([in] long v);
+    HRESULT width([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_WIDTH)]
-    HRESULT width([retval, out] long *p);
+    HRESULT width([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_HEIGHT)]
-    HRESULT height([in] long v);
+    HRESULT height([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_HEIGHT)]
-    HRESULT height([retval, out] long *p);
+    HRESULT height([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_START), displaybind, bindable]
@@ -10276,14 +10792,14 @@
 
     [propput, id(DISPID_IHTMLINPUTTEXTELEMENT_SIZE), displaybind, bindable]
-    HRESULT size([in] long v);
+    HRESULT size([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTTEXTELEMENT_SIZE), displaybind, bindable]
-    HRESULT size([retval, out] long *p);
+    HRESULT size([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLINPUTTEXTELEMENT_MAXLENGTH), displaybind, bindable]
-    HRESULT maxLength([in] long v);
+    HRESULT maxLength([in] LONG v);
 
     [propget, id(DISPID_IHTMLINPUTTEXTELEMENT_MAXLENGTH), displaybind, bindable]
-    HRESULT maxLength([retval, out] long *p);
+    HRESULT maxLength([retval, out] LONG *p);
 
     [id(DISPID_IHTMLINPUTTEXTELEMENT_SELECT)]
@@ -10451,5 +10967,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -10463,14 +10979,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -10609,6 +11125,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -10763,14 +11279,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -10821,20 +11337,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -10869,10 +11385,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -10895,5 +11411,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -11070,5 +11586,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -11076,5 +11592,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -11188,14 +11704,14 @@
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_SIZE), displaybind, bindable]
-    void size(long v);
+    void size(LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_SIZE), displaybind, bindable]
-    long size();
+    LONG size();
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_MAXLENGTH), displaybind, bindable]
-    void maxLength(long v);
+    void maxLength(LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_MAXLENGTH), displaybind, bindable]
-    long maxLength();
+    LONG maxLength();
 
     [id(DISPID_IHTMLINPUTELEMENT_SELECT)]
@@ -11254,14 +11770,14 @@
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_VSPACE), displaybind, bindable]
-    void vspace(long v);
+    void vspace(LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_VSPACE), displaybind, bindable]
-    long vspace();
+    LONG vspace();
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_HSPACE), displaybind, bindable]
-    void hspace(long v);
+    void hspace(LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_HSPACE), displaybind, bindable]
-    long hspace();
+    LONG hspace();
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_ALT), displaybind, bindable]
@@ -11329,14 +11845,14 @@
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_WIDTH)]
-    void width(long v);
+    void width(LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_WIDTH)]
-    long width();
+    LONG width();
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_HEIGHT)]
-    void height(long v);
+    void height(LONG v);
 
     [propget, id(DISPID_IHTMLINPUTELEMENT_HEIGHT)]
-    long height();
+    LONG height();
 
     [propput, id(DISPID_IHTMLINPUTELEMENT_START), displaybind, bindable]
@@ -11428,14 +11944,14 @@
 
     [propput, id(DISPID_IHTMLTEXTAREAELEMENT_ROWS), displaybind, bindable]
-    HRESULT rows([in] long v);
+    HRESULT rows([in] LONG v);
 
     [propget, id(DISPID_IHTMLTEXTAREAELEMENT_ROWS), displaybind, bindable]
-    HRESULT rows([retval, out] long *p);
+    HRESULT rows([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLTEXTAREAELEMENT_COLS), displaybind, bindable]
-    HRESULT cols([in] long v);
+    HRESULT cols([in] LONG v);
 
     [propget, id(DISPID_IHTMLTEXTAREAELEMENT_COLS), displaybind, bindable]
-    HRESULT cols([retval, out] long *p);
+    HRESULT cols([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLTEXTAREAELEMENT_WRAP), displaybind, bindable]
@@ -11591,5 +12107,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -11603,14 +12119,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -11749,6 +12265,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -11903,14 +12419,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -11961,20 +12477,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -12009,10 +12525,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -12035,5 +12551,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -12210,5 +12726,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -12216,5 +12732,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -12307,4 +12823,13 @@
 }
 
+[
+    noncreatable,
+    uuid(FECEAAA3-8405-11cf-8BA1-00AA00476DA6)
+]
+coclass HTMLHistory
+{
+    [default]           interface IOmHistory;
+}
+
 /*****************************************************************************
  *    IHTMLMimeTypesCollection interface
@@ -12319,5 +12844,14 @@
 {
     [propget, id(DISPID_IHTMLMIMETYPESCOLLECTION_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
+}
+
+[
+    noncreatable,
+    uuid(3050f3fe-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass CMimeTypes
+{
+    [default]           interface IHTMLMimeTypesCollection;
 }
 
@@ -12334,8 +12868,17 @@
 {
     [propget, id(DISPID_IHTMLPLUGINSCOLLECTION_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 
     [id(DISPID_IHTMLPLUGINSCOLLECTION_REFRESH)]
     HRESULT refresh([defaultvalue(0), in] VARIANT_BOOL reload);
+}
+
+[
+    noncreatable,
+    uuid(3050f3ff-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass CPlugins
+{
+    [default]           interface IHTMLPluginsCollection;
 }
 
@@ -12403,4 +12946,13 @@
 }
 
+[
+    noncreatable,
+    uuid(3050f402-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass COpsProfile
+{
+    [default]           interface IHTMLOpsProfile;
+}
+
 /*****************************************************************************
  *    IOmNavigator interface
@@ -12466,5 +13018,5 @@
 
     [propget, id(DISPID_IOMNAVIGATOR_CONNECTIONSPEED)]
-    HRESULT connectionSpeed([retval, out] long *p);
+    HRESULT connectionSpeed([retval, out] LONG *p);
 
     [propget, id(DISPID_IOMNAVIGATOR_ONLINE)]
@@ -12473,4 +13025,13 @@
     [propget, id(DISPID_IOMNAVIGATOR_USERPROFILE)]
     HRESULT userProfile([retval, out] IHTMLOpsProfile **p);
+}
+
+[
+    noncreatable,
+    uuid(FECEAAA6-8405-11cf-8BA1-00AA00476DA6)
+]
+coclass HTMLNavigator
+{
+    [default]           interface IOmNavigator;
 }
 
@@ -12548,4 +13109,13 @@
 
 [
+    noncreatable,
+    uuid(163BB1E1-6E00-11cf-837A-48DC04C10000)
+]
+coclass HTMLLocation
+{
+    [default]           interface IHTMLLocation;
+}
+
+[
     odl,
     oleautomation,
@@ -12556,5 +13126,5 @@
 {
     [propget, id(DISPID_IHTMLBOOKMARKCOLLECTION_LENGTH), hidden]
-    HRESULT length([out, retval] long *p);
+    HRESULT length([out, retval] LONG *p);
 
     [propget, id(DISPID_IHTMLBOOKMARKCOLLECTION__NEWENUM), hidden, restricted]
@@ -12563,5 +13133,5 @@
     [id(DISPID_IHTMLBOOKMARKCOLLECTION_ITEM)]
     HRESULT item(
-            [in] long index,
+            [in] LONG index,
             [out, retval] VARIANT *pVarBookmark);
 }
@@ -12649,11 +13219,11 @@
 
     [propput, id(DISPID_IHTMLEVENTOBJ_KEYCODE)]
-    HRESULT keyCode([in] long v);
+    HRESULT keyCode([in] LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_KEYCODE)]
-    HRESULT keyCode([retval, out] long *p);
+    HRESULT keyCode([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_BUTTON)]
-    HRESULT button([retval, out] long *p);
+    HRESULT button([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_TYPE)]
@@ -12664,29 +13234,29 @@
 
     [propget, id(DISPID_IHTMLEVENTOBJ_REASON)]
-    HRESULT reason([retval, out] long *p);
+    HRESULT reason([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_X)]
-    HRESULT x([retval, out] long *p);
+    HRESULT x([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_Y)]
-    HRESULT y([retval, out] long *p);
+    HRESULT y([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_CLIENTX)]
-    HRESULT clientX([retval, out] long *p);
+    HRESULT clientX([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_CLIENTY)]
-    HRESULT clientY([retval, out] long *p);
+    HRESULT clientY([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_OFFSETX)]
-    HRESULT offsetX([retval, out] long *p);
+    HRESULT offsetX([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_OFFSETY)]
-    HRESULT offsetY([retval, out] long *p);
+    HRESULT offsetY([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_SCREENX)]
-    HRESULT screenX([retval, out] long *p);
+    HRESULT screenX([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_SCREENY)]
-    HRESULT screenY([retval, out] long *p);
+    HRESULT screenY([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_SRCFILTER)]
@@ -12718,8 +13288,8 @@
 
     [propput, id(DISPID_IHTMLEVENTOBJ_KEYCODE)]
-    void keyCode(long v);
+    void keyCode(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ_KEYCODE)]
-    long keyCode();
+    LONG keyCode();
 
     [id(DISPID_IHTMLEVENTOBJ2_SETATTRIBUTE)]
@@ -12818,8 +13388,8 @@
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_BUTTON)]
-    void button(long v);
+    void button(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_BUTTON)]
-    long button();
+    LONG button();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_TYPE)]
@@ -12836,55 +13406,55 @@
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_REASON)]
-    void reason(long v);
+    void reason(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_REASON)]
-    long reason();
+    LONG reason();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_X)]
-    void x(long v);
+    void x(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_X)]
-    long x();
+    LONG x();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_Y)]
-    void y(long v);
+    void y(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_Y)]
-    long y();
+    LONG y();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_CLIENTX)]
-    void clientX(long v);
+    void clientX(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_CLIENTX)]
-    long clientX();
+    LONG clientX();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_CLIENTY)]
-    void clientY(long v);
+    void clientY(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_CLIENTY)]
-    long clientY();
+    LONG clientY();
     [propput, id(DISPID_IHTMLEVENTOBJ2_OFFSETX)]
-    void offsetX(long v);
+    void offsetX(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_OFFSETX)]
-    long offsetX();
+    LONG offsetX();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_OFFSETY)]
-    void offsetY(long v);
+    void offsetY(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_OFFSETY)]
-    long offsetY();
+    LONG offsetY();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_SCREENX)]
-    void screenX(long v);
+    void screenX(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_SCREENX)]
-    long screenX();
+    LONG screenX();
 
     [propput, id(DISPID_IHTMLEVENTOBJ2_SCREENY)]
-    void screenY(long v);
+    void screenY(LONG v);
 
     [propget, id(DISPID_IHTMLEVENTOBJ2_SCREENY)]
-    long screenY();
+    LONG screenY();
 
     [propputref, id(DISPID_IHTMLEVENTOBJ2_SRCFILTER)]
@@ -12937,8 +13507,8 @@
 
     [propget, id(DISPID_IHTMLEVENTOBJ3_BEHAVIORCOOKIE)]
-    long behaviorCookie();
+    LONG behaviorCookie();
 
     [propget, id(DISPID_IHTMLEVENTOBJ3_BEHAVIORPART)]
-    long behaviorPart();
+    LONG behaviorPart();
 
     [propget, id(DISPID_IHTMLEVENTOBJ3_NEXTPAGE)]
@@ -12946,5 +13516,5 @@
 
     [propget, id(DISPID_IHTMLEVENTOBJ4_WHEELDELTA)]
-    long wheelDelta();
+    LONG wheelDelta();
 }
 
@@ -12966,5 +13536,5 @@
 
     [propget, id(DISPID_IHTMLFRAMESCOLLECTION2_LENGTH)]
-    HRESULT length([retval, out] long *p);
+    HRESULT length([retval, out] LONG *p);
 }
 
@@ -12981,29 +13551,29 @@
 {
     [propget, id(DISPID_IHTMLSCREEN_COLORDEPTH)]
-    HRESULT colorDepth([retval, out] long *p);
+    HRESULT colorDepth([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLSCREEN_BUFFERDEPTH)]
-    HRESULT bufferDepth([in] long v);
+    HRESULT bufferDepth([in] LONG v);
 
     [propget, id(DISPID_IHTMLSCREEN_BUFFERDEPTH)]
-    HRESULT bufferDepth([retval, out] long *p);
+    HRESULT bufferDepth([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSCREEN_WIDTH)]
-    HRESULT width([retval, out] long *p);
+    HRESULT width([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSCREEN_HEIGHT)]
-    HRESULT height([retval, out] long *p);
+    HRESULT height([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLSCREEN_UPDATEINTERVAL)]
-    HRESULT updateInterval([in] long v);
+    HRESULT updateInterval([in] LONG v);
 
     [propget, id(DISPID_IHTMLSCREEN_UPDATEINTERVAL)]
-    HRESULT updateInterval([retval, out] long *p);
+    HRESULT updateInterval([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSCREEN_AVAILHEIGHT)]
-    HRESULT availHeight([retval, out] long *p);
+    HRESULT availHeight([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSCREEN_AVAILWIDTH)]
-    HRESULT availWidth([retval, out] long *p);
+    HRESULT availWidth([retval, out] LONG *p);
 
     [propget, id(DISPID_IHTMLSCREEN_FONTSMOOTHINGENABLED)]
@@ -13040,10 +13610,10 @@
     HRESULT setTimeout(
         [in] BSTR expression,
-        [in] long msec,
+        [in] LONG msec,
         [optional, in] VARIANT *language,
-        [retval, out] long *timerID);
+        [retval, out] LONG *timerID);
 
     [id(DISPID_IHTMLWINDOW2_CLEARTIMEOUT)]
-    HRESULT clearTimeout([in] long timerID);
+    HRESULT clearTimeout([in] LONG timerID);
 
     [id(DISPID_IHTMLWINDOW2_ALERT)]
@@ -13203,5 +13773,5 @@
 
     [id(DISPID_IHTMLWINDOW2_SCROLL)]
-    HRESULT scroll([in] long x, [in] long y);
+    HRESULT scroll([in] LONG x, [in] LONG y);
 
     [propget, id(DISPID_IHTMLWINDOW2_CLIENTINFORMATION)]
@@ -13211,10 +13781,10 @@
     HRESULT setInterval([
         in] BSTR expression,
-        [in] long msec,
+        [in] LONG msec,
         [optional, in] VARIANT *language,
-        [retval, out] long *timerID);
+        [retval, out] LONG *timerID);
 
     [id(DISPID_IHTMLWINDOW2_CLEARINTERVAL)]
-    HRESULT clearInterval([in] long timerID);
+    HRESULT clearInterval([in] LONG timerID);
 
     [propput, id(DISPID_IHTMLWINDOW2_OFFSCREENBUFFERING)]
@@ -13234,20 +13804,20 @@
 
     [id(DISPID_IHTMLWINDOW2_SCROLLBY)]
-    HRESULT scrollBy([in] long x, [in] long y);
+    HRESULT scrollBy([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_SCROLLTO)]
-    HRESULT scrollTo([in] long x, [in] long y);
+    HRESULT scrollTo([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_MOVETO)]
-    HRESULT moveTo([in] long x, [in] long y);
+    HRESULT moveTo([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_MOVEBY)]
-    HRESULT moveBy([in] long x, [in] long y);
+    HRESULT moveBy([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_RESIZETO)]
-    HRESULT resizeTo([in] long x, [in] long y);
+    HRESULT resizeTo([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_RESIZEBY)]
-    HRESULT resizeBy([in] long x, [in] long y);
+    HRESULT resizeBy([in] LONG x, [in] LONG y);
 
     [propget, id(DISPID_IHTMLWINDOW2_EXTERNAL)]
@@ -13267,8 +13837,8 @@
 {
     [propget, id(DISPID_IHTMLWINDOW3_SCREENLEFT)]
-    HRESULT screenLeft([out, retval] long *p);
+    HRESULT screenLeft([out, retval] LONG *p);
 
     [propget, id(DISPID_IHTMLWINDOW3_SCREENTOP)]
-    HRESULT screenTop([out, retval] long *p);
+    HRESULT screenTop([out, retval] LONG *p);
 
     [id(DISPID_IHTMLWINDOW3_ATTACHEVENT)]
@@ -13286,14 +13856,14 @@
     HRESULT setTimeout(
             [in] VARIANT *expression,
-            [in] long msec,
+            [in] LONG msec,
             [in, optional] VARIANT *language,
-            [out, retval] long *timerID);
+            [out, retval] LONG *timerID);
 
     [id(DISPID_IHTMLWINDOW3_SETINTERVAL)]
     HRESULT setInterval(
             [in] VARIANT *expression,
-            [in] long msec,
+            [in] LONG msec,
             [in, optional] VARIANT *language,
-            [out, retval] long *timerID);
+            [out, retval] LONG *timerID);
 
     [id(DISPID_IHTMLWINDOW3_PRINT)]
@@ -13322,4 +13892,41 @@
             [out, retval] IHTMLWindow2 **pDialog);
 }
+
+/*****************************************************************************
+ *    IHTMLWindow4 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f6cf-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLWindow4 : IDispatch
+{
+    [id(DISPID_IHTMLWINDOW4_CREATEPOPUP)]
+    HRESULT createPopup([optional, in] VARIANT* varArgIn,
+                        [retval, out] IDispatch** ppPopup);
+
+    [propget, id(DISPID_IHTMLWINDOW4_FRAMEELEMENT)]
+    HRESULT frameElement([retval, out] IHTMLFrameBase* * p);
+};
+
+/*****************************************************************************
+ *    IHTMLWindow5 interface
+ */
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3051040e-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLWindow5 : IDispatch
+{
+    [propput, id(DISPID_IHTMLWINDOW5_XMLHTTPREQUEST)]
+    HRESULT XMLHttpRequest([in] VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW5_XMLHTTPREQUEST)]
+    HRESULT XMLHttpRequest([retval, out] VARIANT * p);
+};
 
 /*****************************************************************************
@@ -13338,5 +13945,5 @@
 
     [propget, id(DISPID_IHTMLFRAMESCOLLECTION2_LENGTH)]
-    long length();
+    LONG length();
 
     [propget, id(DISPID_IHTMLWINDOW2_FRAMES)]
@@ -13356,5 +13963,5 @@
 
     [id(DISPID_IHTMLWINDOW2_CLEARTIMEOUT)]
-    void clearTimeout([in] long timerID);
+    void clearTimeout([in] LONG timerID);
 
     [id(DISPID_IHTMLWINDOW2_ALERT)]
@@ -13506,5 +14113,5 @@
 
     [id(DISPID_IHTMLWINDOW2_SCROLL)]
-    void scroll([in] long x, [in] long y);
+    void scroll([in] LONG x, [in] LONG y);
 
     [propget, id(DISPID_IHTMLWINDOW2_CLIENTINFORMATION)]
@@ -13512,5 +14119,5 @@
 
     [id(DISPID_IHTMLWINDOW2_CLEARINTERVAL)]
-    void clearInterval([in] long timerID);
+    void clearInterval([in] LONG timerID);
 
     [propput, id(DISPID_IHTMLWINDOW2_OFFSCREENBUFFERING)]
@@ -13529,20 +14136,20 @@
 
     [id(DISPID_IHTMLWINDOW2_SCROLLBY)]
-    void scrollBy([in] long x, [in] long y);
+    void scrollBy([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_SCROLLTO)]
-    void scrollTo([in] long x, [in] long y);
+    void scrollTo([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_MOVETO)]
-    void moveTo([in] long x, [in] long y);
+    void moveTo([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_MOVEBY)]
-    void moveBy([in] long x, [in] long y);
+    void moveBy([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_RESIZETO)]
-    void resizeTo([in] long x, [in] long y);
+    void resizeTo([in] LONG x, [in] LONG y);
 
     [id(DISPID_IHTMLWINDOW2_RESIZEBY)]
-    void resizeBy([in] long x, [in] long y);
+    void resizeBy([in] LONG x, [in] LONG y);
 
     [propget, id(DISPID_IHTMLWINDOW2_EXTERNAL)]
@@ -13550,8 +14157,8 @@
 
     [propget, id(DISPID_IHTMLWINDOW3_SCREENLEFT)]
-    long screenLeft();
+    LONG screenLeft();
 
     [propget, id(DISPID_IHTMLWINDOW3_SCREENTOP)]
-    long screenTop();
+    LONG screenTop();
 
     [id(DISPID_IHTMLWINDOW3_ATTACHEVENT)]
@@ -13566,13 +14173,13 @@
 
     [id(DISPID_IHTMLWINDOW3_SETTIMEOUT)]
-    long setTimeout(
+    LONG setTimeout(
             [in] VARIANT *expression,
-            [in] long msec,
+            [in] LONG msec,
             [in, optional] VARIANT *language);
 
     [id(DISPID_IHTMLWINDOW3_SETINTERVAL)]
-    long setInterval(
+    LONG setInterval(
             [in] VARIANT *expression,
-            [in] long msec,
+            [in] LONG msec,
             [in, optional] VARIANT *language);
 
@@ -13607,4 +14214,406 @@
     IHTMLFrameBase *frameElement();
 }
+
+/*****************************************************************************
+ *    DispHTMLWindowProxy dispinterface
+ */
+[
+    hidden,
+    uuid(3050f55e-98b5-11cf-bb82-00aa00bdce0b)
+]
+dispinterface DispHTMLWindowProxy
+{
+properties:
+methods:
+    [id(DISPID_IHTMLFRAMESCOLLECTION2_ITEM)]
+    VARIANT item([in] VARIANT* pvarIndex);
+
+    [propget, id(DISPID_IHTMLFRAMESCOLLECTION2_LENGTH)]
+    LONG length();
+
+    [propget, id(DISPID_IHTMLWINDOW2_FRAMES)]
+    IHTMLFramesCollection2* frames();
+
+    [propput, id(DISPID_IHTMLWINDOW2_DEFAULTSTATUS)]
+    void defaultStatus(BSTR v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_DEFAULTSTATUS)]
+    BSTR defaultStatus();
+
+    [propput, id(DISPID_IHTMLWINDOW2_STATUS)]
+    void status(BSTR v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_STATUS)]
+    BSTR status();
+
+    [id(DISPID_IHTMLWINDOW2_CLEARTIMEOUT)]
+    void clearTimeout([in] LONG timerID);
+
+    [id(DISPID_IHTMLWINDOW2_ALERT)]
+    void alert([defaultvalue(""), in] BSTR message);
+
+    [id(DISPID_IHTMLWINDOW2_CONFIRM)]
+    VARIANT_BOOL confirm([defaultvalue(""), in] BSTR message);
+
+    [id(DISPID_IHTMLWINDOW2_PROMPT)]
+    VARIANT prompt([defaultvalue(""), in] BSTR message,
+                   [defaultvalue("undefined"), in] BSTR defstr);
+
+    [propget, id(DISPID_IHTMLWINDOW2_IMAGE)]
+    IHTMLImageElementFactory* Image();
+
+    [propget, id(DISPID_IHTMLWINDOW2_LOCATION)]
+    IHTMLLocation* location();
+
+    [propget, id(DISPID_IHTMLWINDOW2_HISTORY)]
+    IOmHistory* history();
+
+    [id(DISPID_IHTMLWINDOW2_CLOSE)]
+    void close();
+
+    [propput, id(DISPID_IHTMLWINDOW2_OPENER)]
+    void opener(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_OPENER)]
+    VARIANT opener();
+
+    [propget, id(DISPID_IHTMLWINDOW2_NAVIGATOR)]
+    IOmNavigator* navigator();
+
+    [propput, id(DISPID_IHTMLWINDOW2_NAME)]
+    void name(BSTR v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_NAME)]
+    BSTR name();
+
+    [propget, id(DISPID_IHTMLWINDOW2_PARENT)]
+    IHTMLWindow2* parent();
+
+    [id(DISPID_IHTMLWINDOW2_OPEN)]
+    IHTMLWindow2* open([defaultvalue(""), in] BSTR url,
+                       [defaultvalue(""), in] BSTR name,
+                       [defaultvalue(""), in] BSTR features,
+                       [defaultvalue(0), in] VARIANT_BOOL replace);
+
+    [propget, id(DISPID_IHTMLWINDOW2_SELF)]
+    IHTMLWindow2* self();
+
+    [propget, id(DISPID_IHTMLWINDOW2_TOP)]
+    IHTMLWindow2* top();
+
+    [propget, id(DISPID_IHTMLWINDOW2_WINDOW)]
+    IHTMLWindow2* window();
+
+    [id(DISPID_IHTMLWINDOW2_NAVIGATE)]
+    void navigate([in] BSTR url);
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONFOCUS), displaybind, bindable]
+    void onfocus(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONFOCUS), displaybind, bindable]
+    VARIANT onfocus();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONBLUR), displaybind, bindable]
+    void onblur(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONBLUR), displaybind, bindable]
+    VARIANT onblur();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONLOAD), displaybind, bindable]
+    void onload(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONLOAD), displaybind, bindable]
+    VARIANT onload();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONBEFOREUNLOAD), displaybind, bindable]
+    void onbeforeunload(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONBEFOREUNLOAD), displaybind, bindable]
+    VARIANT onbeforeunload();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONUNLOAD), displaybind, bindable]
+    void onunload(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONUNLOAD), displaybind, bindable]
+    VARIANT onunload();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONHELP), displaybind, bindable]
+    void onhelp(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONHELP), displaybind, bindable]
+    VARIANT onhelp();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONERROR), displaybind, bindable]
+    void onerror(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONERROR), displaybind, bindable]
+    VARIANT onerror();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONRESIZE), displaybind, bindable]
+    void onresize(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONRESIZE), displaybind, bindable]
+    VARIANT onresize();
+
+    [propput, id(DISPID_IHTMLWINDOW2_ONSCROLL), displaybind, bindable]
+    void onscroll(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_ONSCROLL), displaybind, bindable]
+    VARIANT onscroll();
+
+    [propget, id(DISPID_IHTMLWINDOW2_DOCUMENT), source]
+    IHTMLDocument2* document();
+
+    [propget, id(DISPID_IHTMLWINDOW2_EVENT)]
+    IHTMLEventObj* event();
+
+    [propget, id(DISPID_IHTMLWINDOW2__NEWENUM), hidden, restricted]
+    IUnknown* _newEnum();
+
+    [id(DISPID_IHTMLWINDOW2_SHOWMODALDIALOG)]
+    VARIANT showModalDialog([in] BSTR dialog,
+                            [optional, in] VARIANT* varArgIn,
+                            [optional, in] VARIANT* varOptions);
+
+    [id(DISPID_IHTMLWINDOW2_SHOWHELP)]
+    void showHelp([in] BSTR helpURL,
+                  [optional, in] VARIANT helpArg,
+                  [defaultvalue(""), in] BSTR features);
+
+    [propget, id(DISPID_IHTMLWINDOW2_SCREEN)]
+    IHTMLScreen* screen();
+
+    [propget, id(DISPID_IHTMLWINDOW2_OPTION)]
+    IHTMLOptionElementFactory* Option();
+
+    [id(DISPID_IHTMLWINDOW2_FOCUS)]
+    void focus();
+
+    [propget, id(DISPID_IHTMLWINDOW2_CLOSED)]
+    VARIANT_BOOL closed();
+
+    [id(DISPID_IHTMLWINDOW2_BLUR)]
+    void blur();
+
+    [id(DISPID_IHTMLWINDOW2_SCROLL)]
+    void scroll([in] LONG x,
+                [in] LONG y);
+
+    [propget, id(DISPID_IHTMLWINDOW2_CLIENTINFORMATION)]
+    IOmNavigator* clientInformation();
+
+    [id(DISPID_IHTMLWINDOW2_CLEARINTERVAL)]
+    void clearInterval([in] LONG timerID);
+
+    [propput, id(DISPID_IHTMLWINDOW2_OFFSCREENBUFFERING)]
+    void offscreenBuffering(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW2_OFFSCREENBUFFERING)]
+    VARIANT offscreenBuffering();
+
+    [id(DISPID_IHTMLWINDOW2_EXECSCRIPT)]
+    VARIANT execScript([in] BSTR code,
+                       [defaultvalue("JScript"), in] BSTR language);
+
+    [id(DISPID_IHTMLWINDOW2_TOSTRING)]
+    BSTR toString();
+
+    [id(DISPID_IHTMLWINDOW2_SCROLLBY)]
+    void scrollBy([in] LONG x,
+                  [in] LONG y);
+
+    [id(DISPID_IHTMLWINDOW2_SCROLLTO)]
+    void scrollTo([in] LONG x,
+                  [in] LONG y);
+
+    [id(DISPID_IHTMLWINDOW2_MOVETO)]
+    void moveTo([in] LONG x,
+                [in] LONG y);
+
+    [id(DISPID_IHTMLWINDOW2_MOVEBY)]
+    void moveBy([in] LONG x,
+                [in] LONG y);
+
+    [id(DISPID_IHTMLWINDOW2_RESIZETO)]
+    void resizeTo([in] LONG x,
+                  [in] LONG y);
+
+    [id(DISPID_IHTMLWINDOW2_RESIZEBY)]
+    void resizeBy([in] LONG x,
+                  [in] LONG y);
+
+    [propget, id(DISPID_IHTMLWINDOW2_EXTERNAL)]
+    IDispatch* external();
+
+    [propget, id(DISPID_IHTMLWINDOW3_SCREENLEFT)]
+    LONG screenLeft();
+
+    [propget, id(DISPID_IHTMLWINDOW3_SCREENTOP)]
+    LONG screenTop();
+
+    [id(DISPID_IHTMLWINDOW3_ATTACHEVENT)]
+    VARIANT_BOOL attachEvent([in] BSTR event,
+                             [in] IDispatch* pDisp);
+
+    [id(DISPID_IHTMLWINDOW3_DETACHEVENT)]
+    void detachEvent([in] BSTR event,
+                     [in] IDispatch* pDisp);
+
+    [id(DISPID_IHTMLWINDOW3_SETTIMEOUT)]
+    LONG setTimeout([in] VARIANT* expression,
+                    [in] LONG msec,
+                    [optional, in] VARIANT* language);
+
+    [id(DISPID_IHTMLWINDOW3_SETINTERVAL)]
+    LONG setInterval([in] VARIANT* expression,
+                     [in] LONG msec,
+                     [optional, in] VARIANT* language);
+
+    [id(DISPID_IHTMLWINDOW3_PRINT)]
+    void print();
+
+    [propput, id(DISPID_IHTMLWINDOW3_ONBEFOREPRINT), displaybind, bindable]
+    void onbeforeprint(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW3_ONBEFOREPRINT), displaybind, bindable]
+    VARIANT onbeforeprint();
+
+    [propput, id(DISPID_IHTMLWINDOW3_ONAFTERPRINT), displaybind, bindable]
+    void onafterprint(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW3_ONAFTERPRINT), displaybind, bindable]
+    VARIANT onafterprint();
+
+    [propget, id(DISPID_IHTMLWINDOW3_CLIPBOARDDATA)]
+    IHTMLDataTransfer* clipboardData();
+
+    [id(DISPID_IHTMLWINDOW3_SHOWMODELESSDIALOG)]
+    IHTMLWindow2* showModelessDialog([defaultvalue(""), in] BSTR url,
+                                     [optional, in] VARIANT* varArgIn,
+                                     [optional, in] VARIANT* options);
+
+    [id(DISPID_IHTMLWINDOW4_CREATEPOPUP)]
+    IDispatch* createPopup([optional, in] VARIANT* varArgIn);
+
+    [propget, id(DISPID_IHTMLWINDOW4_FRAMEELEMENT)]
+    IHTMLFrameBase* frameElement();
+
+    [propput, id(DISPID_IHTMLWINDOW5_XMLHTTPREQUEST)]
+    void XMLHttpRequest(VARIANT v);
+
+    [propget, id(DISPID_IHTMLWINDOW5_XMLHTTPREQUEST)]
+    VARIANT XMLHttpRequest();
+};
+
+/*****************************************************************************
+ *    HTMLWindowEvents interface
+ */
+[
+    hidden,
+    uuid(96A0A4E0-D062-11cf-94B6-00AA0060275C)
+]
+dispinterface HTMLWindowEvents
+{
+properties:
+methods:
+    [id(DISPID_HTMLWINDOWEVENTS_ONLOAD)]
+    void onload();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONUNLOAD)]
+    void onunload();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONHELP)]
+    VARIANT_BOOL onhelp();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONFOCUS)]
+    void onfocus();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONBLUR)]
+    void onblur();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONERROR)]
+    void onerror([in] BSTR description,
+                 [in] BSTR url,
+                 [in] LONG line);
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONRESIZE)]
+    void onresize();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONSCROLL)]
+    void onscroll();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONBEFOREUNLOAD)]
+    void onbeforeunload();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONBEFOREPRINT)]
+    void onbeforeprint();
+
+    [id(DISPID_HTMLWINDOWEVENTS_ONAFTERPRINT)]
+    void onafterprint();
+};
+
+/*****************************************************************************
+ *    HTMLWindowEvents2 interface
+ */
+[
+    hidden,
+    uuid(3050f625-98b5-11cf-bb82-00aa00bdce0b)
+]
+dispinterface HTMLWindowEvents2
+{
+properties:
+methods:
+    [id(DISPID_HTMLWINDOWEVENTS2_ONLOAD)]
+    void onload([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONUNLOAD)]
+    void onunload([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONHELP)]
+    VARIANT_BOOL onhelp([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONFOCUS)]
+    void onfocus([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONBLUR)]
+    void onblur([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONERROR)]
+    void onerror([in] BSTR description,
+                 [in] BSTR url,
+                 [in] LONG line);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONRESIZE)]
+    void onresize([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONSCROLL)]
+    void onscroll([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONBEFOREUNLOAD)]
+    void onbeforeunload([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONBEFOREPRINT)]
+    void onbeforeprint([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLWINDOWEVENTS2_ONAFTERPRINT)]
+    void onafterprint([in] IHTMLEventObj* pEvtObj);
+};
+
+/*****************************************************************************
+ *    HTMLWindowProxy class
+ */
+[
+    uuid(3050f391-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLWindowProxy
+{
+    [default]           dispinterface DispHTMLWindowProxy;
+    [source, default]   dispinterface HTMLWindowEvents;
+    [source]            dispinterface HTMLWindowEvents2;
+                        interface IHTMLWindow2;
+                        interface IHTMLWindow3;
+                        interface IHTMLWindow4;
+                        interface IHTMLWindow5;
+};
 
 /*****************************************************************************
@@ -14622,6 +15631,6 @@
     [id(DISPID_IHTMLDOCUMENT2_ELEMENTFROMPOINT)]
     HRESULT elementFromPoint(
-        [in] long x,
-        [in] long y,
+        [in] LONG x,
+        [in] LONG y,
         [retval, out] IHTMLElement **elementHit);
 
@@ -14650,5 +15659,5 @@
     HRESULT createStyleSheet(
         [defaultvalue(""), in] BSTR bstrHref,
-        [defaultvalue(-1), in] long lIndex,
+        [defaultvalue(-1), in] LONG lIndex,
         [retval, out] IHTMLStyleSheet **ppnewStyleSheet);
 }
@@ -15259,6 +16268,6 @@
     [id(DISPID_IHTMLDOCUMENT2_ELEMENTFROMPOINT)]
     IHTMLElement *elementFromPoint(
-        [in] long x,
-        [in] long y);
+        [in] LONG x,
+        [in] LONG y);
 
     [propget, id(DISPID_IHTMLDOCUMENT2_PARENTWINDOW)]
@@ -15286,5 +16295,5 @@
     IHTMLStyleSheet *createStyleSheet(
         [defaultvalue(""), in] BSTR bstrHref,
-        [defaultvalue(-1), in] long lIndex);
+        [defaultvalue(-1), in] LONG lIndex);
 
     [id(DISPID_IHTMLDOCUMENT3_RELEASECAPTURE)]
@@ -15516,5 +16525,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -15620,8 +16629,8 @@
 
     [propput, id(DISPID_IHTMLCOMMENTELEMENT_ATOMIC), displaybind, bindable]
-    HRESULT atomic([in] long v);
+    HRESULT atomic([in] LONG v);
 
     [propget, id(DISPID_IHTMLCOMMENTELEMENT_ATOMIC), displaybind, bindable]
-    HRESULT atomic([out, retval] long *p);
+    HRESULT atomic([out, retval] LONG *p);
 }
 
@@ -15644,10 +16653,10 @@
 
     [propget, id(DISPID_IHTMLCOMMENTELEMENT2_LENGTH)]
-    HRESULT length([out, retval] long *p);
+    HRESULT length([out, retval] LONG *p);
 
     [id(DISPID_IHTMLCOMMENTELEMENT2_SUBSTRINGDATA)]
     HRESULT substringData(
-            [in] long offset,
-            [in] long Count,
+            [in] LONG offset,
+            [in] LONG Count,
             [out, retval] BSTR *pbstrsubString);
 
@@ -15657,16 +16666,16 @@
     [id(DISPID_IHTMLCOMMENTELEMENT2_INSERTDATA)]
     HRESULT insertData(
-            [in] long offset,
+            [in] LONG offset,
             [in] BSTR bstrstring);
 
     [id(DISPID_IHTMLCOMMENTELEMENT2_DELETEDATA)]
     HRESULT deleteData(
-            [in] long offset,
-            [in] long Count);
+            [in] LONG offset,
+            [in] LONG Count);
 
     [id(DISPID_IHTMLCOMMENTELEMENT2_REPLACEDATA)]
     HRESULT replaceData(
-            [in] long offset,
-            [in] long Count,
+            [in] LONG offset,
+            [in] LONG Count,
             [in] BSTR bstrstring);
 }
@@ -15814,5 +16823,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -15826,14 +16835,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -15972,6 +16981,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -16126,14 +17135,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -16184,20 +17193,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -16232,10 +17241,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -16258,5 +17267,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -16433,5 +17442,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -16439,5 +17448,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -16512,8 +17521,8 @@
 
     [propput, id(DISPID_IHTMLCOMMENTELEMENT_ATOMIC), displaybind, bindable]
-    void atomic(long v);
+    void atomic(LONG v);
 
     [propget, id(DISPID_IHTMLCOMMENTELEMENT_ATOMIC), displaybind, bindable]
-    long atomic();
+    LONG atomic();
 
     [propput, id(DISPID_IHTMLCOMMENTELEMENT2_DATA)]
@@ -16524,10 +17533,10 @@
 
     [propget, id(DISPID_IHTMLCOMMENTELEMENT2_LENGTH)]
-    long length();
+    LONG length();
 
     [id(DISPID_IHTMLCOMMENTELEMENT2_SUBSTRINGDATA)]
     BSTR substringData(
-            [in] long offset,
-            [in] long Count);
+            [in] LONG offset,
+            [in] LONG Count);
 
     [id(DISPID_IHTMLCOMMENTELEMENT2_APPENDDATA)]
@@ -16536,17 +17545,430 @@
     [id(DISPID_IHTMLCOMMENTELEMENT2_INSERTDATA)]
      void insertData(
-            [in] long offset,
+            [in] LONG offset,
             [in] BSTR bstrstring);
 
     [id(DISPID_IHTMLCOMMENTELEMENT2_DELETEDATA)]
     void deleteData(
-            [in] long offset,
-            [in] long Count);
+            [in] LONG offset,
+            [in] LONG Count);
 
     [id(DISPID_IHTMLCOMMENTELEMENT2_REPLACEDATA)]
     void replaceData(
-            [in] long offset,
-            [in] long Count,
+            [in] LONG offset,
+            [in] LONG Count,
             [in] BSTR bstrstring);
+}
+
+[
+    hidden,
+    uuid(3050f60f-98b5-11cf-bb82-00aa00bdce0b)
+]
+dispinterface HTMLElementEvents2
+{
+properties:
+methods:
+    [id(DISPID_HTMLELEMENTEVENTS2_ONHELP)]
+    VARIANT_BOOL onhelp([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCLICK)]
+    VARIANT_BOOL onclick([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDBLCLICK)]
+    VARIANT_BOOL ondblclick([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONKEYPRESS)]
+    VARIANT_BOOL onkeypress([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONKEYDOWN)]
+    void onkeydown([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONKEYUP)]
+    void onkeyup([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEOUT)]
+    void onmouseout([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEOVER)]
+    void onmouseover([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEMOVE)]
+    void onmousemove([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEDOWN)]
+    void onmousedown([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEUP)]
+    void onmouseup([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONSELECTSTART)]
+    VARIANT_BOOL onselectstart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFILTERCHANGE)]
+    void onfilterchange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGSTART)]
+    VARIANT_BOOL ondragstart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREUPDATE)]
+    VARIANT_BOOL onbeforeupdate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONAFTERUPDATE)]
+    void onafterupdate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONERRORUPDATE)]
+    VARIANT_BOOL onerrorupdate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWEXIT)]
+    VARIANT_BOOL onrowexit([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWENTER)]
+    void onrowenter([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDATASETCHANGED)]
+    void ondatasetchanged([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDATAAVAILABLE)]
+    void ondataavailable([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDATASETCOMPLETE)]
+    void ondatasetcomplete([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONLOSECAPTURE)]
+    void onlosecapture([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONPROPERTYCHANGE)]
+    void onpropertychange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONSCROLL)]
+    void onscroll([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFOCUS)]
+    void onfocus([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBLUR)]
+    void onblur([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONRESIZE)]
+    void onresize([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAG)]
+    VARIANT_BOOL ondrag([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGEND)]
+    void ondragend([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGENTER)]
+    VARIANT_BOOL ondragenter([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGOVER)]
+    VARIANT_BOOL ondragover([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGLEAVE)]
+    void ondragleave([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDROP)]
+    VARIANT_BOOL ondrop([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFORECUT)]
+    VARIANT_BOOL onbeforecut([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCUT)]
+    VARIANT_BOOL oncut([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFORECOPY)]
+    VARIANT_BOOL onbeforecopy([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCOPY)]
+    VARIANT_BOOL oncopy([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREPASTE)]
+    VARIANT_BOOL onbeforepaste([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONPASTE)]
+    VARIANT_BOOL onpaste([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCONTEXTMENU)]
+    VARIANT_BOOL oncontextmenu([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWSDELETE)]
+    void onrowsdelete([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWSINSERTED)]
+    void onrowsinserted([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCELLCHANGE)]
+    void oncellchange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONREADYSTATECHANGE)]
+    void onreadystatechange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONLAYOUTCOMPLETE)]
+    void onlayoutcomplete([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONPAGE)]
+    void onpage([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEENTER)]
+    void onmouseenter([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSELEAVE)]
+    void onmouseleave([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONACTIVATE)]
+    void onactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDEACTIVATE)]
+    void ondeactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREDEACTIVATE)]
+    VARIANT_BOOL onbeforedeactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREACTIVATE)]
+    VARIANT_BOOL onbeforeactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFOCUSIN)]
+    void onfocusin([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFOCUSOUT)]
+    void onfocusout([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOVE)]
+    void onmove([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCONTROLSELECT)]
+    VARIANT_BOOL oncontrolselect([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOVESTART)]
+    VARIANT_BOOL onmovestart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOVEEND)]
+    void onmoveend([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONRESIZESTART)]
+    VARIANT_BOOL onresizestart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONRESIZEEND)]
+    void onresizeend([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEWHEEL)]
+    VARIANT_BOOL onmousewheel([in] IHTMLEventObj* pEvtObj);
+};
+[
+    hidden,
+    uuid(3050f33c-98b5-11cf-bb82-00aa00bdce0b)
+]
+dispinterface HTMLElementEvents
+{
+properties:
+methods:
+    [id(DISPID_HTMLELEMENTEVENTS_ONHELP)]
+    VARIANT_BOOL onhelp();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONCLICK)]
+    VARIANT_BOOL onclick();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDBLCLICK)]
+    VARIANT_BOOL ondblclick();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONKEYPRESS)]
+    VARIANT_BOOL onkeypress();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONKEYDOWN)]
+    void onkeydown();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONKEYUP)]
+    void onkeyup();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT)]
+    void onmouseout();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER)]
+    void onmouseover();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSEMOVE)]
+    void onmousemove();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSEDOWN)]
+    void onmousedown();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSEUP)]
+    void onmouseup();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONSELECTSTART)]
+    VARIANT_BOOL onselectstart();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONFILTERCHANGE)]
+    void onfilterchange();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDRAGSTART)]
+    VARIANT_BOOL ondragstart();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBEFOREUPDATE)]
+    VARIANT_BOOL onbeforeupdate();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONAFTERUPDATE)]
+    void onafterupdate();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONERRORUPDATE)]
+    VARIANT_BOOL onerrorupdate();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONROWEXIT)]
+    VARIANT_BOOL onrowexit();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONROWENTER)]
+    void onrowenter();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDATASETCHANGED)]
+    void ondatasetchanged();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDATAAVAILABLE)]
+    void ondataavailable();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDATASETCOMPLETE)]
+    void ondatasetcomplete();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONLOSECAPTURE)]
+    void onlosecapture();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONPROPERTYCHANGE)]
+    void onpropertychange();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONSCROLL)]
+    void onscroll();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONFOCUS)]
+    void onfocus();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBLUR)]
+    void onblur();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONRESIZE)]
+    void onresize();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDRAG)]
+    VARIANT_BOOL ondrag();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDRAGEND)]
+    void ondragend();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDRAGENTER)]
+    VARIANT_BOOL ondragenter();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDRAGOVER)]
+    VARIANT_BOOL ondragover();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDRAGLEAVE)]
+    void ondragleave();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDROP)]
+    VARIANT_BOOL ondrop();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBEFORECUT)]
+    VARIANT_BOOL onbeforecut();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONCUT)]
+    VARIANT_BOOL oncut();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBEFORECOPY)]
+    VARIANT_BOOL onbeforecopy();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONCOPY)]
+    VARIANT_BOOL oncopy();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBEFOREPASTE)]
+    VARIANT_BOOL onbeforepaste();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONPASTE)]
+    VARIANT_BOOL onpaste();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONCONTEXTMENU)]
+    VARIANT_BOOL oncontextmenu();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONROWSDELETE)]
+    void onrowsdelete();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONROWSINSERTED)]
+    void onrowsinserted();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONCELLCHANGE)]
+    void oncellchange();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONREADYSTATECHANGE)]
+    void onreadystatechange();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBEFOREEDITFOCUS)]
+    void onbeforeeditfocus();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONLAYOUTCOMPLETE)]
+    void onlayoutcomplete();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONPAGE)]
+    void onpage();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBEFOREDEACTIVATE)]
+    VARIANT_BOOL onbeforedeactivate();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONBEFOREACTIVATE)]
+    VARIANT_BOOL onbeforeactivate();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOVE)]
+    void onmove();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONCONTROLSELECT)]
+    VARIANT_BOOL oncontrolselect();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOVESTART)]
+    VARIANT_BOOL onmovestart();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOVEEND)]
+    void onmoveend();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONRESIZESTART)]
+    VARIANT_BOOL onresizestart();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONRESIZEEND)]
+    void onresizeend();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSEENTER)]
+    void onmouseenter();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSELEAVE)]
+    void onmouseleave();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONMOUSEWHEEL)]
+    VARIANT_BOOL onmousewheel();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONACTIVATE)]
+    void onactivate();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONDEACTIVATE)]
+    void ondeactivate();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONFOCUSIN)]
+    void onfocusin();
+
+    [id(DISPID_HTMLELEMENTEVENTS_ONFOCUSOUT)]
+    void onfocusout();
+
+};
+
+[
+    noncreatable,
+    uuid(3050f317-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLCommentElement
+{
+    [default]           dispinterface DispHTMLCommentElement;
+    [source, default]   dispinterface HTMLElementEvents;
+    [source]            dispinterface HTMLElementEvents2;
+                        interface IHTMLElement;
+                        interface IHTMLElement2;
+                        interface IHTMLElement3;
+                        interface IHTMLElement4;
+                        interface IHTMLUniqueName;
+                        interface IHTMLDOMNode;
+                        interface IHTMLDOMNode2;
+                        interface IHTMLCommentElement;
+                        interface IHTMLCommentElement2;
 }
 
@@ -16752,4 +18174,199 @@
 }
 
+[
+    hidden,
+    uuid(3050f623-98b5-11cf-bb82-00aa00bdce0b)
+]
+dispinterface HTMLTableEvents2
+{
+properties:
+methods:
+    [id(DISPID_HTMLELEMENTEVENTS2_ONHELP)]
+    VARIANT_BOOL onhelp([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCLICK)]
+    VARIANT_BOOL onclick([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDBLCLICK)]
+    VARIANT_BOOL ondblclick([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONKEYPRESS)]
+    VARIANT_BOOL onkeypress([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONKEYDOWN)]
+    void onkeydown([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONKEYUP)]
+    void onkeyup([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEOUT)]
+    void onmouseout([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEOVER)]
+    void onmouseover([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEMOVE)]
+    void onmousemove([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEDOWN)]
+    void onmousedown([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEUP)]
+    void onmouseup([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONSELECTSTART)]
+    VARIANT_BOOL onselectstart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFILTERCHANGE)]
+    void onfilterchange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGSTART)]
+    VARIANT_BOOL ondragstart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREUPDATE)]
+    VARIANT_BOOL onbeforeupdate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONAFTERUPDATE)]
+    void onafterupdate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONERRORUPDATE)]
+    VARIANT_BOOL onerrorupdate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWEXIT)]
+    VARIANT_BOOL onrowexit([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWENTER)]
+    void onrowenter([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDATASETCHANGED)]
+    void ondatasetchanged([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDATAAVAILABLE)]
+    void ondataavailable([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDATASETCOMPLETE)]
+    void ondatasetcomplete([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONLOSECAPTURE)]
+    void onlosecapture([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONPROPERTYCHANGE)]
+    void onpropertychange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONSCROLL)]
+    void onscroll([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFOCUS)]
+    void onfocus([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBLUR)]
+    void onblur([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONRESIZE)]
+    void onresize([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAG)]
+    VARIANT_BOOL ondrag([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGEND)]
+    void ondragend([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGENTER)]
+    VARIANT_BOOL ondragenter([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGOVER)]
+    VARIANT_BOOL ondragover([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDRAGLEAVE)]
+    void ondragleave([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDROP)]
+    VARIANT_BOOL ondrop([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFORECUT)]
+    VARIANT_BOOL onbeforecut([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCUT)]
+    VARIANT_BOOL oncut([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFORECOPY)]
+    VARIANT_BOOL onbeforecopy([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCOPY)]
+    VARIANT_BOOL oncopy([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREPASTE)]
+    VARIANT_BOOL onbeforepaste([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONPASTE)]
+    VARIANT_BOOL onpaste([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCONTEXTMENU)]
+    VARIANT_BOOL oncontextmenu([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWSDELETE)]
+    void onrowsdelete([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONROWSINSERTED)]
+    void onrowsinserted([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCELLCHANGE)]
+    void oncellchange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONREADYSTATECHANGE)]
+    void onreadystatechange([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONLAYOUTCOMPLETE)]
+    void onlayoutcomplete([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONPAGE)]
+    void onpage([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEENTER)]
+    void onmouseenter([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSELEAVE)]
+    void onmouseleave([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONACTIVATE)]
+    void onactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONDEACTIVATE)]
+    void ondeactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREDEACTIVATE)]
+    VARIANT_BOOL onbeforedeactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONBEFOREACTIVATE)]
+    VARIANT_BOOL onbeforeactivate([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFOCUSIN)]
+    void onfocusin([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONFOCUSOUT)]
+    void onfocusout([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOVE)]
+    void onmove([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONCONTROLSELECT)]
+    VARIANT_BOOL oncontrolselect([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOVESTART)]
+    VARIANT_BOOL onmovestart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOVEEND)]
+    void onmoveend([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONRESIZESTART)]
+    VARIANT_BOOL onresizestart([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONRESIZEEND)]
+    void onresizeend([in] IHTMLEventObj* pEvtObj);
+
+    [id(DISPID_HTMLELEMENTEVENTS2_ONMOUSEWHEEL)]
+    VARIANT_BOOL onmousewheel([in] IHTMLEventObj* pEvtObj);
+};
+
 /*****************************************************************************
  *    IHTMLTableCaption interface
@@ -16790,8 +18407,8 @@
 {
     [propput, id(DISPID_IHTMLTABLE_COLS)]
-    HRESULT cols([in] long v);
+    HRESULT cols([in] LONG v);
 
     [propget, id(DISPID_IHTMLTABLE_COLS)]
-    HRESULT cols([retval, out] long *p);
+    HRESULT cols([retval, out] LONG *p);
 
     [propput, id(DISPID_IHTMLTABLE_BORDER)]
@@ -16880,8 +18497,8 @@
 
     [propput, id(DISPID_IHTMLTABLE_DATAPAGESIZE)]
-    HRESULT dataPageSize([in] long v);
+    HRESULT dataPageSize([in] LONG v);
 
     [propget, id(DISPID_IHTMLTABLE_DATAPAGESIZE)]
-    HRESULT dataPageSize([retval, out] long *p);
+    HRESULT dataPageSize([retval, out] LONG *p);
 
     [id(DISPID_IHTMLTABLE_NEXTPAGE)]
@@ -16923,9 +18540,9 @@
     [id(DISPID_IHTMLTABLE_INSERTROW)]
     HRESULT insertRow(
-            [defaultvalue(-1), in] long index,
+            [defaultvalue(-1), in] LONG index,
             [retval, out] IDispatch **row);
 
     [id(DISPID_IHTMLTABLE_DELETEROW)]
-    HRESULT deleteRow([defaultvalue(-1), in] long index);
+    HRESULT deleteRow([defaultvalue(-1), in] LONG index);
 
     [propget, id(DISPID_IHTMLTABLE_READYSTATE)]
@@ -16938,4 +18555,65 @@
     HRESULT onreadystatechange([retval, out] VARIANT *p);
 }
+
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f4ad-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLTable2 : IDispatch
+{
+    [id(DISPID_IHTMLTABLE2_FIRSTPAGE)]
+    HRESULT firstPage();
+
+    [id(DISPID_IHTMLTABLE2_LASTPAGE)]
+    HRESULT lastPage();
+
+    [propget, id(DISPID_IHTMLTABLE2_CELLS)]
+    HRESULT cells([retval, out] IHTMLElementCollection* * p);
+
+    [id(DISPID_IHTMLTABLE2_MOVEROW)]
+    HRESULT moveRow([defaultvalue(-1), in] LONG indexFrom,
+        [defaultvalue(-1), in] LONG indexTo,
+        [retval, out] IDispatch** row);
+};
+
+[
+    odl,
+    oleautomation,
+    dual,
+    uuid(3050f829-98b5-11cf-bb82-00aa00bdce0b)
+]
+interface IHTMLTable3 : IDispatch
+{
+    [propput, id(DISPID_IHTMLTABLE3_SUMMARY), displaybind, bindable]
+    HRESULT summary([in] BSTR v);
+
+    [propget, id(DISPID_IHTMLTABLE3_SUMMARY), displaybind, bindable]
+    HRESULT summary([retval, out] BSTR * p);
+};
+
+[
+    noncreatable,
+    uuid(3050f26b-98b5-11cf-bb82-00aa00bdce0b)
+]
+coclass HTMLTable
+{
+    [default]           dispinterface DispHTMLTable;
+    [source, default]   dispinterface HTMLTableEvents;
+    [source]            dispinterface HTMLTableEvents2;
+                        interface IHTMLElement;
+                        interface IHTMLElement2;
+                        interface IHTMLElement3;
+                        interface IHTMLElement4;
+                        interface IHTMLUniqueName;
+                        interface IHTMLDOMNode;
+                        interface IHTMLDOMNode2;
+                        interface IHTMLDatabinding;
+                        interface IHTMLControlElement;
+                        interface IHTMLTable;
+                        interface IHTMLTable2;
+                        interface IHTMLTable3;
+};
 
 [
@@ -16970,9 +18648,9 @@
     [id(DISPID_IHTMLTABLESECTION_INSERTROW)]
     HRESULT insertRow(
-            [defaultvalue(-1), in] long index,
+            [defaultvalue(-1), in] LONG index,
             [retval, out] IDispatch **row);
 
     [id(DISPID_IHTMLTABLESECTION_DELETEROW)]
-    HRESULT deleteRow([defaultvalue(-1), in] long index);
+    HRESULT deleteRow([defaultvalue(-1), in] LONG index);
 }
 
@@ -17025,8 +18703,8 @@
 
     [propget, id(DISPID_IHTMLTABLEROW_ROWINDEX)]
-    HRESULT rowIndex([out, retval] long *p);
+    HRESULT rowIndex([out, retval] LONG *p);
 
     [propget, id(DISPID_IHTMLTABLEROW_SECTIONROWINDEX)]
-    HRESULT sectionRowIndex([out, retval] long *p);
+    HRESULT sectionRowIndex([out, retval] LONG *p);
 
     [propget, id(DISPID_IHTMLTABLEROW_CELLS)]
@@ -17035,9 +18713,9 @@
     [id(DISPID_IHTMLTABLEROW_INSERTCELL)]
     HRESULT insertCell(
-            [in, defaultvalue(-1)] long index,
+            [in, defaultvalue(-1)] LONG index,
             [out, retval] IDispatch **row);
 
     [id(DISPID_IHTMLTABLEROW_DELETECELL)]
-    HRESULT deleteCell([in, defaultvalue(-1)] long index);
+    HRESULT deleteCell([in, defaultvalue(-1)] LONG index);
 }
 
@@ -17184,5 +18862,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -17196,14 +18874,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -17342,6 +19020,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -17496,14 +19174,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -17554,20 +19232,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -17602,10 +19280,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -17628,5 +19306,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -17803,5 +19481,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -17809,5 +19487,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -17894,8 +19572,8 @@
 
     [propput, id(DISPID_IHTMLTABLE_COLS)]
-    void cols(long v);
+    void cols(LONG v);
 
     [propget, id(DISPID_IHTMLTABLE_COLS)]
-    long cols();
+    LONG cols();
 
     [propput, id(DISPID_IHTMLTABLE_BORDER)]
@@ -17984,8 +19662,8 @@
 
     [propput, id(DISPID_IHTMLTABLE_DATAPAGESIZE)]
-    void dataPageSize(long v);
+    void dataPageSize(LONG v);
 
     [propget, id(DISPID_IHTMLTABLE_DATAPAGESIZE)]
-    long dataPageSize();
+    LONG dataPageSize();
 
     [id(DISPID_IHTMLTABLE_NEXTPAGE)]
@@ -18026,8 +19704,8 @@
 
     [id(DISPID_IHTMLTABLE_INSERTROW)]
-    IDispatch *insertRow([in, defaultvalue(-1)] long index);
+    IDispatch *insertRow([in, defaultvalue(-1)] LONG index);
 
     [id(DISPID_IHTMLTABLE_DELETEROW)]
-    void deleteRow([in, defaultvalue(-1)] long index);
+    void deleteRow([in, defaultvalue(-1)] LONG index);
 
     [id(DISPID_IHTMLTABLE2_FIRSTPAGE)]
@@ -18042,6 +19720,6 @@
     [id(DISPID_IHTMLTABLE2_MOVEROW)]
     IDispatch *moveRow(
-            [in, defaultvalue(-1)] long indexFrom,
-            [in, defaultvalue(-1)] long indexTo);
+            [in, defaultvalue(-1)] LONG indexFrom,
+            [in, defaultvalue(-1)] LONG indexTo);
 
     [propput, id(DISPID_IHTMLTABLE3_SUMMARY), displaybind, bindable]
@@ -18194,5 +19872,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -18206,14 +19884,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -18352,6 +20030,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -18506,14 +20184,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -18564,20 +20242,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -18612,10 +20290,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -18638,5 +20316,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -18813,5 +20491,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -18819,5 +20497,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -18922,8 +20600,8 @@
 
     [propget, id(DISPID_IHTMLTABLEROW_ROWINDEX)]
-    long rowIndex();
+    LONG rowIndex();
 
     [propget, id(DISPID_IHTMLTABLEROW_SECTIONROWINDEX)]
-    long sectionRowIndex();
+    LONG sectionRowIndex();
 
     [propget, id(DISPID_IHTMLTABLEROW_CELLS)]
@@ -18931,8 +20609,8 @@
 
     [id(DISPID_IHTMLTABLEROW_INSERTCELL)]
-    IDispatch *insertCell([in, defaultvalue(-1)] long index);
+    IDispatch *insertCell([in, defaultvalue(-1)] LONG index);
 
     [id(DISPID_IHTMLTABLEROW_DELETECELL)]
-    void deleteCell([in, defaultvalue(-1)] long index);
+    void deleteCell([in, defaultvalue(-1)] LONG index);
 
     [propput, id(DISPID_IHTMLTABLEROW2_HEIGHT)]
@@ -19274,5 +20952,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT_SOURCEINDEX), bindable]
-    long sourceIndex();
+    LONG sourceIndex();
 
     [propget, id(DISPID_IHTMLELEMENT_RECORDNUMBER)]
@@ -19286,14 +20964,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETLEFT)]
-    long offsetLeft();
+    LONG offsetLeft();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETTOP)]
-    long offsetTop();
+    LONG offsetTop();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETWIDTH)]
-    long offsetWidth();
+    LONG offsetWidth();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETHEIGHT)]
-    long offsetHeight();
+    LONG offsetHeight();
 
     [propget, id(DISPID_IHTMLELEMENT_OFFSETPARENT)]
@@ -19432,6 +21110,6 @@
     [id(DISPID_IHTMLELEMENT2_COMPONENTFROMPOINT)]
     BSTR componentFromPoint(
-            [in] long x,
-            [in] long y);
+            [in] LONG x,
+            [in] LONG y);
 
     [id(DISPID_IHTMLELEMENT2_DOSCROLL)]
@@ -19586,14 +21264,14 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTHEIGHT), displaybind, bindable]
-    long clientHeight();
+    LONG clientHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTWIDTH), displaybind, bindable]
-    long clientWidth();
+    LONG clientWidth();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTTOP), displaybind, bindable]
-    long clientTop();
+    LONG clientTop();
 
     [propget, id(DISPID_IHTMLELEMENT2_CLIENTLEFT), displaybind, bindable]
-    long clientLeft();
+    LONG clientLeft();
 
     [id(DISPID_IHTMLELEMENT2_ATTACHEVENT)]
@@ -19644,20 +21322,20 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLHEIGHT), displaybind, bindable]
-    long scrollHeight();
+    LONG scrollHeight();
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLWIDTH), displaybind, bindable]
-    long scrollWidth();
+    LONG scrollWidth();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    void scrollTop(long v);
+    void scrollTop(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLTOP), displaybind, bindable]
-    long scrollTop();
+    LONG scrollTop();
 
     [propput, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    void scrollLeft(long v);
+    void scrollLeft(LONG v);
 
     [propget, id(DISPID_IHTMLELEMENT2_SCROLLLEFT), displaybind, bindable]
-    long scrollLeft();
+    LONG scrollLeft();
 
     [id(DISPID_IHTMLELEMENT2_CLEARATTRIBUTES)]
@@ -19692,10 +21370,10 @@
 
     [id(DISPID_IHTMLELEMENT2_ADDBEHAVIOR)]
-    long addBehavior(
+    LONG addBehavior(
             [in] BSTR bstrUrl,
             [in, optional] VARIANT *pvarFactory);
 
     [id(DISPID_IHTMLELEMENT2_REMOVEBEHAVIOR)]
-    VARIANT_BOOL removeBehavior([in] long cookie);
+    VARIANT_BOOL removeBehavior([in] LONG cookie);
 
     [propget, id(DISPID_IHTMLELEMENT2_RUNTIMESTYLE), nonbrowsable]
@@ -19718,5 +21396,5 @@
 
     [propget, id(DISPID_IHTMLELEMENT2_READYSTATEVALUE), hidden, restricted]
-    long readyStateValue();
+    LONG readyStateValue();
 
     [id(DISPID_IHTMLELEMENT2_GETELEMENTSBYTAGNAME)]
@@ -19893,5 +21571,5 @@
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUENUMBER), hidden]
-    long uniqueNumber();
+    LONG uniqueNumber();
 
     [propget, id(DISPID_IHTMLUNIQUENAME_UNIQUEID), hidden]
@@ -19899,5 +21577,5 @@
 
     [propget, id(DISPID_IHTMLDOMNODE_NODETYPE)]
-    long nodeType();
+    LONG nodeType();
 
     [propget, id(DISPID_IHTMLDOMNODE_PARENTNODE)]
@@ -20059,14 +21737,14 @@
 
     [propput, id(DISPID_IHTMLIFRAMEELEMENT_VSPACE)]
-    void vspace(long v);
+    void vspace(LONG v);
 
     [propget, id(DISPID_IHTMLIFRAMEELEMENT_VSPACE)]
-    long vspace();
+    LONG vspace();
 
     [propput, id(DISPID_IHTMLIFRAMEELEMENT_HSPACE)]
-    void hspace(long v);
+    void hspace(LONG v);
 
     [propget, id(DISPID_IHTMLIFRAMEELEMENT_HSPACE)]
-    long hspace();
+    LONG hspace();
 
     [propput, id(DISPID_IHTMLIFRAMEELEMENT_ALIGN), displaybind, bindable]
@@ -20142,5 +21820,5 @@
         [out] MARKUP_CONTEXT_TYPE *pContext,
         [out] IHTMLElement **ppElement,
-        [in, out] long *pcch,
+        [in, out] LONG *pcch,
         [out, size_is(*pcch)] OLECHAR *pchText);
 
@@ -20149,5 +21827,5 @@
         [out] MARKUP_CONTEXT_TYPE *pContext,
         [out] IHTMLElement **ppElement,
-        [in, out] long *pcch,
+        [in, out] LONG *pcch,
         [out, size_is(*pcch)] OLECHAR *pchText);
 
@@ -20189,5 +21867,5 @@
     object,
     pointer_default(unique),
-    uuid(83f65030-b598-cf11-bb82-00aa00bdce0b)
+    uuid(3050f683-98b5-11cf-bb82-00aa00bdce0b)
 ]
 interface ISegment : IUnknown
@@ -20221,5 +21899,5 @@
     object,
     pointer_default(unique),
-    uuid(99f65030-b598-cf11-bb82-00aa00bdce0b)
+    uuid(3050f699-98b5-11cf-bb82-00aa00bdce0b)
 ]
 interface ISelectionServicesListener : IUnknown
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msi.h	(revision 19678)
@@ -37,5 +37,5 @@
 #endif
 
-typedef unsigned long MSIHANDLE;
+typedef ULONG MSIHANDLE;
 
 typedef enum tagINSTALLSTATE
@@ -55,4 +55,15 @@
     INSTALLSTATE_DEFAULT = 5
 } INSTALLSTATE;
+
+typedef enum tagMSIPATCHSTATE
+{
+    MSIPATCHSTATE_INVALID = 0,
+    MSIPATCHSTATE_APPLIED = 1,
+    MSIPATCHSTATE_SUPERSEDED = 2,
+    MSIPATCHSTATE_OBSOLETED = 4,
+    MSIPATCHSTATE_REGISTERED = 8,
+    MSIPATCHSTATE_ALL = (MSIPATCHSTATE_APPLIED | MSIPATCHSTATE_SUPERSEDED |
+                         MSIPATCHSTATE_OBSOLETED | MSIPATCHSTATE_REGISTERED)
+} MSIPATCHSTATE;
 
 typedef enum tagINSTALLUILEVEL
@@ -496,4 +507,8 @@
 #define     MsiGetProductInfoEx WINELIB_NAME_AW(MsiGetProductInfoEx)
 
+UINT WINAPI MsiGetPatchInfoExA(LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, LPSTR, LPDWORD);
+UINT WINAPI MsiGetPatchInfoExW(LPCWSTR, LPCWSTR, LPCWSTR, MSIINSTALLCONTEXT, LPCWSTR, LPWSTR, LPDWORD);
+#define     MsiGetPatchInfoEx WINELIB_NAME_AW(MsiGetPatchInfoEx)
+
 UINT WINAPI MsiEnableLogA(DWORD, LPCSTR, DWORD);
 UINT WINAPI MsiEnableLogW(DWORD, LPCWSTR, DWORD);
@@ -615,7 +630,7 @@
 
 UINT WINAPI MsiEnumPatchesExA(LPCSTR, LPCSTR, DWORD, DWORD, DWORD, LPSTR, LPSTR,
-                              MSIINSTALLCONTEXT*, LPSTR, LPSTR);
+                              MSIINSTALLCONTEXT*, LPSTR, LPDWORD);
 UINT WINAPI MsiEnumPatchesExW(LPCWSTR, LPCWSTR, DWORD, DWORD, DWORD, LPWSTR, LPWSTR,
-                              MSIINSTALLCONTEXT*, LPWSTR, LPWSTR);
+                              MSIINSTALLCONTEXT*, LPWSTR, LPDWORD);
 #define     MsiEnumPatchesEx WINELIB_NAME_AW(MsiEnumPatchesEx)
 
@@ -643,4 +658,8 @@
 UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR, DWORD, PMSIPATCHSEQUENCEINFOW);
 #define     MsiDetermineApplicablePatches WINELIB_NAME_AW(MsiDetermineApplicablePatches)
+
+UINT WINAPI MsiApplyMultiplePatchesA(LPCSTR, LPCSTR, LPCSTR);
+UINT WINAPI MsiApplyMultiplePatchesW(LPCWSTR, LPCWSTR, LPCWSTR);
+#define     MsiApplyMultiplePatches WINELIB_NAME_AW(MsiApplyMultiplePatches)
 
 /* Non Unicode */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msinkaut.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msinkaut.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msinkaut.idl	(revision 19678)
@@ -14,4 +14,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msiquery.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msiquery.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msiquery.h	(revision 19678)
@@ -57,4 +57,5 @@
 typedef enum tagMSIMODIFY
 {
+    MSIMODIFY_SEEK = -1,
     MSIMODIFY_REFRESH = 0,
     MSIMODIFY_INSERT = 1,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mstask.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mstask.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mstask.idl	(revision 19678)
@@ -18,4 +18,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mstcpip.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mstcpip.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mstcpip.h	(revision 19678)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2008 Hans Leidekker for CodeWeavers.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+struct tcp_keepalive
+{
+    u_long onoff;
+    u_long keepalivetime;
+    u_long keepaliveinterval;
+};
+
+#ifndef USE_WS_PREFIX
+
+#define SIO_RCVALL            _WSAIOW(IOC_VENDOR, 1)
+#define SIO_RCVALL_MCAST      _WSAIOW(IOC_VENDOR, 2)
+#define SIO_RCVALL_IGMPMCAST  _WSAIOW(IOC_VENDOR, 3)
+#define SIO_KEEPALIVE_VALS    _WSAIOW(IOC_VENDOR, 4)
+#define SIO_ABSORB_RTRALERT   _WSAIOW(IOC_VENDOR, 5)
+#define SIO_UCAST_IF          _WSAIOW(IOC_VENDOR, 6)
+#define SIO_LIMIT_BROADCASTS  _WSAIOW(IOC_VENDOR, 7)
+#define SIO_INDEX_BIND        _WSAIOW(IOC_VENDOR, 8)
+#define SIO_INDEX_MCASTIF     _WSAIOW(IOC_VENDOR, 9)
+#define SIO_INDEX_ADD_MCAST   _WSAIOW(IOC_VENDOR, 10)
+#define SIO_INDEX_DEL_MCAST   _WSAIOW(IOC_VENDOR, 11)
+
+#define RCVALL_OFF             0
+#define RCVALL_ON              1
+#define RCVALL_SOCKETLEVELONLY 2
+
+#else
+
+#define WS_SIO_RCVALL            _WSAIOW(WS_IOC_VENDOR, 1)
+#define WS_SIO_RCVALL_MCAST      _WSAIOW(WS_IOC_VENDOR, 2)
+#define WS_SIO_RCVALL_IGMPMCAST  _WSAIOW(WS_IOC_VENDOR, 3)
+#define WS_SIO_KEEPALIVE_VALS    _WSAIOW(WS_IOC_VENDOR, 4)
+#define WS_SIO_ABSORB_RTRALERT   _WSAIOW(WS_IOC_VENDOR, 5)
+#define WS_SIO_UCAST_IF          _WSAIOW(WS_IOC_VENDOR, 6)
+#define WS_SIO_LIMIT_BROADCASTS  _WSAIOW(WS_IOC_VENDOR, 7)
+#define WS_SIO_INDEX_BIND        _WSAIOW(WS_IOC_VENDOR, 8)
+#define WS_SIO_INDEX_MCASTIF     _WSAIOW(WS_IOC_VENDOR, 9)
+#define WS_SIO_INDEX_ADD_MCAST   _WSAIOW(WS_IOC_VENDOR, 10)
+#define WS_SIO_INDEX_DEL_MCAST   _WSAIOW(WS_IOC_VENDOR, 11)
+
+#define WS_RCVALL_OFF             0
+#define WS_RCVALL_ON              1
+#define WS_RCVALL_SOCKETLEVELONLY 2
+
+#endif /* USE_WS_PREFIX */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/conio.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/conio.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/conio.h	(revision 19678)
@@ -6,9 +6,17 @@
  * This file is in the public domain.
  */
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_CONIO_H
 #define __WINE_CONIO_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #ifdef __cplusplus
@@ -16,21 +24,21 @@
 #endif
 
-char*       _cgets(char*);
-int         _cprintf(const char*,...);
-int         _cputs(const char*);
-int         _cscanf(const char*,...);
-int         _getch(void);
-int         _getche(void);
-int         _kbhit(void);
-int         _putch(int);
-int         _ungetch(int);
+char* __cdecl _cgets(char*);
+int   __cdecl _cprintf(const char*,...);
+int   __cdecl _cputs(const char*);
+int   __cdecl _cscanf(const char*,...);
+int   __cdecl _getch(void);
+int   __cdecl _getche(void);
+int   __cdecl _kbhit(void);
+int   __cdecl _putch(int);
+int   __cdecl _ungetch(int);
 
 #ifdef _M_IX86
-int         _inp(unsigned short);
-unsigned long _inpd(unsigned short);
-unsigned short _inpw(unsigned short);
-int         _outp(unsigned short, int);
-unsigned long _outpd(unsigned short, unsigned long);
-unsigned short _outpw(unsigned short, unsigned short);
+int            __cdecl _inp(unsigned short);
+unsigned long  __cdecl _inpd(unsigned short);
+unsigned short __cdecl _inpw(unsigned short);
+int            __cdecl _outp(unsigned short, int);
+unsigned long  __cdecl _outpd(unsigned short, unsigned long);
+unsigned short __cdecl _outpw(unsigned short, unsigned short);
 #endif
 
@@ -55,6 +63,6 @@
 
 #if defined(__GNUC__) && (__GNUC__ < 4)
-extern int cprintf(const char*,...) __attribute__((alias("_cprintf"),format(printf,1,2)));
-extern int cscanf(const char*,...) __attribute__((alias("_cscanf"),format(scanf,1,2)));
+extern int __cdecl cprintf(const char*,...) __attribute__((alias("_cprintf"),format(printf,1,2)));
+extern int __cdecl cscanf(const char*,...) __attribute__((alias("_cscanf"),format(scanf,1,2)));
 #else
 #define cprintf _cprintf
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/crtdbg.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/crtdbg.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/crtdbg.h	(revision 19678)
@@ -18,5 +18,4 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-
 /*
  * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
@@ -27,9 +26,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_CRTDBG_H_
 #define __WINE_CRTDBG_H_
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 /* The debug API is not implemented in Winelib.
@@ -95,12 +94,12 @@
 extern int _crtDbgFlag;
 
-int   _CrtCheckMemory(void);
-int   _CrtDbgReport(int reportType, const char *filename, int linenumber,
-                    const char *moduleName, const char *format, ...);
-int   _CrtDumpMemoryLeaks(void);
-int   _CrtSetBreakAlloc(int new);
-int   _CrtSetDbgFlag(int new);
-void *_CrtSetDumpClient(void *dumpClient);
-int   _CrtSetReportMode(int reportType, int reportMode);
+int   __cdecl _CrtCheckMemory(void);
+int   __cdecl _CrtDbgReport(int reportType, const char *filename, int linenumber,
+                            const char *moduleName, const char *format, ...);
+int   __cdecl _CrtDumpMemoryLeaks(void);
+int   __cdecl _CrtSetBreakAlloc(int new);
+int   __cdecl _CrtSetDbgFlag(int new);
+void *__cdecl _CrtSetDumpClient(void *dumpClient);
+int   __cdecl _CrtSetReportMode(int reportType, int reportMode);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/crtdefs.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/crtdefs.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/crtdefs.h	(revision 19678)
@@ -0,0 +1,158 @@
+/*
+ * CRT definitions
+ *
+ * Copyright 2000 Francois Gouget.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_USE_MSVCRT
+#define __WINE_USE_MSVCRT
+#endif
+
+#if defined(__x86_64__) && !defined(_WIN64)
+#define _WIN64
+#endif
+
+#if !defined(_MSC_VER) && !defined(__int64)
+# if defined(_WIN64) && !defined(__MINGW64__)
+#   define __int64 long
+# else
+#   define __int64 long long
+# endif
+#endif
+
+#ifndef __stdcall
+# ifdef __i386__
+#  ifdef __GNUC__
+#   ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */
+#    define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
+#   else
+#    define __stdcall __attribute__((__stdcall__))
+#   endif
+#  elif defined(_MSC_VER)
+    /* Nothing needs to be done. __stdcall already exists */
+#  else
+#   error You need to define __stdcall for your compiler
+#  endif
+# elif defined(__x86_64__) && defined (__GNUC__)
+#  define __stdcall __attribute__((ms_abi))
+# else
+#  define __stdcall
+# endif
+#endif /* __stdcall */
+
+#ifndef __cdecl
+# if defined(__i386__) && defined(__GNUC__)
+#  ifdef __APPLE__ /* Mac OS X uses 16-byte aligned stack and not a 4-byte one */
+#   define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
+#  else
+#   define __cdecl __attribute__((__cdecl__))
+#  endif
+# elif defined(__x86_64__) && defined (__GNUC__)
+#  define __cdecl __attribute__((ms_abi))
+# elif !defined(_MSC_VER)
+#  define __cdecl
+# endif
+#endif /* __cdecl */
+
+#ifndef __ms_va_list
+# if defined(__x86_64__) && defined (__GNUC__)
+#  define __ms_va_list __builtin_ms_va_list
+#  define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
+#  define __ms_va_end(list) __builtin_ms_va_end(list)
+# else
+#  define __ms_va_list va_list
+#  define __ms_va_start(list,arg) va_start(list,arg)
+#  define __ms_va_end(list) va_end(list)
+# endif
+#endif
+
+#ifndef _INTPTR_T_DEFINED
+#ifdef  _WIN64
+typedef __int64 intptr_t;
+#else
+typedef int intptr_t;
+#endif
+#define _INTPTR_T_DEFINED
+#endif
+
+#ifndef _UINTPTR_T_DEFINED
+#ifdef  _WIN64
+typedef unsigned __int64 uintptr_t;
+#else
+typedef unsigned int uintptr_t;
+#endif
+#define _UINTPTR_T_DEFINED
+#endif
+
+#ifndef _PTRDIFF_T_DEFINED
+#ifdef _WIN64
+typedef __int64 ptrdiff_t;
+#else
+typedef int ptrdiff_t;
+#endif
+#define _PTRDIFF_T_DEFINED
+#endif
+
+#ifndef _SIZE_T_DEFINED
+#ifdef _WIN64
+typedef unsigned __int64 size_t;
+#else
+typedef unsigned int size_t;
+#endif
+#define _SIZE_T_DEFINED
+#endif
+
+#ifndef _TIME32_T_DEFINED
+typedef long __time32_t;
+#define _TIME32_T_DEFINED
+#endif
+
+#ifndef _TIME64_T_DEFINED
+typedef __int64 __time64_t;
+#define _TIME64_T_DEFINED
+#endif
+
+#ifndef _TIME_T_DEFINED
+#ifdef _WIN64
+typedef __time64_t time_t;
+#else
+typedef __time32_t time_t;
+#endif
+#define _TIME_T_DEFINED
+#endif
+
+#ifndef _WCHAR_T_DEFINED
+#ifndef __cplusplus
+typedef unsigned short wchar_t;
+#endif
+#define _WCHAR_T_DEFINED
+#endif
+
+#ifndef _WCTYPE_T_DEFINED
+typedef unsigned short  wint_t;
+typedef unsigned short  wctype_t;
+#define _WCTYPE_T_DEFINED
+#endif
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/ctype.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/ctype.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/ctype.h	(revision 19678)
@@ -6,9 +6,17 @@
  * This file is in the public domain.
  */
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_CTYPE_H
 #define __WINE_CTYPE_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #ifdef __cplusplus
@@ -16,19 +24,6 @@
 #endif
 
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
 #ifndef WEOF
 #define WEOF        (wint_t)(0xFFFF)
-#endif
-
-#ifndef _WCTYPE_T_DEFINED
-typedef unsigned short  wint_t;
-typedef unsigned short  wctype_t;
-#define _WCTYPE_T_DEFINED
 #endif
 
@@ -45,44 +40,44 @@
 #define _ALPHA       (0x0100|_UPPER|_LOWER)  /* (C1_ALPHA|_UPPER|_LOWER) */
 
-int __isascii(int);
-int __iscsym(int);
-int __iscsymf(int);
-int __toascii(int);
-int _isctype(int,int);
-int _tolower(int);
-int _toupper(int);
-int isalnum(int);
-int isalpha(int);
-int iscntrl(int);
-int isdigit(int);
-int isgraph(int);
-int islower(int);
-int isprint(int);
-int ispunct(int);
-int isspace(int);
-int isupper(int);
-int isxdigit(int);
-int tolower(int);
-int toupper(int);
+int __cdecl __isascii(int);
+int __cdecl __iscsym(int);
+int __cdecl __iscsymf(int);
+int __cdecl __toascii(int);
+int __cdecl _isctype(int,int);
+int __cdecl _tolower(int);
+int __cdecl _toupper(int);
+int __cdecl isalnum(int);
+int __cdecl isalpha(int);
+int __cdecl iscntrl(int);
+int __cdecl isdigit(int);
+int __cdecl isgraph(int);
+int __cdecl islower(int);
+int __cdecl isprint(int);
+int __cdecl ispunct(int);
+int __cdecl isspace(int);
+int __cdecl isupper(int);
+int __cdecl isxdigit(int);
+int __cdecl tolower(int);
+int __cdecl toupper(int);
 
 #ifndef _WCTYPE_DEFINED
 #define _WCTYPE_DEFINED
-int is_wctype(wint_t,wctype_t);
-int isleadbyte(int);
-int iswalnum(wint_t);
-int iswalpha(wint_t);
-int iswascii(wint_t);
-int iswcntrl(wint_t);
-int iswctype(wint_t,wctype_t);
-int iswdigit(wint_t);
-int iswgraph(wint_t);
-int iswlower(wint_t);
-int iswprint(wint_t);
-int iswpunct(wint_t);
-int iswspace(wint_t);
-int iswupper(wint_t);
-int iswxdigit(wint_t);
-wchar_t towlower(wchar_t);
-wchar_t towupper(wchar_t);
+int __cdecl is_wctype(wint_t,wctype_t);
+int __cdecl isleadbyte(int);
+int __cdecl iswalnum(wint_t);
+int __cdecl iswalpha(wint_t);
+int __cdecl iswascii(wint_t);
+int __cdecl iswcntrl(wint_t);
+int __cdecl iswctype(wint_t,wctype_t);
+int __cdecl iswdigit(wint_t);
+int __cdecl iswgraph(wint_t);
+int __cdecl iswlower(wint_t);
+int __cdecl iswprint(wint_t);
+int __cdecl iswpunct(wint_t);
+int __cdecl iswspace(wint_t);
+int __cdecl iswupper(wint_t);
+int __cdecl iswxdigit(wint_t);
+wchar_t __cdecl towlower(wchar_t);
+wchar_t __cdecl towupper(wchar_t);
 #endif /* _WCTYPE_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/direct.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/direct.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/direct.h	(revision 19678)
@@ -6,9 +6,17 @@
  * This file is in the public domain.
  */
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_DIRECT_H
 #define __WINE_DIRECT_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
@@ -16,32 +24,4 @@
 #ifdef __cplusplus
 extern "C" {
-#endif
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
-
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
 #endif
 
@@ -56,20 +36,20 @@
 #endif /* _DISKFREE_T_DEFINED */
 
-int         _chdir(const char*);
-int         _chdrive(int);
-char*       _getcwd(char*,int);
-char*       _getdcwd(int,char*,int);
-int         _getdrive(void);
-unsigned long _getdrives(void);
-int         _mkdir(const char*);
-int         _rmdir(const char*);
+int           __cdecl _chdir(const char*);
+int           __cdecl _chdrive(int);
+char*         __cdecl _getcwd(char*,int);
+char*         __cdecl _getdcwd(int,char*,int);
+int           __cdecl _getdrive(void);
+unsigned long __cdecl _getdrives(void);
+int           __cdecl _mkdir(const char*);
+int           __cdecl _rmdir(const char*);
 
 #ifndef _WDIRECT_DEFINED
 #define _WDIRECT_DEFINED
-int              _wchdir(const wchar_t*);
-wchar_t* _wgetcwd(wchar_t*,int);
-wchar_t* _wgetdcwd(int,wchar_t*,int);
-int              _wmkdir(const wchar_t*);
-int              _wrmdir(const wchar_t*);
+int      __cdecl _wchdir(const wchar_t*);
+wchar_t* __cdecl _wgetcwd(wchar_t*,int);
+wchar_t* __cdecl _wgetdcwd(int,wchar_t*,int);
+int      __cdecl _wmkdir(const wchar_t*);
+int      __cdecl _wrmdir(const wchar_t*);
 #endif /* _WDIRECT_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/dos.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/dos.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/dos.h	(revision 19678)
@@ -6,9 +6,17 @@
  * This file is in the public domain.
  */
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_DOS_H
 #define __WINE_DOS_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
@@ -38,5 +46,5 @@
 #endif
 
-unsigned int _getdiskfree(unsigned int, struct _diskfree_t *);
+unsigned int __cdecl _getdiskfree(unsigned int, struct _diskfree_t *);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/eh.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/eh.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/eh.h	(revision 19678)
@@ -18,5 +18,4 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-
 /*
  * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
@@ -27,9 +26,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_EH_H
 #define __WINE_EH_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #if !defined(__cplusplus) && !defined(__WINE_MSVCRT_TEST)
@@ -41,16 +40,16 @@
 struct _EXCEPTION_POINTERS;
 
-typedef void (*terminate_handler)(void);
-typedef void (*terminate_function)(void);
-typedef void (*unexpected_handler)(void);
-typedef void (*unexpected_function)(void);
-typedef void (*_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info);
+typedef void (__cdecl *terminate_handler)(void);
+typedef void (__cdecl *terminate_function)(void);
+typedef void (__cdecl *unexpected_handler)(void);
+typedef void (__cdecl *unexpected_function)(void);
+typedef void (__cdecl *_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info);
 
-terminate_function set_terminate(terminate_function func);
-unexpected_function set_unexpected(unexpected_function func);
-_se_translator_function _set_se_translator(_se_translator_function func);
+terminate_function __cdecl set_terminate(terminate_function func);
+unexpected_function __cdecl set_unexpected(unexpected_function func);
+_se_translator_function __cdecl set_se_translator(_se_translator_function func);
 
-void        terminate(void);
-void        unexpected(void);
+void __cdecl terminate(void);
+void __cdecl unexpected(void);
 
 #include <poppack.h>
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/errno.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/errno.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/errno.h	(revision 19678)
@@ -28,7 +28,6 @@
 #ifndef __WINE_ERRNO_H
 #define __WINE_ERRNO_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #  define EPERM   1
@@ -76,5 +75,5 @@
 #endif
 
-extern int* _errno(void);
+extern int* __cdecl _errno(void);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/fcntl.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/fcntl.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/fcntl.h	(revision 19678)
@@ -6,9 +6,17 @@
  * This file is in the public domain.
  */
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_FCNTL_H
 #define __WINE_FCNTL_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #define _O_RDONLY      0
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/float.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/float.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/float.h	(revision 19678)
@@ -7,9 +7,17 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_FLOAT_H
 #define __WINE_FLOAT_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #ifdef __cplusplus
@@ -128,12 +136,12 @@
 #define _FPE_EXPLICITGEN        0x8c
 
-double _copysign (double, double);
-double _chgsign (double);
-double _scalb(double, long);
-double _logb(double);
-double _nextafter(double, double);
-int    _finite(double);
-int    _isnan(double);
-int    _fpclass(double);
+double __cdecl _copysign (double, double);
+double __cdecl _chgsign (double);
+double __cdecl _scalb(double, long);
+double __cdecl _logb(double);
+double __cdecl _nextafter(double, double);
+int    __cdecl _finite(double);
+int    __cdecl _isnan(double);
+int    __cdecl _fpclass(double);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/io.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/io.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/io.h	(revision 19678)
@@ -6,30 +6,19 @@
  * This file is in the public domain.
  */
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_IO_H
 #define __WINE_IO_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
 
 /* The following are also defined in dos.h */
@@ -41,9 +30,4 @@
 #define _A_SUBDIR 0x00000010
 #define _A_ARCH   0x00000020
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
 
 #ifndef _FSIZE_T_DEFINED
@@ -100,55 +84,55 @@
 #endif
 
-int         _access(const char*,int);
-int         _chmod(const char*,int);
-int         _chsize(int,long);
-int         _close(int);
-int         _commit(int);
-int         _creat(const char*,int);
-int         _dup(int);
-int         _dup2(int,int);
-int         _eof(int);
-__int64     _filelengthi64(int);
-long        _filelength(int);
-int         _findclose(long);
-long        _findfirst(const char*,struct _finddata_t*);
-long        _findfirsti64(const char*, struct _finddatai64_t*);
-int         _findnext(long,struct _finddata_t*);
-int         _findnexti64(long, struct _finddatai64_t*);
-long        _get_osfhandle(int);
-int         _isatty(int);
-int         _locking(int,int,long);
-long        _lseek(int,long,int);
-__int64     _lseeki64(int,__int64,int);
-char*       _mktemp(char*);
-int         _open(const char*,int,...);
-int         _open_osfhandle(long,int);
-int         _pipe(int*,unsigned int,int);
-int         _read(int,void*,unsigned int);
-int         _setmode(int,int);
-int         _sopen(const char*,int,int,...);
-long        _tell(int);
-__int64     _telli64(int);
-int         _umask(int);
-int         _unlink(const char*);
-int         _write(int,const void*,unsigned int);
+int         __cdecl _access(const char*,int);
+int         __cdecl _chmod(const char*,int);
+int         __cdecl _chsize(int,long);
+int         __cdecl _close(int);
+int         __cdecl _commit(int);
+int         __cdecl _creat(const char*,int);
+int         __cdecl _dup(int);
+int         __cdecl _dup2(int,int);
+int         __cdecl _eof(int);
+__int64     __cdecl _filelengthi64(int);
+long        __cdecl _filelength(int);
+int         __cdecl _findclose(intptr_t);
+intptr_t    __cdecl _findfirst(const char*,struct _finddata_t*);
+intptr_t    __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
+int         __cdecl _findnext(intptr_t,struct _finddata_t*);
+int         __cdecl _findnexti64(intptr_t, struct _finddatai64_t*);
+intptr_t    __cdecl _get_osfhandle(int);
+int         __cdecl _isatty(int);
+int         __cdecl _locking(int,int,long);
+long        __cdecl _lseek(int,long,int);
+__int64     __cdecl _lseeki64(int,__int64,int);
+char*       __cdecl _mktemp(char*);
+int         __cdecl _open(const char*,int,...);
+int         __cdecl _open_osfhandle(intptr_t,int);
+int         __cdecl _pipe(int*,unsigned int,int);
+int         __cdecl _read(int,void*,unsigned int);
+int         __cdecl _setmode(int,int);
+int         __cdecl _sopen(const char*,int,int,...);
+long        __cdecl _tell(int);
+__int64     __cdecl _telli64(int);
+int         __cdecl _umask(int);
+int         __cdecl _unlink(const char*);
+int         __cdecl _write(int,const void*,unsigned int);
 
-int         remove(const char*);
-int         rename(const char*,const char*);
+int         __cdecl remove(const char*);
+int         __cdecl rename(const char*,const char*);
 
 #ifndef _WIO_DEFINED
 #define _WIO_DEFINED
-int         _waccess(const wchar_t*,int);
-int         _wchmod(const wchar_t*,int);
-int         _wcreat(const wchar_t*,int);
-long        _wfindfirst(const wchar_t*,struct _wfinddata_t*);
-long        _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
-int         _wfindnext(long,struct _wfinddata_t*);
-int         _wfindnexti64(long, struct _wfinddatai64_t*);
-wchar_t*_wmktemp(wchar_t*);
-int         _wopen(const wchar_t*,int,...);
-int         _wrename(const wchar_t*,const wchar_t*);
-int         _wsopen(const wchar_t*,int,int,...);
-int         _wunlink(const wchar_t*);
+int         __cdecl _waccess(const wchar_t*,int);
+int         __cdecl _wchmod(const wchar_t*,int);
+int         __cdecl _wcreat(const wchar_t*,int);
+intptr_t    __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*);
+intptr_t    __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
+int         __cdecl _wfindnext(intptr_t,struct _wfinddata_t*);
+int         __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t*);
+wchar_t *   __cdecl _wmktemp(wchar_t*);
+int         __cdecl _wopen(const wchar_t*,int,...);
+int         __cdecl _wrename(const wchar_t*,const wchar_t*);
+int         __cdecl _wsopen(const wchar_t*,int,int,...);
+int         __cdecl _wunlink(const wchar_t*);
 #endif /* _WIO_DEFINED */
 
@@ -185,6 +169,6 @@
 
 #if defined(__GNUC__) && (__GNUC__ < 4)
-extern int open(const char*,int,...) __attribute__((alias("_open")));
-extern int sopen(const char*,int,int,...) __attribute__((alias("_sopen")));
+extern int __cdecl open(const char*,int,...) __attribute__((alias("_open")));
+extern int __cdecl sopen(const char*,int,int,...) __attribute__((alias("_sopen")));
 #else
 #define open _open
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/limits.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/limits.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/limits.h	(revision 19678)
@@ -1,4 +1,6 @@
 #ifndef __WINE_LIMITS_H
 #define __WINE_LIMITS_H
+
+#include <crtdefs.h>
 
 #define CHAR_BIT 8
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/locale.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/locale.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/locale.h	(revision 19678)
@@ -27,16 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_LOCALE_H
 #define __WINE_LOCALE_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
 
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
+#include <crtdefs.h>
 
 #define LC_ALL                 0
@@ -79,10 +72,10 @@
 #endif
 
-char*       setlocale(int,const char*);
-struct lconv* localeconv(void);
+char*         __cdecl setlocale(int,const char*);
+struct lconv* __cdecl localeconv(void);
 
 #ifndef _WLOCALE_DEFINED
 #define _WLOCALE_DEFINED
-wchar_t* _wsetlocale(int,const wchar_t*);
+wchar_t* __cdecl _wsetlocale(int,const wchar_t*);
 #endif /* _WLOCALE_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/malloc.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/malloc.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/malloc.h	(revision 19678)
@@ -27,9 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_MALLOC_H
 #define __WINE_MALLOC_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 /* heap function constants */
@@ -44,25 +44,4 @@
 #define _USEDENTRY     1
 
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
-
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
-
 #ifndef _HEAPINFO_DEFINED
 #define _HEAPINFO_DEFINED
@@ -75,6 +54,10 @@
 #endif /* _HEAPINFO_DEFINED */
 
-extern unsigned int* __p__amblksiz(void);
+#ifdef __i386__
+extern unsigned int* __cdecl __p__amblksiz(void);
 #define _amblksiz (*__p__amblksiz());
+#else
+extern unsigned int _amblksiz;
+#endif
 
 #ifdef __cplusplus
@@ -82,26 +65,26 @@
 #endif
 
-void*       _expand(void*,size_t);
-int         _heapadd(void*,size_t);
-int         _heapchk(void);
-int         _heapmin(void);
-int         _heapset(unsigned int);
-size_t _heapused(size_t*,size_t*);
-int         _heapwalk(_HEAPINFO*);
-size_t _msize(void*);
+void*  __cdecl _expand(void*,size_t);
+int    __cdecl _heapadd(void*,size_t);
+int    __cdecl _heapchk(void);
+int    __cdecl _heapmin(void);
+int    __cdecl _heapset(unsigned int);
+size_t __cdecl _heapused(size_t*,size_t*);
+int    __cdecl _heapwalk(_HEAPINFO*);
+size_t __cdecl _msize(void*);
 
-void*       calloc(size_t,size_t);
-void        free(void*);
-void*       malloc(size_t);
-void*       realloc(void*,size_t);
+void*  __cdecl calloc(size_t,size_t);
+void   __cdecl free(void*);
+void*  __cdecl malloc(size_t);
+void*  __cdecl realloc(void*,size_t);
 
-void        _aligned_free(void*);
-void*       _aligned_malloc(size_t,size_t);
-void*       _aligned_offset_malloc(size_t,size_t,size_t);
-void*       _aligned_realloc(void*,size_t,size_t);
-void*       _aligned_offset_realloc(void*,size_t,size_t,size_t);
+void   __cdecl _aligned_free(void*);
+void*  __cdecl _aligned_malloc(size_t,size_t);
+void*  __cdecl _aligned_offset_malloc(size_t,size_t,size_t);
+void*  __cdecl _aligned_realloc(void*,size_t,size_t);
+void*  __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t);
 
-size_t _get_sbh_threshold(void);
-int _set_sbh_threshold(size_t size);
+size_t __cdecl _get_sbh_threshold(void);
+int    __cdecl _set_sbh_threshold(size_t size);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/math.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/math.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/math.h	(revision 19678)
@@ -7,9 +7,17 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_MATH_H
 #define __WINE_MATH_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
@@ -47,37 +55,37 @@
 #endif /* _COMPLEX_DEFINED */
 
-double sin(double);
-double cos(double);
-double tan(double);
-double sinh(double);
-double cosh(double);
-double tanh(double);
-double asin(double);
-double acos(double);
-double atan(double);
-double atan2(double, double);
-double exp(double);
-double log(double);
-double log10(double);
-double pow(double, double);
-double sqrt(double);
-double ceil(double);
-double floor(double);
-double fabs(double);
-double ldexp(double, int);
-double frexp(double, int*);
-double modf(double, double*);
-double fmod(double, double);
+double __cdecl sin(double);
+double __cdecl cos(double);
+double __cdecl tan(double);
+double __cdecl sinh(double);
+double __cdecl cosh(double);
+double __cdecl tanh(double);
+double __cdecl asin(double);
+double __cdecl acos(double);
+double __cdecl atan(double);
+double __cdecl atan2(double, double);
+double __cdecl exp(double);
+double __cdecl log(double);
+double __cdecl log10(double);
+double __cdecl pow(double, double);
+double __cdecl sqrt(double);
+double __cdecl ceil(double);
+double __cdecl floor(double);
+double __cdecl fabs(double);
+double __cdecl ldexp(double, int);
+double __cdecl frexp(double, int*);
+double __cdecl modf(double, double*);
+double __cdecl fmod(double, double);
 
-double hypot(double, double);
-double j0(double);
-double j1(double);
-double jn(int, double);
-double y0(double);
-double y1(double);
-double yn(int, double);
+double __cdecl hypot(double, double);
+double __cdecl j0(double);
+double __cdecl j1(double);
+double __cdecl jn(int, double);
+double __cdecl y0(double);
+double __cdecl y1(double);
+double __cdecl yn(int, double);
 
-int _matherr(struct _exception*);
-double _cabs(struct _complex);
+int __cdecl _matherr(struct _exception*);
+double __cdecl _cabs(struct _complex);
 
 #ifndef HUGE_VAL
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/mbctype.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/mbctype.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/mbctype.h	(revision 19678)
@@ -27,9 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_MBCTYPE_H
 #define __WINE_MBCTYPE_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #ifdef __cplusplus
@@ -37,6 +37,10 @@
 #endif
 
-unsigned char* __p__mbctype(void);
+#ifdef __i386__
+unsigned char* __cdecl __p__mbctype(void);
 #define _mbctype                   (__p__mbctype())
+#else
+extern unsigned char MSVCRT_mbctype[];
+#endif
 
 #define _MS     0x01
@@ -60,22 +64,22 @@
 #define _MB_CP_LOCALE   -4
 
-int         _getmbcp(void);
-int         _ismbbalnum(unsigned int);
-int         _ismbbalpha(unsigned int);
-int         _ismbbgraph(unsigned int);
-int         _ismbbkalnum(unsigned int);
-int         _ismbbkana(unsigned int);
-int         _ismbbkprint(unsigned int);
-int         _ismbbkpunct(unsigned int);
-int         _ismbbprint(unsigned int);
-int         _ismbbpunct(unsigned int);
-int         _setmbcp(int);
+int __cdecl _getmbcp(void);
+int __cdecl _ismbbalnum(unsigned int);
+int __cdecl _ismbbalpha(unsigned int);
+int __cdecl _ismbbgraph(unsigned int);
+int __cdecl _ismbbkalnum(unsigned int);
+int __cdecl _ismbbkana(unsigned int);
+int __cdecl _ismbbkprint(unsigned int);
+int __cdecl _ismbbkpunct(unsigned int);
+int __cdecl _ismbbprint(unsigned int);
+int __cdecl _ismbbpunct(unsigned int);
+int __cdecl _setmbcp(int);
 
 #ifndef _MBLEADTRAIL_DEFINED
 #define _MBLEADTRAIL_DEFINED
-int         _ismbblead(unsigned int);
-int         _ismbbtrail(unsigned int);
-int         _ismbslead(const unsigned char*,const unsigned char*);
-int         _ismbstrail(const unsigned char*,const unsigned char*);
+int __cdecl _ismbblead(unsigned int);
+int __cdecl _ismbbtrail(unsigned int);
+int __cdecl _ismbslead(const unsigned char*,const unsigned char*);
+int __cdecl _ismbstrail(const unsigned char*,const unsigned char*);
 #endif /* _MBLEADTRAIL_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/mbstring.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/mbstring.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/mbstring.h	(revision 19678)
@@ -27,32 +27,11 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_MBSTRING_H
 #define __WINE_MBSTRING_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
-
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
-
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
 
 #ifndef _NLSCMP_DEFINED
@@ -65,83 +44,80 @@
 #endif
 
-int         _ismbcalnum(unsigned int);
-int         _ismbcalpha(unsigned int);
-int         _ismbcdigit(unsigned int);
-int         _ismbcgraph(unsigned int);
-int         _ismbchira(unsigned int);
-int         _ismbckata(unsigned int);
-int         _ismbcl0(unsigned int);
-int         _ismbcl1(unsigned int);
-int         _ismbcl2(unsigned int);
-int         _ismbclegal(unsigned int);
-int         _ismbclower(unsigned int);
-int         _ismbcprint(unsigned int);
-int         _ismbcpunct(unsigned int);
-int         _ismbcspace(unsigned int);
-int         _ismbcsymbol(unsigned int);
-int         _ismbcupper(unsigned int);
-unsigned int _mbbtombc(unsigned int);
-int         _mbbtype(unsigned char,int);
-#define     _mbccmp(_cpc1,_cpc2) _mbsncmp((_cpc1),(_cpc2),1)
-void        _mbccpy(unsigned char*,const unsigned char*);
-unsigned int _mbcjistojms(unsigned int);
-unsigned int _mbcjmstojis(unsigned int);
-size_t _mbclen(const unsigned char*);
-unsigned int _mbctohira(unsigned int);
-unsigned int _mbctokata(unsigned int);
-unsigned int _mbctolower(unsigned int);
-unsigned int _mbctombb(unsigned int);
-unsigned int _mbctoupper(unsigned int);
-int         _mbsbtype(const unsigned char*,size_t);
-unsigned char* _mbscat(unsigned char*,const unsigned char*);
-unsigned char* _mbschr(const unsigned char*,unsigned int);
-int         _mbscmp(const unsigned char*,const unsigned char*);
-int         _mbscoll(const unsigned char*,const unsigned char*);
-unsigned char* _mbscpy(unsigned char*,const unsigned char*);
-size_t _mbscspn(const unsigned char*,const unsigned char*);
-unsigned char* _mbsdec(const unsigned char*,const unsigned char*);
-unsigned char* _mbsdup(const unsigned char*);
-int         _mbsicmp(const unsigned char*,const unsigned char*);
-int         _mbsicoll(const unsigned char*,const unsigned char*);
-unsigned char* _mbsinc(const unsigned char*);
-size_t _mbslen(const unsigned char*);
-unsigned char* _mbslwr(unsigned char*);
-unsigned char* _mbsnbcat(unsigned char*,const unsigned char*,size_t);
-int         _mbsnbcmp(const unsigned char*,const unsigned char*,size_t);
-int         _mbsnbcoll(const unsigned char*,const unsigned char*,size_t);
-size_t _mbsnbcnt(const unsigned char*,size_t);
-unsigned char* _mbsnbcpy(unsigned char*,const unsigned char*
-,size_t);
-int         _mbsnbicmp(const unsigned char*,const unsigned char*,size_t);
-int         _mbsnbicoll(const unsigned char*,const unsigned char*,size_t);
-unsigned char* _mbsnbset(unsigned char*,unsigned int,size_t)
-;
-unsigned char* _mbsncat(unsigned char*,const unsigned char*,
- size_t);
-size_t _mbsnccnt(const unsigned char*,size_t);
-int         _mbsncmp(const unsigned char*,const unsigned char*,size_t);
-int         _mbsncoll(const unsigned char*,const unsigned char*,size_t);
-unsigned char* _mbsncpy(unsigned char*,const unsigned char*,size_t);
-unsigned int _mbsnextc (const unsigned char*);
-int         _mbsnicmp(const unsigned char*,const unsigned char*,size_t);
-int         _mbsnicoll(const unsigned char*,const unsigned char*,size_t);
-unsigned char* _mbsninc(const unsigned char*,size_t);
-unsigned char* _mbsnset(unsigned char*,unsigned int,size_t);
-unsigned char* _mbspbrk(const unsigned char*,const unsigned char*);
-unsigned char* _mbsrchr(const unsigned char*,unsigned int);
-unsigned char* _mbsrev(unsigned char*);
-unsigned char* _mbsset(unsigned char*,unsigned int);
-size_t _mbsspn(const unsigned char*,const unsigned char*);
-unsigned char* _mbsspnp(const unsigned char*,const unsigned char*);
-unsigned char* _mbsstr(const unsigned char*,const unsigned char*);
-unsigned char* _mbstok(unsigned char*,const unsigned char*);
-unsigned char* _mbsupr(unsigned char*);
+int            __cdecl _ismbcalnum(unsigned int);
+int            __cdecl _ismbcalpha(unsigned int);
+int            __cdecl _ismbcdigit(unsigned int);
+int            __cdecl _ismbcgraph(unsigned int);
+int            __cdecl _ismbchira(unsigned int);
+int            __cdecl _ismbckata(unsigned int);
+int            __cdecl _ismbcl0(unsigned int);
+int            __cdecl _ismbcl1(unsigned int);
+int            __cdecl _ismbcl2(unsigned int);
+int            __cdecl _ismbclegal(unsigned int);
+int            __cdecl _ismbclower(unsigned int);
+int            __cdecl _ismbcprint(unsigned int);
+int            __cdecl _ismbcpunct(unsigned int);
+int            __cdecl _ismbcspace(unsigned int);
+int            __cdecl _ismbcsymbol(unsigned int);
+int            __cdecl _ismbcupper(unsigned int);
+unsigned int   __cdecl _mbbtombc(unsigned int);
+int            __cdecl _mbbtype(unsigned char,int);
+#define                _mbccmp(_cpc1,_cpc2) _mbsncmp((_cpc1),(_cpc2),1)
+void           __cdecl _mbccpy(unsigned char*,const unsigned char*);
+unsigned int   __cdecl _mbcjistojms(unsigned int);
+unsigned int   __cdecl _mbcjmstojis(unsigned int);
+size_t         __cdecl _mbclen(const unsigned char*);
+unsigned int   __cdecl _mbctohira(unsigned int);
+unsigned int   __cdecl _mbctokata(unsigned int);
+unsigned int   __cdecl _mbctolower(unsigned int);
+unsigned int   __cdecl _mbctombb(unsigned int);
+unsigned int   __cdecl _mbctoupper(unsigned int);
+int            __cdecl _mbsbtype(const unsigned char*,size_t);
+unsigned char* __cdecl _mbscat(unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbschr(const unsigned char*,unsigned int);
+int            __cdecl _mbscmp(const unsigned char*,const unsigned char*);
+int            __cdecl _mbscoll(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbscpy(unsigned char*,const unsigned char*);
+size_t         __cdecl _mbscspn(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbsdec(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbsdup(const unsigned char*);
+int            __cdecl _mbsicmp(const unsigned char*,const unsigned char*);
+int            __cdecl _mbsicoll(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbsinc(const unsigned char*);
+size_t         __cdecl _mbslen(const unsigned char*);
+unsigned char* __cdecl _mbslwr(unsigned char*);
+unsigned char* __cdecl _mbsnbcat(unsigned char*,const unsigned char*,size_t);
+int            __cdecl _mbsnbcmp(const unsigned char*,const unsigned char*,size_t);
+int            __cdecl _mbsnbcoll(const unsigned char*,const unsigned char*,size_t);
+size_t         __cdecl _mbsnbcnt(const unsigned char*,size_t);
+unsigned char* __cdecl _mbsnbcpy(unsigned char*,const unsigned char*,size_t);
+int            __cdecl _mbsnbicmp(const unsigned char*,const unsigned char*,size_t);
+int            __cdecl _mbsnbicoll(const unsigned char*,const unsigned char*,size_t);
+unsigned char* __cdecl _mbsnbset(unsigned char*,unsigned int,size_t);
+unsigned char* __cdecl _mbsncat(unsigned char*,const unsigned char*, size_t);
+size_t         __cdecl _mbsnccnt(const unsigned char*,size_t);
+int            __cdecl _mbsncmp(const unsigned char*,const unsigned char*,size_t);
+int            __cdecl _mbsncoll(const unsigned char*,const unsigned char*,size_t);
+unsigned char* __cdecl _mbsncpy(unsigned char*,const unsigned char*,size_t);
+unsigned int   __cdecl _mbsnextc (const unsigned char*);
+int            __cdecl _mbsnicmp(const unsigned char*,const unsigned char*,size_t);
+int            __cdecl _mbsnicoll(const unsigned char*,const unsigned char*,size_t);
+unsigned char* __cdecl _mbsninc(const unsigned char*,size_t);
+unsigned char* __cdecl _mbsnset(unsigned char*,unsigned int,size_t);
+unsigned char* __cdecl _mbspbrk(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbsrchr(const unsigned char*,unsigned int);
+unsigned char* __cdecl _mbsrev(unsigned char*);
+unsigned char* __cdecl _mbsset(unsigned char*,unsigned int);
+size_t         __cdecl _mbsspn(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbsspnp(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbsstr(const unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbstok(unsigned char*,const unsigned char*);
+unsigned char* __cdecl _mbsupr(unsigned char*);
 
 #ifndef _MBLEADTRAIL_DEFINED
 #define _MBLEADTRAIL_DEFINED
-int         _ismbblead(unsigned int);
-int         _ismbbtrail(unsigned int);
-int         _ismbslead(const unsigned char*,const unsigned char*);
-int         _ismbstrail(const unsigned char*,const unsigned char*);
+int __cdecl _ismbblead(unsigned int);
+int __cdecl _ismbbtrail(unsigned int);
+int __cdecl _ismbslead(const unsigned char*,const unsigned char*);
+int __cdecl _ismbstrail(const unsigned char*,const unsigned char*);
 #endif /* _MBLEADTRAIL_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/memory.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/memory.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/memory.h	(revision 19678)
@@ -0,0 +1,46 @@
+/*
+ * Memory definitions
+ *
+ * Derived from the mingw header written by Colin Peters.
+ * Modified for Wine use by Jon Griffiths and Francois Gouget.
+ * This file is in the public domain.
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_MEMORY_H
+#define __WINE_MEMORY_H
+
+#include <crtdefs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CRT_MEMORY_DEFINED
+#define _CRT_MEMORY_DEFINED
+
+void* __cdecl memchr(const void*,int,size_t);
+int   __cdecl memcmp(const void*,const void*,size_t);
+void* __cdecl memcpy(void*,const void*,size_t);
+void* __cdecl memset(void*,int,size_t);
+void* __cdecl _memccpy(void*,const void*,int,unsigned int);
+int   __cdecl _memicmp(const void*,const void*,unsigned int);
+
+static inline int memicmp(const void* s1, const void* s2, size_t len) { return _memicmp(s1, s2, len); }
+static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return _memccpy(s1, s2, c, n); }
+
+#endif /* _CRT_MEMORY_DEFINED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_MEMORY_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/process.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/process.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/process.h	(revision 19678)
@@ -6,16 +6,18 @@
  * This file is in the public domain.
  */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_PROCESS_H
 #define __WINE_PROCESS_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
 
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
+#include <crtdefs.h>
 
 /* Process creation flags */
@@ -29,80 +31,60 @@
 #define _WAIT_GRANDCHILD 1
 
-#ifndef __stdcall
-# ifdef __i386__
-#  ifdef __GNUC__
-#   ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */
-#    define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
-#   else
-#    define __stdcall __attribute__((__stdcall__))
-#   endif
-#  elif defined(_MSC_VER)
-    /* Nothing needs to be done. __stdcall already exists */
-#  else
-#   error You need to define __stdcall for your compiler
-#  endif
-# elif defined(__x86_64__) && defined (__GNUC__)
-#  define __stdcall __attribute__((ms_abi))
-# else
-#  define __stdcall
-# endif
-#endif /* __stdcall */
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef void (*_beginthread_start_routine_t)(void *);
+typedef void (__cdecl *_beginthread_start_routine_t)(void *);
 typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
 
-uintptr_t _beginthread(_beginthread_start_routine_t,unsigned int,void*);
-uintptr_t _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
-intptr_t    _cwait(int*,intptr_t,int);
-void        _endthread(void);
-void        _endthreadex(unsigned int);
-intptr_t    _execl(const char*,const char*,...);
-intptr_t    _execle(const char*,const char*,...);
-intptr_t    _execlp(const char*,const char*,...);
-intptr_t    _execlpe(const char*,const char*,...);
-intptr_t    _execv(const char*,char* const *);
-intptr_t    _execve(const char*,char* const *,const char* const *);
-intptr_t    _execvp(const char*,char* const *);
-intptr_t    _execvpe(const char*,char* const *,const char* const *);
-int         _getpid(void);
-intptr_t    _spawnl(int,const char*,const char*,...);
-intptr_t    _spawnle(int,const char*,const char*,...);
-intptr_t    _spawnlp(int,const char*,const char*,...);
-intptr_t    _spawnlpe(int,const char*,const char*,...);
-intptr_t    _spawnv(int,const char*,const char* const *);
-intptr_t    _spawnve(int,const char*,const char* const *,const char* const *);
-intptr_t    _spawnvp(int,const char*,const char* const *);
-intptr_t    _spawnvpe(int,const char*,const char* const *,const char* const *);
+uintptr_t __cdecl _beginthread(_beginthread_start_routine_t,unsigned int,void*);
+uintptr_t __cdecl _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
+intptr_t  __cdecl _cwait(int*,intptr_t,int);
+void      __cdecl _endthread(void);
+void      __cdecl _endthreadex(unsigned int);
+intptr_t  __cdecl _execl(const char*,const char*,...);
+intptr_t  __cdecl _execle(const char*,const char*,...);
+intptr_t  __cdecl _execlp(const char*,const char*,...);
+intptr_t  __cdecl _execlpe(const char*,const char*,...);
+intptr_t  __cdecl _execv(const char*,char* const *);
+intptr_t  __cdecl _execve(const char*,char* const *,const char* const *);
+intptr_t  __cdecl _execvp(const char*,char* const *);
+intptr_t  __cdecl _execvpe(const char*,char* const *,const char* const *);
+int       __cdecl _getpid(void);
+intptr_t  __cdecl _spawnl(int,const char*,const char*,...);
+intptr_t  __cdecl _spawnle(int,const char*,const char*,...);
+intptr_t  __cdecl _spawnlp(int,const char*,const char*,...);
+intptr_t  __cdecl _spawnlpe(int,const char*,const char*,...);
+intptr_t  __cdecl _spawnv(int,const char*,const char* const *);
+intptr_t  __cdecl _spawnve(int,const char*,const char* const *,const char* const *);
+intptr_t  __cdecl _spawnvp(int,const char*,const char* const *);
+intptr_t  __cdecl _spawnvpe(int,const char*,const char* const *,const char* const *);
 
-void        _c_exit(void);
-void        _cexit(void);
-void        _exit(int);
-void        abort(void);
-void        exit(int);
-int         system(const char*);
+void      __cdecl _c_exit(void);
+void      __cdecl _cexit(void);
+void      __cdecl _exit(int);
+void      __cdecl abort(void);
+void      __cdecl exit(int);
+int       __cdecl system(const char*);
 
 #ifndef _WPROCESS_DEFINED
 #define _WPROCESS_DEFINED
-intptr_t    _wexecl(const wchar_t*,const wchar_t*,...);
-intptr_t    _wexecle(const wchar_t*,const wchar_t*,...);
-intptr_t    _wexeclp(const wchar_t*,const wchar_t*,...);
-intptr_t    _wexeclpe(const wchar_t*,const wchar_t*,...);
-intptr_t    _wexecv(const wchar_t*,const wchar_t* const *);
-intptr_t    _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-intptr_t    _wexecvp(const wchar_t*,const wchar_t* const *);
-intptr_t    _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-intptr_t    _wspawnl(int,const wchar_t*,const wchar_t*,...);
-intptr_t    _wspawnle(int,const wchar_t*,const wchar_t*,...);
-intptr_t    _wspawnlp(int,const wchar_t*,const wchar_t*,...);
-intptr_t    _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
-intptr_t    _wspawnv(int,const wchar_t*,const wchar_t* const *);
-intptr_t    _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-intptr_t    _wspawnvp(int,const wchar_t*,const wchar_t* const *);
-intptr_t    _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-int         _wsystem(const wchar_t*);
+intptr_t __cdecl _wexecl(const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wexecle(const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wexeclp(const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wexeclpe(const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wexecv(const wchar_t*,const wchar_t* const *);
+intptr_t __cdecl _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+intptr_t __cdecl _wexecvp(const wchar_t*,const wchar_t* const *);
+intptr_t __cdecl _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+intptr_t __cdecl _wspawnl(int,const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wspawnle(int,const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wspawnlp(int,const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
+intptr_t __cdecl _wspawnv(int,const wchar_t*,const wchar_t* const *);
+intptr_t __cdecl _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+intptr_t __cdecl _wspawnvp(int,const wchar_t*,const wchar_t* const *);
+intptr_t __cdecl _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+int      __cdecl _wsystem(const wchar_t*);
 #endif /* _WPROCESS_DEFINED */
 
@@ -133,12 +115,12 @@
 
 #if defined(__GNUC__) && (__GNUC__ < 4)
-extern intptr_t execl(const char*,const char*,...) __attribute__((alias("_execl")));
-extern intptr_t execle(const char*,const char*,...) __attribute__((alias("_execle")));
-extern intptr_t execlp(const char*,const char*,...) __attribute__((alias("_execlp")));
-extern intptr_t execlpe(const char*,const char*,...) __attribute__((alias("_execlpe")));
-extern intptr_t spawnl(int,const char*,const char*,...) __attribute__((alias("_spawnl")));
-extern intptr_t spawnle(int,const char*,const char*,...) __attribute__((alias("_spawnle")));
-extern intptr_t spawnlp(int,const char*,const char*,...) __attribute__((alias("_spawnlp")));
-extern intptr_t spawnlpe(int,const char*,const char*,...) __attribute__((alias("_spawnlpe")));
+extern intptr_t __cdecl execl(const char*,const char*,...) __attribute__((alias("_execl")));
+extern intptr_t __cdecl execle(const char*,const char*,...) __attribute__((alias("_execle")));
+extern intptr_t __cdecl execlp(const char*,const char*,...) __attribute__((alias("_execlp")));
+extern intptr_t __cdecl execlpe(const char*,const char*,...) __attribute__((alias("_execlpe")));
+extern intptr_t __cdecl spawnl(int,const char*,const char*,...) __attribute__((alias("_spawnl")));
+extern intptr_t __cdecl spawnle(int,const char*,const char*,...) __attribute__((alias("_spawnle")));
+extern intptr_t __cdecl spawnlp(int,const char*,const char*,...) __attribute__((alias("_spawnlp")));
+extern intptr_t __cdecl spawnlpe(int,const char*,const char*,...) __attribute__((alias("_spawnlpe")));
 #else
 #define execl    _execl
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/search.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/search.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/search.h	(revision 19678)
@@ -27,31 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_SEARCH_H
 #define __WINE_SEARCH_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
 
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
-
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
-
+#include <crtdefs.h>
 
 #ifdef __cplusplus
@@ -59,12 +37,8 @@
 #endif
 
-void*       _lfind(const void*,const void*,unsigned int*,unsigned int,
-                   int (*)(const void*,const void*));
-void*       _lsearch(const void*,void*,unsigned int*,unsigned int,
-                     int (*)(const void*,const void*));
-void*       bsearch(const void*,const void*,size_t,size_t,
-                            int (*)(const void*,const void*));
-void        qsort(void*,size_t,size_t,
-                          int (*)(const void*,const void*));
+void* __cdecl _lfind(const void*,const void*,unsigned int*,unsigned int,int (*)(const void*,const void*));
+void* __cdecl _lsearch(const void*,void*,unsigned int*,unsigned int,int (*)(const void*,const void*));
+void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (*)(const void*,const void*));
+void  __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*));
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/setjmp.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/setjmp.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/setjmp.h	(revision 19678)
@@ -27,9 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_SETJMP_H
 #define __WINE_SETJMP_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
@@ -64,6 +64,6 @@
 #endif
 
-int         _setjmp(jmp_buf);
-int         longjmp(jmp_buf,int);
+int __cdecl _setjmp(jmp_buf);
+int __cdecl longjmp(jmp_buf,int);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/share.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/share.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/share.h	(revision 19678)
@@ -22,4 +22,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_SHARE_H
 #define __WINE_SHARE_H
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/signal.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/signal.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/signal.h	(revision 19678)
@@ -27,9 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef _WINE_SIGNAL_H
 #define _WINE_SIGNAL_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #define SIGINT   2
@@ -47,5 +47,5 @@
 #endif
 
-typedef void (*__sighandler_t)(int);
+typedef void (__cdecl *__sighandler_t)(int);
 
 #define SIG_DFL ((__sighandler_t)0)
@@ -53,6 +53,6 @@
 #define SIG_ERR ((__sighandler_t)-1)
 
-__sighandler_t signal(int sig, __sighandler_t func);
-int raise(int sig);
+__sighandler_t __cdecl signal(int sig, __sighandler_t func);
+int __cdecl raise(int sig);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stddef.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stddef.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stddef.h	(revision 19678)
@@ -27,64 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_STDDEF_H
 #define __WINE_STDDEF_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
 
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-#ifndef _INTPTR_T_DEFINED
-#ifdef  _WIN64
-typedef __int64 intptr_t;
-#else
-typedef int intptr_t;
-#endif
-#define _INTPTR_T_DEFINED
-#endif
-
-#ifndef _UINTPTR_T_DEFINED
-#ifdef  _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-
-#ifndef _PTRDIFF_T_DEFINED
-#ifdef _WIN64
-typedef __int64 ptrdiff_t;
-#else
-typedef int ptrdiff_t;
-#endif
-#define _PTRDIFF_T_DEFINED
-#endif
-
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
+#include <crtdefs.h>
 
 #ifndef NULL
@@ -107,7 +52,7 @@
 #endif
 
-unsigned long               __threadid(void);
-unsigned long               __threadhandle(void);
-#define _threadid          (__threadid())
+unsigned long __cdecl __threadid(void);
+unsigned long __cdecl __threadhandle(void);
+#define _threadid    (__threadid())
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stdio.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stdio.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stdio.h	(revision 19678)
@@ -6,11 +6,18 @@
  * This file is in the public domain.
  */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_STDIO_H
 #define __WINE_STDIO_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
-
-#include <pshpack8.h>
+
+#include <crtdefs.h>
 
 #ifndef RC_INVOKED
@@ -18,15 +25,5 @@
 #endif
 
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
+#include <pshpack8.h>
 
 /* file._flag flags */
@@ -90,26 +87,4 @@
 #endif
 
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-#ifndef _WCTYPE_T_DEFINED
-typedef unsigned short  wint_t;
-typedef unsigned short  wctype_t;
-#define _WCTYPE_T_DEFINED
-#endif
-
 #ifdef __cplusplus
 extern "C" {
@@ -117,6 +92,11 @@
 
 #ifndef _STDIO_DEFINED
-FILE*        __p__iob(void);
-#define _iob               (__p__iob())
+# ifdef __i386__
+FILE* __cdecl __p__iob(void);
+#  define _iob (__p__iob())
+# else
+FILE* __cdecl __iob_func(void);
+#  define _iob (__iob_func())
+# endif
 #endif /* _STDIO_DEFINED */
 
@@ -127,106 +107,108 @@
 #ifndef _STDIO_DEFINED
 #define _STDIO_DEFINED
-int         _fcloseall(void);
-FILE* _fdopen(int,const char*);
-int         _fgetchar(void);
-int         _filbuf(FILE*);
-int         _fileno(FILE*);
-int         _flsbuf(int,FILE*);
-int         _flushall(void);
-int         _fputchar(int);
-FILE* _fsopen(const char*,const char*,int);
-int         _getmaxstdio(void);
-int         _getw(FILE*);
-int         _pclose(FILE*);
-FILE* _popen(const char*,const char*);
-int         _putw(int,FILE*);
-int         _rmtmp(void);
-int         _setmaxstdio(int);
-int         _snprintf(char*,size_t,const char*,...);
-char*       _tempnam(const char*,const char*);
-int         _unlink(const char*);
-int         _vsnprintf(char*,size_t,const char*,va_list);
-
-void        clearerr(FILE*);
-int         fclose(FILE*);
-int         feof(FILE*);
-int         ferror(FILE*);
-int         fflush(FILE*);
-int         fgetc(FILE*);
-int         fgetpos(FILE*,fpos_t*);
-char*       fgets(char*,int,FILE*);
-FILE* fopen(const char*,const char*);
-int         fprintf(FILE*,const char*,...);
-int         fputc(int,FILE*);
-int         fputs(const char*,FILE*);
-size_t fread(void*,size_t,size_t,FILE*);
-FILE* freopen(const char*,const char*,FILE*);
-int         fscanf(FILE*,const char*,...);
-int         fseek(FILE*,long,int);
-int         fsetpos(FILE*,fpos_t*);
-long        ftell(FILE*);
-size_t fwrite(const void*,size_t,size_t,FILE*);
-int         getc(FILE*);
-int         getchar(void);
-char*       gets(char*);
-void        perror(const char*);
-int         printf(const char*,...);
-int         putc(int,FILE*);
-int         putchar(int);
-int         puts(const char*);
-int         remove(const char*);
-int         rename(const char*,const char*);
-void        rewind(FILE*);
-int         scanf(const char*,...);
-void        setbuf(FILE*,char*);
-int         setvbuf(FILE*,char*,int,size_t);
-int         sprintf(char*,const char*,...);
-int         sscanf(const char*,const char*,...);
-FILE* tmpfile(void);
-char*       tmpnam(char*);
-int         ungetc(int,FILE*);
-int         vfprintf(FILE*,const char*,va_list);
-int         vprintf(const char*,va_list);
-int         vsprintf(char*,const char*,va_list);
+int    __cdecl _fcloseall(void);
+FILE*  __cdecl _fdopen(int,const char*);
+int    __cdecl _fgetchar(void);
+int    __cdecl _filbuf(FILE*);
+int    __cdecl _fileno(FILE*);
+int    __cdecl _flsbuf(int,FILE*);
+int    __cdecl _flushall(void);
+int    __cdecl _fputchar(int);
+FILE*  __cdecl _fsopen(const char*,const char*,int);
+int    __cdecl _getmaxstdio(void);
+int    __cdecl _getw(FILE*);
+int    __cdecl _pclose(FILE*);
+FILE*  __cdecl _popen(const char*,const char*);
+int    __cdecl _putw(int,FILE*);
+int    __cdecl _rmtmp(void);
+int    __cdecl _setmaxstdio(int);
+int    __cdecl _snprintf(char*,size_t,const char*,...);
+char*  __cdecl _tempnam(const char*,const char*);
+int    __cdecl _unlink(const char*);
+int    __cdecl _vscprintf(const char*,__ms_va_list);
+int    __cdecl _vsnprintf(char*,size_t,const char*,__ms_va_list);
+
+void   __cdecl clearerr(FILE*);
+int    __cdecl fclose(FILE*);
+int    __cdecl feof(FILE*);
+int    __cdecl ferror(FILE*);
+int    __cdecl fflush(FILE*);
+int    __cdecl fgetc(FILE*);
+int    __cdecl fgetpos(FILE*,fpos_t*);
+char*  __cdecl fgets(char*,int,FILE*);
+FILE*  __cdecl fopen(const char*,const char*);
+int    __cdecl fprintf(FILE*,const char*,...);
+int    __cdecl fputc(int,FILE*);
+int    __cdecl fputs(const char*,FILE*);
+size_t __cdecl fread(void*,size_t,size_t,FILE*);
+FILE*  __cdecl freopen(const char*,const char*,FILE*);
+int    __cdecl fscanf(FILE*,const char*,...);
+int    __cdecl fseek(FILE*,long,int);
+int    __cdecl fsetpos(FILE*,fpos_t*);
+long   __cdecl ftell(FILE*);
+size_t __cdecl fwrite(const void*,size_t,size_t,FILE*);
+int    __cdecl getc(FILE*);
+int    __cdecl getchar(void);
+char*  __cdecl gets(char*);
+void   __cdecl perror(const char*);
+int    __cdecl printf(const char*,...);
+int    __cdecl putc(int,FILE*);
+int    __cdecl putchar(int);
+int    __cdecl puts(const char*);
+int    __cdecl remove(const char*);
+int    __cdecl rename(const char*,const char*);
+void   __cdecl rewind(FILE*);
+int    __cdecl scanf(const char*,...);
+void   __cdecl setbuf(FILE*,char*);
+int    __cdecl setvbuf(FILE*,char*,int,size_t);
+int    __cdecl sprintf(char*,const char*,...);
+int    __cdecl sscanf(const char*,const char*,...);
+FILE*  __cdecl tmpfile(void);
+char*  __cdecl tmpnam(char*);
+int    __cdecl ungetc(int,FILE*);
+int    __cdecl vfprintf(FILE*,const char*,__ms_va_list);
+int    __cdecl vprintf(const char*,__ms_va_list);
+int    __cdecl vsprintf(char*,const char*,__ms_va_list);
 
 #ifndef _WSTDIO_DEFINED
 #define _WSTDIO_DEFINED
-wint_t  _fgetwchar(void);
-wint_t  _fputwchar(wint_t);
-wchar_t*_getws(wchar_t*);
-int             _putws(const wchar_t*);
-int             _snwprintf(wchar_t*,size_t,const wchar_t*,...);
-int             _vsnwprintf(wchar_t*,size_t,const wchar_t*,va_list);
-FILE*   _wfdopen(int,const wchar_t*);
-FILE*   _wfopen(const wchar_t*,const wchar_t*);
-FILE*   _wfreopen(const wchar_t*,const wchar_t*,FILE*);
-FILE*   _wfsopen(const wchar_t*,const wchar_t*,int);
-void            _wperror(const wchar_t*);
-FILE*   _wpopen(const wchar_t*,const wchar_t*);
-int             _wremove(const wchar_t*);
-wchar_t*_wtempnam(const wchar_t*,const wchar_t*);
-wchar_t*_wtmpnam(wchar_t*);
-
-wint_t  fgetwc(FILE*);
-wchar_t*fgetws(wchar_t*,int,FILE*);
-wint_t  fputwc(wint_t,FILE*);
-int             fputws(const wchar_t*,FILE*);
-int             fwprintf(FILE*,const wchar_t*,...);
-int             fputws(const wchar_t*,FILE*);
-int             fwscanf(FILE*,const wchar_t*,...);
-wint_t  getwc(FILE*);
-wint_t  getwchar(void);
-wchar_t*getws(wchar_t*);
-wint_t  putwc(wint_t,FILE*);
-wint_t  putwchar(wint_t);
-int             putws(const wchar_t*);
-int             swprintf(wchar_t*,const wchar_t*,...);
-int             swscanf(const wchar_t*,const wchar_t*,...);
-wint_t  ungetwc(wint_t,FILE*);
-int             vfwprintf(FILE*,const wchar_t*,va_list);
-int             vswprintf(wchar_t*,const wchar_t*,va_list);
-int             vwprintf(const wchar_t*,va_list);
-int             wprintf(const wchar_t*,...);
-int             wscanf(const wchar_t*,...);
+wint_t   __cdecl _fgetwchar(void);
+wint_t   __cdecl _fputwchar(wint_t);
+wchar_t* __cdecl _getws(wchar_t*);
+int      __cdecl _putws(const wchar_t*);
+int      __cdecl _snwprintf(wchar_t*,size_t,const wchar_t*,...);
+int      __cdecl _vscwprintf(const wchar_t*,__ms_va_list);
+int      __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list);
+FILE*    __cdecl _wfdopen(int,const wchar_t*);
+FILE*    __cdecl _wfopen(const wchar_t*,const wchar_t*);
+FILE*    __cdecl _wfreopen(const wchar_t*,const wchar_t*,FILE*);
+FILE*    __cdecl _wfsopen(const wchar_t*,const wchar_t*,int);
+void     __cdecl _wperror(const wchar_t*);
+FILE*    __cdecl _wpopen(const wchar_t*,const wchar_t*);
+int      __cdecl _wremove(const wchar_t*);
+wchar_t* __cdecl _wtempnam(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl _wtmpnam(wchar_t*);
+
+wint_t   __cdecl fgetwc(FILE*);
+wchar_t* __cdecl fgetws(wchar_t*,int,FILE*);
+wint_t   __cdecl fputwc(wint_t,FILE*);
+int      __cdecl fputws(const wchar_t*,FILE*);
+int      __cdecl fwprintf(FILE*,const wchar_t*,...);
+int      __cdecl fputws(const wchar_t*,FILE*);
+int      __cdecl fwscanf(FILE*,const wchar_t*,...);
+wint_t   __cdecl getwc(FILE*);
+wint_t   __cdecl getwchar(void);
+wchar_t* __cdecl getws(wchar_t*);
+wint_t   __cdecl putwc(wint_t,FILE*);
+wint_t   __cdecl putwchar(wint_t);
+int      __cdecl putws(const wchar_t*);
+int      __cdecl swprintf(wchar_t*,const wchar_t*,...);
+int      __cdecl swscanf(const wchar_t*,const wchar_t*,...);
+wint_t   __cdecl ungetwc(wint_t,FILE*);
+int      __cdecl vfwprintf(FILE*,const wchar_t*,__ms_va_list);
+int      __cdecl vswprintf(wchar_t*,const wchar_t*,__ms_va_list);
+int      __cdecl vwprintf(const wchar_t*,__ms_va_list);
+int      __cdecl wprintf(const wchar_t*,...);
+int      __cdecl wscanf(const wchar_t*,...);
 #endif /* _WSTDIO_DEFINED */
 
@@ -249,5 +231,5 @@
 #define _UNLINK_DEFINED
 #endif
-static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args) { return _vsnprintf(buffer,size,format,args); }
+static inline int vsnprintf(char *buffer, size_t size, const char *format, __ms_va_list args) { return _vsnprintf(buffer,size,format,args); }
 
 static inline wint_t fgetwchar(void) { return _fgetwchar(); }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stdlib.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stdlib.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stdlib.h	(revision 19678)
@@ -6,9 +6,18 @@
  * This file is in the public domain.
  */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_STDLIB_H
 #define __WINE_STDLIB_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
@@ -22,12 +31,4 @@
 #endif
 
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-
 typedef struct
 {
@@ -44,16 +45,4 @@
     unsigned char ld[10];
 } _LDOUBLE;
-
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
 
 #define EXIT_SUCCESS        0
@@ -80,13 +69,4 @@
 } ldiv_t;
 
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
-
 #define __max(a,b) (((a) > (b)) ? (a) : (b))
 #define __min(a,b) (((a) < (b)) ? (a) : (b))
@@ -107,130 +87,144 @@
 #endif
 
-extern unsigned int*         __p__osver(void);
-extern unsigned int*         __p__winver(void);
-extern unsigned int*         __p__winmajor(void);
-extern unsigned int*         __p__winminor(void);
+#ifdef __i386__
+
+extern unsigned int* __cdecl __p__osver(void);
 #define _osver             (*__p__osver())
+extern unsigned int* __cdecl __p__winver(void);
 #define _winver            (*__p__winver())
+extern unsigned int* __cdecl __p__winmajor(void);
 #define _winmajor          (*__p__winmajor())
+extern unsigned int* __cdecl __p__winminor(void);
 #define _winminor          (*__p__winminor())
-
-extern int*                  __p___argc(void);
-extern char***               __p___argv(void);
-extern wchar_t***    __p___wargv(void);
-extern char***               __p__environ(void);
-extern wchar_t***    __p__wenviron(void);
-extern int*                  __p___mb_cur_max(void);
-extern unsigned long*        __doserrno(void);
-extern unsigned int*         __p__fmode(void);
+extern int*          __cdecl __p___argc(void);
+#define __argc             (*__p___argc())
+extern char***       __cdecl __p___argv(void);
+#define __argv             (*__p___argv())
+extern wchar_t***    __cdecl __p___wargv(void);
+#define __wargv            (*__p___wargv())
+extern char***       __cdecl __p__environ(void);
+#define _environ           (*__p__environ())
+extern wchar_t***    __cdecl __p__wenviron(void);
+#define _wenviron          (*__p__wenviron())
+extern unsigned int* __cdecl __p__fmode(void);
+#define _fmode             (*__p__fmode())
+
+#else  /* __i386__ */
+
+extern unsigned int _osver;
+extern unsigned int _winver;
+extern unsigned int _winmajor;
+extern unsigned int _winminor;
+extern int __argc;
+extern char **__argv;
+extern wchar_t **__wargv;
+extern char **_environ;
+extern wchar_t **_wenviron;
+extern unsigned int _fmode;
+
+#endif  /* __i386__ */
+
+extern int*           __cdecl ___mb_cur_max_func(void);
+#define __mb_cur_max        (*___mb_cur_max_func())
+extern unsigned long* __cdecl __doserrno(void);
+#define _doserrno           (*__doserrno())
+extern int*           __cdecl _errno(void);
+#define errno               (*_errno())
+
 /* FIXME: We need functions to access these:
  * int _sys_nerr;
  * char** _sys_errlist;
  */
-#define __argc             (*__p___argc())
-#define __argv             (*__p___argv())
-#define __wargv            (*__p___wargv())
-#define _environ           (*__p__environ())
-#define _wenviron          (*__p__wenviron())
-#define __mb_cur_max       (*__p___mb_cur_max())
-#define _doserrno          (*__doserrno())
-#define _fmode             (*_fmode)
-
-
-extern int*           _errno(void);
-#define errno        (*_errno())
-
-
-typedef int (*_onexit_t)(void);
-
-
-int         _atodbl(_CRT_DOUBLE*,char*);
-int         _atoflt(_CRT_FLOAT*,char*);
-__int64     _atoi64(const char*);
-long double _atold(const char*);
-int         _atoldbl(_LDOUBLE*,char*);
-void        _beep(unsigned int,unsigned int);
-char*       _ecvt(double,int,int*,int*);
-char*       _fcvt(double,int,int*,int*);
-char*       _fullpath(char*,const char*,size_t);
-char*       _gcvt(double,int,char*);
-char*       _i64toa(__int64,char*,int);
-char*       _itoa(int,char*,int);
-char*       _ltoa(long,char*,int);
-unsigned long _lrotl(unsigned long,int);
-unsigned long _lrotr(unsigned long,int);
-void        _makepath(char*,const char*,const char*,const char*,const char*);
-size_t _mbstrlen(const char*);
-_onexit_t _onexit(_onexit_t);
-int         _putenv(const char*);
-unsigned int _rotl(unsigned int,int);
-unsigned int _rotr(unsigned int,int);
-void        _searchenv(const char*,const char*,char*);
-int         _set_error_mode(int);
-void        _seterrormode(int);
-void        _sleep(unsigned long);
-void        _splitpath(const char*,char*,char*,char*,char*);
-long double _strtold(const char*,char**);
-void        _swab(char*,char*,int);
-char*       _ui64toa(unsigned __int64,char*,int);
-char*       _ultoa(unsigned long,char*,int);
-
-void        _exit(int);
-void        abort(void);
-int         abs(int);
-int         atexit(void (*)(void));
-double      atof(const char*);
-int         atoi(const char*);
-long        atol(const char*);
-void*       calloc(size_t,size_t);
+
+
+typedef int (__cdecl *_onexit_t)(void);
+
+
+int           __cdecl _atodbl(_CRT_DOUBLE*,char*);
+int           __cdecl _atoflt(_CRT_FLOAT*,char*);
+__int64       __cdecl _atoi64(const char*);
+long double   __cdecl _atold(const char*);
+int           __cdecl _atoldbl(_LDOUBLE*,char*);
+void          __cdecl _beep(unsigned int,unsigned int);
+char*         __cdecl _ecvt(double,int,int*,int*);
+char*         __cdecl _fcvt(double,int,int*,int*);
+char*         __cdecl _fullpath(char*,const char*,size_t);
+char*         __cdecl _gcvt(double,int,char*);
+char*         __cdecl _i64toa(__int64,char*,int);
+char*         __cdecl _itoa(int,char*,int);
+char*         __cdecl _ltoa(long,char*,int);
+unsigned long __cdecl _lrotl(unsigned long,int);
+unsigned long __cdecl _lrotr(unsigned long,int);
+void          __cdecl _makepath(char*,const char*,const char*,const char*,const char*);
+size_t        __cdecl _mbstrlen(const char*);
+_onexit_t     __cdecl _onexit(_onexit_t);
+int           __cdecl _putenv(const char*);
+unsigned int  __cdecl _rotl(unsigned int,int);
+unsigned int  __cdecl _rotr(unsigned int,int);
+void          __cdecl _searchenv(const char*,const char*,char*);
+int           __cdecl _set_error_mode(int);
+void          __cdecl _seterrormode(int);
+void          __cdecl _sleep(unsigned long);
+void          __cdecl _splitpath(const char*,char*,char*,char*,char*);
+long double   __cdecl _strtold(const char*,char**);
+void          __cdecl _swab(char*,char*,int);
+char*         __cdecl _ui64toa(unsigned __int64,char*,int);
+char*         __cdecl _ultoa(unsigned long,char*,int);
+
+void          __cdecl _exit(int);
+void          __cdecl abort(void);
+int           __cdecl abs(int);
+int           __cdecl atexit(void (*)(void));
+double        __cdecl atof(const char*);
+int           __cdecl atoi(const char*);
+long          __cdecl atol(const char*);
+void*         __cdecl calloc(size_t,size_t);
 #ifndef __i386__
-div_t div(int,int);
-ldiv_t ldiv(long,long);
-#endif
-void        exit(int);
-void        free(void*);
-char*       getenv(const char*);
-long        labs(long);
-void*       malloc(size_t);
-int         mblen(const char*,size_t);
-void        perror(const char*);
-int         rand(void);
-void*       realloc(void*,size_t);
-void        srand(unsigned int);
-double      strtod(const char*,char**);
-long        strtol(const char*,char**,int);
-unsigned long strtoul(const char*,char**,int);
-int         system(const char*);
-void*       bsearch(const void*,const void*,size_t,size_t,
-                            int (*)(const void*,const void*));
-void        qsort(void*,size_t,size_t,
-                          int (*)(const void*,const void*));
+div_t  __cdecl div(int,int);
+ldiv_t __cdecl ldiv(long,long);
+#endif
+void          __cdecl exit(int);
+void          __cdecl free(void*);
+char*         __cdecl getenv(const char*);
+long          __cdecl labs(long);
+void*         __cdecl malloc(size_t);
+int           __cdecl mblen(const char*,size_t);
+void          __cdecl perror(const char*);
+int           __cdecl rand(void);
+void*         __cdecl realloc(void*,size_t);
+void          __cdecl srand(unsigned int);
+double        __cdecl strtod(const char*,char**);
+long          __cdecl strtol(const char*,char**,int);
+unsigned long __cdecl strtoul(const char*,char**,int);
+int           __cdecl system(const char*);
+void*         __cdecl bsearch(const void*,const void*,size_t,size_t,int (*)(const void*,const void*));
+void          __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*));
 
 #ifndef _WSTDLIB_DEFINED
 #define _WSTDLIB_DEFINED
-wchar_t*_itow(int,wchar_t*,int);
-wchar_t*_i64tow(__int64,wchar_t*,int);
-wchar_t*_ltow(long,wchar_t*,int);
-wchar_t*_ui64tow(unsigned __int64,wchar_t*,int);
-wchar_t*_ultow(unsigned long,wchar_t*,int);
-wchar_t*_wfullpath(wchar_t*,const wchar_t*,size_t);
-wchar_t*_wgetenv(const wchar_t*);
-void            _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
-void            _wperror(const wchar_t*);
-int             _wputenv(const wchar_t*);
-void            _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
-void            _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
-int             _wsystem(const wchar_t*);
-int             _wtoi(const wchar_t*);
-__int64         _wtoi64(const wchar_t*);
-long            _wtol(const wchar_t*);
-
-size_t mbstowcs(wchar_t*,const char*,size_t);
-int            mbtowc(wchar_t*,const char*,size_t);
-double         wcstod(const wchar_t*,wchar_t**);
-long           wcstol(const wchar_t*,wchar_t**,int);
-size_t wcstombs(char*,const wchar_t*,size_t);
-unsigned long  wcstoul(const wchar_t*,wchar_t**,int);
-int            wctomb(char*,wchar_t);
+wchar_t*      __cdecl _itow(int,wchar_t*,int);
+wchar_t*      __cdecl _i64tow(__int64,wchar_t*,int);
+wchar_t*      __cdecl _ltow(long,wchar_t*,int);
+wchar_t*      __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
+wchar_t*      __cdecl _ultow(unsigned long,wchar_t*,int);
+wchar_t*      __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
+wchar_t*      __cdecl _wgetenv(const wchar_t*);
+void          __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
+void          __cdecl _wperror(const wchar_t*);
+int           __cdecl _wputenv(const wchar_t*);
+void          __cdecl _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
+void          __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
+int           __cdecl _wsystem(const wchar_t*);
+int           __cdecl _wtoi(const wchar_t*);
+__int64       __cdecl _wtoi64(const wchar_t*);
+long          __cdecl _wtol(const wchar_t*);
+
+size_t        __cdecl mbstowcs(wchar_t*,const char*,size_t);
+int           __cdecl mbtowc(wchar_t*,const char*,size_t);
+double        __cdecl wcstod(const wchar_t*,wchar_t**);
+long          __cdecl wcstol(const wchar_t*,wchar_t**,int);
+size_t        __cdecl wcstombs(char*,const wchar_t*,size_t);
+unsigned long __cdecl wcstoul(const wchar_t*,wchar_t**,int);
+int           __cdecl wctomb(char*,wchar_t);
 #endif /* _WSTDLIB_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/string.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/string.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/string.h	(revision 19678)
@@ -6,37 +6,18 @@
  * This file is in the public domain.
  */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_STRING_H
 #define __WINE_STRING_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
 
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
-
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
+#include <crtdefs.h>
 
 #ifndef _NLSCMP_DEFINED
@@ -57,69 +38,76 @@
 #endif
 
-void*       _memccpy(void*,const void*,int,unsigned int);
-int         _memicmp(const void*,const void*,unsigned int);
-int         _strcmpi(const char*,const char*);
-char*       _strdup(const char*);
-char*       _strerror(const char*);
-int         _stricmp(const char*,const char*);
-int         _stricoll(const char*,const char*);
-char*       _strlwr(char*);
-int         _strnicmp(const char*,const char*,size_t);
-char*       _strnset(char*,int,size_t);
-char*       _strrev(char*);
-char*       _strset(char*,int);
-char*       _strupr(char*);
+#ifndef _CRT_MEMORY_DEFINED
+#define _CRT_MEMORY_DEFINED
+void* __cdecl memchr(const void*,int,size_t);
+int   __cdecl memcmp(const void*,const void*,size_t);
+void* __cdecl memcpy(void*,const void*,size_t);
+void* __cdecl memset(void*,int,size_t);
+void* __cdecl _memccpy(void*,const void*,int,unsigned int);
+int   __cdecl _memicmp(const void*,const void*,unsigned int);
 
-void*       memchr(const void*,int,size_t);
-int         memcmp(const void*,const void*,size_t);
-void*       memcpy(void*,const void*,size_t);
-void*       memmove(void*,const void*,size_t);
-void*       memset(void*,int,size_t);
-char*       strcat(char*,const char*);
-char*       strchr(const char*,int);
-int         strcmp(const char*,const char*);
-int         strcoll(const char*,const char*);
-char*       strcpy(char*,const char*);
-size_t strcspn(const char*,const char*);
-char*       strerror(int);
-size_t strlen(const char*);
-char*       strncat(char*,const char*,size_t);
-int         strncmp(const char*,const char*,size_t);
-char*       strncpy(char*,const char*,size_t);
-char*       strpbrk(const char*,const char*);
-char*       strrchr(const char*,int);
-size_t strspn(const char*,const char*);
-char*       strstr(const char*,const char*);
-char*       strtok(char*,const char*);
-size_t strxfrm(char*,const char*,size_t);
+static inline int memicmp(const void* s1, const void* s2, size_t len) { return _memicmp(s1, s2, len); }
+static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return _memccpy(s1, s2, c, n); }
+#endif /* _CRT_MEMORY_DEFINED */
+
+int   __cdecl _strcmpi(const char*,const char*);
+char* __cdecl _strdup(const char*);
+char* __cdecl _strerror(const char*);
+int   __cdecl _stricmp(const char*,const char*);
+int   __cdecl _stricoll(const char*,const char*);
+char* __cdecl _strlwr(char*);
+int   __cdecl _strnicmp(const char*,const char*,size_t);
+char* __cdecl _strnset(char*,int,size_t);
+char* __cdecl _strrev(char*);
+char* __cdecl _strset(char*,int);
+char* __cdecl _strupr(char*);
+
+void*  __cdecl memmove(void*,const void*,size_t);
+char*  __cdecl strcat(char*,const char*);
+char*  __cdecl strchr(const char*,int);
+int    __cdecl strcmp(const char*,const char*);
+int    __cdecl strcoll(const char*,const char*);
+char*  __cdecl strcpy(char*,const char*);
+size_t __cdecl strcspn(const char*,const char*);
+char*  __cdecl strerror(int);
+size_t __cdecl strlen(const char*);
+char*  __cdecl strncat(char*,const char*,size_t);
+int    __cdecl strncmp(const char*,const char*,size_t);
+char*  __cdecl strncpy(char*,const char*,size_t);
+char*  __cdecl strpbrk(const char*,const char*);
+char*  __cdecl strrchr(const char*,int);
+size_t __cdecl strspn(const char*,const char*);
+char*  __cdecl strstr(const char*,const char*);
+char*  __cdecl strtok(char*,const char*);
+size_t __cdecl strxfrm(char*,const char*,size_t);
 
 #ifndef _WSTRING_DEFINED
 #define _WSTRING_DEFINED
-wchar_t*_wcsdup(const wchar_t*);
-int             _wcsicmp(const wchar_t*,const wchar_t*);
-int             _wcsicoll(const wchar_t*,const wchar_t*);
-wchar_t*_wcslwr(wchar_t*);
-int             _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
-wchar_t*_wcsnset(wchar_t*,wchar_t,size_t);
-wchar_t*_wcsrev(wchar_t*);
-wchar_t*_wcsset(wchar_t*,wchar_t);
-wchar_t*_wcsupr(wchar_t*);
+wchar_t* __cdecl _wcsdup(const wchar_t*);
+int      __cdecl _wcsicmp(const wchar_t*,const wchar_t*);
+int      __cdecl _wcsicoll(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl _wcslwr(wchar_t*);
+int      __cdecl _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl _wcsnset(wchar_t*,wchar_t,size_t);
+wchar_t* __cdecl _wcsrev(wchar_t*);
+wchar_t* __cdecl _wcsset(wchar_t*,wchar_t);
+wchar_t* __cdecl _wcsupr(wchar_t*);
 
-wchar_t*wcscat(wchar_t*,const wchar_t*);
-wchar_t*wcschr(const wchar_t*,wchar_t);
-int             wcscmp(const wchar_t*,const wchar_t*);
-int             wcscoll(const wchar_t*,const wchar_t*);
-wchar_t*wcscpy(wchar_t*,const wchar_t*);
-size_t  wcscspn(const wchar_t*,const wchar_t*);
-size_t  wcslen(const wchar_t*);
-wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t);
-int             wcsncmp(const wchar_t*,const wchar_t*,size_t);
-wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t);
-wchar_t*wcspbrk(const wchar_t*,const wchar_t*);
-wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor);
-size_t  wcsspn(const wchar_t*,const wchar_t*);
-wchar_t*wcsstr(const wchar_t*,const wchar_t*);
-wchar_t*wcstok(wchar_t*,const wchar_t*);
-size_t  wcsxfrm(wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl wcscat(wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcschr(const wchar_t*,wchar_t);
+int      __cdecl wcscmp(const wchar_t*,const wchar_t*);
+int      __cdecl wcscoll(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcscpy(wchar_t*,const wchar_t*);
+size_t   __cdecl wcscspn(const wchar_t*,const wchar_t*);
+size_t   __cdecl wcslen(const wchar_t*);
+wchar_t* __cdecl wcsncat(wchar_t*,const wchar_t*,size_t);
+int      __cdecl wcsncmp(const wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl wcsncpy(wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl wcspbrk(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcsrchr(const wchar_t*,wchar_t wcFor);
+size_t   __cdecl wcsspn(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcsstr(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
+size_t   __cdecl wcsxfrm(wchar_t*,const wchar_t*,size_t);
 #endif /* _WSTRING_DEFINED */
 
@@ -129,6 +117,4 @@
 
 
-static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return _memccpy(s1, s2, c, n); }
-static inline int memicmp(const void* s1, const void* s2, size_t len) { return _memicmp(s1, s2, len); }
 static inline int strcasecmp(const char* s1, const char* s2) { return _stricmp(s1, s2); }
 static inline int strcmpi(const char* s1, const char* s2) { return _strcmpi(s1, s2); }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/stat.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/stat.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/stat.h	(revision 19678)
@@ -6,20 +6,21 @@
  * This file is in the public domain.
  */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_SYS_STAT_H
 #define __WINE_SYS_STAT_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
+#include <sys/types.h>
 
 #include <pshpack8.h>
-
-#include <sys/types.h>
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
 
 #ifndef _DEV_T_DEFINED
@@ -31,9 +32,4 @@
 typedef unsigned short _ino_t;
 #define _INO_T_DEFINED
-#endif
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
 #endif
 
@@ -131,17 +127,17 @@
 #endif
 
-int _fstat(int,struct _stat*);
-int _stat(const char*,struct _stat*);
-int _fstati64(int,struct _stati64*);
-int _stati64(const char*,struct _stati64*);
-int _fstat64(int,struct _stat64*);
-int _stat64(const char*,struct _stat64*);
-int _umask(int);
+int __cdecl _fstat(int,struct _stat*);
+int __cdecl _stat(const char*,struct _stat*);
+int __cdecl _fstati64(int,struct _stati64*);
+int __cdecl _stati64(const char*,struct _stati64*);
+int __cdecl _fstat64(int,struct _stat64*);
+int __cdecl _stat64(const char*,struct _stat64*);
+int __cdecl _umask(int);
 
 #ifndef _WSTAT_DEFINED
 #define _WSTAT_DEFINED
-int _wstat(const wchar_t*,struct _stat*);
-int _wstati64(const wchar_t*,struct _stati64*);
-int _wstat64(const wchar_t*,struct _stat64*);
+int __cdecl _wstat(const wchar_t*,struct _stat*);
+int __cdecl _wstati64(const wchar_t*,struct _stati64*);
+int __cdecl _wstat64(const wchar_t*,struct _stat64*);
 #endif /* _WSTAT_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/timeb.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/timeb.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/timeb.h	(revision 19678)
@@ -27,16 +27,11 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_SYS_TIMEB_H
 #define __WINE_SYS_TIMEB_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
 
 #ifndef _TIMEB_DEFINED
@@ -56,5 +51,5 @@
 #endif
 
-void        _ftime(struct _timeb*);
+void __cdecl _ftime(struct _timeb*);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/types.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/types.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/types.h	(revision 19678)
@@ -27,21 +27,9 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_SYS_TYPES_H
 #define __WINE_SYS_TYPES_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
 
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
+#include <crtdefs.h>
 
 #ifndef _DEV_T_DEFINED
@@ -63,14 +51,4 @@
 typedef int _off_t;
 #define _OFF_T_DEFINED
-#endif
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
-
-#ifndef _TIME64_T_DEFINED
-#define _TIME64_T_DEFINED
-typedef __int64 __time64_t;
 #endif
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/utime.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/utime.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/sys/utime.h	(revision 19678)
@@ -27,23 +27,11 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_SYS_UTIME_H
 #define __WINE_SYS_UTIME_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
 
 #ifndef _UTIMBUF_DEFINED
@@ -60,8 +48,7 @@
 #endif
 
-int         _futime(int,struct _utimbuf*);
-int         _utime(const char*,struct _utimbuf*);
-
-int         _wutime(const wchar_t*,struct _utimbuf*);
+int __cdecl _futime(int,struct _utimbuf*);
+int __cdecl _utime(const char*,struct _utimbuf*);
+int __cdecl _wutime(const wchar_t*,struct _utimbuf*);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/time.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/time.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/time.h	(revision 19678)
@@ -27,44 +27,11 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_TIME_H
 #define __WINE_TIME_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
-
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
 
 #ifndef _CLOCK_T_DEFINED
@@ -104,4 +71,5 @@
 #endif
 
+#ifdef __i386__
 #define _daylight (*__p__daylight())
 #define _dstbias (*__p__dstbias())
@@ -109,32 +77,38 @@
 #define _tzname (__p__tzname())
 
-int *__p__daylight(void);
-long *__p__dstbias(void);
-long *__p__timezone(void);
-char **__p__tzname(void);
+int *   __cdecl __p__daylight(void);
+long *  __cdecl __p__dstbias(void);
+long *  __cdecl __p__timezone(void);
+char ** __cdecl __p__tzname(void);
+#else
+extern int _daylight;
+extern long _dstbias;
+extern long _timezone;
+extern char *_tzname;
+#endif
 
-unsigned    _getsystime(struct tm*);
-unsigned    _setsystime(struct tm*,unsigned);
-char*       _strdate(char*);
-char*       _strtime(char*);
-void        _tzset(void);
+unsigned    __cdecl _getsystime(struct tm*);
+unsigned    __cdecl _setsystime(struct tm*,unsigned);
+char*       __cdecl _strdate(char*);
+char*       __cdecl _strtime(char*);
+void        __cdecl _tzset(void);
 
-char*       asctime(const struct tm*);
-clock_t clock(void);
-char*       ctime(const time_t*);
-double      difftime(time_t,time_t);
-struct tm* gmtime(const time_t*);
-struct tm* localtime(const time_t*);
-time_t mktime(struct tm*);
-size_t      strftime(char*,size_t,const char*,const struct tm*);
-time_t time(time_t*);
+char*       __cdecl asctime(const struct tm*);
+clock_t     __cdecl clock(void);
+char*       __cdecl ctime(const time_t*);
+double      __cdecl difftime(time_t,time_t);
+struct tm*  __cdecl gmtime(const time_t*);
+struct tm*  __cdecl localtime(const time_t*);
+time_t      __cdecl mktime(struct tm*);
+size_t      __cdecl strftime(char*,size_t,const char*,const struct tm*);
+time_t      __cdecl time(time_t*);
 
 #ifndef _WTIME_DEFINED
 #define _WTIME_DEFINED
-wchar_t* _wasctime(const struct tm*);
-size_t  wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
-wchar_t*_wctime(const time_t*);
-wchar_t*_wstrdate(wchar_t*);
-wchar_t*_wstrtime(wchar_t*);
+wchar_t* __cdecl _wasctime(const struct tm*);
+size_t   __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
+wchar_t* __cdecl _wctime(const time_t*);
+wchar_t* __cdecl _wstrdate(wchar_t*);
+wchar_t* __cdecl _wstrtime(wchar_t*);
 #endif /* _WTIME_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/wchar.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/wchar.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/wchar.h	(revision 19678)
@@ -6,23 +6,24 @@
  * This file is in the public domain.
  */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_WCHAR_H
 #define __WINE_WCHAR_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
+#include <stdarg.h>
 
 #include <pshpack8.h>
-
-#include <stdarg.h>
 
 #ifdef __cplusplus
 extern "C" {
-#endif
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
 #endif
 
@@ -37,16 +38,4 @@
 #define WCHAR_MIN 0
 #define WCHAR_MAX ((wchar_t)-1)
-
-#if defined(__x86_64__) && !defined(_WIN64)
-#define _WIN64
-#endif
-
-#if !defined(_MSC_VER) && !defined(__int64)
-# ifdef _WIN64
-#   define __int64 long
-# else
-#   define __int64 long long
-# endif
-#endif
 
 #ifndef DECLSPEC_ALIGN
@@ -62,19 +51,4 @@
 typedef int mbstate_t;
 
-#ifndef _SIZE_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-#else
-typedef unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
-
-#ifndef _WCTYPE_T_DEFINED
-typedef unsigned short  wint_t;
-typedef unsigned short  wctype_t;
-#define _WCTYPE_T_DEFINED
-#endif
-
 #ifndef WEOF
 #define WEOF        (wint_t)(0xFFFF)
@@ -99,14 +73,4 @@
 typedef int _off_t;
 #define _OFF_T_DEFINED
-#endif
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
-
-#ifndef _TIME64_T_DEFINED
-#define _TIME64_T_DEFINED
-typedef __int64 __time64_t;
 #endif
 
@@ -238,196 +202,197 @@
 #ifndef _WCTYPE_DEFINED
 #define _WCTYPE_DEFINED
-int is_wctype(wint_t,wctype_t);
-int isleadbyte(int);
-int iswalnum(wint_t);
-int iswalpha(wint_t);
-int iswascii(wint_t);
-int iswcntrl(wint_t);
-int iswctype(wint_t,wctype_t);
-int iswdigit(wint_t);
-int iswgraph(wint_t);
-int iswlower(wint_t);
-int iswprint(wint_t);
-int iswpunct(wint_t);
-int iswspace(wint_t);
-int iswupper(wint_t);
-int iswxdigit(wint_t);
-wchar_t towlower(wchar_t);
-wchar_t towupper(wchar_t);
+int     __cdecl is_wctype(wint_t,wctype_t);
+int     __cdecl isleadbyte(int);
+int     __cdecl iswalnum(wint_t);
+int     __cdecl iswalpha(wint_t);
+int     __cdecl iswascii(wint_t);
+int     __cdecl iswcntrl(wint_t);
+int     __cdecl iswctype(wint_t,wctype_t);
+int     __cdecl iswdigit(wint_t);
+int     __cdecl iswgraph(wint_t);
+int     __cdecl iswlower(wint_t);
+int     __cdecl iswprint(wint_t);
+int     __cdecl iswpunct(wint_t);
+int     __cdecl iswspace(wint_t);
+int     __cdecl iswupper(wint_t);
+int     __cdecl iswxdigit(wint_t);
+wchar_t __cdecl towlower(wchar_t);
+wchar_t __cdecl towupper(wchar_t);
 #endif /* _WCTYPE_DEFINED */
 
 #ifndef _WDIRECT_DEFINED
 #define _WDIRECT_DEFINED
-int              _wchdir(const wchar_t*);
-wchar_t* _wgetcwd(wchar_t*,int);
-wchar_t* _wgetdcwd(int,wchar_t*,int);
-int              _wmkdir(const wchar_t*);
-int              _wrmdir(const wchar_t*);
+int      __cdecl _wchdir(const wchar_t*);
+wchar_t* __cdecl _wgetcwd(wchar_t*,int);
+wchar_t* __cdecl _wgetdcwd(int,wchar_t*,int);
+int      __cdecl _wmkdir(const wchar_t*);
+int      __cdecl _wrmdir(const wchar_t*);
 #endif /* _WDIRECT_DEFINED */
 
 #ifndef _WIO_DEFINED
 #define _WIO_DEFINED
-int         _waccess(const wchar_t*,int);
-int         _wchmod(const wchar_t*,int);
-int         _wcreat(const wchar_t*,int);
-long        _wfindfirst(const wchar_t*,struct _wfinddata_t*);
-long        _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
-int         _wfindnext(long,struct _wfinddata_t*);
-int         _wfindnexti64(long, struct _wfinddatai64_t*);
-wchar_t*_wmktemp(wchar_t*);
-int         _wopen(const wchar_t*,int,...);
-int         _wrename(const wchar_t*,const wchar_t*);
-int         _wsopen(const wchar_t*,int,int,...);
-int         _wunlink(const wchar_t*);
+int      __cdecl _waccess(const wchar_t*,int);
+int      __cdecl _wchmod(const wchar_t*,int);
+int      __cdecl _wcreat(const wchar_t*,int);
+long     __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*);
+long     __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
+int      __cdecl _wfindnext(long,struct _wfinddata_t*);
+int      __cdecl _wfindnexti64(long, struct _wfinddatai64_t*);
+wchar_t* __cdecl _wmktemp(wchar_t*);
+int      __cdecl _wopen(const wchar_t*,int,...);
+int      __cdecl _wrename(const wchar_t*,const wchar_t*);
+int      __cdecl _wsopen(const wchar_t*,int,int,...);
+int      __cdecl _wunlink(const wchar_t*);
 #endif /* _WIO_DEFINED */
 
 #ifndef _WLOCALE_DEFINED
 #define _WLOCALE_DEFINED
-wchar_t* _wsetlocale(int,const wchar_t*);
+wchar_t* __cdecl _wsetlocale(int,const wchar_t*);
 #endif /* _WLOCALE_DEFINED */
 
 #ifndef _WPROCESS_DEFINED
 #define _WPROCESS_DEFINED
-int         _wexecl(const wchar_t*,const wchar_t*,...);
-int         _wexecle(const wchar_t*,const wchar_t*,...);
-int         _wexeclp(const wchar_t*,const wchar_t*,...);
-int         _wexeclpe(const wchar_t*,const wchar_t*,...);
-int         _wexecv(const wchar_t*,const wchar_t* const *);
-int         _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-int         _wexecvp(const wchar_t*,const wchar_t* const *);
-int         _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-int         _wspawnl(int,const wchar_t*,const wchar_t*,...);
-int         _wspawnle(int,const wchar_t*,const wchar_t*,...);
-int         _wspawnlp(int,const wchar_t*,const wchar_t*,...);
-int         _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
-int         _wspawnv(int,const wchar_t*,const wchar_t* const *);
-int         _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-int         _wspawnvp(int,const wchar_t*,const wchar_t* const *);
-int         _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
-int         _wsystem(const wchar_t*);
+int      __cdecl _wexecl(const wchar_t*,const wchar_t*,...);
+int      __cdecl _wexecle(const wchar_t*,const wchar_t*,...);
+int      __cdecl _wexeclp(const wchar_t*,const wchar_t*,...);
+int      __cdecl _wexeclpe(const wchar_t*,const wchar_t*,...);
+int      __cdecl _wexecv(const wchar_t*,const wchar_t* const *);
+int      __cdecl _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+int      __cdecl _wexecvp(const wchar_t*,const wchar_t* const *);
+int      __cdecl _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+int      __cdecl _wspawnl(int,const wchar_t*,const wchar_t*,...);
+int      __cdecl _wspawnle(int,const wchar_t*,const wchar_t*,...);
+int      __cdecl _wspawnlp(int,const wchar_t*,const wchar_t*,...);
+int      __cdecl _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
+int      __cdecl _wspawnv(int,const wchar_t*,const wchar_t* const *);
+int      __cdecl _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+int      __cdecl _wspawnvp(int,const wchar_t*,const wchar_t* const *);
+int      __cdecl _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
+int      __cdecl _wsystem(const wchar_t*);
 #endif /* _WPROCESS_DEFINED */
 
 #ifndef _WSTAT_DEFINED
 #define _WSTAT_DEFINED
-int _wstat(const wchar_t*,struct _stat*);
-int _wstati64(const wchar_t*,struct _stati64*);
-int _wstat64(const wchar_t*,struct _stat64*);
+int __cdecl _wstat(const wchar_t*,struct _stat*);
+int __cdecl _wstati64(const wchar_t*,struct _stati64*);
+int __cdecl _wstat64(const wchar_t*,struct _stat64*);
 #endif /* _WSTAT_DEFINED */
 
 #ifndef _WSTDIO_DEFINED
 #define _WSTDIO_DEFINED
-wint_t  _fgetwchar(void);
-wint_t  _fputwchar(wint_t);
-wchar_t*_getws(wchar_t*);
-int             _putws(const wchar_t*);
-int             _snwprintf(wchar_t*,size_t,const wchar_t*,...);
-int             _vsnwprintf(wchar_t*,size_t,const wchar_t*,va_list);
-FILE*   _wfdopen(int,const wchar_t*);
-FILE*   _wfopen(const wchar_t*,const wchar_t*);
-FILE*   _wfreopen(const wchar_t*,const wchar_t*,FILE*);
-FILE*   _wfsopen(const wchar_t*,const wchar_t*,int);
-void            _wperror(const wchar_t*);
-FILE*   _wpopen(const wchar_t*,const wchar_t*);
-int             _wremove(const wchar_t*);
-wchar_t*_wtempnam(const wchar_t*,const wchar_t*);
-wchar_t*_wtmpnam(wchar_t*);
-
-wint_t  fgetwc(FILE*);
-wchar_t*fgetws(wchar_t*,int,FILE*);
-wint_t  fputwc(wint_t,FILE*);
-int             fputws(const wchar_t*,FILE*);
-int             fwprintf(FILE*,const wchar_t*,...);
-int             fputws(const wchar_t*,FILE*);
-int             fwscanf(FILE*,const wchar_t*,...);
-wint_t  getwc(FILE*);
-wint_t  getwchar(void);
-wchar_t*getws(wchar_t*);
-wint_t  putwc(wint_t,FILE*);
-wint_t  putwchar(wint_t);
-int             putws(const wchar_t*);
-int             swprintf(wchar_t*,const wchar_t*,...);
-int             swscanf(const wchar_t*,const wchar_t*,...);
-wint_t  ungetwc(wint_t,FILE*);
-int             vfwprintf(FILE*,const wchar_t*,va_list);
-int             vswprintf(wchar_t*,const wchar_t*,va_list);
-int             vwprintf(const wchar_t*,va_list);
-int             wprintf(const wchar_t*,...);
-int             wscanf(const wchar_t*,...);
+wint_t   __cdecl _fgetwchar(void);
+wint_t   __cdecl _fputwchar(wint_t);
+wchar_t* __cdecl _getws(wchar_t*);
+int      __cdecl _putws(const wchar_t*);
+int      __cdecl _snwprintf(wchar_t*,size_t,const wchar_t*,...);
+int      __cdecl _vscwprintf(const wchar_t*,__ms_va_list);
+int      __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list);
+FILE*    __cdecl _wfdopen(int,const wchar_t*);
+FILE*    __cdecl _wfopen(const wchar_t*,const wchar_t*);
+FILE*    __cdecl _wfreopen(const wchar_t*,const wchar_t*,FILE*);
+FILE*    __cdecl _wfsopen(const wchar_t*,const wchar_t*,int);
+void     __cdecl _wperror(const wchar_t*);
+FILE*    __cdecl _wpopen(const wchar_t*,const wchar_t*);
+int      __cdecl _wremove(const wchar_t*);
+wchar_t* __cdecl _wtempnam(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl _wtmpnam(wchar_t*);
+
+wint_t   __cdecl fgetwc(FILE*);
+wchar_t* __cdecl fgetws(wchar_t*,int,FILE*);
+wint_t   __cdecl fputwc(wint_t,FILE*);
+int      __cdecl fputws(const wchar_t*,FILE*);
+int      __cdecl fwprintf(FILE*,const wchar_t*,...);
+int      __cdecl fputws(const wchar_t*,FILE*);
+int      __cdecl fwscanf(FILE*,const wchar_t*,...);
+wint_t   __cdecl getwc(FILE*);
+wint_t   __cdecl getwchar(void);
+wchar_t* __cdecl getws(wchar_t*);
+wint_t   __cdecl putwc(wint_t,FILE*);
+wint_t   __cdecl putwchar(wint_t);
+int      __cdecl putws(const wchar_t*);
+int      __cdecl swprintf(wchar_t*,const wchar_t*,...);
+int      __cdecl swscanf(const wchar_t*,const wchar_t*,...);
+wint_t   __cdecl ungetwc(wint_t,FILE*);
+int      __cdecl vfwprintf(FILE*,const wchar_t*,__ms_va_list);
+int      __cdecl vswprintf(wchar_t*,const wchar_t*,__ms_va_list);
+int      __cdecl vwprintf(const wchar_t*,__ms_va_list);
+int      __cdecl wprintf(const wchar_t*,...);
+int      __cdecl wscanf(const wchar_t*,...);
 #endif /* _WSTDIO_DEFINED */
 
 #ifndef _WSTDLIB_DEFINED
 #define _WSTDLIB_DEFINED
-wchar_t*_itow(int,wchar_t*,int);
-wchar_t*_i64tow(__int64,wchar_t*,int);
-wchar_t*_ltow(long,wchar_t*,int);
-wchar_t*_ui64tow(unsigned __int64,wchar_t*,int);
-wchar_t*_ultow(unsigned long,wchar_t*,int);
-wchar_t*_wfullpath(wchar_t*,const wchar_t*,size_t);
-wchar_t*_wgetenv(const wchar_t*);
-void            _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
-void            _wperror(const wchar_t*);
-int             _wputenv(const wchar_t*);
-void            _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
-void            _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
-int             _wsystem(const wchar_t*);
-int             _wtoi(const wchar_t*);
-__int64         _wtoi64(const wchar_t*);
-long            _wtol(const wchar_t*);
-
-size_t mbstowcs(wchar_t*,const char*,size_t);
-int            mbtowc(wchar_t*,const char*,size_t);
-double         wcstod(const wchar_t*,wchar_t**);
-long           wcstol(const wchar_t*,wchar_t**,int);
-size_t wcstombs(char*,const wchar_t*,size_t);
-unsigned long  wcstoul(const wchar_t*,wchar_t**,int);
-int            wctomb(char*,wchar_t);
+wchar_t* __cdecl _itow(int,wchar_t*,int);
+wchar_t* __cdecl _i64tow(__int64,wchar_t*,int);
+wchar_t* __cdecl _ltow(long,wchar_t*,int);
+wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
+wchar_t* __cdecl _ultow(unsigned long,wchar_t*,int);
+wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl _wgetenv(const wchar_t*);
+void     __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
+void     __cdecl _wperror(const wchar_t*);
+int      __cdecl _wputenv(const wchar_t*);
+void     __cdecl _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
+void     __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
+int      __cdecl _wsystem(const wchar_t*);
+int      __cdecl _wtoi(const wchar_t*);
+__int64  __cdecl _wtoi64(const wchar_t*);
+long     __cdecl _wtol(const wchar_t*);
+
+size_t        __cdecl mbstowcs(wchar_t*,const char*,size_t);
+int           __cdecl mbtowc(wchar_t*,const char*,size_t);
+double        __cdecl wcstod(const wchar_t*,wchar_t**);
+long          __cdecl wcstol(const wchar_t*,wchar_t**,int);
+size_t        __cdecl wcstombs(char*,const wchar_t*,size_t);
+unsigned long __cdecl wcstoul(const wchar_t*,wchar_t**,int);
+int           __cdecl wctomb(char*,wchar_t);
 #endif /* _WSTDLIB_DEFINED */
 
 #ifndef _WSTRING_DEFINED
 #define _WSTRING_DEFINED
-wchar_t*_wcsdup(const wchar_t*);
-int             _wcsicmp(const wchar_t*,const wchar_t*);
-int             _wcsicoll(const wchar_t*,const wchar_t*);
-wchar_t*_wcslwr(wchar_t*);
-int             _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
-wchar_t*_wcsnset(wchar_t*,wchar_t,size_t);
-wchar_t*_wcsrev(wchar_t*);
-wchar_t*_wcsset(wchar_t*,wchar_t);
-wchar_t*_wcsupr(wchar_t*);
-
-wchar_t*wcscat(wchar_t*,const wchar_t*);
-wchar_t*wcschr(const wchar_t*,wchar_t);
-int             wcscmp(const wchar_t*,const wchar_t*);
-int             wcscoll(const wchar_t*,const wchar_t*);
-wchar_t*wcscpy(wchar_t*,const wchar_t*);
-size_t  wcscspn(const wchar_t*,const wchar_t*);
-size_t  wcslen(const wchar_t*);
-wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t);
-int             wcsncmp(const wchar_t*,const wchar_t*,size_t);
-wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t);
-wchar_t*wcspbrk(const wchar_t*,const wchar_t*);
-wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor);
-size_t  wcsspn(const wchar_t*,const wchar_t*);
-wchar_t*wcsstr(const wchar_t*,const wchar_t*);
-wchar_t*wcstok(wchar_t*,const wchar_t*);
-size_t  wcsxfrm(wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl _wcsdup(const wchar_t*);
+int      __cdecl _wcsicmp(const wchar_t*,const wchar_t*);
+int      __cdecl _wcsicoll(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl _wcslwr(wchar_t*);
+int      __cdecl _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl _wcsnset(wchar_t*,wchar_t,size_t);
+wchar_t* __cdecl _wcsrev(wchar_t*);
+wchar_t* __cdecl _wcsset(wchar_t*,wchar_t);
+wchar_t* __cdecl _wcsupr(wchar_t*);
+
+wchar_t* __cdecl wcscat(wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcschr(const wchar_t*,wchar_t);
+int      __cdecl wcscmp(const wchar_t*,const wchar_t*);
+int      __cdecl wcscoll(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcscpy(wchar_t*,const wchar_t*);
+size_t   __cdecl wcscspn(const wchar_t*,const wchar_t*);
+size_t   __cdecl wcslen(const wchar_t*);
+wchar_t* __cdecl wcsncat(wchar_t*,const wchar_t*,size_t);
+int      __cdecl wcsncmp(const wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl wcsncpy(wchar_t*,const wchar_t*,size_t);
+wchar_t* __cdecl wcspbrk(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcsrchr(const wchar_t*,wchar_t wcFor);
+size_t   __cdecl wcsspn(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcsstr(const wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
+size_t   __cdecl wcsxfrm(wchar_t*,const wchar_t*,size_t);
 #endif /* _WSTRING_DEFINED */
 
 #ifndef _WTIME_DEFINED
 #define _WTIME_DEFINED
-wchar_t*_wasctime(const struct tm*);
-size_t  wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
-wchar_t*_wctime(const time_t*);
-wchar_t*_wstrdate(wchar_t*);
-wchar_t*_wstrtime(wchar_t*);
+wchar_t* __cdecl _wasctime(const struct tm*);
+size_t   __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
+wchar_t* __cdecl _wctime(const time_t*);
+wchar_t* __cdecl _wstrdate(wchar_t*);
+wchar_t* __cdecl _wstrtime(wchar_t*);
 #endif /* _WTIME_DEFINED */
 
-wchar_t btowc(int);
-size_t  mbrlen(const char *,size_t,mbstate_t*);
-size_t  mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);
-size_t  mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*);
-size_t  wcrtomb(char*,wchar_t,mbstate_t*);
-size_t  wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
-int             wctob(wint_t);
+wchar_t __cdecl btowc(int);
+size_t  __cdecl mbrlen(const char *,size_t,mbstate_t*);
+size_t  __cdecl mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);
+size_t  __cdecl mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*);
+size_t  __cdecl wcrtomb(char*,wchar_t,mbstate_t*);
+size_t  __cdecl wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
+int     __cdecl wctob(wint_t);
 
 #ifdef __cplusplus
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/wctype.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/wctype.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/wctype.h	(revision 19678)
@@ -27,18 +27,11 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_WCTYPE_H
 #define __WINE_WCTYPE_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
+
+#include <crtdefs.h>
 
 #include <pshpack8.h>
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
 
 /* ASCII char classification table - binary compatible */
@@ -58,10 +51,4 @@
 #endif
 
-#ifndef _WCTYPE_T_DEFINED
-typedef unsigned short  wint_t;
-typedef unsigned short  wctype_t;
-#define _WCTYPE_T_DEFINED
-#endif
-
 /* FIXME: there's something to do with __p__pctype and __p__pwctype */
 
@@ -73,21 +60,21 @@
 #ifndef _WCTYPE_DEFINED
 #define _WCTYPE_DEFINED
-int is_wctype(wint_t,wctype_t);
-int isleadbyte(int);
-int iswalnum(wint_t);
-int iswalpha(wint_t);
-int iswascii(wint_t);
-int iswcntrl(wint_t);
-int iswctype(wint_t,wctype_t);
-int iswdigit(wint_t);
-int iswgraph(wint_t);
-int iswlower(wint_t);
-int iswprint(wint_t);
-int iswpunct(wint_t);
-int iswspace(wint_t);
-int iswupper(wint_t);
-int iswxdigit(wint_t);
-wchar_t towlower(wchar_t);
-wchar_t towupper(wchar_t);
+int __cdecl is_wctype(wint_t,wctype_t);
+int __cdecl isleadbyte(int);
+int __cdecl iswalnum(wint_t);
+int __cdecl iswalpha(wint_t);
+int __cdecl iswascii(wint_t);
+int __cdecl iswcntrl(wint_t);
+int __cdecl iswctype(wint_t,wctype_t);
+int __cdecl iswdigit(wint_t);
+int __cdecl iswgraph(wint_t);
+int __cdecl iswlower(wint_t);
+int __cdecl iswprint(wint_t);
+int __cdecl iswpunct(wint_t);
+int __cdecl iswspace(wint_t);
+int __cdecl iswupper(wint_t);
+int __cdecl iswxdigit(wint_t);
+wchar_t __cdecl towlower(wchar_t);
+wchar_t __cdecl towupper(wchar_t);
 #endif /* _WCTYPE_DEFINED */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msxml.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msxml.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msxml.idl	(revision 19678)
@@ -18,4 +18,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #include <msxmldid.h>
 
@@ -38,8 +47,8 @@
 {
     [propput, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
-    HRESULT length( [in] long v );
+    HRESULT length( [in] LONG v );
 
     [propget, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
-    HRESULT length( [retval, out] long *p );
+    HRESULT length( [retval, out] LONG *p );
 
     [propget, id(DISPID_XMLELEMENTCOLLECTION_NEWENUM)]
@@ -87,5 +96,5 @@
 
     [propget, id(DISPID_XMLELEMENT_TYPE)]
-    HRESULT type( [retval, out] long *p );
+    HRESULT type( [retval, out] LONG *p );
 
     [propget, id(DISPID_XMLELEMENT_TEXT)]
@@ -98,6 +107,6 @@
     HRESULT addChild(
             [in] IXMLElement *pChildElem,
-            [in] long lIndex,
-            [in] long lreserved );
+            [in] LONG lIndex,
+            [in] LONG lreserved );
 
     [id(DISPID_XMLELEMENT_REMOVECHILD)]
@@ -135,5 +144,5 @@
 
     [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
-    HRESULT readyState( [retval, out] long *p );
+    HRESULT readyState( [retval, out] LONG *p );
 
     [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
@@ -192,5 +201,5 @@
 
     [propget, id(DISPID_XMLELEMENT_TYPE)]
-    HRESULT type([retval, out] long *plType);
+    HRESULT type([retval, out] LONG *plType);
 
     [propget, id(DISPID_XMLELEMENT_TEXT)]
@@ -203,6 +212,6 @@
     HRESULT addChild(
         [in] IXMLElement2 *pChildElem,
-        [in] long lIndex,
-        [in] long lReserved);
+        [in] LONG lIndex,
+        [in] LONG lReserved);
 
     [id(DISPID_XMLELEMENT_REMOVECHILD)]
@@ -242,5 +251,5 @@
    
     [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
-    HRESULT readyState([retval, out]long *pl);
+    HRESULT readyState([retval, out]LONG *pl);
 
     [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msxml2.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msxml2.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msxml2.idl	(revision 19678)
@@ -16,4 +16,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -328,5 +337,5 @@
 
     [propget, id(DISPID_READYSTATE)]
-    HRESULT readyState([retval, out] long *value);
+    HRESULT readyState([retval, out] LONG *value);
 
     [propget, id(DISPID_XMLDOM_DOCUMENT_PARSEERROR)]
@@ -405,8 +414,8 @@
     [propget, id(DISPID_XMLDOM_SCHEMACOLLECTION_LENGTH)]
     HRESULT length(
-        [retval, out] long *length);
+        [retval, out] LONG *length);
 
     [propget, id(DISPID_VALUE)]
-    HRESULT namespaceURI([in] long index, [out, retval] BSTR *len);
+    HRESULT namespaceURI([in] LONG index, [out, retval] BSTR *len);
 
     [id(DISPID_XMLDOM_SCHEMACOLLECTION_ADDCOLLECTION)]
@@ -457,8 +466,8 @@
 {
     [propget, id(DISPID_VALUE)]
-    HRESULT item([in] long lIndex, [retval, out] IXMLDOMNode **outNode);
+    HRESULT item([in] LONG lIndex, [retval, out] IXMLDOMNode **outNode);
 
     [propget, id(DISPID_DOM_NODELIST_LENGTH)]
-    HRESULT length([retval, out] long *lLength);
+    HRESULT length([retval, out] LONG *lLength);
 
     [id(DISPID_XMLDOM_NODELIST_NEXTNODE)]
@@ -546,8 +555,8 @@
 
     [propget, id(DISPID_VALUE)]
-    HRESULT item([in] long lIndex, [retval, out] IXMLDOMNode **outNode);
+    HRESULT item([in] LONG lIndex, [retval, out] IXMLDOMNode **outNode);
 
     [propget, id(DISPID_DOM_NODELIST_LENGTH)]
-    HRESULT length([retval, out] long *lLength);
+    HRESULT length([retval, out] LONG *lLength);
 
     [id(DISPID_XMLDOM_NAMEDNODEMAP_GETQUALIFIEDITEM)]
@@ -597,10 +606,10 @@
 
     [propget, id(DISPID_DOM_DATA_LENGTH)]
-    HRESULT length([retval, out] long *len);
+    HRESULT length([retval, out] LONG *len);
 
     [id(DISPID_DOM_DATA_SUBSTRING)]
     HRESULT substringData(
-        [in] long offset,
-        [in] long count,
+        [in] LONG offset,
+        [in] LONG count,
         [retval, out] BSTR *p);
 
@@ -611,16 +620,16 @@
     [id(DISPID_DOM_DATA_INSERT)]
     HRESULT insertData(
-        [in] long offset,
+        [in] LONG offset,
         [in] BSTR p);
 
     [id(DISPID_DOM_DATA_DELETE)]
     HRESULT deleteData(
-        [in] long offset,
-        [in] long count);
+        [in] LONG offset,
+        [in] LONG count);
 
     [id(DISPID_DOM_DATA_REPLACE)]
     HRESULT replaceData(
-        [in] long offset,
-        [in] long count,
+        [in] LONG offset,
+        [in] LONG count,
         [in] BSTR p);
 }
@@ -700,5 +709,5 @@
     [id(DISPID_DOM_TEXT_SPLITTEXT)]
     HRESULT splitText(
-        [in] long offset,
+        [in] LONG offset,
         [retval, out] IXMLDOMText **txtNode);
 }
@@ -820,15 +829,15 @@
     HRESULT uniqueID(
         [in]IXMLDOMNode *pNode, 
-        [retval, out]long *pID);
+        [retval, out]LONG *pID);
 
     [id(DISPID_XTLRUNTIME_DEPTH)]
     HRESULT depth(
         [in] IXMLDOMNode *pNode, 
-        [retval, out]long * pDepth);
+        [retval, out]LONG * pDepth);
 
     [id(DISPID_XTLRUNTIME_CHILDNUMBER)] 
     HRESULT childNumber(
         [in]IXMLDOMNode *pNode, 
-        [retval, out] long *pNumber);
+        [retval, out] LONG *pNumber);
 
     [id(DISPID_XTLRUNTIME_ANCESTORCHILDNUMBER)]
@@ -836,14 +845,14 @@
         [in]BSTR bstr, 
         [in]IXMLDOMNode *pNode, 
-        [retval, out]long *pNumber);
+        [retval, out]LONG *pNumber);
 
     [id(DISPID_XTLRUNTIME_ABSOLUTECHILDNUMBER)]
     HRESULT absoluteChildNumber(
         [in]IXMLDOMNode *pNode, 
-        [retval, out]long *pNumber);
+        [retval, out]LONG *pNumber);
 
     [id(DISPID_XTLRUNTIME_FORMATINDEX)]
     HRESULT formatIndex(
-        [in] long lIndex, 
+        [in] LONG lIndex,
         [in] BSTR bstr, 
         [retval, out]BSTR *pbstr);
@@ -926,5 +935,5 @@
 
     [propget, id(DISPID_XMLDOM_PROCESSOR_READYSTATE)]
-    HRESULT readyState([retval, out] long *pstate);
+    HRESULT readyState([retval, out] LONG *pstate);
 
     [id(DISPID_XMLDOM_PROCESSOR_ADDPARAMETER)]
@@ -991,5 +1000,5 @@
 
     [propget, id(7)]
-    HRESULT status([out, retval] long *pStatus);
+    HRESULT status([out, retval] LONG *pStatus);
 
     [propget, id(8)]
@@ -1009,5 +1018,5 @@
 
     [propget, id(13)]
-    HRESULT readyState([out, retval] long *pState);
+    HRESULT readyState([out, retval] LONG *pState);
 
     [propput, id(14)]
@@ -1023,5 +1032,5 @@
 {
     [propget, id(DISPID_VALUE)]
-    HRESULT errorCode([retval, out] long *errCode);
+    HRESULT errorCode([retval, out] LONG *errCode);
 
     [propget, id(DISPID_DOM_ERROR_URL)]
@@ -1035,11 +1044,11 @@
 
     [propget, id(DISPID_DOM_ERROR_LINE)]
-    HRESULT line([retval, out] long *lineNo);
+    HRESULT line([retval, out] LONG *lineNo);
 
     [propget, id(DISPID_DOM_ERROR_LINEPOS)]
-    HRESULT linepos([retval, out] long * linePos);
+    HRESULT linepos([retval, out] LONG * linePos);
 
     [propget, id(DISPID_DOM_ERROR_FILEPOS)]
-    HRESULT filepos([retval, out] long * filePos);
+    HRESULT filepos([retval, out] LONG * filePos);
 }
 
@@ -1691,7 +1700,7 @@
     [id(DISPID_SAX_ERRORHANDLER_ERROR)]
     HRESULT error(
-        [in] IVBSAXLocator * locator,
+            [in] IVBSAXLocator * locator,
 	    [in, out] BSTR * errorMessage,
-	    [in] long errorCode);
+            [in] LONG errorCode);
 
     [id(DISPID_SAX_ERRORHANDLER_FATALERROR)]
@@ -1699,5 +1708,5 @@
 	    [in] IVBSAXLocator * locator,
 	    [in, out] BSTR * errorMessage,
-	    [in] long errorCode);
+            [in] LONG errorCode);
 
     [id(DISPID_SAX_ERRORHANDLER_IGNORABLEWARNING)]
@@ -1705,5 +1714,5 @@
 	    [in] IVBSAXLocator * locator,
 	    [in, out] BSTR * errorMessage,
-	    [in] long errorCode);
+            [in] LONG errorCode);
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/netfw.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/netfw.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/netfw.idl	(revision 19678)
@@ -20,4 +20,13 @@
  * The firewall management interface
  *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oaidl.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oaidl.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oaidl.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objbase.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objbase.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objbase.h	(revision 19678)
@@ -235,6 +235,7 @@
 
 #define interface struct
-#define DECLARE_INTERFACE(iface)        interface iface
-#define DECLARE_INTERFACE_(iface,ibase) interface iface : public ibase
+#define DECLARE_INTERFACE(iface)        interface DECLSPEC_NOVTABLE iface
+#define DECLARE_INTERFACE_(iface,ibase) interface DECLSPEC_NOVTABLE iface : public ibase
+#define DECLARE_INTERFACE_IID_(iface, ibase, iid) interface DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE iface : public ibase
 
 #define BEGIN_INTERFACE
@@ -276,4 +277,5 @@
 #endif
 #define DECLARE_INTERFACE_(iface,ibase) DECLARE_INTERFACE(iface)
+#define DECLARE_INTERFACE_IID_(iface, ibase, iid) DECLARE_INTERFACE_(iface, ibase)
 
 #define BEGIN_INTERFACE
@@ -318,5 +320,5 @@
 
 /*****************************************************************************
- *  Standard API
+ *	Standard API
  */
 DWORD WINAPI CoBuildVersion(void);
@@ -343,9 +345,9 @@
 HRESULT WINAPI CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv);
 HRESULT WINAPI CoCreateInstanceEx(REFCLSID      rclsid,
-                  LPUNKNOWN     pUnkOuter,
-                  DWORD         dwClsContext,
-                  COSERVERINFO* pServerInfo,
-                  ULONG         cmq,
-                  MULTI_QI*     pResults);
+				  LPUNKNOWN     pUnkOuter,
+				  DWORD         dwClsContext,
+				  COSERVERINFO* pServerInfo,
+				  ULONG         cmq,
+				  MULTI_QI*     pResults);
 
 HRESULT WINAPI CoGetInstanceFromFile(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter, DWORD dwClsCtx, DWORD grfMode, OLECHAR* pwszName, DWORD dwCount, MULTI_QI* pResults);
@@ -401,4 +403,5 @@
 HRESULT WINAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE* asAuthSvc, void* pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void* pReserved2, DWORD dwCapabilities, void* pReserved3);
 HRESULT WINAPI CoGetCallContext(REFIID riid, void** ppInterface);
+HRESULT WINAPI CoSwitchCallContext(IUnknown *pContext, IUnknown **ppOldContext);
 HRESULT WINAPI CoQueryAuthenticationServices(DWORD* pcAuthSvc, SOLE_AUTHENTICATION_SERVICE** asAuthSvc);
 
@@ -435,5 +438,5 @@
 
 /*****************************************************************************
- *  GUID API
+ *	GUID API
  */
 HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR*);
@@ -445,5 +448,5 @@
 
 /*****************************************************************************
- *  COM Server dll - exports
+ *	COM Server dll - exports
  */
 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv) DECLSPEC_HIDDEN;
@@ -458,5 +461,5 @@
 
 /*****************************************************************************
- *  Data Object
+ *	Data Object
  */
 HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder);
@@ -464,5 +467,5 @@
 
 /*****************************************************************************
- *  Moniker API
+ *	Moniker API
  */
 HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID iidResult, LPVOID* ppvResult);
@@ -483,29 +486,29 @@
 
 /*****************************************************************************
- *  Storage API
- */
-#define STGM_DIRECT     0x00000000
-#define STGM_TRANSACTED     0x00010000
-#define STGM_SIMPLE     0x08000000
-#define STGM_READ       0x00000000
-#define STGM_WRITE      0x00000001
-#define STGM_READWRITE      0x00000002
-#define STGM_SHARE_DENY_NONE    0x00000040
-#define STGM_SHARE_DENY_READ    0x00000030
-#define STGM_SHARE_DENY_WRITE   0x00000020
-#define STGM_SHARE_EXCLUSIVE    0x00000010
-#define STGM_PRIORITY       0x00040000
-#define STGM_DELETEONRELEASE    0x04000000
-#define STGM_CREATE     0x00001000
-#define STGM_CONVERT        0x00020000
-#define STGM_FAILIFTHERE    0x00000000
-#define STGM_NOSCRATCH      0x00100000
-#define STGM_NOSNAPSHOT     0x00200000
-#define STGM_DIRECT_SWMR    0x00400000
-
-#define STGFMT_STORAGE      0
-#define STGFMT_FILE         3
-#define STGFMT_ANY      4
-#define STGFMT_DOCFILE  5
+ *	Storage API
+ */
+#define STGM_DIRECT		0x00000000
+#define STGM_TRANSACTED		0x00010000
+#define STGM_SIMPLE		0x08000000
+#define STGM_READ		0x00000000
+#define STGM_WRITE		0x00000001
+#define STGM_READWRITE		0x00000002
+#define STGM_SHARE_DENY_NONE	0x00000040
+#define STGM_SHARE_DENY_READ	0x00000030
+#define STGM_SHARE_DENY_WRITE	0x00000020
+#define STGM_SHARE_EXCLUSIVE	0x00000010
+#define STGM_PRIORITY		0x00040000
+#define STGM_DELETEONRELEASE	0x04000000
+#define STGM_CREATE		0x00001000
+#define STGM_CONVERT		0x00020000
+#define STGM_FAILIFTHERE	0x00000000
+#define STGM_NOSCRATCH		0x00100000
+#define STGM_NOSNAPSHOT		0x00200000
+#define STGM_DIRECT_SWMR	0x00400000
+
+#define STGFMT_STORAGE		0
+#define STGFMT_FILE 		3
+#define STGFMT_ANY 		4
+#define STGFMT_DOCFILE 	5
 
 typedef struct tagSTGOPTIONS
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objidl.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objidl.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objidl.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef DO_NO_IMPORTS
 import "unknwn.idl";
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objsafe.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objsafe.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/objsafe.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ocidl.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ocidl.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ocidl.idl	(revision 19678)
@@ -17,4 +17,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ocmm.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ocmm.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ocmm.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ole2.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ole2.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ole2.h	(revision 19678)
@@ -132,4 +132,7 @@
 HRESULT     WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc,
                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
+HRESULT     WINAPI OleCreateFromDataEx(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD dwFlags, DWORD renderopt, ULONG num_formats,
+                                       DWORD *adv_flags, LPFORMATETC fmts, IAdviseSink *sink, DWORD *conns,
+                                       LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
 HRESULT     WINAPI OleCreateDefaultHandler(REFCLSID  clsid,
 					   LPUNKNOWN pUnkOuter,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleacc.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleacc.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleacc.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleauto.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleauto.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleauto.h	(revision 19678)
@@ -326,5 +326,5 @@
 HRESULT WINAPI VarR8FromStr(OLECHAR*,LCID,ULONG,double*);
 HRESULT WINAPI VarR8FromCy(CY,double*);
-HRESULT WINAPI VarR8FromDec(DECIMAL*,double*);
+HRESULT WINAPI VarR8FromDec(const DECIMAL*,double*);
 HRESULT WINAPI VarR8FromDisp(IDispatch*,LCID,double*);
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/olectl.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/olectl.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/olectl.h	(revision 19678)
@@ -167,8 +167,8 @@
 } PICTDESC, *LPPICTDESC;
 
-typedef long OLE_XPOS_PIXELS;
-typedef long OLE_YPOS_PIXELS;
-typedef long OLE_XSIZE_PIXELS;
-typedef long OLE_YSIZE_PIXELS;
+typedef LONG OLE_XPOS_PIXELS;
+typedef LONG OLE_YPOS_PIXELS;
+typedef LONG OLE_XSIZE_PIXELS;
+typedef LONG OLE_YSIZE_PIXELS;
 typedef float OLE_XPOS_CONTAINER;
 typedef float OLE_YPOS_CONTAINER;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oledb.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oledb.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oledb.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "wtypes.idl";
 import "oaidl.idl";
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleidl.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleidl.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/oleidl.idl	(revision 19678)
@@ -19,4 +19,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef DO_NO_IMPORTS
 import "objidl.idl";
@@ -24,4 +33,6 @@
 
 interface IOleInPlaceActiveObject;
+
+cpp_quote("#include <winuser.h>")
 
 /*****************************************************************************
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/optary.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/optary.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/optary.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pdh.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pdh.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pdh.h	(revision 19678)
@@ -185,4 +185,7 @@
 PDH_STATUS WINAPI PdhCollectQueryDataEx(PDH_HQUERY, DWORD, HANDLE);
 PDH_STATUS WINAPI PdhCollectQueryDataWithTime(PDH_HQUERY,LONGLONG *);
+PDH_STATUS WINAPI PdhEnumObjectItemsA(LPCSTR, LPCSTR, LPCSTR, LPSTR, LPDWORD, LPSTR, LPDWORD, DWORD, DWORD);
+PDH_STATUS WINAPI PdhEnumObjectItemsW(LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, LPWSTR, LPDWORD, DWORD, DWORD);
+#define    PdhEnumObjectItems WINELIB_NAME_AW(PdhEnumObjectItems)
 PDH_STATUS WINAPI PdhGetCounterInfoA(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_A);
 PDH_STATUS WINAPI PdhGetCounterInfoW(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_W);
@@ -197,4 +200,7 @@
 PDH_STATUS WINAPI PdhLookupPerfNameByIndexW(LPCWSTR, DWORD, LPWSTR, LPDWORD);
 #define    PdhLookupPerfNameByIndex WINELIB_NAME_AW(PdhLookupPerfNameByIndex)
+PDH_STATUS WINAPI PdhMakeCounterPathA(PDH_COUNTER_PATH_ELEMENTS_A *, LPSTR, LPDWORD, DWORD);
+PDH_STATUS WINAPI PdhMakeCounterPathW(PDH_COUNTER_PATH_ELEMENTS_W *, LPWSTR, LPDWORD, DWORD);
+#define    PdhMakeCounterPath WINELIB_NAME_AW(PdhMakeCounterPath)
 PDH_STATUS WINAPI PdhOpenQueryA(LPCSTR, DWORD_PTR, PDH_HQUERY *);
 PDH_STATUS WINAPI PdhOpenQueryW(LPCWSTR, DWORD_PTR, PDH_HQUERY *);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pdhmsg.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pdhmsg.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pdhmsg.h	(revision 19678)
@@ -43,4 +43,5 @@
 #define PDH_INSUFFICIENT_BUFFER         0xc0000bc2
 #define PDH_INVALID_DATA                0xc0000bc6
+#define PDH_NOT_IMPLEMENTED             0xc0000bd3
 #define PDH_STRING_NOT_FOUND            0xc0000bd4
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/perhist.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/perhist.idl	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/perhist.idl	(revision 19678)
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2009 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+import "objidl.idl";
+import "oleidl.idl";
+
+[
+    object,
+    uuid(91A565C1-E38F-11d0-94BF-00A0C9055CBF),
+    pointer_default(unique)
+]
+interface IPersistHistory : IPersist
+{
+    typedef [unique] IPersistHistory *LPPERSISTHISTORY;
+
+    HRESULT LoadHistory([in] IStream *pStream, [in] IBindCtx *pbc);
+
+    HRESULT SaveHistory([in] IStream *pStream);
+
+    HRESULT SetPositionCookie([in] DWORD dwPositioncookie);
+
+    HRESULT GetPositionCookie([out] DWORD *pdwPositioncookie);
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/propidl.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/propidl.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/propidl.idl	(revision 19678)
@@ -17,4 +17,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/psapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/psapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/psapi.h	(revision 19678)
@@ -38,14 +38,14 @@
 
 typedef struct _PROCESS_MEMORY_COUNTERS {
-  DWORD cb;
-  DWORD PageFaultCount;
-  DWORD PeakWorkingSetSize;
-  DWORD WorkingSetSize;
-  DWORD QuotaPeakPagedPoolUsage;
-  DWORD QuotaPagedPoolUsage;
-  DWORD QuotaPeakNonPagedPoolUsage;
-  DWORD QuotaNonPagedPoolUsage;
-  DWORD PagefileUsage;
-  DWORD PeakPagefileUsage;
+  DWORD  cb;
+  DWORD  PageFaultCount;
+  SIZE_T PeakWorkingSetSize;
+  SIZE_T WorkingSetSize;
+  SIZE_T QuotaPeakPagedPoolUsage;
+  SIZE_T QuotaPagedPoolUsage;
+  SIZE_T QuotaPeakNonPagedPoolUsage;
+  SIZE_T QuotaNonPagedPoolUsage;
+  SIZE_T PagefileUsage;
+  SIZE_T PeakPagefileUsage;
 } PROCESS_MEMORY_COUNTERS;
 typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pstore.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pstore.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pstore.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "oaidl.idl";
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/qedit.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/qedit.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/qedit.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -38,5 +47,5 @@
         double SampleTime,
         BYTE * pBuffer,
-        long BufferLen
+        LONG BufferLen
     );
 }
@@ -67,6 +76,6 @@
 
     HRESULT GetCurrentBuffer(
-        [in,out] long * pBufferSize,
-        [out] long * pBuffer
+        [in,out] LONG * pBufferSize,
+        [out] LONG * pBuffer
     );
 
@@ -77,5 +86,5 @@
     HRESULT SetCallback(
         ISampleGrabberCB * pCallback,
-        long WhichMethodToCallback
+        LONG WhichMethodToCallback
     );
 };
@@ -97,13 +106,13 @@
 
     HRESULT get_OutputStreams(
-        [out] long *pVal
+        [out] LONG *pVal
     );
 
     HRESULT get_CurrentStream(
-        [out] long *pVal
+        [out] LONG *pVal
     );
 
     HRESULT put_CurrentStream(
-        long newVal
+        LONG newVal
     );
 
@@ -130,14 +139,14 @@
     HRESULT GetBitmapBits(
         double StreamTime,
-        long * pBufferSize,
+        LONG * pBufferSize,
         char * pBuffer,
-        long Width,
-        long Height
+        LONG Width,
+        LONG Height
     );
 
     HRESULT WriteBitmapBits(
         double StreamTime,
-        long Width,
-        long Height,
+        LONG Width,
+        LONG Height,
         BSTR Filename
     );
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/richedit.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/richedit.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/richedit.h	(revision 19678)
@@ -526,5 +526,5 @@
 typedef struct _editstream
 {
-    DWORD		dwCookie;
+    DWORD_PTR		dwCookie;
     DWORD		dwError;
     EDITSTREAMCALLBACK	pfnCallback;
@@ -632,5 +632,5 @@
 {
     KHYPH      khyph;
-    long       ichHyph;
+    LONG       ichHyph;
     WCHAR      chHyph;
 } HYPHRESULT;
@@ -640,5 +640,5 @@
     SHORT      cbSize;
     SHORT      dxHyphenateZone;
-    void       (WINAPI* pfnHyphenate)(WCHAR*, LANGID, long, HYPHRESULT*);
+    void       (WINAPI* pfnHyphenate)(WCHAR*, LANGID, LONG, HYPHRESULT*);
 } HYPHENATEINFO;
 
@@ -722,5 +722,5 @@
 } IMECOMPTEXT;
 
-void WINAPI HyphenateProc(WCHAR*, LANGID, long, HYPHRESULT*);
+void WINAPI HyphenateProc(WCHAR*, LANGID, LONG, HYPHRESULT*);
 
 #define SF_TEXT		      0x00000001
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/richole.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/richole.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/richole.idl	(revision 19678)
@@ -16,4 +16,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpc.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpc.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpc.h	(revision 19678)
@@ -61,5 +61,5 @@
 #define RPC_ENTRY  __stdcall
 #define RPCRTAPI
-typedef long RPC_STATUS;
+typedef LONG RPC_STATUS;
 
 typedef void* I_RPC_HANDLE;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcdce.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcdce.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcdce.h	(revision 19678)
@@ -64,5 +64,5 @@
 typedef struct _RPC_BINDING_VECTOR
 {
-  unsigned long Count;
+  ULONG Count;
   RPC_BINDING_HANDLE BindingH[1];
 } RPC_BINDING_VECTOR;
@@ -71,5 +71,5 @@
 typedef struct _UUID_VECTOR
 {
-  unsigned long Count;
+  ULONG Count;
   UUID *Uuid[1];
 } UUID_VECTOR;
@@ -85,5 +85,5 @@
 typedef struct
 {
-  unsigned long Count;
+  ULONG Count;
   RPC_IF_ID *IfId[1];
 } RPC_IF_ID_VECTOR;
@@ -92,5 +92,5 @@
 {
   unsigned int Count;
-  unsigned long Stats[1];
+  ULONG Stats[1];
 } RPC_STATS_VECTOR;
 
@@ -205,6 +205,6 @@
 {
   unsigned int  Length;
-  unsigned long EndpointFlags;
-  unsigned long NICFlags;
+  ULONG EndpointFlags;
+  ULONG NICFlags;
 } RPC_POLICY,  *PRPC_POLICY;
 
@@ -212,10 +212,10 @@
 {
     unsigned short* User;
-    unsigned long UserLength;
+    ULONG UserLength;
     unsigned short* Domain;
-    unsigned long DomainLength;
+    ULONG DomainLength;
     unsigned short* Password;
-    unsigned long PasswordLength;
-    unsigned long Flags;
+    ULONG PasswordLength;
+    ULONG Flags;
 } SEC_WINNT_AUTH_IDENTITY_W, *PSEC_WINNT_AUTH_IDENTITY_W;
 
@@ -223,10 +223,10 @@
 {
     unsigned char* User;
-    unsigned long UserLength;
+    ULONG UserLength;
     unsigned char* Domain;
-    unsigned long DomainLength;
+    ULONG DomainLength;
     unsigned char* Password;
-    unsigned long PasswordLength;
-    unsigned long Flags;
+    ULONG PasswordLength;
+    ULONG Flags;
 } SEC_WINNT_AUTH_IDENTITY_A, *PSEC_WINNT_AUTH_IDENTITY_A;
 
@@ -234,8 +234,8 @@
 {
     SEC_WINNT_AUTH_IDENTITY_W *TransportCredentials;
-    unsigned long Flags;
-    unsigned long AuthenticationTarget;
-    unsigned long NumberOfAuthnSchemes;
-    unsigned long *AuthnSchemes;
+    ULONG Flags;
+    ULONG AuthenticationTarget;
+    ULONG NumberOfAuthnSchemes;
+    ULONG *AuthnSchemes;
     unsigned short *ServerCertificateSubject;
 } RPC_HTTP_TRANSPORT_CREDENTIALS_W, *PRPC_HTTP_TRANSPORT_CREDENTIALS_W;
@@ -244,25 +244,25 @@
 {
     SEC_WINNT_AUTH_IDENTITY_A *TransportCredentials;
-    unsigned long Flags;
-    unsigned long AuthenticationTarget;
-    unsigned long NumberOfAuthnSchemes;
-    unsigned long *AuthnSchemes;
+    ULONG Flags;
+    ULONG AuthenticationTarget;
+    ULONG NumberOfAuthnSchemes;
+    ULONG *AuthnSchemes;
     unsigned char *ServerCertificateSubject;
 } RPC_HTTP_TRANSPORT_CREDENTIALS_A, *PRPC_HTTP_TRANSPORT_CREDENTIALS_A;
 
 typedef struct _RPC_SECURITY_QOS {
-    unsigned long Version;
-    unsigned long Capabilities;
-    unsigned long IdentityTracking;
-    unsigned long ImpersonationType;
+    ULONG Version;
+    ULONG Capabilities;
+    ULONG IdentityTracking;
+    ULONG ImpersonationType;
 } RPC_SECURITY_QOS, *PRPC_SECURITY_QOS;
 
 typedef struct _RPC_SECURITY_QOS_V2_W
 {
-    unsigned long Version;
-    unsigned long Capabilities;
-    unsigned long IdentityTracking;
-    unsigned long ImpersonationType;
-    unsigned long AdditionalSecurityInfoType;
+    ULONG Version;
+    ULONG Capabilities;
+    ULONG IdentityTracking;
+    ULONG ImpersonationType;
+    ULONG AdditionalSecurityInfoType;
     union
     {
@@ -273,9 +273,9 @@
 typedef struct _RPC_SECURITY_QOS_V2_A
 {
-    unsigned long Version;
-    unsigned long Capabilities;
-    unsigned long IdentityTracking;
-    unsigned long ImpersonationType;
-    unsigned long AdditionalSecurityInfoType;
+    ULONG Version;
+    ULONG Capabilities;
+    ULONG IdentityTracking;
+    ULONG ImpersonationType;
+    ULONG AdditionalSecurityInfoType;
     union
     {
@@ -404,4 +404,7 @@
 
 RPCRTAPI RPC_STATUS RPC_ENTRY
+  RpcMgmtInqStats( RPC_BINDING_HANDLE Binding, RPC_STATS_VECTOR **Statistics );
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcMgmtStopServerListening( RPC_BINDING_HANDLE Binding );
 
@@ -421,4 +424,7 @@
 RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcMgmtSetServerStackSize( ULONG ThreadStackSize );
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
+RpcMgmtStatsVectorFree( RPC_STATS_VECTOR **StatsVector );
 
 RPCRTAPI RPC_STATUS RPC_ENTRY
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcdcep.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcdcep.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcdcep.h	(revision 19678)
@@ -46,5 +46,5 @@
 {
     RPC_BINDING_HANDLE Handle;
-    unsigned long DataRepresentation;
+    ULONG DataRepresentation;
     void* Buffer;
     unsigned int BufferLength;
@@ -55,5 +55,5 @@
     RPC_MGR_EPV* ManagerEpv;
     void* ImportContext;
-    unsigned long RpcFlags;
+    ULONG RpcFlags;
 } RPC_MESSAGE, *PRPC_MESSAGE;
 
@@ -212,5 +212,5 @@
 
 RPCRTAPI RPC_STATUS RPC_ENTRY
-  I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn, unsigned long ServerTid );
+  I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn, ULONG ServerTid );
 
 RPCRTAPI RPC_STATUS RPC_ENTRY
@@ -218,5 +218,5 @@
 
 RPCRTAPI UINT RPC_ENTRY
-  I_RpcWindowProc( void* hWnd, unsigned int Message, unsigned int wParam, unsigned long lParam );
+  I_RpcWindowProc( void* hWnd, unsigned int Message, unsigned int wParam, ULONG lParam );
 
 #endif
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcndr.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcndr.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/rpcndr.h	(revision 19678)
@@ -154,5 +154,5 @@
 
 typedef unsigned char *RPC_BUFPTR;
-typedef unsigned long RPC_LENGTH;
+typedef ULONG RPC_LENGTH;
 typedef void (__RPC_USER *EXPR_EVAL)(struct _MIDL_STUB_MESSAGE *);
 typedef const unsigned char *PFORMAT_STRING;
@@ -205,5 +205,5 @@
   ULONG Offset;
   ULONG ActualCount;
-  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(size_t);
+  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
   void (__RPC_API *pfnFree)(void *);
   unsigned char *StackTop;
@@ -332,5 +332,5 @@
 typedef struct _MALLOC_FREE_STRUCT
 {
-  void * (__WINE_ALLOC_SIZE(1) __RPC_USER *pfnAllocate)(size_t);
+  void * (__WINE_ALLOC_SIZE(1) __RPC_USER *pfnAllocate)(SIZE_T);
   void   (__RPC_USER *pfnFree)(void *);
 } MALLOC_FREE_STRUCT;
@@ -345,5 +345,5 @@
 {
   void *RpcInterfaceInformation;
-  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(size_t);
+  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
   void (__RPC_API *pfnFree)(void *);
   union {
@@ -484,5 +484,5 @@
     void *Buffer;
     ULONG BufferSize;
-    void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(size_t);
+    void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
     void (__RPC_API *pfnFree)(void *);
     struct IRpcChannelBuffer *pRpcChannelBuffer;
@@ -571,4 +571,16 @@
 RPCRTAPI void RPC_ENTRY
   NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
+
+RPCRTAPI unsigned char* RPC_ENTRY
+  NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
+RPCRTAPI unsigned char* RPC_ENTRY
+  NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
+RPCRTAPI void RPC_ENTRY
+  NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
+RPCRTAPI void RPC_ENTRY
+  NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
+
+RPCRTAPI unsigned char* RPC_ENTRY
+  NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
 
 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
@@ -600,9 +612,7 @@
 TYPE_MARSHAL(EncapsulatedUnion)
 TYPE_MARSHAL(NonEncapsulatedUnion)
-TYPE_MARSHAL(ByteCountPointer)
 TYPE_MARSHAL(XmitOrRepAs)
 TYPE_MARSHAL(UserMarshal)
 TYPE_MARSHAL(InterfacePointer)
-TYPE_MARSHAL(Range)
 
 SIMPLE_TYPE_MARSHAL(ConformantString)
@@ -678,5 +688,5 @@
 
 RPCRTAPI void* RPC_ENTRY
-  NdrOleAllocate( size_t Size ) __WINE_ALLOC_SIZE(1);
+  NdrOleAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
 RPCRTAPI void RPC_ENTRY
   NdrOleFree( void* NodeToFree );
@@ -739,9 +749,9 @@
   NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage );
 RPCRTAPI void * RPC_ENTRY
-  NdrRpcSmClientAllocate( size_t Size ) __WINE_ALLOC_SIZE(1);
+  NdrRpcSmClientAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
 RPCRTAPI void RPC_ENTRY
   NdrRpcSmClientFree( void *NodeToFree );
 RPCRTAPI void * RPC_ENTRY
-  NdrRpcSsDefaultAllocate( size_t Size ) __WINE_ALLOC_SIZE(1);
+  NdrRpcSsDefaultAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
 RPCRTAPI void RPC_ENTRY
   NdrRpcSsDefaultFree( void *NodeToFree );
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/sensevts.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/sensevts.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/sensevts.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/servprov.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/servprov.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/servprov.idl	(revision 19678)
@@ -16,4 +16,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/setupapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/setupapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/setupapi.h	(revision 19678)
@@ -32,6 +32,8 @@
 #include <commctrl.h>
 
-#ifdef __cplusplus
-extern "C" {
+#ifdef _WIN64
+#include <pshpack8.h>
+#else
+#include <pshpack1.h>
 #endif
 
@@ -1224,4 +1226,5 @@
 #define ERROR_INCORRECTLY_COPIED_INF      (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x237)
 #define ERROR_SCE_DISABLED                (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x238)
+#define ERROR_WRONG_INF_TYPE              (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x24A)
 #define ERROR_NO_DEFAULT_INTERFACE_DEVICE ERROR_NO_DEFAULT_DEVICE_INTERFACE
 #define ERROR_INTERFACE_DEVICE_ACTIVE     ERROR_DEVICE_INTERFACE_ACTIVE
@@ -1302,9 +1305,9 @@
 #define SPDRP_MAXIMUM_PROPERTY            0x00000023
 
-#define DPROMPT_SUCCESS       0
-#define DPROMPT_CANCEL        1
-#define DPROMPT_SKIPFILE      2
-#define DPROMPT_BUFFERTOSMALL 3
-#define DPROMPT_OUTOFMEMORY   4
+#define DPROMPT_SUCCESS        0
+#define DPROMPT_CANCEL         1
+#define DPROMPT_SKIPFILE       2
+#define DPROMPT_BUFFERTOOSMALL 3
+#define DPROMPT_OUTOFMEMORY    4
 
 #define SETDIRID_NOT_FULL_PATH 0x00000001
@@ -1318,4 +1321,8 @@
 #define IDF_NOFOREGROUND 0x00000400
 #define IDF_WARNIFSKIP   0x00000800
+
+#define IDF_NOREMOVABLEMEDIAPROMPT 0x00001000
+#define IDF_USEDISKNAMEASPROMPT    0x00002000
+#define IDF_OEMDISK                0x80000000
 
 #define INFINFO_INF_SPEC_IS_HINF        1
@@ -1642,6 +1649,6 @@
 HDSKSPC  WINAPI SetupDuplicateDiskSpaceListW(HDSKSPC, PVOID, DWORD, UINT);
 #define         SetupDuplicateDiskSpaceList WINELIB_NAME_AW(SetupDuplicateDiskSpaceList)
-BOOL     WINAPI SetupEnumInfSectionsA(HINF, UINT, PSTR, SIZE, UINT *);
-BOOL     WINAPI SetupEnumInfSectionsW(HINF, UINT, PWSTR, SIZE, UINT *);
+BOOL     WINAPI SetupEnumInfSectionsA(HINF, UINT, PSTR, DWORD, DWORD *);
+BOOL     WINAPI SetupEnumInfSectionsW(HINF, UINT, PWSTR, DWORD, DWORD *);
 #define         SetupEnumInfSections WINELIB_NAME_AW(SetupEnumInfSections)
 BOOL     WINAPI SetupFindFirstLineA( HINF hinf, PCSTR section, PCSTR key, INFCONTEXT *context );
@@ -1857,7 +1864,5 @@
 #undef DECL_WINELIB_SETUPAPI_TYPE_AW
 
-#ifdef __cplusplus
-}
-#endif
+#include <poppack.h>
 
 #endif /* _INC_SETUPAPI */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shellapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shellapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shellapi.h	(revision 19678)
@@ -33,5 +33,7 @@
 #endif /* defined(__cplusplus) */
 
+#ifndef _WIN64
 #include <pshpack1.h>
+#endif
 
 DECLARE_HANDLE(HDROP);
@@ -520,5 +522,7 @@
 #endif /* defined(__cplusplus) */
 
+#ifndef _WIN64
 #include <poppack.h>
+#endif
 
 #endif /* __WINE_SHELLAPI_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shldisp.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shldisp.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shldisp.idl	(revision 19678)
@@ -17,4 +17,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlguid.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlguid.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlguid.h	(revision 19678)
@@ -133,4 +133,6 @@
 DEFINE_GUID(IID_IQueryAssociations, 0xc46ca590, 0x3c3f, 0x11d2, 0xbe, 0xe6, 0x00, 0x00, 0xf8, 0x05, 0xca, 0x57);
 
+DEFINE_GUID(CLSID_QueryAssociations, 0xa07034fd, 0x6caa, 0x4954, 0xac, 0x3f, 0x97, 0xa2, 0x72, 0x16, 0xf9, 0x8a);
+
 DEFINE_GUID(CLSID_DragDropHelper, 0x4657278a, 0x411b, 0x11d2, 0x83, 0x9a, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
 
@@ -140,4 +142,6 @@
 
 DEFINE_GUID(CLSID_ProgressDialog, 0xf8383852, 0xfcd3, 0x11d1, 0xa6, 0xb9, 0x0, 0x60, 0x97, 0xdf, 0x5b, 0xd4);
+
+DEFINE_GUID(CLSID_ShellItem,      0x2fe352ea, 0xfd1f, 0x11d2, 0xb1, 0xf4, 0x00, 0xc0, 0x4f, 0x8e, 0xeb, 0x3e);
 
 #define PSGUID_SHELLDETAILS     {0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlobj.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlobj.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlobj.h	(revision 19678)
@@ -54,4 +54,5 @@
 HPSXA        WINAPI SHCreatePropSheetExtArray(HKEY,LPCWSTR,UINT);
 HPSXA        WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*);
+HRESULT      WINAPI SHCreateShellItem(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**);
 DWORD        WINAPI SHCLSIDFromStringA(LPCSTR,CLSID*);
 DWORD        WINAPI SHCLSIDFromStringW(LPCWSTR,CLSID*);
@@ -73,4 +74,5 @@
 HRESULT      WINAPI SHILCreateFromPath(LPCWSTR,LPITEMIDLIST*,DWORD*);
 HRESULT      WINAPI SHLoadOLE(LPARAM);
+HRESULT      WINAPI SHParseDisplayName(LPCWSTR,IBindCtx*,LPITEMIDLIST*,SFGAOF,SFGAOF*);
 HRESULT      WINAPI SHPathPrepareForWriteA(HWND,IUnknown*,LPCSTR,DWORD);
 HRESULT      WINAPI SHPathPrepareForWriteW(HWND,IUnknown*,LPCWSTR,DWORD);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlwapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlwapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shlwapi.h	(revision 19678)
@@ -869,6 +869,6 @@
 #define StrTrim WINELIB_NAME_AW(StrTrim)
 
-INT WINAPI wvnsprintfA(LPSTR,INT,LPCSTR,va_list);
-INT WINAPI wvnsprintfW(LPWSTR,INT,LPCWSTR,va_list);
+INT WINAPI wvnsprintfA(LPSTR,INT,LPCSTR,__ms_va_list);
+INT WINAPI wvnsprintfW(LPWSTR,INT,LPCWSTR,__ms_va_list);
 #define wvnsprintf WINELIB_NAME_AW(wvnsprintf)
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shobjidl.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shobjidl.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shobjidl.idl	(revision 19678)
@@ -20,4 +20,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "objidl.idl";
 import "oleidl.idl";
@@ -70,4 +79,19 @@
 
 /*****************************************************************************
+ * IPersistIDList interface
+ */
+[
+    object,
+    uuid(1079acfc-29bd-11d3-8e0d-00c04f6837d5),
+    pointer_default(unique)
+]
+interface IPersistIDList : IPersist
+{
+    HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
+    HRESULT GetIDList( [out] LPITEMIDLIST *ppidl );
+}
+
+
+/*****************************************************************************
  * IEnumIDList interface
  */
@@ -104,5 +128,6 @@
     object,
     uuid(000214E9-0000-0000-C000-000000000046),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IShellPropSheetExt : IUnknown
@@ -337,4 +362,40 @@
 }
 
+/*****************************************************************************
+ * IShellItem interface
+ */
+[
+    object,
+    uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
+    pointer_default(unique)
+]
+interface IShellItem : IUnknown
+{
+    typedef DWORD SIGDN;
+
+    typedef DWORD SICHINTF;
+
+    HRESULT BindToHandler(
+        [in] IBindCtx *pbc,
+        [in] REFGUID rbhid,
+        [in] REFIID riid,
+        [out, iid_is(riid)] void **ppvOut);
+
+    HRESULT GetParent( [out] IShellItem **ppsi );
+
+    HRESULT GetDisplayName(
+        [in] SIGDN sigdnName,
+        [out] LPWSTR *ppszName);
+
+    HRESULT GetAttributes(
+        [in] SFGAOF sfgaoMask,
+        [out] SFGAOF *psfgaoAttribs);
+
+    HRESULT Compare(
+        [in] IShellItem *psi,
+        [in] SICHINTF hint,
+        [out] int *piOrder);
+}
+
 
 
@@ -626,5 +687,5 @@
         [out, size_is(cch)] LPSTR pszFile,
         [in] int cch,
-        [in, out] WIN32_FIND_DATAA *pfd,
+        [in, out, unique] WIN32_FIND_DATAA *pfd,
         [in] DWORD fFlags);
 
@@ -814,5 +875,6 @@
     object,
     uuid(000214eb-0000-0000-c000-000000000046),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IExtractIconA : IUnknown
@@ -854,5 +916,6 @@
     object,
     uuid(000214fa-0000-0000-c000-000000000046),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IExtractIconW : IUnknown
@@ -940,5 +1003,6 @@
     object,
     uuid(de5bf786-477a-11d2-839d-00c04fd918d0),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IDragSourceHelper : IUnknown
@@ -969,5 +1033,6 @@
     object,
     uuid(4657278b-411b-11d2-839a-00c04fd918d0),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IDropTargetHelper : IUnknown
@@ -1120,5 +1185,6 @@
     object,
     uuid(000214f4-0000-0000-c000-000000000046),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IContextMenu2 : IContextMenu
@@ -1139,5 +1205,6 @@
     object,
     uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IContextMenu3 : IContextMenu2
@@ -1233,5 +1300,6 @@
     object,
     uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IURLSearchHook : IUnknown
@@ -1249,5 +1317,6 @@
     object,
     uuid(09f656a2-41af-480c-88f7-16cc0d164615),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface ISearchContext : IUnknown
@@ -1268,5 +1337,6 @@
     object,
     uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IURLSearchHook2 : IURLSearchHook
@@ -1296,5 +1366,5 @@
                 [in] HWND hwnd);
     HRESULT GetReferent(
-                [out] LPCSTR pcszReferent,
+                [out] LPSTR pcszReferent,
                 [in] int cchReferent);
     HRESULT SetFolder(
@@ -1327,5 +1397,5 @@
                 [in] HWND hwnd);
     HRESULT GetReferent(
-                [out] LPCWSTR pcszReferent,
+                [out] LPWSTR pcszReferent,
                 [in] int cchReferent);
     HRESULT SetFolder(
@@ -1366,5 +1436,6 @@
     object,
     uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IShellChangeNotify : IUnknown
@@ -1382,5 +1453,6 @@
     object,
     uuid(01e18d10-4d8b-11d2-855d-006008059367),
-    pointer_default(unique)
+    pointer_default(unique),
+    local
 ]
 interface IFileSystemBindData : IUnknown
@@ -1417,4 +1489,6 @@
 }
 
+cpp_quote("EXTERN_C const CLSID CLSID_TaskbarList;")
+
 /*****************************************************************************
  *    IAutoCompleteDropDown interface
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shtypes.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shtypes.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/shtypes.idl	(revision 19678)
@@ -18,4 +18,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -52,5 +61,5 @@
 } STRRET_TYPE;
 
-cpp_quote("#include <pshpack4.h>")
+cpp_quote("#include <pshpack8.h>")
 typedef struct _STRRET
 {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/sspi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/sspi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/sspi.h	(revision 19678)
@@ -25,4 +25,5 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #ifndef __WINE_SSPI_H__
 #define __WINE_SSPI_H__
@@ -81,6 +82,6 @@
 typedef struct _SECURITY_INTEGER
 {
-    unsigned long LowPart;
-    long HighPart;
+    ULONG LowPart;
+    LONG  HighPart;
 } SECURITY_INTEGER, *PSECURITY_INTEGER;
 typedef SECURITY_INTEGER TimeStamp, *PTimeStamp;
@@ -99,20 +100,20 @@
 typedef struct _SecPkgInfoA
 {
-    unsigned long  fCapabilities;
-    unsigned short wVersion;
-    unsigned short wRPCID;
-    unsigned long  cbMaxToken;
-    SEC_CHAR      *Name;
-    SEC_CHAR      *Comment;
+    ULONG     fCapabilities;
+    USHORT    wVersion;
+    USHORT    wRPCID;
+    ULONG     cbMaxToken;
+    SEC_CHAR *Name;
+    SEC_CHAR *Comment;
 } SecPkgInfoA, *PSecPkgInfoA;
 
 typedef struct _SecPkgInfoW
 {
-    unsigned long  fCapabilities;
-    unsigned short wVersion;
-    unsigned short wRPCID;
-    unsigned long  cbMaxToken;
-    SEC_WCHAR     *Name;
-    SEC_WCHAR     *Comment;
+    ULONG      fCapabilities;
+    USHORT     wVersion;
+    USHORT     wRPCID;
+    ULONG      cbMaxToken;
+    SEC_WCHAR *Name;
+    SEC_WCHAR *Comment;
 } SecPkgInfoW, *PSecPkgInfoW;
 
@@ -143,7 +144,7 @@
 typedef struct _SecBuffer
 {
-    unsigned long cbBuffer;
-    unsigned long BufferType;
-    void         *pvBuffer;
+    ULONG cbBuffer;
+    ULONG BufferType;
+    PVOID pvBuffer;
 } SecBuffer, *PSecBuffer;
 
@@ -172,7 +173,7 @@
 typedef struct _SecBufferDesc
 {
-    unsigned long ulVersion;
-    unsigned long cBuffers;
-    PSecBuffer    pBuffers;
+    ULONG      ulVersion;
+    ULONG      cBuffers;
+    PSecBuffer pBuffers;
 } SecBufferDesc, *PSecBufferDesc;
 
@@ -181,5 +182,5 @@
 
 typedef void (SEC_ENTRY *SEC_GET_KEY_FN)(void *Arg, void *Principal,
- unsigned long KeyVer, void **Key, SECURITY_STATUS *Status);
+ ULONG KeyVer, void **Key, SECURITY_STATUS *Status);
 
 SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(PULONG pcPackages,
@@ -444,17 +445,17 @@
 typedef struct _SecPkgContext_Sizes
 {
-    unsigned long cbMaxToken;
-    unsigned long cbMaxSignature;
-    unsigned long cbBlockSize;
-    unsigned long cbSecurityTrailer;
+    ULONG cbMaxToken;
+    ULONG cbMaxSignature;
+    ULONG cbBlockSize;
+    ULONG cbSecurityTrailer;
 } SecPkgContext_Sizes, *PSecPkgContext_Sizes;
 
 typedef struct _SecPkgContext_StreamSizes
 {
-    unsigned long cbHeader;
-    unsigned long cbTrailer;
-    unsigned long cbMaximumMessage;
-    unsigned long cbBuffers;
-    unsigned long cbBlockSize;
+    ULONG cbHeader;
+    ULONG cbTrailer;
+    ULONG cbMaximumMessage;
+    ULONG cbBuffers;
+    ULONG cbBlockSize;
 } SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
 
@@ -480,24 +481,24 @@
 typedef struct _SecPkgContext_DceInfo
 {
-    unsigned long AuthzSvc;
-    void *pPac;
+    ULONG AuthzSvc;
+    PVOID pPac;
 } SecPkgContext_DceInfo, *PSecPkgContext_DceInfo;
 
 typedef struct _SecPkgContext_KeyInfoA
 {
-    SEC_CHAR      *sSignatureAlgorithmName;
-    SEC_CHAR      *sEncryptAlgorithmName;
-    unsigned long  KeySize;
-    unsigned long  SignatureAlgorithm;
-    unsigned long  EncryptAlgorithm;
+    SEC_CHAR *sSignatureAlgorithmName;
+    SEC_CHAR *sEncryptAlgorithmName;
+    ULONG     KeySize;
+    ULONG     SignatureAlgorithm;
+    ULONG     EncryptAlgorithm;
 } SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA;
 
 typedef struct _SecPkgContext_KeyInfoW
 {
-    SEC_WCHAR     *sSignatureAlgorithmName;
-    SEC_WCHAR     *sEncryptAlgorithmName;
-    unsigned long  KeySize;
-    unsigned long  SignatureAlgorithm;
-    unsigned long  EncryptAlgorithm;
+    SEC_WCHAR *sSignatureAlgorithmName;
+    SEC_WCHAR *sEncryptAlgorithmName;
+    ULONG      KeySize;
+    ULONG      SignatureAlgorithm;
+    ULONG      EncryptAlgorithm;
 } SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
 
@@ -520,14 +521,14 @@
 typedef struct _SecPkgContext_ProtoInfoA
 {
-    SEC_CHAR     *sProtocolName;
-    unsigned long majorVersion;
-    unsigned long minorVersion;
+    SEC_CHAR *sProtocolName;
+    ULONG     majorVersion;
+    ULONG     minorVersion;
 } SecPkgContext_ProtoInfoA, *PSecPkgContext_ProtoInfoA;
 
 typedef struct _SecPkgContext_ProtoInfoW
 {
-    SEC_WCHAR    *sProtocolName;
-    unsigned long majorVersion;
-    unsigned long minorVersion;
+    SEC_WCHAR *sProtocolName;
+    ULONG      majorVersion;
+    ULONG      minorVersion;
 } SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW;
 
@@ -542,5 +543,5 @@
 typedef struct _SecPkgContext_SessionKey
 {
-    unsigned long  SessionKeyLength;
+    ULONG          SessionKeyLength;
     unsigned char *SessionKey;
 } SecPkgContext_SessionKey, *PSecPkgContext_SessionKey;
@@ -561,22 +562,22 @@
 typedef struct _SecPkgContext_Flags
 {
-    unsigned long Flags;
+    ULONG Flags;
 } SecPkgContext_Flags, *PSecPkgContext_Flags;
 
 typedef struct _SecPkgContext_UserFlags
 {
-    unsigned long UserFlags;
+    ULONG UserFlags;
 } SecPkgContext_UserFlags, *PSecPkgContext_UserFlags;
 
 typedef struct _SecPkgContext_NegotiationInfoA
 {
-    PSecPkgInfoA  PackageInfo;
-    unsigned long NegotiationState;
+    PSecPkgInfoA PackageInfo;
+    ULONG        NegotiationState;
 } SecPkgContext_NegotiationInfoA, *PSecPkgContext_NegotiationInfoA;
 
 typedef struct _SecPkgContext_NegotiationInfoW
 {
-    PSecPkgInfoW  PackageInfo;
-    unsigned long NegotiationState;
+    PSecPkgInfoW PackageInfo;
+    ULONG        NegotiationState;
 } SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW;
 
@@ -608,12 +609,12 @@
 typedef struct _SecPkgContext_CredentialNameA
 {
-    unsigned long  CredentialType;
-    SEC_CHAR      *sCredentialName;
+    ULONG     CredentialType;
+    SEC_CHAR *sCredentialName;
 } SecPkgContext_CredentialNameA, *PSecPkgContext_CredentialNameA;
 
 typedef struct _SecPkgContext_CredentialNameW
 {
-    unsigned long  CredentialType;
-    SEC_WCHAR     *sCredentialName;
+    ULONG      CredentialType;
+    SEC_WCHAR *sCredentialName;
 } SecPkgContext_CredentialNameW, *PSecPkgContext_CredentialNameW;
 
@@ -628,5 +629,5 @@
 typedef struct _SecPkgContext_TargetInformation
 {
-    unsigned long  MarshalledTargetInfoLength;
+    ULONG          MarshalledTargetInfoLength;
     unsigned char *MarshalledTargetInfo;
 } SecPkgContext_TargetInformation, *PSecPkgContext_TargetInformation;
@@ -634,12 +635,12 @@
 typedef struct _SecPkgContext_AuthzID
 {
-    unsigned long  AuthzIDLength;
-    char          *AuthzID;
+    ULONG  AuthzIDLength;
+    char  *AuthzID;
 } SecPkgContext_AuthzID, *PSecPkgContext_AuthzID;
 
 typedef struct _SecPkgContext_Target
 {
-    unsigned long  TargetLength;
-    char          *Target;
+    ULONG  TargetLength;
+    char  *Target;
 } SecPkgContext_Target, *PSecPkgContext_Target;
 
@@ -752,5 +753,5 @@
 typedef struct _SECURITY_FUNCTION_TABLE_A
 {
-    unsigned long                     dwVersion;
+    ULONG                             dwVersion;
     ENUMERATE_SECURITY_PACKAGES_FN_A  EnumerateSecurityPackagesA;
     QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
@@ -784,5 +785,5 @@
 typedef struct _SECURITY_FUNCTION_TABLE_W
 {
-    unsigned long                     dwVersion;
+    ULONG                             dwVersion;
     ENUMERATE_SECURITY_PACKAGES_FN_W  EnumerateSecurityPackagesW;
     QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/stdole2.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/stdole2.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/stdole2.idl	(revision 19678)
@@ -19,4 +19,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 [
   uuid(00020430-0000-0000-C000-000000000046),
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/strmif.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/strmif.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/strmif.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "objidl.idl";
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tapi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tapi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tapi.h	(revision 19678)
@@ -869,5 +869,7 @@
 /* line functions */
 DWORD WINAPI lineAccept(HCALL,LPCSTR,DWORD);
-DWORD WINAPI lineAddProvider(LPCSTR,HWND,LPDWORD);
+DWORD WINAPI lineAddProviderA(LPCSTR,HWND,LPDWORD);
+DWORD WINAPI lineAddProviderW(LPCWSTR,HWND,LPDWORD);
+#define      lineAddProvider WINELIB_NAME_AW(lineAddProvider)
 DWORD WINAPI lineAddToConference(HCALL,HCALL);
 DWORD WINAPI lineAnswer(HCALL,LPCSTR,DWORD);
@@ -896,12 +898,18 @@
 DWORD WINAPI lineGetConfRelatedCalls(HCALL,LPLINECALLLIST);
 DWORD WINAPI lineGetCountry(DWORD,DWORD,LPLINECOUNTRYLIST);
-DWORD WINAPI lineGetDevCaps(HLINEAPP,DWORD,DWORD,DWORD,LPLINEDEVCAPS);
+DWORD WINAPI lineGetDevCapsA(HLINEAPP,DWORD,DWORD,DWORD,LPLINEDEVCAPS);
+DWORD WINAPI lineGetDevCapsW(HLINEAPP,DWORD,DWORD,DWORD,LPLINEDEVCAPS);
+#define      lineGetDevCaps WINELIB_NAME_AW(lineGetDevCaps);
 DWORD WINAPI lineGetDevConfig(DWORD,LPVARSTRING,LPCSTR);
-DWORD WINAPI lineGetID(HLINE,DWORD,HCALL,DWORD,LPVARSTRING,LPCSTR);
+DWORD WINAPI lineGetIDA(HLINE,DWORD,HCALL,DWORD,LPVARSTRING,LPCSTR);
+DWORD WINAPI lineGetIDW(HLINE,DWORD,HCALL,DWORD,LPVARSTRING,LPCWSTR);
+#define      lineGetID WINELIB_NAME_AW(lineGetID);
 DWORD WINAPI lineGetIcon(DWORD,LPCSTR,HICON *);
 DWORD WINAPI lineGetLineDevStatus(HLINE,LPLINEDEVSTATUS);
 DWORD WINAPI lineGetNewCalls(HLINE,DWORD,DWORD,LPLINECALLLIST);
 DWORD WINAPI lineGetNumRings(HLINE,DWORD,LPDWORD);
-DWORD WINAPI lineGetProviderList(DWORD dwAPIVersion,LPLINEPROVIDERLIST);
+DWORD WINAPI lineGetProviderListA(DWORD,LPLINEPROVIDERLIST);
+DWORD WINAPI lineGetProviderListW(DWORD,LPLINEPROVIDERLIST);
+#define      lineGetProviderList WINELIB_NAME_AW(lineGetProviderList)
 DWORD WINAPI lineGetRequest(HLINEAPP,DWORD,LPVOID);
 DWORD WINAPI lineGetStatusMessages(HLINE,LPDWORD,LPDWORD);
@@ -913,5 +921,7 @@
 LONG  WINAPI lineInitializeExW(LPHLINEAPP,HINSTANCE,LINECALLBACK,LPCWSTR,LPDWORD,LPDWORD,LPLINEINITIALIZEEXPARAMS);
 #define      lineInitializeEx WINELIB_NAME_AW(lineInitializeEx)
-DWORD WINAPI lineMakeCall(HLINE,LPHCALL,LPCSTR,DWORD,LPLINECALLPARAMS);
+DWORD WINAPI lineMakeCallA(HLINE,LPHCALL,LPCSTR,DWORD,LPLINECALLPARAMS);
+DWORD WINAPI lineMakeCallW(HLINE,LPHCALL,LPCWSTR,DWORD,LPLINECALLPARAMS);
+#define      lineMakeCall WINELIB_NAMEAW(lineMakeCall);
 DWORD WINAPI lineMonitorDigits(HCALL,DWORD);
 DWORD WINAPI lineMonitorMedia(HCALL,DWORD);
@@ -952,5 +962,4 @@
 DWORD WINAPI lineUnpark(HLINE,DWORD,LPHCALL,LPCSTR);
 
-DWORD WINAPI lineAddProviderA(LPCSTR,HWND,LPDWORD);
 DWORD WINAPI lineBlindTransferA(HCALL,LPCSTR,DWORD);
 DWORD WINAPI lineConfigDialogA(DWORD,HWND,LPCSTR);
@@ -966,14 +975,10 @@
 DWORD WINAPI lineGetCallInfoA(HCALL,LPLINECALLINFO);
 DWORD WINAPI lineGetCountryA(DWORD,DWORD,LPLINECOUNTRYLIST);
-DWORD WINAPI lineGetDevCapsA(HLINEAPP,DWORD,DWORD,DWORD,LPLINEDEVCAPS);
 DWORD WINAPI lineGetDevConfigA(DWORD,LPVARSTRING,LPCSTR);
-DWORD WINAPI lineGetIDA(HLINE,DWORD,HCALL,DWORD,LPVARSTRING,LPCSTR);
 DWORD WINAPI lineGetIconA(DWORD,LPCSTR,HICON *);
 DWORD WINAPI lineGetLineDevStatusA(HLINE,LPLINEDEVSTATUS);
-DWORD WINAPI lineGetProviderListA(DWORD dwAPIVersion,LPLINEPROVIDERLIST);
 DWORD WINAPI lineGetRequestA(HLINEAPP,DWORD,LPVOID);
 DWORD WINAPI lineGetTranslateCapsA(HLINEAPP,DWORD,LPLINETRANSLATECAPS);
 DWORD WINAPI lineHandoffA(HCALL,LPCSTR,DWORD);
-DWORD WINAPI lineMakeCallA(HLINE,LPHCALL,LPCSTR,DWORD,LPLINECALLPARAMS);
 DWORD WINAPI lineOpenA(HLINEAPP,DWORD,LPHLINE,DWORD,DWORD,DWORD,DWORD,DWORD,LPLINECALLPARAMS);
 DWORD WINAPI lineParkA(HCALL,DWORD,LPCSTR,LPVARSTRING);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/textserv.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/textserv.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/textserv.h	(revision 19678)
@@ -325,5 +325,5 @@
         DWORD* plength) PURE;
 
-    STDMETHOD(TxGetScrollbars)( THIS_
+    STDMETHOD(TxGetScrollBars)( THIS_
         DWORD* pdwScrollBar) PURE;
 
@@ -367,44 +367,4 @@
 #define ITextHost_AddRef(p) (p)->lpVtbl->AddRef(p)
 #define ITextHost_Release(p) (p)->lpVtbl->Release(p)
-/*** ITextHost methods ***/
-#define ITextHost_TxGetDC(p) (p)->lpVtbl->TxGetDC(p)
-#define ITextHost_TxReleaseDC(p,a) (p)->lpVtbl->TxReleaseDC(p,a)
-#define ITextHost_TxShowScrollBar(p,a,b) (p)->lpVtbl->TxShowScrollBar(p,a,b)
-#define ITextHost_TxEnableScrollBar(p,a,b) (p)->lpVtbl->TxEnableScrollBar(p,a,b)
-#define ITextHost_TxSetScrollRange(p,a,b,c,d) (p)->lpVtbl->TxSetScrollRange(p,a,b,c,d)
-#define ITextHost_TxSetScrollPos(p,a,b,c) (p)->lpVtbl->TxSetScrollPos(p,a,b,c)
-#define ITextHost_TxInvalidateRect(p,a,b) (p)->lpVtbl->TxInvalidateRect(p,a,b)
-#define ITextHost_TxViewChange(p,a) (p)->lpVtbl->TxViewChange(p,a)
-#define ITextHost_TxCreateCaret(p,a,b,c) (p)->lpVtbl->TxCreateCaret(p,a,b,c)
-#define ITextHost_TxShowCaret(p,a) (p)->lpVtbl->TxShowCaret(p,a)
-#define ITextHost_TxSetCarentPos(p,a,b) (p)->lpVtbl->TxSetCarentPos(p,a,b)
-#define ITextHost_TxSetTimer(p,a,b) (p)->lpVtbl->TxSetTimer(p,a,b)
-#define ITextHost_TxKillTimer(p,a) (p)->lpVtbl->TxKillTimer(p,a)
-#define ITextHost_TxScrollWindowEx(p,a,b,c,d,e,f,g) (p)->lpVtbl->TxScrollWindowEx(p,a,b,c,d,e,f,g)
-#define ITextHost_TxSetCapture(p,a) (p)->lpVtbl->TxSetCapture(p,a)
-#define ITextHost_TxSetFocus(p) (p)->lpVtbl->TxSetFocus(p)
-#define ITextHost_TxSetCursor(p,a,b) (p)->lpVtbl->TxSetCursor(p,a,b)
-#define ITextHost_TxScreenToClient(p,a) (p)->lpVtbl->TxScreenToClient(p,a)
-#define ITextHost_TxClientToScreen(p,a) (p)->lpVtbl->TxClientToScreen(p,a)
-#define ITextHost_TxActivate(p,a) (p)->lpVtbl->TxActivate(p,a)
-#define ITextHost_TxDeactivate(p,a) (p)->lpVtbl->TxDeactivate(p,a)
-#define ITextHost_TxGetClientRect(p,a) (p)->lpVtbl->TxGetClientRect(p,a)
-#define ITextHost_TxGetViewInset(p,a) (p)->lpVtbl->TxGetViewInset(p,a)
-#define ITextHost_TxGetCharFormat(p,a) (p)->lpVtbl->TxGetCharFormat(p,a)
-#define ITextHost_TxGetParaFormat(p,a) (p)->lpVtbl->TxGetParaFormat(p,a)
-#define ITextHost_TxGetSysColor(p,a) (p)->lpVtbl->TxGetSysColor(p,a)
-#define ITextHost_TxGetBackStyle(p,a) (p)->lpVtbl->TxGetBackStyle(p,a)
-#define ITextHost_TxGetMaxLength(p,a) (p)->lpVtbl->TxGetMaxLength(p,a)
-#define ITextHost_TxGetScrollbars(p,a) (p)->lpVtbl->TxGetScrollbars(p,a)
-#define ITextHost_TxGetPasswordChar(p,a) (p)->lpVtbl->TxGetPasswordChar(p,a)
-#define ITextHost_TxGetAcceleratorPos(p,a) (p)->lpVtbl->TxGetAcceleratorPos(p,a)
-#define ITextHost_TxGetExtent(p,a) (p)->lpVtbl->TxGetExtent(p,a)
-#define ITextHost_OnTxCharFormatChange(p,a) (p)->lpVtbl->OnTxCharFormatChange(p,a)
-#define ITextHost_OnTxParaFormatChange(p,a) (p)->lpVtbl->OnTxParaFormatChange(p,a)
-#define ITextHost_TxGetPropertyBits(p,a,b) (p)->lpVtbl->TxGetPropertyBits(p,a,b)
-#define ITextHost_TxNotify(p,a,b) (p)->lpVtbl->TxNotify(p,a,b)
-#define ITextHost_TxImmGetContext(p) (p)->lpVtbl->TxImmGetContext(p)
-#define ITextHost_TxImmReleaseContext(p,a) (p)->lpVtbl->TxImmReleaseContext(p,a)
-#define ITextHost_TxGetSelectionBarWidth(p,a) (p)->lpVtbl->TxGetSelectionBarWidth(p,a)
 #endif
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/textstor.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/textstor.idl	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/textstor.idl	(revision 19678)
@@ -0,0 +1,289 @@
+/*
+ * Copyright 2009 Aric Stewart, CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef DO_NO_IMPORTS
+import "oaidl.idl";
+#endif
+
+const ULONG TS_DEFAULT_SELECTION = ~0u;
+
+const DWORD TS_SD_READONLY     = 0x001;
+const DWORD TS_SD_LOADING      = 0x002;
+
+const DWORD TS_SS_DISJOINTSEL  = 0x001;
+const DWORD TS_SS_REGIONS      = 0x002;
+const DWORD TS_SS_TRANSITORY   = 0x004;
+const DWORD TS_SS_NOHIDDENTEXT = 0x008;
+
+const DWORD TS_AS_TEXT_CHANGE      = 0x01;
+const DWORD TS_AS_SEL_CHANGE       = 0x02;
+const DWORD TS_AS_LAYOUT_CHANGE    = 0x04;
+const DWORD TS_AS_ATTR_CHANGE      = 0x08;
+const DWORD TS_AS_STATUS_CHANGE    = 0x10;
+
+const DWORD TS_AS_ALL_SINKS = (TS_AS_TEXT_CHANGE | TS_AS_SEL_CHANGE | TS_AS_LAYOUT_CHANGE | TS_AS_ATTR_CHANGE | TS_AS_STATUS_CHANGE);
+
+const DWORD TS_LF_SYNC            = 0x1;
+const DWORD TS_LF_READ            = 0x2;
+const DWORD TS_LF_READWRITE       = 0x6;
+
+typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)]  enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
+typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)]  enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
+typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)]  GUID TS_ATTRID;
+
+typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
+{
+    DWORD dwDynamicFlags;
+    DWORD dwStaticFlags;
+} TS_STATUS;
+
+typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)]  struct TS_TEXTCHANGE
+{
+    LONG acpStart;
+    LONG acpOldEnd;
+    LONG acpNewEnd;
+} TS_TEXTCHANGE;
+
+typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)]  struct TS_SELECTIONSTYLE
+{
+    TsActiveSelEnd ase;
+    BOOL fInterimChar;
+} TS_SELECTIONSTYLE;
+
+typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)]  struct TS_SELECTION_ACP
+{
+    LONG acpStart;
+    LONG acpEnd;
+    TS_SELECTIONSTYLE style;
+} TS_SELECTION_ACP;
+
+typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)]  struct TS_RUNINFO
+{
+    ULONG uCount;
+    TsRunType type;
+} TS_RUNINFO;
+
+typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)]  struct TS_ATTRVAL
+{
+    TS_ATTRID idAttr;
+    DWORD dwOverlapId;
+    VARIANT varValue;
+} TS_ATTRVAL;
+
+typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)]  enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
+typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)]  DWORD TsViewCookie;
+
+[
+  object,
+  uuid(22d44c94-a419-4542-a272-ae26093ececf),
+  pointer_default(unique)
+]
+interface ITextStoreACPSink : IUnknown
+{
+    HRESULT OnTextChange(
+        [in] DWORD dwFlags,
+        [in] const TS_TEXTCHANGE *pChange);
+
+    HRESULT OnSelectionChange();
+
+    HRESULT OnLayoutChange(
+        [in] TsLayoutCode lcode,
+        [in] TsViewCookie vcView);
+
+    HRESULT OnStatusChange(
+        [in] DWORD dwFlags);
+
+    HRESULT OnAttrsChange(
+        [in] LONG acpStart,
+        [in] LONG acpEnd,
+        [in] ULONG cAttrs,
+        [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
+
+    HRESULT OnLockGranted(
+        [in] DWORD dwLockFlags);
+
+    HRESULT OnStartEditTransaction();
+
+    HRESULT OnEndEditTransaction();
+};
+
+[
+  object,
+  uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
+  pointer_default(unique)
+]
+interface ITextStoreACP : IUnknown
+{
+    HRESULT AdviseSink(
+        [in] REFIID riid,
+        [in, iid_is(riid)] IUnknown *punk,
+        [in] DWORD dwMask);
+
+    HRESULT UnadviseSink(
+        [in] IUnknown *punk);
+
+    HRESULT RequestLock(
+        [in] DWORD dwLockFlags,
+        [out] HRESULT *phrSession);
+
+    HRESULT GetStatus(
+        [out] TS_STATUS *pdcs);
+
+    HRESULT QueryInsert(
+        [in] LONG acpTestStart,
+        [in] LONG acpTestEnd,
+        [in] ULONG cch,
+        [out] LONG *pacpResultStart,
+        [out] LONG *pacpResultEnd);
+
+    HRESULT GetSelection(
+        [in] ULONG ulIndex,
+        [in] ULONG ulCount,
+        [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
+        [out] ULONG *pcFetched);
+
+    HRESULT SetSelection(
+        [in] ULONG ulCount,
+        [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
+
+    HRESULT GetText(
+        [in] LONG acpStart,
+        [in] LONG acpEnd,
+        [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
+        [in] ULONG cchPlainReq,
+        [out] ULONG *pcchPlainRet,
+        [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
+        [in] ULONG cRunInfoReq,
+        [out] ULONG *pcRunInfoRet,
+        [out] LONG *pacpNext);
+
+    HRESULT SetText(
+        [in] DWORD dwFlags,
+        [in] LONG acpStart,
+        [in] LONG acpEnd,
+        [in, size_is(cch)] const WCHAR *pchText,
+        [in] ULONG cch,
+        [out] TS_TEXTCHANGE *pChange);
+
+    HRESULT GetFormattedText(
+        [in] LONG acpStart,
+        [in] LONG acpEnd,
+        [out] IDataObject **ppDataObject);
+
+    HRESULT GetEmbedded(
+        [in] LONG acpPos,
+        [in] REFGUID rguidService,
+        [in] REFIID riid,
+        [out, iid_is(riid)] IUnknown **ppunk);
+
+    HRESULT QueryInsertEmbedded(
+        [in] const GUID *pguidService,
+        [in] const FORMATETC *pFormatEtc,
+        [out] BOOL *pfInsertable);
+
+    HRESULT InsertEmbedded(
+        [in] DWORD dwFlags,
+        [in] LONG acpStart,
+        [in] LONG acpEnd,
+        [in] IDataObject *pDataObject,
+        [out] TS_TEXTCHANGE *pChange);
+
+
+    HRESULT InsertTextAtSelection(
+        [in] DWORD dwFlags,
+        [in, size_is(cch)] const WCHAR *pchText,
+        [in] ULONG cch,
+        [out] LONG *pacpStart,
+        [out] LONG *pacpEnd,
+        [out] TS_TEXTCHANGE *pChange);
+
+    HRESULT InsertEmbeddedAtSelection(
+        [in] DWORD dwFlags,
+        [in] IDataObject *pDataObject,
+        [out] LONG *pacpStart,
+        [out] LONG *pacpEnd,
+        [out] TS_TEXTCHANGE *pChange);
+
+    HRESULT RequestSupportedAttrs(
+        [in] DWORD dwFlags,
+        [in] ULONG cFilterAttrs,
+        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
+
+    HRESULT RequestAttrsAtPosition(
+        [in] LONG acpPos,
+        [in] ULONG cFilterAttrs,
+        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
+        [in] DWORD dwFlags);
+
+    HRESULT RequestAttrsTransitioningAtPosition(
+        [in] LONG acpPos,
+        [in] ULONG cFilterAttrs,
+        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
+        [in] DWORD dwFlags);
+
+    HRESULT FindNextAttrTransition(
+        [in] LONG acpStart,
+        [in] LONG acpHalt,
+        [in] ULONG cFilterAttrs,
+        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
+        [in] DWORD dwFlags,
+        [out] LONG *pacpNext,
+        [out] BOOL *pfFound,
+        [out] LONG *plFoundOffset);
+
+    HRESULT RetrieveRequestedAttrs(
+        [in] ULONG ulCount,
+        [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
+        [out] ULONG *pcFetched);
+
+    HRESULT GetEndACP(
+        [out] LONG *pacp);
+
+    HRESULT GetActiveView(
+        [out] TsViewCookie *pvcView);
+
+    HRESULT GetACPFromPoint(
+        [in] TsViewCookie vcView,
+        [in] const POINT *ptScreen,
+        [in] DWORD dwFlags,
+        [out] LONG *pacp);
+
+    HRESULT GetTextExt(
+        [in] TsViewCookie vcView,
+        [in] LONG acpStart,
+        [in] LONG acpEnd,
+        [out] RECT *prc,
+        [out] BOOL *pfClipped);
+
+    HRESULT GetScreenExt(
+        [in] TsViewCookie vcView,
+        [out] RECT *prc);
+
+    HRESULT GetWnd(
+        [in] TsViewCookie vcView,
+        [out] HWND *phwnd);
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tlhelp32.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tlhelp32.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tlhelp32.h	(revision 19678)
@@ -70,28 +70,28 @@
 typedef struct tagPROCESSENTRY32
 {
-    DWORD dwSize;
-    DWORD cntUsage;
-    DWORD th32ProcessID;
-    DWORD th32DefaultHeapID;
-    DWORD th32ModuleID;
-    DWORD cntThreads;
-    DWORD th32ParentProcessID;
-    LONG  pcPriClassBase;
-    DWORD dwFlags;
-    char szExeFile[MAX_PATH];
+    DWORD     dwSize;
+    DWORD     cntUsage;
+    DWORD     th32ProcessID;
+    ULONG_PTR th32DefaultHeapID;
+    DWORD     th32ModuleID;
+    DWORD     cntThreads;
+    DWORD     th32ParentProcessID;
+    LONG      pcPriClassBase;
+    DWORD     dwFlags;
+    char      szExeFile[MAX_PATH];
 } PROCESSENTRY32, *PPROCESSENTRY32, *LPPROCESSENTRY32;
 
 typedef struct tagPROCESSENTRY32W
 {
-    DWORD dwSize;
-    DWORD cntUsage;
-    DWORD th32ProcessID;
-    DWORD th32DefaultHeapID;
-    DWORD th32ModuleID;
-    DWORD cntThreads;
-    DWORD th32ParentProcessID;
-    LONG  pcPriClassBase;
-    DWORD dwFlags;
-    WCHAR szExeFile[MAX_PATH];
+    DWORD     dwSize;
+    DWORD     cntUsage;
+    DWORD     th32ProcessID;
+    ULONG_PTR th32DefaultHeapID;
+    DWORD     th32ModuleID;
+    DWORD     cntThreads;
+    DWORD     th32ParentProcessID;
+    LONG      pcPriClassBase;
+    DWORD     dwFlags;
+    WCHAR     szExeFile[MAX_PATH];
 } PROCESSENTRY32W, *PPROCESSENTRY32W, *LPPROCESSENTRY32W;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tom.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tom.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/tom.idl	(revision 19678)
@@ -17,5 +17,18 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "oaidl.idl";
+
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
+cpp_quote("#undef FindText")
+cpp_quote("#endif")
 
 typedef enum tagTomConstants
@@ -201,21 +214,21 @@
     HRESULT GetName([retval, out]BSTR *pName);
     HRESULT GetSelection([retval, out]ITextSelection **ppSel);
-    HRESULT GetStoryCount([retval, out]long *pCount);
+    HRESULT GetStoryCount([retval, out]LONG *pCount);
     HRESULT GetStoryRanges([retval, out]ITextStoryRanges **ppStories);
-    HRESULT GetSaved([retval, out]long *pValue);
-    HRESULT SetSaved([in]long Value);
+    HRESULT GetSaved([retval, out]LONG *pValue);
+    HRESULT SetSaved([in]LONG Value);
     HRESULT GetDefaultTabStop([retval, out]float *pValue);
     HRESULT SetDefaultTabStop([in]float Value);
     HRESULT New();
-    HRESULT Open([in]VARIANT *pVar, [in]long Flags, [in]long CodePage);
-    HRESULT Save([in]VARIANT *pVar, [in]long Flags, [in]long CodePage);
-    HRESULT Freeze([retval, out]long *pCount);
-    HRESULT Unfreeze([retval, out]long *pCount);
+    HRESULT Open([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage);
+    HRESULT Save([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage);
+    HRESULT Freeze([retval, out]LONG *pCount);
+    HRESULT Unfreeze([retval, out]LONG *pCount);
     HRESULT BeginEditCollection();
     HRESULT EndEditCollection();
-    HRESULT Undo([in]long Count, [retval, out]long *prop);
-    HRESULT Redo([in]long Count, [retval, out]long *prop);
-    HRESULT Range([in]long cp1, [in]long cp2, [retval, out]ITextRange**ppRange);
-    HRESULT RangeFromPoint([in]long x, [in]long y, [retval, out]ITextRange**ppRange);
+    HRESULT Undo([in]LONG Count, [retval, out]LONG *prop);
+    HRESULT Redo([in]LONG Count, [retval, out]LONG *prop);
+    HRESULT Range([in]LONG cp1, [in]LONG cp2, [retval, out]ITextRange **ppRange);
+    HRESULT RangeFromPoint([in]LONG x, [in]LONG y, [retval, out]ITextRange **ppRange);
 }
 
@@ -231,52 +244,52 @@
     HRESULT GetText([retval, out]BSTR *pbstr);
     HRESULT SetText([in]BSTR bstr);
-    HRESULT GetChar([retval, out]long *pch);
-    HRESULT SetChar([in]long ch);
+    HRESULT GetChar([retval, out]LONG *pch);
+    HRESULT SetChar([in]LONG ch);
     HRESULT GetDuplicate([retval, out]ITextRange **ppRange);
     HRESULT GetFormattedText([retval, out]ITextRange **ppRange);
     HRESULT SetFormattedText([in]ITextRange *pRange);
-    HRESULT GetStart([retval, out]long *pcpFirst);
-    HRESULT SetStart([in]long cpFirst);
-    HRESULT GetEnd([retval, out]long *pcpLim);
-    HRESULT SetEnd([in]long cpLim);
+    HRESULT GetStart([retval, out]LONG *pcpFirst);
+    HRESULT SetStart([in]LONG cpFirst);
+    HRESULT GetEnd([retval, out]LONG *pcpLim);
+    HRESULT SetEnd([in]LONG cpLim);
     HRESULT GetFont([retval, out]ITextFont **pFont);
     HRESULT SetFont([in]ITextFont *pFont);
     HRESULT GetPara([retval, out]ITextPara **ppPara);
     HRESULT SetPara([in]ITextPara *pPara);
-    HRESULT GetStoryLength([retval, out]long *pcch);
-    HRESULT GetStoryType([retval, out]long *pValue);
-    HRESULT Collapse([in]long bStart);
-    HRESULT Expand([in]long Unit, [retval, out]long *pDelta);
-    HRESULT GetIndex([in]long Unit, [retval, out]long *pIndex);
-    HRESULT SetIndex([in]long Unit, [in]long Index, [in]long Extend);
-    HRESULT SetRange([in]long cpActive, [in]long cpOther);
-    HRESULT InRange([in]ITextRange *pRange, [retval, out]long *pb);
-    HRESULT InStory([in]ITextRange *pRange, [retval, out]long *pb);
-    HRESULT IsEqual([in]ITextRange *pRange, [retval, out]long *pb);
+    HRESULT GetStoryLength([retval, out]LONG *pcch);
+    HRESULT GetStoryType([retval, out]LONG *pValue);
+    HRESULT Collapse([in]LONG bStart);
+    HRESULT Expand([in]LONG Unit, [retval, out]LONG *pDelta);
+    HRESULT GetIndex([in]LONG Unit, [retval, out]LONG *pIndex);
+    HRESULT SetIndex([in]LONG Unit, [in]LONG Index, [in]LONG Extend);
+    HRESULT SetRange([in]LONG cpActive, [in]LONG cpOther);
+    HRESULT InRange([in]ITextRange *pRange, [retval, out]LONG *pb);
+    HRESULT InStory([in]ITextRange *pRange, [retval, out]LONG *pb);
+    HRESULT IsEqual([in]ITextRange *pRange, [retval, out]LONG *pb);
     HRESULT Select();
-    HRESULT StartOf([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT EndOf([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT Move([in]long Unit, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveStart([in]long Unit, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveEnd([in]long Unit, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveWhile([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveStartWhile([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveEndWhile([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveUntil([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveStartUntil([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT MoveEndUntil([in]VARIANT *Cset, [in]long Count, [retval, out]long *pDelta);
-    HRESULT FindText([in]BSTR bstr, [in]long cch, [in]long Flags, [retval, out]long *pLength);
-    HRESULT FindTextStart([in]BSTR bstr, [in]long cch, [in]long Flags, [retval, out]long *pLength);
-    HRESULT FindTextEnd([in]BSTR bstr, [in]long cch, [in]long Flags, [retval, out]long *pLength);
-    HRESULT Delete([in]long Unit, [in]long Count, [retval, out]long *pDelta);
+    HRESULT StartOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT EndOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT Move([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveStart([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveEnd([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveStartWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveEndWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveStartUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT MoveEndUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
+    HRESULT FindText([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
+    HRESULT FindTextStart([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
+    HRESULT FindTextEnd([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
+    HRESULT Delete([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
     HRESULT Cut([out]VARIANT *pVar);
     HRESULT Copy([out]VARIANT *pVar);
-    HRESULT Paste([in]VARIANT *pVar, [in]long Format);
-    HRESULT CanPaste([in]VARIANT *pVar, [in]long Format, [retval, out]long *pb);
-    HRESULT CanEdit([retval, out]long *pb);
-    HRESULT ChangeCase([in]long Type);
-    HRESULT GetPoint([in]long Type, [out]long *cx, [out]long *cy);
-    HRESULT SetPoint([in]long x, [in]long y, [in]long Type, [in]long Extend);
-    HRESULT ScrollIntoView([in]long Value);
+    HRESULT Paste([in]VARIANT *pVar, [in]LONG Format);
+    HRESULT CanPaste([in]VARIANT *pVar, [in]LONG Format, [retval, out]LONG *pb);
+    HRESULT CanEdit([retval, out]LONG *pb);
+    HRESULT ChangeCase([in]LONG Type);
+    HRESULT GetPoint([in]LONG Type, [out]LONG *cx, [out]LONG *cy);
+    HRESULT SetPoint([in]LONG x, [in]LONG y, [in]LONG Type, [in]LONG Extend);
+    HRESULT ScrollIntoView([in]LONG Value);
     HRESULT GetEmbeddedObject([retval, out]IUnknown **ppv);
 }
@@ -288,13 +301,13 @@
 interface ITextSelection : ITextRange
 {
-    HRESULT GetFlags([retval, out]long *pFlags);
-    HRESULT SetFlags([in]long Flags);
-    HRESULT GetType([retval, out]long *pType);
-    HRESULT MoveLeft([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT MoveRight([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT MoveUp([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT MoveDown([in]long Unit, [in]long Count, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT HomeKey([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
-    HRESULT EndKey([in]long Unit, [in]long Extend, [retval, out]long *pDelta);
+    HRESULT GetFlags([retval, out]LONG *pFlags);
+    HRESULT SetFlags([in]LONG Flags);
+    HRESULT GetType([retval, out]LONG *pType);
+    HRESULT MoveLeft([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT MoveRight([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT MoveUp([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT MoveDown([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT HomeKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
+    HRESULT EndKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
     HRESULT TypeText([in]BSTR bstr);
 }
@@ -308,57 +321,57 @@
     HRESULT GetDuplicate([retval, out]ITextFont **ppFont);
     HRESULT SetDuplicate([in]ITextFont *pFont);
-    HRESULT CanChange([out]long *pB);
-    HRESULT IsEqual([in]ITextFont *pFont, [retval, out]long *pB);
-    HRESULT Reset([in]long Value);
-    HRESULT GetStyle([retval, out]long *pValue);
-    HRESULT SetStyle([in]long Value);
-    HRESULT GetAllCaps([retval, out]long *pValue);
-    HRESULT SetAllCaps([in]long Value);
-    HRESULT GetAnimation([retval, out]long *pValue);
-    HRESULT SetAnimation([in]long Value);
-    HRESULT GetBackColor([retval, out]long *pValue);
-    HRESULT SetBackColor([in]long Value);
-    HRESULT GetBold([retval, out]long *pValue);
-    HRESULT SetBold([in]long Value);
-    HRESULT GetEmboss([retval, out]long *pValue);
-    HRESULT SetEmboss([in]long Value);
-    HRESULT GetForeColor([retval, out]long *pValue);
-    HRESULT SetForeColor([in]long Value);
-    HRESULT GetHidden([retval, out]long *pValue);
-    HRESULT SetHidden([in]long Value);
-    HRESULT GetEngrave([retval, out]long *pValue);
-    HRESULT SetEngrave([in]long Value);
-    HRESULT GetItalic([retval, out]long *pValue);
-    HRESULT SetItalic([in]long Value);
-    HRESULT GetKerning([retval, out]long *pValue);
-    HRESULT SetKerning([in]long Value);
-    HRESULT GetLanguageID([retval, out]long *pValue);
-    HRESULT SetLanguageID([in]long Value);
+    HRESULT CanChange([out]LONG *pB);
+    HRESULT IsEqual([in]ITextFont *pFont, [retval, out]LONG *pB);
+    HRESULT Reset([in]LONG Value);
+    HRESULT GetStyle([retval, out]LONG *pValue);
+    HRESULT SetStyle([in]LONG Value);
+    HRESULT GetAllCaps([retval, out]LONG *pValue);
+    HRESULT SetAllCaps([in]LONG Value);
+    HRESULT GetAnimation([retval, out]LONG *pValue);
+    HRESULT SetAnimation([in]LONG Value);
+    HRESULT GetBackColor([retval, out]LONG *pValue);
+    HRESULT SetBackColor([in]LONG Value);
+    HRESULT GetBold([retval, out]LONG *pValue);
+    HRESULT SetBold([in]LONG Value);
+    HRESULT GetEmboss([retval, out]LONG *pValue);
+    HRESULT SetEmboss([in]LONG Value);
+    HRESULT GetForeColor([retval, out]LONG *pValue);
+    HRESULT SetForeColor([in]LONG Value);
+    HRESULT GetHidden([retval, out]LONG *pValue);
+    HRESULT SetHidden([in]LONG Value);
+    HRESULT GetEngrave([retval, out]LONG *pValue);
+    HRESULT SetEngrave([in]LONG Value);
+    HRESULT GetItalic([retval, out]LONG *pValue);
+    HRESULT SetItalic([in]LONG Value);
+    HRESULT GetKerning([retval, out]LONG *pValue);
+    HRESULT SetKerning([in]LONG Value);
+    HRESULT GetLanguageID([retval, out]LONG *pValue);
+    HRESULT SetLanguageID([in]LONG Value);
     HRESULT GetName([retval, out]BSTR *pValue);
     HRESULT SetName([in]BSTR Value);
-    HRESULT GetOutline([retval, out]long *pValue);
-    HRESULT SetOutline([in]long Value);
-    HRESULT GetPosition([retval, out]long *pValue);
-    HRESULT SetPosition([in]long Value);
-    HRESULT GetProtected([retval, out]long *pValue);
-    HRESULT SetProtected([in]long Value);
-    HRESULT GetShadow([retval, out]long *pValue);
-    HRESULT SetShadow([in]long Value);
-    HRESULT GetSize([retval, out]long *pValue);
-    HRESULT SetSize([in]long Value);
-    HRESULT GetSmallCaps([retval, out]long *pValue);
-    HRESULT SetSmallCaps([in]long Value);
+    HRESULT GetOutline([retval, out]LONG *pValue);
+    HRESULT SetOutline([in]LONG Value);
+    HRESULT GetPosition([retval, out]LONG *pValue);
+    HRESULT SetPosition([in]LONG Value);
+    HRESULT GetProtected([retval, out]LONG *pValue);
+    HRESULT SetProtected([in]LONG Value);
+    HRESULT GetShadow([retval, out]LONG *pValue);
+    HRESULT SetShadow([in]LONG Value);
+    HRESULT GetSize([retval, out]LONG *pValue);
+    HRESULT SetSize([in]LONG Value);
+    HRESULT GetSmallCaps([retval, out]LONG *pValue);
+    HRESULT SetSmallCaps([in]LONG Value);
     HRESULT GetSpacing([retval, out]float *pValue);
     HRESULT SetSpacing([in]float Value);
-    HRESULT GetStrikeThrough([retval, out]long *pValue);
-    HRESULT SetStrikeThrough([in]long Value);
-    HRESULT GetSubscript([retval, out]long *pValue);
-    HRESULT SetSubscript([in]long Value);
-    HRESULT GetSuperscript([retval, out]long *pValue);
-    HRESULT SetSuperscript([in]long Value);
-    HRESULT GetUnderline([retval, out]long *pValue);
-    HRESULT SetUnderline([in]long Value);
-    HRESULT GetWeight([retval, out]long *pValue);
-    HRESULT SetWeight([in]long Value);
+    HRESULT GetStrikeThrough([retval, out]LONG *pValue);
+    HRESULT SetStrikeThrough([in]LONG Value);
+    HRESULT GetSubscript([retval, out]LONG *pValue);
+    HRESULT SetSubscript([in]LONG Value);
+    HRESULT GetSuperscript([retval, out]LONG *pValue);
+    HRESULT SetSuperscript([in]LONG Value);
+    HRESULT GetUnderline([retval, out]LONG *pValue);
+    HRESULT SetUnderline([in]LONG Value);
+    HRESULT GetWeight([retval, out]LONG *pValue);
+    HRESULT SetWeight([in]LONG Value);
 }
 
@@ -371,39 +384,39 @@
     HRESULT GetDuplicate([retval, out]ITextPara **ppPara);
     HRESULT SetDuplicate([in]ITextPara *pPara);
-    HRESULT CanChange([out]long *pB);
-    HRESULT IsEqual([in]ITextPara *pPara, [retval, out]long *pB);
-    HRESULT Reset([in]long Value);
-    HRESULT GetStyle([retval, out]long *pValue);
-    HRESULT SetStyle([in]long Value);
-    HRESULT GetAlignment([retval, out]long *pValue);
-    HRESULT SetAlignment([in]long Value);
-    HRESULT GetHyphenation([retval, out]long *pValue);
-    HRESULT SetHyphenation([in]long Value);
+    HRESULT CanChange([out]LONG *pB);
+    HRESULT IsEqual([in]ITextPara *pPara, [retval, out]LONG *pB);
+    HRESULT Reset([in]LONG Value);
+    HRESULT GetStyle([retval, out]LONG *pValue);
+    HRESULT SetStyle([in]LONG Value);
+    HRESULT GetAlignment([retval, out]LONG *pValue);
+    HRESULT SetAlignment([in]LONG Value);
+    HRESULT GetHyphenation([retval, out]LONG *pValue);
+    HRESULT SetHyphenation([in]LONG Value);
     HRESULT GetFirstLineIndent([retval, out]float *pValue);
-    HRESULT GetKeepTogether([retval, out]long *pValue);
-    HRESULT SetKeepTogether([in]long Value);
-    HRESULT GetKeepWithNext([retval, out]long *pValue);
-    HRESULT SetKeepWithNext([in]long Value);
+    HRESULT GetKeepTogether([retval, out]LONG *pValue);
+    HRESULT SetKeepTogether([in]LONG Value);
+    HRESULT GetKeepWithNext([retval, out]LONG *pValue);
+    HRESULT SetKeepWithNext([in]LONG Value);
     HRESULT GetLeftIndent([retval, out]float *pValue);
     HRESULT GetLineSpacing([retval, out]float *pValue);
-    HRESULT GetLineSpacingRule([retval, out]long *pValue);
-    HRESULT GetListAlignment([retval, out]long *pValue);
-    HRESULT SetListAlignment([in]long Value);
-    HRESULT GetListLevelIndex([retval, out]long *pValue);
-    HRESULT SetListLevelIndex([in]long Value);
-    HRESULT GetListStart([retval, out]long *pValue);
-    HRESULT SetListStart([in]long Value);
-    HRESULT GetListTab([retval, out]long *pValue);
-    HRESULT SetListTab([in]long Value);
-    HRESULT GetListType([retval, out]long *pValue);
-    HRESULT SetListType([in]long Value);
-    HRESULT GetNoLineNumber([retval, out]long *pValue);
-    HRESULT SetNoLineNumber([in]long Value);
-    HRESULT GetPageBreakBefore([retval, out]long *pValue);
-    HRESULT SetPageBreakBefore([in]long Value);
+    HRESULT GetLineSpacingRule([retval, out]LONG *pValue);
+    HRESULT GetListAlignment([retval, out]LONG *pValue);
+    HRESULT SetListAlignment([in]LONG Value);
+    HRESULT GetListLevelIndex([retval, out]LONG *pValue);
+    HRESULT SetListLevelIndex([in]LONG Value);
+    HRESULT GetListStart([retval, out]LONG *pValue);
+    HRESULT SetListStart([in]LONG Value);
+    HRESULT GetListTab([retval, out]LONG *pValue);
+    HRESULT SetListTab([in]LONG Value);
+    HRESULT GetListType([retval, out]LONG *pValue);
+    HRESULT SetListType([in]LONG Value);
+    HRESULT GetNoLineNumber([retval, out]LONG *pValue);
+    HRESULT SetNoLineNumber([in]LONG Value);
+    HRESULT GetPageBreakBefore([retval, out]LONG *pValue);
+    HRESULT SetPageBreakBefore([in]LONG Value);
     HRESULT GetRightIndent([retval, out]float *pValue);
     HRESULT SetRightIndent([in]float Value);
     HRESULT SetIndents([in]float StartIndent, [in]float LeftIndent, [in]float RightIndent);
-    HRESULT SetLineSpacing([in]long LineSpacingRule, [in]float LineSpacing);
+    HRESULT SetLineSpacing([in]LONG LineSpacingRule, [in]float LineSpacing);
     HRESULT GetSpaceAfter([retval, out]float *pValue);
     HRESULT SetSpaceAfter([in]float Value);
@@ -412,9 +425,9 @@
     HRESULT GetWindowControl([retval, out]float *pValue);
     HRESULT SetWindowControl([in]float Value);
-    HRESULT GetTabCount([retval, out]long *pCount);
-    HRESULT AddTab([in]float tbPos, [in]long tbAlign, [in]long tbLeader);
+    HRESULT GetTabCount([retval, out]LONG *pCount);
+    HRESULT AddTab([in]float tbPos, [in]LONG tbAlign, [in]LONG tbLeader);
     HRESULT ClearAllTabs();
     HRESULT DeleteTab([in]float tbPos);
-    HRESULT GetTab([in]long iTab, [out]float *ptbPos, [out]long *ptbAlign, [out]long *ptbLeader);
+    HRESULT GetTab([in]LONG iTab, [out]float *ptbPos, [out]LONG *ptbAlign, [out]LONG *ptbLeader);
 }
 
@@ -426,5 +439,5 @@
 {
     HRESULT _NewEnum([retval, out]IUnknown **ppUnkEnum);
-    HRESULT Item([in]long Index, [retval, out]ITextRange **ppRange);
-    HRESULT GetCount([retval, out]long *pCount);
-}
+    HRESULT Item([in]LONG Index, [retval, out]ITextRange **ppRange);
+    HRESULT GetCount([retval, out]LONG *pCount);
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/twain.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/twain.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/twain.h	(revision 19678)
@@ -63,9 +63,4 @@
 #undef FAR
 #define FAR
-#define huge
-#define WIN32
-#define _WIN32
-#undef __declspec
-#define __declspec(spec)
 
 /****************************************************************************
@@ -87,14 +82,6 @@
     typedef HANDLE         TW_HANDLE;
     typedef LPVOID         TW_MEMREF;
-
-    /*  SDH - 05/05/95 - TWUNK */
-    /*  For common code between 16 and 32 bits.  */
-# ifdef  WIN32
-#  define TW_HUGE
-# else   /* WIN32 */
-#  define TW_HUGE    huge
-# endif  /* WIN32 */
-    typedef BYTE TW_HUGE * HPBYTE;
-    typedef void TW_HUGE * HPVOID;
+    typedef BYTE         * HPBYTE;
+    typedef void         * HPVOID;
 #endif  /* _MSWIN_ */
 
@@ -128,8 +115,8 @@
 typedef char           TW_INT8,   FAR *pTW_INT8;
 typedef short          TW_INT16,  FAR *pTW_INT16;
-typedef long           TW_INT32,  FAR *pTW_INT32;
+typedef LONG           TW_INT32,  FAR *pTW_INT32;
 typedef unsigned char  TW_UINT8,  FAR *pTW_UINT8;
 typedef unsigned short TW_UINT16, FAR *pTW_UINT16;
-typedef unsigned long  TW_UINT32, FAR *pTW_UINT32;
+typedef ULONG          TW_UINT32, FAR *pTW_UINT32;
 typedef unsigned short TW_BOOL,   FAR *pTW_BOOL;
 
@@ -1831,17 +1818,9 @@
 #endif  /* __cplusplus */
 #ifdef  _MSWIN_
-# ifdef _WIN32
-     __declspec(dllexport) TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin,
-                                                          TW_UINT32    DG,
-                                                          TW_UINT16    DAT,
-                                                          TW_UINT16    MSG,
-                                                          TW_MEMREF    pData);
-# else   /* _WIN32 */
-     TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin,
-                                    TW_UINT32    DG,
-                                    TW_UINT16    DAT,
-                                    TW_UINT16    MSG,
-                                    TW_MEMREF    pData);
-# endif  /* _WIN32 */
+  TW_UINT16 DECLSPEC_EXPORT PASCAL DS_Entry (pTW_IDENTITY pOrigin,
+                                             TW_UINT32    DG,
+                                             TW_UINT16    DAT,
+                                             TW_UINT16    MSG,
+                                             TW_MEMREF    pData);
 
   typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC) (pTW_IDENTITY pOrigin,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/unknwn.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/unknwn.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/unknwn.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/urlhist.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/urlhist.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/urlhist.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/urlmon.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/urlmon.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/urlmon.idl	(revision 19678)
@@ -16,4 +16,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -199,5 +208,7 @@
         BSCF_LASTDATANOTIFICATION = 0x04,
         BSCF_DATAFULLYAVAILABLE = 0x08,
-        BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10
+        BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10,
+        BSCF_SKIPDRAINDATAFORFILEURLS = 0x20,
+        BSCF_64BITLENGTHDOWNLOAD = 0x40
     } BSCF;
 
@@ -704,5 +715,5 @@
         [in] IInternetBindInfo *pOIBindInfo,
         [in] DWORD grfPI,
-        [in] DWORD dwReserved);
+        [in] HANDLE_PTR dwReserved);
 
     HRESULT Continue(
@@ -1368,4 +1379,12 @@
 } INTERNETFEATURELIST;
 
+typedef struct _tagPROTOCOLFILTERDATA {
+    DWORD cbSize;
+    IInternetProtocolSink *pProtocolSink;
+    IInternetProtocol *pProtocol;
+    IUnknown *pUnk;
+    DWORD dwFilterFlags;
+} PROTOCOLFILTERDATA;
+
 /*****************************************************************************
  * IUri interface
@@ -1514,4 +1533,5 @@
 cpp_quote("DEFINE_GUID(IID_IAsyncBindCtx, 0x79EAC9D4, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);")
 cpp_quote("DEFINE_GUID(CLSID_StdURLMoniker, 0x79EAC9E0, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);")
+cpp_quote("DEFINE_GUID(CLSID_DeCompMimeFilter, 0x8f6b0360, 0xb80d, 0x11d0, 0xa9,0xb3, 0x00,0x60,0x97,0x94,0x23,0x11);")
 
 cpp_quote("DEFINE_GUID(CLSID_CdlProtocol, 0x3dd53d40, 0x7b8b, 0x11D0, 0xb0,0x13, 0x00,0xaa,0x00,0x59,0xce,0x02);")
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vfw.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vfw.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vfw.h	(revision 19678)
@@ -1429,5 +1429,5 @@
 #define MCIWndGetEnd(hWnd)          (LONG)MCIWndSM(hWnd,MCIWNDM_GETEND,0,0)
 
-#define MCIWndStep(hWnd,n)          (LONG)MCIWndSM(hWnd,MCI_STEP,0,(LPARAM)(long)(n))
+#define MCIWndStep(hWnd,n)          (LONG)MCIWndSM(hWnd,MCI_STEP,0,(LPARAM)(LONG)(n))
 
 #define MCIWndDestroy(hWnd)         (VOID)MCIWndSM(hWnd,WM_CLOSE,0,0)
@@ -1696,7 +1696,7 @@
     DWORD       dwBytesUsed;
     DWORD       dwTimeCaptured;
-    DWORD       dwUser;
+    DWORD_PTR   dwUser;
     DWORD       dwFlags;
-    DWORD       dwReserved[4];
+    DWORD_PTR   dwReserved[4];
 } VIDEOHDR, *PVIDEOHDR, *LPVIDEOHDR;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vmr9.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vmr9.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vmr9.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "unknwn.idl";
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vmrender.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vmrender.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/vmrender.idl	(revision 19678)
@@ -17,4 +17,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 cpp_quote("#if 0")
 typedef DWORD IDirectDrawSurface7;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winbase.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winbase.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winbase.h	(revision 19678)
@@ -319,14 +319,14 @@
 #define PROCESS_HEAP_ENTRY_DDESHARE           0x0020
 
-#define INVALID_HANDLE_VALUE     ((HANDLE)~0UL)
-#define INVALID_FILE_SIZE        ((DWORD)~0UL)
-#define INVALID_SET_FILE_POINTER ((DWORD)~0UL)
-#define INVALID_FILE_ATTRIBUTES  ((DWORD)~0UL)
+#define INVALID_HANDLE_VALUE     ((HANDLE)~(ULONG_PTR)0)
+#define INVALID_FILE_SIZE        (~0u)
+#define INVALID_SET_FILE_POINTER (~0u)
+#define INVALID_FILE_ATTRIBUTES  (~0u)
 
 #define LOCKFILE_FAIL_IMMEDIATELY   1
 #define LOCKFILE_EXCLUSIVE_LOCK     2
 
-#define FLS_OUT_OF_INDEXES ((DWORD)~0UL)
-#define TLS_OUT_OF_INDEXES ((DWORD)~0UL)
+#define FLS_OUT_OF_INDEXES (~0u)
+#define TLS_OUT_OF_INDEXES (~0u)
 
 #define SHUTDOWN_NORETRY 1
@@ -786,5 +786,5 @@
     LPVOID	lpMinimumApplicationAddress;
     LPVOID	lpMaximumApplicationAddress;
-    DWORD	dwActiveProcessorMask;
+    DWORD_PTR	dwActiveProcessorMask;
     DWORD	dwNumberOfProcessors;
     DWORD	dwProcessorType;
@@ -1191,4 +1191,6 @@
 #define SET_TAPE_DRIVE_INFORMATION 1
 
+#define PROCESS_NAME_NATIVE        1
+
 typedef void (CALLBACK *PAPCFUNC)(ULONG_PTR);
 typedef void (CALLBACK *PTIMERAPCROUTINE)(LPVOID,DWORD,DWORD);
@@ -1279,4 +1281,8 @@
 #define DDD_NO_BROADCAST_SYSTEM     0x00000008
 #define DDD_LUID_BROADCAST_DRIVE    0x00000010
+
+#define LOGON_WITH_PROFILE          0x00000001
+#define LOGON_NETCREDENTIALS_ONLY   0x00000002
+#define LOGON_ZERO_PASSWORD_BUFFER  0x80000000
 
 WINBASEAPI BOOL        WINAPI ActivateActCtx(HANDLE,ULONG_PTR *);
@@ -1402,4 +1408,5 @@
 WINADVAPI  BOOL        WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
 #define                       CreateProcessAsUser WINELIB_NAME_AW(CreateProcessAsUser)
+WINADVAPI  BOOL        WINAPI CreateProcessWithLogonW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPCWSTR,LPWSTR,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
 WINBASEAPI HANDLE      WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
 WINADVAPI  BOOL        WINAPI CreateRestrictedToken(HANDLE,DWORD,DWORD,PSID_AND_ATTRIBUTES,DWORD,PLUID_AND_ATTRIBUTES,DWORD,PSID_AND_ATTRIBUTES,PHANDLE);
@@ -1543,6 +1550,6 @@
 WINBASEAPI BOOL        WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
 WINBASEAPI BOOL        WINAPI FlushViewOfFile(LPCVOID,SIZE_T);
-WINBASEAPI DWORD       WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
-WINBASEAPI DWORD       WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
+WINBASEAPI DWORD       WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,__ms_va_list*);
+WINBASEAPI DWORD       WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,__ms_va_list*);
 #define                       FormatMessage WINELIB_NAME_AW(FormatMessage)
 WINBASEAPI BOOL        WINAPI FreeEnvironmentStringsA(LPSTR);
@@ -1614,4 +1621,5 @@
 WINBASEAPI DWORD       WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
 #define                       GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable)
+WINBASEAPI UINT        WINAPI GetErrorMode(void);
 WINBASEAPI BOOL        WINAPI GetExitCodeProcess(HANDLE,LPDWORD);
 WINBASEAPI BOOL        WINAPI GetExitCodeThread(HANDLE,LPDWORD);
@@ -1966,4 +1974,7 @@
 WINBASEAPI DWORD       WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
 #define                       QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
+WINBASEAPI BOOL        WINAPI QueryFullProcessImageNameA(HANDLE,DWORD,LPSTR,PDWORD);
+WINBASEAPI BOOL        WINAPI QueryFullProcessImageNameW(HANDLE,DWORD,LPWSTR,PDWORD);
+#define                       QueryFullProcessImageName WINELIB_NAME_AW(QueryFullProcessImageName)
 WINBASEAPI BOOL        WINAPI QueryInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,LPVOID,DWORD,DWORD*);
 WINBASEAPI BOOL        WINAPI QueryPerformanceCounter(LARGE_INTEGER*);
@@ -2097,5 +2108,5 @@
 WINBASEAPI BOOL        WINAPI SwitchToThread(void);
 WINBASEAPI BOOL        WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
-WINBASEAPI BOOL        WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
+WINBASEAPI BOOL        WINAPI SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION*,const SYSTEMTIME*,LPSYSTEMTIME);
 WINBASEAPI BOOL        WINAPI TerminateJobObject(HANDLE,UINT);
 WINBASEAPI BOOL        WINAPI TerminateProcess(HANDLE,DWORD);
@@ -2108,5 +2119,5 @@
 WINBASEAPI BOOL        WINAPI TransmitCommChar(HANDLE,CHAR);
 WINBASEAPI BOOL        WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit);
-WINBASEAPI BOOL        WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
+WINBASEAPI BOOL        WINAPI TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION*,const SYSTEMTIME*,LPSYSTEMTIME);
 WINBASEAPI LONG        WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS);
 WINBASEAPI BOOL        WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
@@ -2321,11 +2332,12 @@
 /* Wine internal functions */
 
-extern char *wine_get_unix_file_name( LPCWSTR dos );
-extern WCHAR *wine_get_dos_file_name( LPCSTR str );
-
-
-/* a few optimizations for i386/gcc */
-
-#if defined(__i386__) && defined(__GNUC__) && defined(__WINESRC__) && !defined(_NTSYSTEM_)
+extern char * CDECL wine_get_unix_file_name( LPCWSTR dos );
+extern WCHAR * CDECL wine_get_dos_file_name( LPCSTR str );
+
+
+/* Interlocked functions */
+
+#ifdef __i386__
+# if defined(__GNUC__) && !defined(_NTSYSTEM_)
 
 extern inline LONG WINAPI InterlockedCompareExchange( LONG volatile *dest, LONG xchg, LONG compare );
@@ -2368,56 +2380,38 @@
 }
 
-extern inline DWORD WINAPI GetLastError(void);
-extern inline DWORD WINAPI GetLastError(void)
-{
-    DWORD ret;
-    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x34,%0" : "=r" (ret) );
+# else  /* __GNUC__ */
+
+WINBASEAPI LONG WINAPI InterlockedCompareExchange(LONG volatile*,LONG,LONG);
+WINBASEAPI LONG WINAPI InterlockedDecrement(LONG volatile*);
+WINBASEAPI LONG WINAPI InterlockedExchange(LONG volatile*,LONG);
+WINBASEAPI LONG WINAPI InterlockedExchangeAdd(LONG volatile*,LONG);
+WINBASEAPI LONG WINAPI InterlockedIncrement(LONG volatile*);
+
+# endif  /* __GNUC__ */
+
+static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID volatile *dest, PVOID xchg, PVOID compare )
+{
+    return (PVOID)InterlockedCompareExchange( (LONG volatile*)dest, (LONG)xchg, (LONG)compare );
+}
+
+static inline PVOID WINAPI InterlockedExchangePointer( PVOID volatile *dest, PVOID val )
+{
+    return (PVOID)InterlockedExchange( (LONG volatile*)dest, (LONG)val );
+}
+
+#else  /* __i386__ */
+
+static inline LONG WINAPI InterlockedCompareExchange( LONG volatile *dest, LONG xchg, LONG compare )
+{
+#if defined(__x86_64__) && defined(__GNUC__)
+    LONG ret;
+    __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
+                          : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
     return ret;
-}
-
-extern inline DWORD WINAPI GetCurrentProcessId(void);
-extern inline DWORD WINAPI GetCurrentProcessId(void)
-{
-    DWORD ret;
-    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) );
-    return ret;
-}
-
-extern inline DWORD WINAPI GetCurrentThreadId(void);
-extern inline DWORD WINAPI GetCurrentThreadId(void)
-{
-    DWORD ret;
-    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) );
-    return ret;
-}
-
-extern inline void WINAPI SetLastError( DWORD err );
-extern inline void WINAPI SetLastError( DWORD err )
-{
-    __asm__ __volatile__( ".byte 0x64\n\tmovl %0,0x34" : : "r" (err) : "memory" );
-}
-
-extern inline HANDLE WINAPI GetProcessHeap(void);
-extern inline HANDLE WINAPI GetProcessHeap(void)
-{
-    HANDLE *pdb;
-    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x30,%0" : "=r" (pdb) );
-    return pdb[0x18 / sizeof(HANDLE)];  /* get dword at offset 0x18 in pdb */
-}
-
-#else  /* __i386__ && __GNUC__ && __WINESRC__ && !_NTSYSTEM_ */
-
-WINBASEAPI DWORD       WINAPI GetCurrentProcessId(void);
-WINBASEAPI DWORD       WINAPI GetCurrentThreadId(void);
-WINBASEAPI DWORD       WINAPI GetLastError(void);
-WINBASEAPI HANDLE      WINAPI GetProcessHeap(void);
-WINBASEAPI LONG        WINAPI InterlockedCompareExchange(LONG volatile*,LONG,LONG);
-WINBASEAPI LONG        WINAPI InterlockedDecrement(LONG volatile*);
-WINBASEAPI LONG        WINAPI InterlockedExchange(LONG volatile*,LONG);
-WINBASEAPI LONG        WINAPI InterlockedExchangeAdd(LONG volatile*,LONG);
-WINBASEAPI LONG        WINAPI InterlockedIncrement(LONG volatile*);
-WINBASEAPI VOID        WINAPI SetLastError(DWORD);
-
-#endif  /* __i386__ && __GNUC__ && __WINESRC__ && !_NTSYSTEM_ */
+#else
+    extern int interlocked_cmpxchg( int *dest, int xchg, int compare );
+    return interlocked_cmpxchg( (int *)dest, xchg, compare );
+#endif
+}
 
 static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID volatile *dest, PVOID xchg, PVOID compare )
@@ -2429,5 +2423,19 @@
     return ret;
 #else
-    return (PVOID)InterlockedCompareExchange( (LONG volatile*)dest, (LONG)xchg, (LONG)compare );
+    extern void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare );
+    return interlocked_cmpxchg_ptr( (void **)dest, xchg, compare );
+#endif
+}
+
+static inline LONG WINAPI InterlockedExchange( LONG volatile *dest, LONG val )
+{
+#if defined(__x86_64__) && defined(__GNUC__)
+    LONG ret;
+    __asm__ __volatile__( "lock; xchgl %0,(%1)"
+                          : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
+    return ret;
+#else
+    extern int interlocked_xchg( int *dest, int val );
+    return interlocked_xchg( (int *)dest, val );
 #endif
 }
@@ -2441,11 +2449,110 @@
     return ret;
 #else
-    return (PVOID)InterlockedExchange( (LONG volatile*)dest, (LONG)val );
+    extern void *interlocked_xchg_ptr( void **dest, void *val );
+    return interlocked_xchg_ptr( (void **)dest, val );
 #endif
 }
 
+static inline LONG WINAPI InterlockedExchangeAdd( LONG volatile *dest, LONG incr )
+{
+#if defined(__x86_64__) && defined(__GNUC__)
+    LONG ret;
+    __asm__ __volatile__( "lock; xaddl %0,(%1)"
+                          : "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
+    return ret;
+#else
+    extern int interlocked_xchg_add( int *dest, int incr );
+    return interlocked_xchg_add( (int *)dest, incr );
+#endif
+}
+
+static inline LONG WINAPI InterlockedIncrement( LONG volatile *dest )
+{
+    return InterlockedExchangeAdd( dest, 1 ) + 1;
+}
+
+static inline LONG WINAPI InterlockedDecrement( LONG volatile *dest )
+{
+    return InterlockedExchangeAdd( dest, -1 ) - 1;
+}
+
+#endif  /* __i386__ */
+
+/* A few optimizations for gcc */
+
+#if defined(__GNUC__) && !defined(__MINGW32__) && (defined(__i386__) || defined(__x86_64__))
+
+extern inline DWORD WINAPI GetLastError(void);
+extern inline DWORD WINAPI GetLastError(void)
+{
+    DWORD ret;
+#ifdef __x86_64__
+    __asm__ __volatile__( ".byte 0x65\n\tmovl 0x68,%0" : "=r" (ret) );
+#else
+    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x34,%0" : "=r" (ret) );
+#endif
+    return ret;
+}
+
+extern inline DWORD WINAPI GetCurrentProcessId(void);
+extern inline DWORD WINAPI GetCurrentProcessId(void)
+{
+    DWORD ret;
+#ifdef __x86_64__
+    __asm__ __volatile__( ".byte 0x65\n\tmovl 0x40,%0" : "=r" (ret) );
+#else
+    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) );
+#endif
+    return ret;
+}
+
+extern inline DWORD WINAPI GetCurrentThreadId(void);
+extern inline DWORD WINAPI GetCurrentThreadId(void)
+{
+    DWORD ret;
+#ifdef __x86_64__
+    __asm__ __volatile__( ".byte 0x65\n\tmovl 0x48,%0" : "=r" (ret) );
+#else
+    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) );
+#endif
+    return ret;
+}
+
+extern inline void WINAPI SetLastError( DWORD err );
+extern inline void WINAPI SetLastError( DWORD err )
+{
+#ifdef __x86_64__
+    __asm__ __volatile__( ".byte 0x65\n\tmovl %0,0x68" : : "r" (err) : "memory" );
+#else
+    __asm__ __volatile__( ".byte 0x64\n\tmovl %0,0x34" : : "r" (err) : "memory" );
+#endif
+}
+
+extern inline HANDLE WINAPI GetProcessHeap(void);
+extern inline HANDLE WINAPI GetProcessHeap(void)
+{
+    HANDLE *pdb;
+#ifdef __x86_64__
+    __asm__ __volatile__( ".byte 0x65\n\tmovq 0x60,%0" : "=r" (pdb) );
+    return pdb[0x30 / sizeof(HANDLE)];  /* get dword at offset 0x30 in pdb */
+#else
+    __asm__ __volatile__( ".byte 0x64\n\tmovl 0x30,%0" : "=r" (pdb) );
+    return pdb[0x18 / sizeof(HANDLE)];  /* get dword at offset 0x18 in pdb */
+#endif
+}
+
+#else  /* __GNUC__ */
+
+WINBASEAPI DWORD       WINAPI GetCurrentProcessId(void);
+WINBASEAPI DWORD       WINAPI GetCurrentThreadId(void);
+WINBASEAPI DWORD       WINAPI GetLastError(void);
+WINBASEAPI HANDLE      WINAPI GetProcessHeap(void);
+WINBASEAPI VOID        WINAPI SetLastError(DWORD);
+
+#endif  /* __GNUC__ */
+
 #ifdef __WINESRC__
-#define GetCurrentProcess() ((HANDLE)0xffffffff)
-#define GetCurrentThread()  ((HANDLE)0xfffffffe)
+#define GetCurrentProcess() ((HANDLE)~(ULONG_PTR)0)
+#define GetCurrentThread()  ((HANDLE)~(ULONG_PTR)1)
 #endif
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincon.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincon.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincon.h	(revision 19678)
@@ -215,4 +215,7 @@
 WINBASEAPI UINT WINAPI   GetConsoleCP(VOID);
 WINBASEAPI BOOL WINAPI   GetConsoleCursorInfo( HANDLE,LPCONSOLE_CURSOR_INFO);
+WINBASEAPI BOOL WINAPI   GetConsoleInputExeNameA(DWORD,LPSTR);
+WINBASEAPI BOOL WINAPI   GetConsoleInputExeNameW(DWORD,LPWSTR);
+#define                  GetConsoleInputExeName WINELIB_NAME_AW(GetConsoleInputExeName)
 WINBASEAPI BOOL WINAPI   GetConsoleMode( HANDLE,LPDWORD);
 WINBASEAPI UINT WINAPI   GetConsoleOutputCP(VOID);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincred.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincred.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincred.h	(revision 19678)
@@ -108,4 +108,35 @@
 DECL_WINELIB_TYPE_AW(PCREDENTIAL)
 
+typedef struct _CREDENTIAL_TARGET_INFORMATIONA
+{
+    LPSTR TargetName;
+    LPSTR NetbiosServerName;
+    LPSTR DnsServerName;
+    LPSTR NetbiosDomainName;
+    LPSTR DnsDomainName;
+    LPSTR DnsTreeName;
+    LPSTR PackageName;
+    DWORD Flags;
+    DWORD CredTypeCount;
+    LPDWORD CredTypes;
+} CREDENTIAL_TARGET_INFORMATIONA, *PCREDENTIAL_TARGET_INFORMATIONA;
+
+typedef struct _CREDENTIAL_TARGET_INFORMATIONW
+{
+    LPWSTR TargetName;
+    LPWSTR NetbiosServerName;
+    LPWSTR DnsServerName;
+    LPWSTR NetbiosDomainName;
+    LPWSTR DnsDomainName;
+    LPWSTR DnsTreeName;
+    LPWSTR PackageName;
+    DWORD Flags;
+    DWORD CredTypeCount;
+    LPDWORD CredTypes;
+} CREDENTIAL_TARGET_INFORMATIONW, *PCREDENTIAL_TARGET_INFORMATIONW;
+
+DECL_WINELIB_TYPE_AW(CREDENTIAL_TARGET_INFORMATION)
+DECL_WINELIB_TYPE_AW(PCREDENTIAL_TARGET_INFORMATION)
+
 typedef struct _CREDUI_INFOA
 {
@@ -166,4 +197,9 @@
 #define CRED_PERSIST_LOCAL_MACHINE                  2
 #define CRED_PERSIST_ENTERPRISE                     3
+
+/* values for CREDENTIAL_TARGET_INFORMATION::Flags */
+#define CRED_TI_SERVER_FORMAT_UNKNOWN               1
+#define CRED_TI_DOMAIN_FORMAT_UNKNOWN               2
+#define CRED_TI_ONLY_PASSWORD_REQUIRED              4
 
 #define CREDUI_FLAGS_INCORRECT_PASSWORD             0x00000001
@@ -199,4 +235,7 @@
 WINADVAPI BOOL  WINAPI CredReadW(LPCWSTR,DWORD,DWORD,PCREDENTIALW *);
 #define                CredRead WINELIB_NAME_AW(CredRead)
+WINADVAPI BOOL  WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA,DWORD,DWORD *,PCREDENTIALA **);
+WINADVAPI BOOL  WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW,DWORD,DWORD *,PCREDENTIALW **);
+#define                CredReadDomainCredentials WINELIB_NAME_AW(CredReadDomainCredentials)
 WINADVAPI BOOL  WINAPI CredRenameA(LPCSTR,LPCSTR,DWORD,DWORD);
 WINADVAPI BOOL  WINAPI CredRenameW(LPCWSTR,LPCWSTR,DWORD,DWORD);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincrypt.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincrypt.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wincrypt.h	(revision 19678)
@@ -1967,4 +1967,7 @@
 #define CRYPT_WRITE             0x0010
 #define CRYPT_MAC               0x0020
+#define CRYPT_EXPORT_KEY        0x0040
+#define CRYPT_IMPORT_KEY        0x0080
+#define CRYPT_ARCHIVE           0x0100
 
 /* Crypt*Key */
@@ -3349,4 +3352,9 @@
 #define CRYPT_ACQUIRE_SILENT_FLAG        0x00000040
 
+/* flags for CryptFindCertificateKeyProvInfo */
+#define CRYPT_FIND_USER_KEYSET_FLAG    0x00000001
+#define CRYPT_FIND_MACHINE_KEYSET_FLAG 0x00000002
+#define CRYPT_FIND_SILENT_KEYSET_FLAG  0x00000040
+
 /* Chain engines and chains */
 typedef HANDLE HCERTCHAINENGINE;
@@ -3775,4 +3783,13 @@
 #define CMSG_ENCODED_SORTED_CTL_FLAG               0x1
 #define CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG 0x2
+
+/* PFXImportCertStore flags */
+#define CRYPT_USER_KEYSET           0x00001000
+#define PKCS12_IMPORT_RESERVED_MASK 0xffff0000
+/* PFXExportCertStore flags */
+#define REPORT_NO_PRIVATE_KEY                 0x00000001
+#define REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY 0x00000002
+#define EXPORT_PRIVATE_KEYS                   0x00000004
+#define PKCS12_EXPORT_RESERVED_MASK           0xffff0000
 
 /* function declarations */
@@ -3892,4 +3909,6 @@
 BOOL WINAPI CryptUnregisterOIDInfo(PCCRYPT_OID_INFO pInfo);
 
+LPCWSTR WINAPI CryptFindLocalizedName(LPCWSTR pwszCryptName);
+
 LPCSTR WINAPI CertAlgIdToOID(DWORD dwAlgId);
 DWORD WINAPI CertOIDToAlgId(LPCSTR pszObjId);
@@ -4239,4 +4258,7 @@
  DWORD dwFlags, void *pvReserved, HCRYPTPROV_OR_NCRYPT_KEY_HANDLE *phCryptProv, DWORD *pdwKeySpec,
  BOOL *pfCallerFreeProv);
+
+BOOL WINAPI CryptFindCertificateKeyProvInfo(PCCERT_CONTEXT pCert,
+ DWORD dwFlags, void *pvReserved);
 
 BOOL WINAPI CryptProtectData( DATA_BLOB* pDataIn, LPCWSTR szDataDescr,
@@ -4394,4 +4416,15 @@
  DWORD *pcbComputedHash);
 
+/* PFX functions */
+HCERTSTORE WINAPI PFXImportCertStore(CRYPT_DATA_BLOB *pPFX, LPCWSTR szPassword,
+ DWORD dwFlags);
+BOOL WINAPI PFXIsPFXBlob(CRYPT_DATA_BLOB *pPFX);
+BOOL WINAPI PFXVerifyPassword(CRYPT_DATA_BLOB *pPFX, LPCWSTR szPassword,
+ DWORD dwFlags);
+BOOL WINAPI PFXExportCertStoreEx(HCERTSTORE hStore, CRYPT_DATA_BLOB *pPFX,
+ LPCWSTR szPassword, void *pvReserved, DWORD dwFlags);
+BOOL WINAPI PFXExportCertStore(HCERTSTORE hStore, CRYPT_DATA_BLOB *pPFX,
+ LPCWSTR szPassword, DWORD dwFlags);
+
 /* cryptnet.dll functions */
 BOOL WINAPI CryptCancelAsyncRetrieval(HCRYPTASYNC hAsyncRetrieval);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/windef.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/windef.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/windef.h	(revision 19678)
@@ -47,14 +47,15 @@
 /* Calling conventions definitions */
 
-#if defined(__i386__) && !defined(_X86_)
-# define _X86_
-#endif
-
-#if defined(_X86_) && !defined(__i386__)
-# define __i386__
-#endif
-
 #if defined(__x86_64__) && !defined(_WIN64)
 #define _WIN64
+#endif
+
+#ifndef _WIN64
+# if defined(__i386__) && !defined(_X86_)
+#  define _X86_
+# endif
+# if defined(_X86_) && !defined(__i386__)
+#  define __i386__
+# endif
 #endif
 
@@ -92,4 +93,16 @@
 # endif
 #endif /* __cdecl */
+
+#ifndef __ms_va_list
+# if defined(__x86_64__) && defined (__GNUC__)
+#  define __ms_va_list __builtin_ms_va_list
+#  define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
+#  define __ms_va_end(list) __builtin_ms_va_end(list)
+# else
+#  define __ms_va_list va_list
+#  define __ms_va_start(list,arg) va_start(list,arg)
+#  define __ms_va_end(list) va_end(list)
+# endif
+#endif
 
 #ifdef __WINESRC__
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/dcetypes.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/dcetypes.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/dcetypes.idl	(revision 19678)
@@ -17,4 +17,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/debug.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/debug.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/debug.h	(revision 19678)
@@ -196,5 +196,5 @@
 {
     if (!id) return "(null)";
-    if (!((ULONG_PTR)id >> 16)) return wine_dbg_sprintf( "<guid-0x%04lx>", (ULONG_PTR)id & 0xffff );
+    if (!((ULONG_PTR)id >> 16)) return wine_dbg_sprintf( "<guid-0x%04hx>", (WORD)(ULONG_PTR)id );
     return wine_dbg_sprintf( "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
                              id->Data1, id->Data2, id->Data3,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/epm.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/epm.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/epm.idl	(revision 19678)
@@ -17,4 +17,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/exception.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/exception.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/exception.h	(revision 19678)
@@ -47,5 +47,5 @@
  *     do some stuff that can raise an exception
  * }
- * __EXCEPT(filter_func,param)
+ * __EXCEPT(filter_func)
  * {
  *     handle the exception here
@@ -59,12 +59,15 @@
  *     do some stuff that can raise an exception
  * }
- * __FINALLY(finally_func,param)
- *
- * The filter_func must be defined with the WINE_EXCEPTION_FILTER
- * macro, and return one of the EXCEPTION_* code; it can use
- * GetExceptionInformation and GetExceptionCode to retrieve the
+ * __FINALLY(finally_func)
+ *
+ * The filter_func and finally_func functions must be defined like this:
+ *
+ * LONG CALLBACK filter_func( PEXCEPTION_POINTERS __eptr ) { ... }
+ *
+ * void CALLBACK finally_func( BOOL __normal ) { ... }
+ *
+ * The filter function must return one of the EXCEPTION_* code; it can
+ * use GetExceptionInformation() and GetExceptionCode() to retrieve the
  * exception info.
- *
- * The finally_func must be defined with the WINE_FINALLY_FUNC macro.
  *
  * Warning: inside a __TRY or __EXCEPT block, 'break' or 'continue' statements
@@ -243,5 +246,5 @@
 #ifndef USE_COMPILER_EXCEPTIONS
 
-extern void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
+NTSYSAPI void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
 
 /* wrapper for RtlUnwind since it clobbers registers on Windows */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/irot.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/irot.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/irot.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/itss.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/itss.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/itss.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/library.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/library.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/library.h	(revision 19678)
@@ -75,5 +75,4 @@
 extern char **__wine_main_argv;
 extern WCHAR **__wine_main_wargv;
-extern char **__wine_main_environ;
 extern void __wine_dll_register( const IMAGE_NT_HEADERS *header, const char *filename );
 extern void wine_init( int argc, char *argv[], char *error, int error_size );
@@ -142,7 +141,10 @@
 static inline void wine_ldt_set_base( LDT_ENTRY *ent, const void *base )
 {
-    ent->BaseLow               = (WORD)(unsigned long)base;
-    ent->HighWord.Bits.BaseMid = (BYTE)((unsigned long)base >> 16);
-    ent->HighWord.Bits.BaseHi  = (BYTE)((unsigned long)base >> 24);
+    ent->BaseLow               = (WORD)(ULONG_PTR)base;
+    ent->HighWord.Bits.BaseMid = (BYTE)((ULONG_PTR)base >> 16);
+    ent->HighWord.Bits.BaseHi  = (BYTE)((ULONG_PTR)base >> 24);
+#ifdef _WIN64
+    ent->BaseHigh              = (ULONG_PTR)base >> 32;
+#endif
 }
 static inline void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
@@ -155,6 +157,9 @@
 {
     return (void *)(ent->BaseLow |
-                    (unsigned long)ent->HighWord.Bits.BaseMid << 16 |
-                    (unsigned long)ent->HighWord.Bits.BaseHi << 24);
+#ifdef _WIN64
+                    (ULONG_PTR)ent->BaseHigh << 32 |
+#endif
+                    (ULONG_PTR)ent->HighWord.Bits.BaseMid << 16 |
+                    (ULONG_PTR)ent->HighWord.Bits.BaseHi << 24);
 }
 static inline unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/port.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/port.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/port.h	(revision 19678)
@@ -59,4 +59,8 @@
 #endif
 
+/* Can't use windef.h here, cause it'd cause problems with NONAMELESSUNION/STRUCT later */
+#ifndef inline
+#define inline
+#endif
 
 /****************************************************************
@@ -124,4 +128,8 @@
 #endif
 
+#ifdef HAVE_ONE_ARG_MKDIR
+#define mkdir(path,mode) mkdir(path)
+#endif
+
 #if !defined(HAVE_FTRUNCATE) && defined(HAVE_CHSIZE)
 #define ftruncate chsize
@@ -178,8 +186,4 @@
 #ifndef S_ISREG
 # define S_ISREG(mod) (((mod) & _S_IFMT) == _S_IFREG)
-#endif
-
-#ifndef S_IWUSR
-# define S_IWUSR 0
 #endif
 
@@ -197,14 +201,4 @@
 #endif
 
-#if !defined(S_IXUSR) && defined(S_IEXEC)
-# define S_IXUSR S_IEXEC
-#endif
-#if !defined(S_IXGRP) && defined(S_IEXEC)
-# define S_IXGRP S_IEXEC
-#endif
-#if !defined(S_IXOTH) && defined(S_IEXEC)
-# define S_IXOTH S_IEXEC
-#endif
-
 
 /****************************************************************
@@ -223,5 +217,5 @@
 /* Macros to define assembler functions somewhat portably */
 
-#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__APPLE__)
+#if defined(__GNUC__) && !defined(__INTERIX) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__APPLE__)
 # define __ASM_GLOBAL_FUNC(name,code) \
       __asm__( ".text\n\t" \
@@ -244,17 +238,4 @@
 
 
-/* Register functions */
-
-#ifdef __i386__
-#define DEFINE_REGS_ENTRYPOINT( name, args, pop_args ) \
-    __ASM_GLOBAL_FUNC( name, \
-                       "pushl %eax\n\t" \
-                       "call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
-                       ".long " __ASM_NAME("__regs_") #name "-.\n\t" \
-                       ".byte " #args "," #pop_args )
-/* FIXME: add support for other CPUs */
-#endif  /* __i386__ */
-
-
 /****************************************************************
  * Function definitions (only when using libwine_port)
@@ -325,4 +306,20 @@
 #endif /* !defined(HAVE_MEMMOVE) */
 
+#ifndef HAVE_POLL
+struct pollfd
+{
+    int fd;
+    short events;
+    short revents;
+};
+#define POLLIN   0x01
+#define POLLPRI  0x02
+#define POLLOUT  0x04
+#define POLLERR  0x08
+#define POLLHUP  0x10
+#define POLLNVAL 0x20
+int poll( struct pollfd *fds, unsigned int count, int timeout );
+#endif /* HAVE_POLL */
+
 #ifndef HAVE_PREAD
 ssize_t pread( int fd, void *buf, size_t count, off_t offset );
@@ -361,4 +358,8 @@
 #endif /* !defined(HAVE_STRCASECMP) */
 
+#ifndef HAVE_SYMLINK
+int symlink(const char *from, const char *to);
+#endif
+
 #ifndef HAVE_USLEEP
 int usleep (unsigned int useconds);
@@ -366,5 +367,5 @@
 
 #ifdef __i386__
-static void *memcpy_unaligned( void *dst, const void *src, size_t size )
+static inline void *memcpy_unaligned( void *dst, const void *src, size_t size )
 {
     return memcpy( dst, src, size );
@@ -390,5 +391,5 @@
 /* Interlocked functions */
 
-#if defined(__i386__) && defined(__GNUC__)
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 
 extern inline int interlocked_cmpxchg( int *dest, int xchg, int compare );
@@ -410,6 +411,11 @@
 {
     void *ret;
+#ifdef __x86_64__
+    __asm__ __volatile__( "lock; cmpxchgq %2,(%1)"
+                          : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
+#else
     __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
                           : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
+#endif
     return ret;
 }
@@ -426,6 +432,11 @@
 {
     void *ret;
+#ifdef __x86_64__
+    __asm__ __volatile__( "lock; xchgq %0,(%1)"
+                          : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
+#else
     __asm__ __volatile__( "lock; xchgl %0,(%1)"
                           : "=r" (ret) : "r" (dest), "0" (val) : "memory" );
+#endif
     return ret;
 }
@@ -439,5 +450,5 @@
 }
 
-#else  /* __i386___ && __GNUC__ */
+#else  /* __GNUC__ */
 
 extern int interlocked_cmpxchg( int *dest, int xchg, int compare );
@@ -448,5 +459,5 @@
 extern int interlocked_xchg_add( int *dest, int incr );
 
-#endif  /* __i386___ && __GNUC__ */
+#endif  /* __GNUC__ */
 
 #else /* NO_LIBWINE_PORT */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/pthread.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/pthread.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/pthread.h	(revision 19678)
@@ -40,55 +40,4 @@
 #endif
 
-#ifdef HAVE_PTHREAD_H
-
-#define _GNU_SOURCE
-#include <pthread.h>
-#ifdef HAVE_PTHREAD_NP_H
-#include <pthread_np.h>
-#endif
-
-#ifndef HAVE_PTHREAD_RWLOCK_T
-typedef void *pthread_rwlock_t;
-#endif
-#ifndef HAVE_PTHREAD_RWLOCKATTR_T
-typedef void *pthread_rwlockattr_t;
-#endif
-
-struct wine_pthread_callbacks
-{
-    void *    (*ptr_get_thread_data)(void);
-    void      (*ptr_set_thread_data)(void *data);
-    pthread_t (*ptr_pthread_self)(void);
-    int       (*ptr_pthread_equal)(pthread_t thread1, pthread_t thread2);
-    int       (*ptr_pthread_create)(pthread_t* thread, const pthread_attr_t* attr,
-                                    void* (*start_routine)(void *), void* arg);
-    int       (*ptr_pthread_cancel)(pthread_t thread);
-    int       (*ptr_pthread_join)(pthread_t thread, void **value_ptr);
-    int       (*ptr_pthread_detach)(pthread_t thread);
-    void      (*ptr_pthread_exit)(void *retval, char *currentframe);
-    int       (*ptr_pthread_mutex_init)(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr);
-    int       (*ptr_pthread_mutex_lock)(pthread_mutex_t *mutex);
-    int       (*ptr_pthread_mutex_trylock)(pthread_mutex_t *mutex);
-    int       (*ptr_pthread_mutex_unlock)(pthread_mutex_t *mutex);
-    int       (*ptr_pthread_mutex_destroy)(pthread_mutex_t *mutex);
-    int       (*ptr_pthread_rwlock_init)(pthread_rwlock_t *rwlock,
-                                         const pthread_rwlockattr_t *rwlock_attr);
-    int       (*ptr_pthread_rwlock_destroy)(pthread_rwlock_t *rwlock);
-    int       (*ptr_pthread_rwlock_rdlock)(pthread_rwlock_t *rwlock);
-    int       (*ptr_pthread_rwlock_tryrdlock)(pthread_rwlock_t *rwlock);
-    int       (*ptr_pthread_rwlock_wrlock)(pthread_rwlock_t *rwlock);
-    int       (*ptr_pthread_rwlock_trywrlock)(pthread_rwlock_t *rwlock);
-    int       (*ptr_pthread_rwlock_unlock)(pthread_rwlock_t *rwlock);
-    int       (*ptr_pthread_cond_init)(pthread_cond_t *cond, const pthread_condattr_t *cond_attr);
-    int       (*ptr_pthread_cond_destroy)(pthread_cond_t *cond);
-    int       (*ptr_pthread_cond_signal)(pthread_cond_t *cond);
-    int       (*ptr_pthread_cond_broadcast)(pthread_cond_t *cond);
-    int       (*ptr_pthread_cond_wait)(pthread_cond_t *cond, pthread_mutex_t *mutex);
-    int       (*ptr_pthread_cond_timedwait)(pthread_cond_t *cond, pthread_mutex_t *mutex,
-                                            const struct timespec *abstime);
-};
-
-#endif /* HAVE_PTHREAD_H */
-
 /* thread information used to creating and exiting threads */
 struct wine_pthread_thread_info
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/server.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/server.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/server.h	(revision 19678)
@@ -60,8 +60,8 @@
 
 extern unsigned int wine_server_call( void *req_ptr );
-extern void wine_server_send_fd( int fd );
-extern int wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, obj_handle_t *handle );
-extern int wine_server_handle_to_fd( obj_handle_t handle, unsigned int access, int *unix_fd, unsigned int *options );
-extern void wine_server_release_fd( obj_handle_t handle, int unix_fd );
+extern void CDECL wine_server_send_fd( int fd );
+extern int CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle );
+extern int CDECL wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd, unsigned int *options );
+extern void CDECL wine_server_release_fd( HANDLE handle, int unix_fd );
 
 /* do a server call and set the last error code */
@@ -99,4 +99,35 @@
 }
 
+/* convert an object handle to a server handle */
+static inline obj_handle_t wine_server_obj_handle( HANDLE handle )
+{
+    if ((int)(INT_PTR)handle != (INT_PTR)handle) return 0xfffffff0;  /* some invalid handle */
+    return (INT_PTR)handle;
+}
+
+/* convert a user handle to a server handle */
+static inline user_handle_t wine_server_user_handle( HANDLE handle )
+{
+    return (UINT_PTR)handle;
+}
+
+/* convert a server handle to a generic handle */
+static inline HANDLE wine_server_ptr_handle( obj_handle_t handle )
+{
+    return (HANDLE)(INT_PTR)(int)handle;
+}
+
+/* convert a client pointer to a server client_ptr_t */
+static inline client_ptr_t wine_server_client_ptr( const void *ptr )
+{
+    return (client_ptr_t)(ULONG_PTR)ptr;
+}
+
+/* convert a server client_ptr_t to a real pointer */
+static inline void *wine_server_get_ptr( client_ptr_t ptr )
+{
+    return (void *)(ULONG_PTR)ptr;
+}
+
 
 /* macros for server requests */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/server_protocol.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/server_protocol.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/server_protocol.h	(revision 19678)
@@ -6,4 +6,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 #ifndef __WINE_WINE_SERVER_PROTOCOL_H
 #define __WINE_WINE_SERVER_PROTOCOL_H
@@ -16,12 +25,18 @@
 #include <winbase.h>
 
-typedef void *obj_handle_t;
-typedef void *user_handle_t;
-typedef unsigned short atom_t;
+typedef unsigned int obj_handle_t;
+typedef unsigned int user_handle_t;
+typedef unsigned int atom_t;
 typedef unsigned int process_id_t;
 typedef unsigned int thread_id_t;
 typedef unsigned int data_size_t;
 typedef unsigned int ioctl_code_t;
+typedef unsigned __int64 lparam_t;
+typedef unsigned __int64 apc_param_t;
+typedef unsigned __int64 mem_size_t;
 typedef unsigned __int64 file_pos_t;
+typedef unsigned __int64 client_ptr_t;
+typedef unsigned __int64 affinity_t;
+typedef client_ptr_t mod_handle_t;
 
 struct request_header
@@ -50,74 +65,139 @@
 
 
-struct debug_event_exception
-{
-    EXCEPTION_RECORD record;
-    int              first;
-};
-struct debug_event_create_thread
-{
-    obj_handle_t handle;
-    void        *teb;
-    void        *start;
-};
-struct debug_event_create_process
-{
-    obj_handle_t file;
-    obj_handle_t process;
-    obj_handle_t thread;
-    void        *base;
-    int          dbg_offset;
-    int          dbg_size;
-    void        *teb;
-    void        *start;
-    void        *name;
-    int          unicode;
-};
-struct debug_event_exit
-{
-    int          exit_code;
-};
-struct debug_event_load_dll
-{
-    obj_handle_t handle;
-    void        *base;
-    int          dbg_offset;
-    int          dbg_size;
-    void        *name;
-    int          unicode;
-};
-struct debug_event_unload_dll
-{
-    void       *base;
-};
-struct debug_event_output_string
-{
-    void       *string;
-    int         unicode;
-    int         length;
-};
-struct debug_event_rip_info
-{
-    int         error;
-    int         type;
-};
-union debug_event_data
-{
-    struct debug_event_exception      exception;
-    struct debug_event_create_thread  create_thread;
-    struct debug_event_create_process create_process;
-    struct debug_event_exit           exit;
-    struct debug_event_load_dll       load_dll;
-    struct debug_event_unload_dll     unload_dll;
-    struct debug_event_output_string  output_string;
-    struct debug_event_rip_info       rip_info;
-};
+typedef union
+{
+    int code;
+    struct
+    {
+        int              code;
+        int              first;
+        unsigned int     exc_code;
+        unsigned int     flags;
+        client_ptr_t     record;
+        client_ptr_t     address;
+        int              nb_params;
+        int              __pad;
+        client_ptr_t     params[15];
+    } exception;
+    struct
+    {
+        int          code;
+        obj_handle_t handle;
+        client_ptr_t teb;
+        client_ptr_t start;
+    } create_thread;
+    struct
+    {
+        int          code;
+        obj_handle_t file;
+        obj_handle_t process;
+        obj_handle_t thread;
+        mod_handle_t base;
+        int          dbg_offset;
+        int          dbg_size;
+        client_ptr_t teb;
+        client_ptr_t start;
+        client_ptr_t name;
+        int          unicode;
+    } create_process;
+    struct
+    {
+        int          code;
+        int          exit_code;
+    } exit;
+    struct
+    {
+        int          code;
+        obj_handle_t handle;
+        mod_handle_t base;
+        int          dbg_offset;
+        int          dbg_size;
+        client_ptr_t name;
+        int          unicode;
+    } load_dll;
+    struct
+    {
+        int          code;
+        int          __pad;
+        mod_handle_t base;
+    } unload_dll;
+    struct
+    {
+        int          code;
+        int          unicode;
+        client_ptr_t string;
+        data_size_t  length;
+    } output_string;
+    struct
+    {
+        int          code;
+        int          error;
+        int          type;
+    } rip_info;
+} debug_event_t;
+
+
+enum cpu_type
+{
+    CPU_x86, CPU_x86_64, CPU_ALPHA, CPU_POWERPC, CPU_SPARC
+};
+typedef int cpu_type_t;
 
 
 typedef struct
 {
-    int                      code;
-    union debug_event_data   info;
-} debug_event_t;
+    cpu_type_t       cpu;
+    unsigned int     flags;
+    union
+    {
+        struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
+        struct { unsigned __int64 rip, rbp, rsp;
+                 unsigned int cs, ss, flags, mxcsr; } x86_64_regs;
+        struct { unsigned __int64 fir;
+                 unsigned int psr; } alpha_regs;
+        struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap; } powerpc_regs;
+        struct { unsigned int psr, pc, npc, y, wim, tbr; } sparc_regs;
+    } ctl;
+    union
+    {
+        struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
+        struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
+                                  r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
+        struct { unsigned __int64 v0, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12,
+                                  s0, s1, s2, s3, s4, s5, s6, a0, a1, a2, a3, a4, a5, at; } alpha_regs;
+        struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
+        struct { unsigned int g[8], o[8], l[8], i[8]; } sparc_regs;
+    } integer;
+    union
+    {
+        struct { unsigned int ds, es, fs, gs; } i386_regs;
+        struct { unsigned int ds, es, fs, gs; } x86_64_regs;
+    } seg;
+    union
+    {
+        struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
+                 unsigned char regs[80]; } i386_regs;
+        struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
+        struct { unsigned __int64 f[32], fpcr, softfpcr; } alpha_regs;
+        struct { double fpr[32], fpscr; } powerpc_regs;
+    } fp;
+    union
+    {
+        struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
+        struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
+        struct { unsigned int dr[8]; } powerpc_regs;
+    } debug;
+    union
+    {
+        unsigned char i386_regs[512];
+    } ext;
+} context_t;
+
+#define SERVER_CTX_CONTROL            0x01
+#define SERVER_CTX_INTEGER            0x02
+#define SERVER_CTX_SEGMENTS           0x04
+#define SERVER_CTX_FLOATING_POINT     0x08
+#define SERVER_CTX_DEBUG_REGISTERS    0x10
+#define SERVER_CTX_EXTENDED_REGISTERS 0x20
 
 
@@ -131,6 +211,7 @@
 struct wake_up_reply
 {
-    void *cookie;
-    int   signaled;
+    client_ptr_t cookie;
+    int          signaled;
+    int          __pad;
 };
 
@@ -143,6 +224,6 @@
 {
     atom_t         atom;
-    short          string;
-    obj_handle_t   handle;
+    int            string;
+    lparam_t       data;
 } property_data_t;
 
@@ -159,19 +240,28 @@
 typedef struct
 {
-    void           *callback;
-    void           *iosb;
-    void           *arg;
-    void           *apc;
+    obj_handle_t    handle;
     obj_handle_t    event;
-    unsigned long   cvalue;
+    client_ptr_t    callback;
+    client_ptr_t    iosb;
+    client_ptr_t    arg;
+    apc_param_t     cvalue;
 } async_data_t;
 
 
 
+struct hardware_msg_data
+{
+    lparam_t        info;
+    int             x;
+    int             y;
+    unsigned int    hw_id;
+    int             __pad;
+};
+
 struct callback_msg_data
 {
-    void           *callback;
-    unsigned long   data;
-    unsigned long   result;
+    client_ptr_t    callback;
+    lparam_t        data;
+    lparam_t        result;
 };
 
@@ -180,5 +270,5 @@
     user_handle_t   hook;
     thread_id_t     tid;
-    void           *hook_proc;
+    client_ptr_t    hook_proc;
 
 };
@@ -187,4 +277,5 @@
 {
     unsigned char            bytes[1];
+    struct hardware_msg_data hardware;
     struct callback_msg_data callback;
     struct winevent_msg_data winevent;
@@ -259,29 +350,31 @@
     {
         enum apc_type    type;
-        void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
-        unsigned long    args[3];
+        int              __pad;
+        client_ptr_t     func;
+        apc_param_t      args[3];
     } user;
     struct
     {
-        enum apc_type   type;
-        void (__stdcall *func)(void*, unsigned int, unsigned int);
+        enum apc_type    type;
+        int              __pad;
+        client_ptr_t     func;
         timeout_t        time;
-        void            *arg;
+        client_ptr_t     arg;
     } timer;
     struct
     {
         enum apc_type    type;
-        unsigned int   (*func)(void*, void*, unsigned int, unsigned long *);
-        void            *user;
-        void            *sb;
         unsigned int     status;
+        client_ptr_t     func;
+        client_ptr_t     user;
+        client_ptr_t     sb;
     } async_io;
     struct
     {
         enum apc_type    type;
-        void            *addr;
-        unsigned long    size;
+        unsigned int     op_type;
+        client_ptr_t     addr;
+        mem_size_t       size;
         unsigned int     zero_bits;
-        unsigned int     op_type;
         unsigned int     prot;
     } virtual_alloc;
@@ -289,37 +382,41 @@
     {
         enum apc_type    type;
-        void            *addr;
-        unsigned long    size;
         unsigned int     op_type;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_free;
     struct
     {
         enum apc_type    type;
-        const void      *addr;
+        int              __pad;
+        client_ptr_t     addr;
     } virtual_query;
     struct
     {
         enum apc_type    type;
-        void            *addr;
-        unsigned long    size;
         unsigned int     prot;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_protect;
     struct
     {
         enum apc_type    type;
-        const void      *addr;
-        unsigned long    size;
+        int              __pad;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_flush;
     struct
     {
         enum apc_type    type;
-        void            *addr;
-        unsigned long    size;
+        int              __pad;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_lock;
     struct
     {
         enum apc_type    type;
-        void            *addr;
-        unsigned long    size;
+        int              __pad;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_unlock;
     struct
@@ -327,24 +424,25 @@
         enum apc_type    type;
         obj_handle_t     handle;
-        void            *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
         file_pos_t       offset;
-        unsigned int     zero_bits;
         unsigned int     alloc_type;
-        unsigned int     prot;
+        unsigned short   zero_bits;
+        unsigned short   prot;
     } map_view;
     struct
     {
         enum apc_type    type;
-        void            *addr;
+        int              __pad;
+        client_ptr_t     addr;
     } unmap_view;
     struct
     {
         enum apc_type    type;
-        void (__stdcall *func)(void*);
-        void            *arg;
-        unsigned long    reserve;
-        unsigned long    commit;
         int              suspend;
+        client_ptr_t     func;
+        client_ptr_t     arg;
+        mem_size_t       reserve;
+        mem_size_t       commit;
     } create_thread;
 } apc_call_t;
@@ -357,5 +455,6 @@
         enum apc_type    type;
         unsigned int     status;
-        unsigned long    total;
+        client_ptr_t     apc;
+        unsigned int     total;
     } async_io;
     struct
@@ -363,6 +462,6 @@
         enum apc_type    type;
         unsigned int     status;
-        void            *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_alloc;
     struct
@@ -370,6 +469,6 @@
         enum apc_type    type;
         unsigned int     status;
-        void            *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_free;
     struct
@@ -377,11 +476,11 @@
         enum apc_type    type;
         unsigned int     status;
-        void            *base;
-        void            *alloc_base;
-        unsigned long    size;
-        unsigned int     state;
-        unsigned int     prot;
-        unsigned int     alloc_prot;
-        unsigned int     alloc_type;
+        client_ptr_t     base;
+        client_ptr_t     alloc_base;
+        mem_size_t       size;
+        unsigned short   state;
+        unsigned short   prot;
+        unsigned short   alloc_prot;
+        unsigned short   alloc_type;
     } virtual_query;
     struct
@@ -389,6 +488,6 @@
         enum apc_type    type;
         unsigned int     status;
-        void            *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
         unsigned int     prot;
     } virtual_protect;
@@ -397,6 +496,6 @@
         enum apc_type    type;
         unsigned int     status;
-        const void      *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_flush;
     struct
@@ -404,6 +503,6 @@
         enum apc_type    type;
         unsigned int     status;
-        void            *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_lock;
     struct
@@ -411,6 +510,6 @@
         enum apc_type    type;
         unsigned int     status;
-        void            *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } virtual_unlock;
     struct
@@ -418,6 +517,6 @@
         enum apc_type    type;
         unsigned int     status;
-        void            *addr;
-        unsigned long    size;
+        client_ptr_t     addr;
+        mem_size_t       size;
     } map_view;
     struct
@@ -464,4 +563,5 @@
     thread_id_t  tid;
     obj_handle_t thandle;
+    char __pad_28[4];
 };
 
@@ -519,7 +619,8 @@
 {
     struct request_header __header;
-    void*        module;
-    void*        entry;
     int          gui;
+    mod_handle_t module;
+    client_ptr_t ldt_copy;
+    client_ptr_t entry;
 };
 struct init_process_done_reply
@@ -536,10 +637,9 @@
     int          unix_tid;
     int          debug_level;
-    void*        teb;
-    void*        peb;
-    void*        entry;
-    void*        ldt_copy;
+    client_ptr_t teb;
+    client_ptr_t entry;
     int          reply_fd;
     int          wait_fd;
+    cpu_type_t   cpu;
 };
 struct init_thread_reply
@@ -548,7 +648,9 @@
     process_id_t pid;
     thread_id_t  tid;
+    timeout_t    server_start;
     data_size_t  info_size;
-    timeout_t    server_start;
     int          version;
+    unsigned int all_cpus;
+    char __pad_36[4];
 };
 
@@ -565,4 +667,5 @@
     struct reply_header __header;
     int          self;
+    char __pad_12[4];
 };
 
@@ -594,10 +697,10 @@
     process_id_t pid;
     process_id_t ppid;
+    affinity_t   affinity;
+    client_ptr_t peb;
+    timeout_t    start_time;
+    timeout_t    end_time;
     int          exit_code;
     int          priority;
-    unsigned int affinity;
-    void*        peb;
-    timeout_t    start_time;
-    timeout_t    end_time;
 };
 
@@ -610,5 +713,5 @@
     int          mask;
     int          priority;
-    unsigned int affinity;
+    affinity_t   affinity;
 };
 struct set_process_info_reply
@@ -632,11 +735,12 @@
     process_id_t pid;
     thread_id_t  tid;
-    void*        teb;
+    client_ptr_t teb;
+    affinity_t   affinity;
+    timeout_t    creation_time;
+    timeout_t    exit_time;
     int          exit_code;
     int          priority;
-    unsigned int affinity;
-    timeout_t    creation_time;
-    timeout_t    exit_time;
     int          last;
+    char __pad_60[4];
 };
 
@@ -649,6 +753,7 @@
     int          mask;
     int          priority;
-    unsigned int affinity;
+    affinity_t   affinity;
     obj_handle_t token;
+    char __pad_36[4];
 };
 struct set_thread_info_reply
@@ -666,11 +771,11 @@
     struct request_header __header;
     obj_handle_t handle;
-    void*        base_address;
+    mod_handle_t base_address;
 };
 struct get_dll_info_reply
 {
     struct reply_header __header;
-    size_t       size;
-    void*        entry_point;
+    client_ptr_t entry_point;
+    data_size_t  size;
     data_size_t  filename_len;
     /* VARARG(filename,unicode_str); */
@@ -688,4 +793,5 @@
     struct reply_header __header;
     int          count;
+    char __pad_12[4];
 };
 
@@ -701,4 +807,5 @@
     struct reply_header __header;
     int          count;
+    char __pad_12[4];
 };
 
@@ -709,10 +816,11 @@
     struct request_header __header;
     obj_handle_t handle;
-    void*        base;
-    size_t       size;
+    mod_handle_t base;
+    client_ptr_t name;
+    data_size_t  size;
     int          dbg_offset;
     int          dbg_size;
-    void*        name;
     /* VARARG(filename,unicode_str); */
+    char __pad_44[4];
 };
 struct load_dll_reply
@@ -726,5 +834,6 @@
 {
     struct request_header __header;
-    void*        base;
+    char __pad_12[4];
+    mod_handle_t base;
 };
 struct unload_dll_reply
@@ -738,6 +847,5 @@
 {
     struct request_header __header;
-    obj_handle_t thread;
-    obj_handle_t process;
+    obj_handle_t handle;
     apc_call_t   call;
 };
@@ -787,4 +895,5 @@
     struct reply_header __header;
     int          old_flags;
+    char __pad_12[4];
 };
 
@@ -807,4 +916,5 @@
     int          self;
     int          closed;
+    char __pad_20[4];
 };
 #define DUP_HANDLE_CLOSE_SOURCE  DUPLICATE_CLOSE_SOURCE
@@ -825,4 +935,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -840,4 +951,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -848,5 +960,5 @@
     struct request_header __header;
     int          flags;
-    void*        cookie;
+    client_ptr_t cookie;
     obj_handle_t signal;
     obj_handle_t prev_apc;
@@ -858,7 +970,8 @@
 {
     struct reply_header __header;
-    obj_handle_t apc_handle;
     timeout_t    timeout;
     apc_call_t   call;
+    obj_handle_t apc_handle;
+    char __pad_60[4];
 };
 #define SELECT_ALL           1
@@ -881,4 +994,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -889,4 +1003,5 @@
     obj_handle_t  handle;
     int           op;
+    char __pad_20[4];
 };
 struct event_op_reply
@@ -910,4 +1025,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -926,4 +1042,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -939,4 +1056,5 @@
     struct reply_header __header;
     unsigned int prev_count;
+    char __pad_12[4];
 };
 
@@ -955,4 +1073,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -972,4 +1091,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -986,4 +1106,5 @@
     struct reply_header __header;
     unsigned int prev_count;
+    char __pad_12[4];
 };
 
@@ -1002,4 +1123,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1022,4 +1144,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1040,4 +1163,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1055,4 +1179,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1097,4 +1222,5 @@
     struct reply_header __header;
     obj_handle_t event;
+    char __pad_12[4];
 };
 
@@ -1147,4 +1273,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1162,4 +1289,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1196,4 +1324,5 @@
     unsigned int state;
     /* VARARG(errors,ints); */
+    char __pad_20[4];
 };
 
@@ -1207,4 +1336,5 @@
     unsigned int sstate;
     unsigned int cstate;
+    char __pad_28[4];
 };
 struct enable_socket_event_reply
@@ -1218,4 +1348,5 @@
     obj_handle_t handle;
     obj_handle_t deferred;
+    char __pad_20[4];
 };
 struct set_socket_deferred_reply
@@ -1244,4 +1375,5 @@
 {
     struct request_header __header;
+    char __pad_12[4];
 };
 struct free_console_reply
@@ -1322,4 +1454,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1334,4 +1467,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1346,4 +1480,5 @@
     struct reply_header __header;
     int          mode;
+    char __pad_12[4];
 };
 
@@ -1355,4 +1490,5 @@
     obj_handle_t handle;
     int          mode;
+    char __pad_20[4];
 };
 struct set_console_mode_reply
@@ -1408,4 +1544,5 @@
     user_handle_t win;
     /* VARARG(title,unicode_str); */
+    char __pad_36[4];
 };
 
@@ -1436,4 +1573,5 @@
     int          total;
     /* VARARG(line,unicode_str); */
+    char __pad_12[4];
 };
 
@@ -1452,4 +1590,5 @@
     struct reply_header __header;
     obj_handle_t handle_out;
+    char __pad_12[4];
 };
 
@@ -1474,4 +1613,5 @@
     short int    max_width;
     short int    max_height;
+    char __pad_46[2];
 };
 struct set_console_output_info_reply
@@ -1509,4 +1649,5 @@
     short int    max_width;
     short int    max_height;
+    char __pad_34[6];
 };
 
@@ -1522,4 +1663,5 @@
     struct reply_header __header;
     int          written;
+    char __pad_12[4];
 };
 
@@ -1537,4 +1679,5 @@
     int          read;
     /* VARARG(rec,input_records); */
+    char __pad_12[4];
 };
 
@@ -1557,4 +1700,5 @@
     int          width;
     int          height;
+    char __pad_20[4];
 };
 enum char_info_mode
@@ -1583,4 +1727,5 @@
     struct reply_header __header;
     int          written;
+    char __pad_12[4];
 };
 
@@ -1616,4 +1761,5 @@
     short int    w;
     short int    h;
+    char __pad_28[4];
 };
 struct move_console_output_reply
@@ -1629,4 +1775,5 @@
     int          signal;
     process_id_t group_id;
+    char __pad_20[4];
 };
 struct send_console_signal_reply
@@ -1641,5 +1788,4 @@
     struct request_header __header;
     unsigned int filter;
-    obj_handle_t handle;
     int          subtree;
     int          want_data;
@@ -1662,4 +1808,5 @@
     int          action;
     /* VARARG(name,string); */
+    char __pad_12[4];
 };
 
@@ -1671,6 +1818,6 @@
     unsigned int access;
     unsigned int attributes;
-    file_pos_t   size;
     unsigned int protect;
+    mem_size_t   size;
     obj_handle_t file_handle;
     /* VARARG(objattr,object_attributes); */
@@ -1680,4 +1827,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1710,4 +1858,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1723,8 +1872,8 @@
 {
     struct reply_header __header;
-    file_pos_t   size;
+    mem_size_t   size;
     int          protect;
     int          header_size;
-    void*        base;
+    client_ptr_t base;
     obj_handle_t mapping;
     obj_handle_t shared_file;
@@ -1742,6 +1891,7 @@
 {
     struct reply_header __header;
-    file_pos_t   size;
+    mem_size_t   size;
     int          committed;
+    char __pad_20[4];
 };
 
@@ -1753,5 +1903,5 @@
     obj_handle_t handle;
     file_pos_t   offset;
-    file_pos_t   size;
+    mem_size_t   size;
 };
 struct add_mapping_committed_range_reply
@@ -1761,8 +1911,6 @@
 
 
-#define SNAP_HEAPLIST   0x00000001
-#define SNAP_PROCESS    0x00000002
-#define SNAP_THREAD     0x00000004
-#define SNAP_MODULE     0x00000008
+#define SNAP_PROCESS    0x00000001
+#define SNAP_THREAD     0x00000002
 
 struct create_snapshot_request
@@ -1770,6 +1918,5 @@
     struct request_header __header;
     unsigned int attributes;
-    int          flags;
-    process_id_t pid;
+    unsigned int flags;
 };
 struct create_snapshot_reply
@@ -1777,4 +1924,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -1793,6 +1941,4 @@
     process_id_t pid;
     process_id_t ppid;
-    void*        heap;
-    void*        module;
     int          threads;
     int          priority;
@@ -1817,21 +1963,5 @@
     int          base_pri;
     int          delta_pri;
-};
-
-
-
-struct next_module_request
-{
-    struct request_header __header;
-    obj_handle_t handle;
-    int          reset;
-};
-struct next_module_reply
-{
-    struct reply_header __header;
-    process_id_t pid;
-    void*        base;
-    size_t       size;
-    /* VARARG(filename,unicode_str); */
+    char __pad_28[4];
 };
 
@@ -1850,4 +1980,5 @@
     obj_handle_t  wait;
     /* VARARG(event,debug_event); */
+    char __pad_20[4];
 };
 
@@ -1857,6 +1988,12 @@
 {
     struct request_header __header;
-    int              first;
-    /* VARARG(record,exc_event); */
+    int           first;
+    unsigned int  code;
+    unsigned int  flags;
+    client_ptr_t  record;
+    client_ptr_t  address;
+    data_size_t   len;
+    /* VARARG(params,uints64,len); */
+    /* VARARG(context,context); */
 };
 struct queue_exception_event_reply
@@ -1864,4 +2001,5 @@
     struct reply_header __header;
     obj_handle_t     handle;
+    char __pad_12[4];
 };
 
@@ -1884,7 +2022,8 @@
 {
     struct request_header __header;
-    void*         string;
+    data_size_t   length;
+    client_ptr_t  string;
     int           unicode;
-    int           length;
+    char __pad_28[4];
 };
 struct output_debug_string_reply
@@ -1914,4 +2053,5 @@
     process_id_t pid;
     int          attach;
+    char __pad_20[4];
 };
 struct debug_process_reply
@@ -1931,4 +2071,5 @@
     struct reply_header __header;
     int          self;
+    char __pad_12[4];
 };
 
@@ -1951,5 +2092,5 @@
     struct request_header __header;
     obj_handle_t handle;
-    void*        addr;
+    client_ptr_t addr;
 };
 struct read_process_memory_reply
@@ -1965,5 +2106,5 @@
     struct request_header __header;
     obj_handle_t handle;
-    void*        addr;
+    client_ptr_t addr;
     /* VARARG(data,bytes); */
 };
@@ -1982,5 +2123,4 @@
     unsigned int attributes;
     unsigned int options;
-    time_t       modif;
     data_size_t  namelen;
     /* VARARG(name,unicode_str,namelen); */
@@ -2007,4 +2147,5 @@
     struct reply_header __header;
     obj_handle_t hkey;
+    char __pad_12[4];
 };
 
@@ -2051,5 +2192,5 @@
     int          max_value;
     int          max_data;
-    time_t       modif;
+    timeout_t    modif;
     data_size_t  total;
     data_size_t  namelen;
@@ -2107,4 +2248,5 @@
     /* VARARG(name,unicode_str,namelen); */
     /* VARARG(data,bytes); */
+    char __pad_20[4];
 };
 
@@ -2130,4 +2272,5 @@
     obj_handle_t file;
     /* VARARG(name,unicode_str); */
+    char __pad_20[4];
 };
 struct load_registry_reply
@@ -2155,4 +2298,5 @@
     obj_handle_t hkey;
     obj_handle_t file;
+    char __pad_20[4];
 };
 struct save_registry_reply
@@ -2170,4 +2314,5 @@
     int          subtree;
     unsigned int filter;
+    char __pad_28[4];
 };
 struct set_registry_notification_reply
@@ -2191,4 +2336,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -2207,4 +2353,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -2215,7 +2362,7 @@
     obj_handle_t handle;
     timeout_t    expire;
+    client_ptr_t callback;
+    client_ptr_t arg;
     int          period;
-    void*        callback;
-    void*        arg;
 };
 struct set_timer_reply
@@ -2223,4 +2370,5 @@
     struct reply_header __header;
     int          signaled;
+    char __pad_12[4];
 };
 
@@ -2235,4 +2383,5 @@
     struct reply_header __header;
      int         signaled;
+    char __pad_12[4];
 };
 
@@ -2248,4 +2397,5 @@
     timeout_t    when;
     int          signaled;
+    char __pad_20[4];
 };
 
@@ -2264,4 +2414,5 @@
     int          self;
     /* VARARG(context,context); */
+    char __pad_12[4];
 };
 
@@ -2272,5 +2423,4 @@
     struct request_header __header;
     obj_handle_t handle;
-    unsigned int flags;
     int          suspend;
     /* VARARG(context,context); */
@@ -2280,4 +2430,5 @@
     struct reply_header __header;
     int          self;
+    char __pad_12[4];
 };
 
@@ -2296,4 +2447,5 @@
     unsigned int  limit;
     unsigned char flags;
+    char __pad_17[7];
 };
 
@@ -2310,4 +2462,5 @@
     struct reply_header __header;
     atom_t        atom;
+    char __pad_12[4];
 };
 
@@ -2319,4 +2472,5 @@
     obj_handle_t  table;
     atom_t        atom;
+    char __pad_20[4];
 };
 struct delete_atom_reply
@@ -2337,4 +2491,5 @@
     struct reply_header __header;
     atom_t       atom;
+    char __pad_12[4];
 };
 
@@ -2354,4 +2509,5 @@
     data_size_t  total;
     /* VARARG(name,unicode_str); */
+    char __pad_20[4];
 };
 
@@ -2377,4 +2533,5 @@
     obj_handle_t table;
     int          if_pinned;
+    char __pad_20[4];
 };
 struct empty_atom_table_reply
@@ -2394,4 +2551,5 @@
     struct reply_header __header;
     obj_handle_t table;
+    char __pad_12[4];
 };
 
@@ -2406,4 +2564,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -2461,4 +2620,5 @@
     struct reply_header __header;
     obj_handle_t event;
+    char __pad_12[4];
 };
 
@@ -2473,6 +2633,6 @@
     user_handle_t   win;
     unsigned int    msg;
-    unsigned long   wparam;
-    unsigned long   lparam;
+    lparam_t        wparam;
+    lparam_t        lparam;
     timeout_t       timeout;
     /* VARARG(data,message_data); */
@@ -2515,10 +2675,11 @@
     user_handle_t   win;
     unsigned int    msg;
-    unsigned int    time;
-    unsigned long   wparam;
-    unsigned long   lparam;
-    unsigned long   info;
+    lparam_t        wparam;
+    lparam_t        lparam;
+    lparam_t        info;
     int             x;
     int             y;
+    unsigned int    time;
+    char __pad_60[4];
 };
 struct send_hardware_message_reply
@@ -2544,13 +2705,9 @@
     struct reply_header __header;
     user_handle_t   win;
+    unsigned int    msg;
+    lparam_t        wparam;
+    lparam_t        lparam;
     int             type;
-    unsigned int    msg;
-    unsigned long   wparam;
-    unsigned long   lparam;
-    unsigned long   info;
-    int             x;
-    int             y;
     unsigned int    time;
-    unsigned int    hw_id;
     unsigned int    active_hooks;
     data_size_t     total;
@@ -2563,6 +2720,6 @@
 {
     struct request_header __header;
-    unsigned long   result;
     int             remove;
+    lparam_t        result;
     /* VARARG(data,bytes); */
 };
@@ -2596,5 +2753,5 @@
 {
     struct reply_header __header;
-    unsigned long   result;
+    lparam_t        result;
     /* VARARG(data,bytes); */
 };
@@ -2608,11 +2765,11 @@
     unsigned int    msg;
     unsigned int    rate;
-    unsigned long   id;
-    unsigned long   lparam;
+    lparam_t        id;
+    lparam_t        lparam;
 };
 struct set_win_timer_reply
 {
     struct reply_header __header;
-    unsigned long   id;
+    lparam_t        id;
 };
 
@@ -2623,6 +2780,7 @@
     struct request_header __header;
     user_handle_t   win;
+    lparam_t        id;
     unsigned int    msg;
-    unsigned long   id;
+    char __pad_28[4];
 };
 struct kill_win_timer_reply
@@ -2642,4 +2800,5 @@
     struct reply_header __header;
     int is_hung;
+    char __pad_12[4];
 };
 
@@ -2675,4 +2834,5 @@
     unsigned int writemult;
     unsigned int eventmask;
+    char __pad_44[4];
 };
 struct set_serial_info_reply
@@ -2688,8 +2848,8 @@
 {
     struct request_header __header;
-    obj_handle_t handle;
     int          type;
+    async_data_t async;
     int          count;
-    async_data_t async;
+    char __pad_60[4];
 };
 struct register_async_reply
@@ -2718,7 +2878,7 @@
 {
     struct request_header __header;
-    obj_handle_t   handle;
     ioctl_code_t   code;
     async_data_t   async;
+    int            blocking;
     /* VARARG(in_data,bytes); */
 };
@@ -2737,5 +2897,5 @@
     struct request_header __header;
     obj_handle_t   handle;
-    void*          user_arg;
+    client_ptr_t   user_arg;
 };
 struct get_ioctl_result_reply
@@ -2754,9 +2914,9 @@
     obj_handle_t   rootdir;
     unsigned int   options;
-    unsigned int   flags;
     unsigned int   maxinstances;
     unsigned int   outsize;
     unsigned int   insize;
     timeout_t      timeout;
+    unsigned int   flags;
     /* VARARG(name,unicode_str); */
 };
@@ -2765,4 +2925,5 @@
     struct reply_header __header;
     obj_handle_t   handle;
+    char __pad_12[4];
 };
 
@@ -2787,4 +2948,5 @@
     unsigned int   outsize;
     unsigned int   insize;
+    char __pad_28[4];
 };
 
@@ -2797,5 +2959,5 @@
     user_handle_t  owner;
     atom_t         atom;
-    void*          instance;
+    mod_handle_t   instance;
     /* VARARG(class,unicode_str); */
 };
@@ -2807,5 +2969,5 @@
     user_handle_t  owner;
     int            extra;
-    void*          class_ptr;
+    client_ptr_t   class_ptr;
 };
 
@@ -2874,15 +3036,15 @@
 {
     struct request_header __header;
-    unsigned int   flags;
+    unsigned short flags;
+    short int      is_unicode;
     user_handle_t  handle;
     unsigned int   style;
     unsigned int   ex_style;
     unsigned int   id;
-    int            is_unicode;
-    void*          instance;
-    unsigned long  user_data;
+    mod_handle_t   instance;
+    lparam_t       user_data;
     int            extra_offset;
     data_size_t    extra_size;
-    unsigned long  extra_value;
+    lparam_t       extra_value;
 };
 struct set_window_info_reply
@@ -2891,8 +3053,9 @@
     unsigned int   old_style;
     unsigned int   old_ex_style;
+    mod_handle_t   old_instance;
+    lparam_t       old_user_data;
+    lparam_t       old_extra_value;
     unsigned int   old_id;
-    void*          old_instance;
-    unsigned long  old_user_data;
-    unsigned long  old_extra_value;
+    char __pad_44[4];
 };
 #define SET_WIN_STYLE     0x01
@@ -2931,4 +3094,5 @@
     int            count;
     /* VARARG(parents,user_handles); */
+    char __pad_12[4];
 };
 
@@ -2949,4 +3113,5 @@
     int            count;
     /* VARARG(children,user_handles); */
+    char __pad_12[4];
 };
 
@@ -2965,4 +3130,5 @@
     int            count;
     /* VARARG(children,user_handles); */
+    char __pad_12[4];
 };
 
@@ -3091,4 +3257,5 @@
     data_size_t    total_size;
     /* VARARG(region,rectangles); */
+    char __pad_12[4];
 };
 
@@ -3101,4 +3268,5 @@
     int            redraw;
     /* VARARG(region,rectangles); */
+    char __pad_20[4];
 };
 struct set_window_region_reply
@@ -3123,4 +3291,5 @@
     data_size_t    total_size;
     /* VARARG(region,rectangles); */
+    char __pad_20[4];
 };
 #define UPDATE_NONCLIENT       0x01
@@ -3154,4 +3323,5 @@
     unsigned int   flags;
     /* VARARG(region,rectangles); */
+    char __pad_20[4];
 };
 struct redraw_window_reply
@@ -3166,7 +3336,8 @@
     struct request_header __header;
     user_handle_t  window;
+    lparam_t       data;
     atom_t         atom;
-    obj_handle_t   handle;
     /* VARARG(name,unicode_str); */
+    char __pad_28[4];
 };
 struct set_window_property_reply
@@ -3187,5 +3358,5 @@
 {
     struct reply_header __header;
-    obj_handle_t   handle;
+    lparam_t       data;
 };
 
@@ -3202,5 +3373,5 @@
 {
     struct reply_header __header;
-    obj_handle_t   handle;
+    lparam_t       data;
 };
 
@@ -3217,4 +3388,5 @@
     int            total;
     /* VARARG(props,properties); */
+    char __pad_12[4];
 };
 
@@ -3233,4 +3405,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -3248,4 +3421,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -3272,4 +3446,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -3298,4 +3473,5 @@
     unsigned int next;
     /* VARARG(name,unicode_str); */
+    char __pad_12[4];
 };
 
@@ -3314,4 +3490,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -3331,4 +3508,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -3356,4 +3534,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -3383,4 +3562,5 @@
     unsigned int next;
     /* VARARG(name,unicode_str); */
+    char __pad_12[4];
 };
 
@@ -3435,4 +3615,5 @@
     user_handle_t  caret;
     rectangle_t    rect;
+    char __pad_52[4];
 };
 
@@ -3447,4 +3628,5 @@
     struct reply_header __header;
     unsigned int time;
+    char __pad_12[4];
 };
 
@@ -3462,4 +3644,5 @@
     unsigned char  state;
     /* VARARG(keystate,bytes); */
+    char __pad_9[7];
 };
 
@@ -3488,4 +3671,5 @@
     int            send_msg_old;
     int            send_msg_new;
+    char __pad_20[4];
 };
 
@@ -3500,4 +3684,5 @@
     struct reply_header __header;
     user_handle_t  previous;
+    char __pad_12[4];
 };
 
@@ -3512,4 +3697,5 @@
     struct reply_header __header;
     user_handle_t  previous;
+    char __pad_12[4];
 };
 
@@ -3546,4 +3732,5 @@
     int            old_hide;
     int            old_state;
+    char __pad_36[4];
 };
 
@@ -3567,4 +3754,5 @@
     int            old_hide;
     int            old_state;
+    char __pad_36[4];
 };
 #define SET_CARET_POS        0x01
@@ -3582,6 +3770,6 @@
     int            event_min;
     int            event_max;
+    client_ptr_t   proc;
     int            flags;
-    void*          proc;
     int            unicode;
     /* VARARG(module,unicode_str); */
@@ -3600,6 +3788,6 @@
     struct request_header __header;
     user_handle_t  handle;
+    client_ptr_t   proc;
     int            id;
-    void*          proc;
 };
 struct remove_hook_reply
@@ -3607,4 +3795,5 @@
     struct reply_header __header;
     unsigned int   active_hooks;
+    char __pad_12[4];
 };
 
@@ -3626,8 +3815,9 @@
     process_id_t   pid;
     thread_id_t    tid;
-    void*          proc;
     int            unicode;
+    client_ptr_t   proc;
     unsigned int   active_hooks;
     /* VARARG(module,unicode_str); */
+    char __pad_36[4];
 };
 
@@ -3663,7 +3853,8 @@
     process_id_t   pid;
     thread_id_t    tid;
-    void*          proc;
+    client_ptr_t   proc;
     int            unicode;
     /* VARARG(module,unicode_str); */
+    char __pad_36[4];
 };
 
@@ -3676,8 +3867,8 @@
     atom_t         atom;
     unsigned int   style;
-    void*          instance;
+    mod_handle_t   instance;
     int            extra;
     int            win_extra;
-    void*          client_ptr;
+    client_ptr_t   client_ptr;
     /* VARARG(name,unicode_str); */
 };
@@ -3686,4 +3877,5 @@
     struct reply_header __header;
     atom_t         atom;
+    char __pad_12[4];
 };
 
@@ -3694,5 +3886,5 @@
     struct request_header __header;
     atom_t         atom;
-    void*          instance;
+    mod_handle_t   instance;
     /* VARARG(name,unicode_str); */
 };
@@ -3700,5 +3892,5 @@
 {
     struct reply_header __header;
-    void*          client_ptr;
+    client_ptr_t   client_ptr;
 };
 
@@ -3713,8 +3905,8 @@
     unsigned int   style;
     int            win_extra;
-    void*          instance;
+    mod_handle_t   instance;
     int            extra_offset;
     data_size_t    extra_size;
-    unsigned long  extra_value;
+    lparam_t       extra_value;
 };
 struct set_class_info_reply
@@ -3725,6 +3917,6 @@
     int            old_extra;
     int            old_win_extra;
-    void*          old_instance;
-    unsigned long  old_extra_value;
+    mod_handle_t   old_instance;
+    lparam_t       old_extra_value;
 };
 #define SET_CLASS_ATOM      0x0001
@@ -3753,4 +3945,5 @@
     user_handle_t  old_viewer;
     unsigned int   seqno;
+    char __pad_28[4];
 };
 
@@ -3779,4 +3972,5 @@
     struct reply_header __header;
     obj_handle_t   token;
+    char __pad_12[4];
 };
 #define OPEN_TOKEN_THREAD   1
@@ -3820,4 +4014,5 @@
     unsigned int  len;
     /* VARARG(privileges,LUID_AND_ATTRIBUTES); */
+    char __pad_12[4];
 };
 
@@ -3833,4 +4028,5 @@
     unsigned int  len;
     /* VARARG(privileges,LUID_AND_ATTRIBUTES); */
+    char __pad_12[4];
 };
 
@@ -3848,4 +4044,5 @@
     int           has_privileges;
     /* VARARG(privileges,LUID_AND_ATTRIBUTES); */
+    char __pad_12[4];
 };
 
@@ -3863,4 +4060,5 @@
     struct reply_header __header;
     obj_handle_t  new_handle;
+    char __pad_12[4];
 };
 
@@ -3883,4 +4081,5 @@
     unsigned int    privileges_len;
     /* VARARG(privileges,LUID_AND_ATTRIBUTES); */
+    char __pad_20[4];
 };
 
@@ -3895,4 +4094,5 @@
     data_size_t     user_len;
     /* VARARG(user,SID); */
+    char __pad_12[4];
 };
 
@@ -3907,4 +4107,29 @@
     data_size_t     user_len;
     /* VARARG(user,token_groups); */
+    char __pad_12[4];
+};
+
+struct get_token_default_dacl_request
+{
+    struct request_header __header;
+    obj_handle_t    handle;
+};
+struct get_token_default_dacl_reply
+{
+    struct reply_header __header;
+    data_size_t     acl_len;
+    /* VARARG(acl,ACL); */
+    char __pad_12[4];
+};
+
+struct set_token_default_dacl_request
+{
+    struct request_header __header;
+    obj_handle_t    handle;
+    /* VARARG(acl,ACL); */
+};
+struct set_token_default_dacl_reply
+{
+    struct reply_header __header;
 };
 
@@ -3915,4 +4140,5 @@
     unsigned int    security_info;
     /* VARARG(sd,security_descriptor); */
+    char __pad_20[4];
 };
 struct set_security_object_reply
@@ -3932,4 +4158,5 @@
     unsigned int    sd_len;
     /* VARARG(sd,security_descriptor); */
+    char __pad_12[4];
 };
 
@@ -3941,28 +4168,30 @@
     unsigned int   attributes;
     obj_handle_t   rootdir;
+    timeout_t      read_timeout;
     unsigned int   max_msgsize;
+    /* VARARG(name,unicode_str); */
+};
+struct create_mailslot_reply
+{
+    struct reply_header __header;
+    obj_handle_t   handle;
+    char __pad_12[4];
+};
+
+
+
+struct set_mailslot_info_request
+{
+    struct request_header __header;
+    obj_handle_t   handle;
     timeout_t      read_timeout;
-    /* VARARG(name,unicode_str); */
-};
-struct create_mailslot_reply
-{
-    struct reply_header __header;
-    obj_handle_t   handle;
-};
-
-
-
-struct set_mailslot_info_request
-{
-    struct request_header __header;
-    obj_handle_t   handle;
     unsigned int   flags;
+};
+struct set_mailslot_info_reply
+{
+    struct reply_header __header;
     timeout_t      read_timeout;
-};
-struct set_mailslot_info_reply
-{
-    struct reply_header __header;
     unsigned int   max_msgsize;
-    timeout_t      read_timeout;
+    char __pad_20[4];
 };
 #define MAILSLOT_SET_READ_TIMEOUT  1
@@ -3982,4 +4211,5 @@
     struct reply_header __header;
     obj_handle_t   handle;
+    char __pad_12[4];
 };
 
@@ -3998,4 +4228,5 @@
     struct reply_header __header;
     obj_handle_t   handle;
+    char __pad_12[4];
 };
 
@@ -4011,7 +4242,8 @@
 {
     struct reply_header __header;
-    size_t         name_len;
+    data_size_t    name_len;
     /* VARARG(name,unicode_str,name_len); */
     /* VARARG(type,unicode_str); */
+    char __pad_12[4];
 };
 
@@ -4032,4 +4264,5 @@
     struct reply_header __header;
     obj_handle_t   handle;
+    char __pad_12[4];
 };
 
@@ -4048,4 +4281,5 @@
     struct reply_header __header;
     obj_handle_t   handle;
+    char __pad_12[4];
 };
 
@@ -4100,4 +4334,5 @@
     struct reply_header __header;
     int            impersonation_level;
+    char __pad_12[4];
 };
 
@@ -4125,4 +4360,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -4135,6 +4371,6 @@
     unsigned int attributes;
     obj_handle_t rootdir;
+    client_ptr_t user_ptr;
     obj_handle_t manager;
-    void*        user_ptr;
     /* VARARG(name,unicode_str); */
 };
@@ -4143,4 +4379,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -4172,5 +4409,5 @@
     obj_handle_t next;
     ioctl_code_t code;
-    void*        user_ptr;
+    client_ptr_t user_ptr;
     data_size_t  in_size;
     data_size_t  out_size;
@@ -4188,4 +4425,5 @@
     struct reply_header __header;
     obj_handle_t event;
+    char __pad_12[4];
 };
 
@@ -4223,4 +4461,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -4239,4 +4478,5 @@
     struct reply_header __header;
     obj_handle_t handle;
+    char __pad_12[4];
 };
 
@@ -4247,7 +4487,7 @@
     struct request_header __header;
     obj_handle_t  handle;
-    unsigned long ckey;
-    unsigned long cvalue;
-    unsigned long information;
+    apc_param_t   ckey;
+    apc_param_t   cvalue;
+    unsigned int  information;
     unsigned int  status;
 };
@@ -4267,7 +4507,7 @@
 {
     struct reply_header __header;
-    unsigned long ckey;
-    unsigned long cvalue;
-    unsigned long information;
+    apc_param_t   ckey;
+    apc_param_t   cvalue;
+    unsigned int  information;
     unsigned int  status;
 };
@@ -4284,4 +4524,5 @@
     struct reply_header __header;
     unsigned int  depth;
+    char __pad_12[4];
 };
 
@@ -4292,6 +4533,7 @@
     struct request_header __header;
     obj_handle_t  handle;
+    apc_param_t   ckey;
     obj_handle_t  chandle;
-    unsigned long ckey;
+    char __pad_28[4];
 };
 struct set_completion_info_reply
@@ -4306,7 +4548,7 @@
     struct request_header __header;
     obj_handle_t   handle;
-    unsigned long  cvalue;
+    apc_param_t    cvalue;
     unsigned int   status;
-    unsigned long  information;
+    unsigned int   information;
 };
 struct add_fd_completion_reply
@@ -4328,4 +4570,5 @@
     unsigned int   alpha;
     unsigned int   flags;
+    char __pad_20[4];
 };
 
@@ -4339,4 +4582,5 @@
     unsigned int   alpha;
     unsigned int   flags;
+    char __pad_28[4];
 };
 struct set_window_layered_info_reply
@@ -4426,5 +4670,4 @@
     REQ_next_process,
     REQ_next_thread,
-    REQ_next_module,
     REQ_wait_debug_event,
     REQ_queue_exception_event,
@@ -4556,4 +4799,6 @@
     REQ_get_token_user,
     REQ_get_token_groups,
+    REQ_get_token_default_dacl,
+    REQ_set_token_default_dacl,
     REQ_set_security_object,
     REQ_get_security_object,
@@ -4670,5 +4915,4 @@
     struct next_process_request next_process_request;
     struct next_thread_request next_thread_request;
-    struct next_module_request next_module_request;
     struct wait_debug_event_request wait_debug_event_request;
     struct queue_exception_event_request queue_exception_event_request;
@@ -4800,4 +5044,6 @@
     struct get_token_user_request get_token_user_request;
     struct get_token_groups_request get_token_groups_request;
+    struct get_token_default_dacl_request get_token_default_dacl_request;
+    struct set_token_default_dacl_request set_token_default_dacl_request;
     struct set_security_object_request set_security_object_request;
     struct get_security_object_request get_security_object_request;
@@ -4912,5 +5158,4 @@
     struct next_process_reply next_process_reply;
     struct next_thread_reply next_thread_reply;
-    struct next_module_reply next_module_reply;
     struct wait_debug_event_reply wait_debug_event_reply;
     struct queue_exception_event_reply queue_exception_event_reply;
@@ -5042,4 +5287,6 @@
     struct get_token_user_reply get_token_user_reply;
     struct get_token_groups_reply get_token_groups_reply;
+    struct get_token_default_dacl_reply get_token_default_dacl_reply;
+    struct set_token_default_dacl_reply set_token_default_dacl_reply;
     struct set_security_object_reply set_security_object_reply;
     struct get_security_object_reply get_security_object_reply;
@@ -5073,5 +5320,5 @@
 };
 
-#define SERVER_PROTOCOL_VERSION 346
+#define SERVER_PROTOCOL_VERSION 386
 
 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/svcctl.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/svcctl.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/svcctl.idl	(revision 19678)
@@ -20,4 +20,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "wtypes.idl";
 
@@ -95,5 +104,31 @@
 } SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
 
-#define SERVICE_CONFIG_DESCRIPTION 1
+typedef enum _SC_ACTION_TYPE {
+    SC_ACTION_NONE        = 0,
+    SC_ACTION_RESTART     = 1,
+    SC_ACTION_REBOOT      = 2,
+    SC_ACTION_RUN_COMMAND = 3
+} SC_ACTION_TYPE;
+
+typedef struct _SC_ACTION {
+    SC_ACTION_TYPE  Type;
+    DWORD       Delay;
+} SC_ACTION,*LPSC_ACTION;
+
+typedef struct _SERVICE_FAILURE_ACTIONSW {
+    DWORD dwResetPeriod;
+    [unique] LPWSTR lpRebootMsg;
+    [unique] LPWSTR lpCommand;
+    DWORD cActions;
+    [size_is(cActions)] SC_ACTION *lpsaActions;
+} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
+
+#define SERVICE_CONFIG_DESCRIPTION              1
+#define SERVICE_CONFIG_FAILURE_ACTIONS          2
+#define SERVICE_CONFIG_DELAYED_AUTO_START_INFO  3
+#define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG     4
+#define SERVICE_CONFIG_SERVICE_SID_INFO         5
+#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
+#define SERVICE_CONFIG_PRESHUTDOWN_INFO         7
 
 cpp_quote("#endif")
@@ -102,4 +137,5 @@
 {
   [case (SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW descr;
+  [case (SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW actions;
 } SERVICE_CONFIG2W;
 
@@ -231,7 +267,6 @@
         [in] SC_RPC_HANDLE hSCManager,
         [in] LPCWSTR lpServiceName,
-        [out,size_is(cchBufSize)] WCHAR lpBuffer[],
-        [in] DWORD cchBufSize,
-        [out] DWORD *cchLength);
+        [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
+        [in,out] DWORD *cchBufSize);
 
     /* Compatible with Windows function 0x15 */
@@ -239,7 +274,6 @@
         [in] SC_RPC_HANDLE hSCManager,
         [in] LPCWSTR lpServiceDisplayName,
-        [out,size_is(cchBufSize)] WCHAR lpBuffer[],
-        [in] DWORD cchBufSize,
-        [out] DWORD *cchLength);
+        [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
+        [in,out] DWORD *cchBufSize);
 
     /* Not compatible with Windows function 0x16 */
@@ -297,6 +331,12 @@
     DWORD svcctl_QueryServiceConfig2A(/* FIXME */);
 
-    /* Not compatible with Windows function 0x27 */
-    DWORD svcctl_QueryServiceConfig2W(/* FIXME */);
+    /* Untested with Windows function 0x27 */
+    DWORD svcctl_QueryServiceConfig2W(
+        [in] SC_RPC_HANDLE hService,
+        [in] DWORD InfoLevel,
+        [out,size_is(cbBufSize)] BYTE lpBuffer[],
+        [in] DWORD cbBufSize,
+        [out] LPDWORD pcbBytesNeeded
+    );
 
     /* Untested with Windows function 0x28 */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/test.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/test.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/test.h	(revision 19678)
@@ -50,8 +50,8 @@
 
 #ifndef INVALID_FILE_ATTRIBUTES
-#define INVALID_FILE_ATTRIBUTES  ((DWORD)~0UL)
+#define INVALID_FILE_ATTRIBUTES  (~0u)
 #endif
 #ifndef INVALID_SET_FILE_POINTER
-#define INVALID_SET_FILE_POINTER ((DWORD)~0UL)
+#define INVALID_SET_FILE_POINTER (~0u)
 #endif
 
@@ -268,15 +268,21 @@
         if (condition)
         {
-            fprintf( stdout, "%s:%d: Test succeeded inside todo block",
+            fprintf( stdout, "%s:%d: Test succeeded inside todo block: ",
                      data->current_file, data->current_line );
-            if (msg[0])
-            {
-                fprintf(stdout,": ");
-                vfprintf(stdout, msg, args);
-            }
+            vfprintf(stdout, msg, args);
             InterlockedIncrement(&todo_failures);
             return 0;
         }
-        else InterlockedIncrement(&todo_successes);
+        else
+        {
+            if (winetest_debug > 0)
+            {
+                fprintf( stdout, "%s:%d: Test marked todo: ",
+                         data->current_file, data->current_line );
+                vfprintf(stdout, msg, args);
+            }
+            InterlockedIncrement(&todo_successes);
+            return 1;
+        }
     }
     else
@@ -284,11 +290,7 @@
         if (!condition)
         {
-            fprintf( stdout, "%s:%d: Test failed",
+            fprintf( stdout, "%s:%d: Test failed: ",
                      data->current_file, data->current_line );
-            if (msg[0])
-            {
-                fprintf( stdout,": ");
-                vfprintf(stdout, msg, args);
-            }
+            vfprintf(stdout, msg, args);
             InterlockedIncrement(&failures);
             return 0;
@@ -300,7 +302,7 @@
                          data->current_file, data->current_line);
             InterlockedIncrement(&successes);
+            return 1;
         }
     }
-    return 1;
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wgl.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wgl.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wgl.h	(revision 19678)
@@ -190,4 +190,11 @@
 #ifndef GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
 # define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
+#endif
+
+/* WGL_EXT_pixel_format_packed_float */
+#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
+#ifndef GLX_EXT_fbconfig_packed_float
+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT  0x00000008
 #endif
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wine_common_ver.rc
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wine_common_ver.rc	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wine_common_ver.rc	(revision 19678)
@@ -114,5 +114,5 @@
 	    VALUE "FileVersion", WINE_FILEVERSION_STR
 	    VALUE "InternalName", WINE_FILENAME
-	    VALUE "LegalCopyright", "Copyright (c) 1993-2008 the Wine project authors (see the file AUTHORS for a complete list)"
+	    VALUE "LegalCopyright", "Copyright (c) 1993-2009 the Wine project authors (see the file AUTHORS for a complete list)"
 	    VALUE "OriginalFilename", WINE_FILENAME_STR
 	    VALUE "ProductName", WINE_PRODUCTNAME_STR
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.h	(revision 19678)
@@ -1,3 +1,4 @@
-/*** Autogenerated by WIDL 1.1.10 from ../../../dlls/wined3d/../../include/wine/wined3d.idl - Do not edit ***/
+/*** Autogenerated by WIDL 1.1.21 from ../../include/wine/wined3d.idl - Do not edit ***/
+
 #include <rpc.h>
 #include <rpcndr.h>
@@ -5,9 +6,126 @@
 #ifndef __WIDL_WINED3D_H
 #define __WIDL_WINED3D_H
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/* Headers for imported files */
+
 #include <unknwn.h>
+
+/* Forward declarations */
+
+#ifndef __IWineD3DDeviceParent_FWD_DEFINED__
+#define __IWineD3DDeviceParent_FWD_DEFINED__
+typedef interface IWineD3DDeviceParent IWineD3DDeviceParent;
+#endif
+
+#ifndef __IWineD3DBase_FWD_DEFINED__
+#define __IWineD3DBase_FWD_DEFINED__
+typedef interface IWineD3DBase IWineD3DBase;
+#endif
+
+#ifndef __IWineD3D_FWD_DEFINED__
+#define __IWineD3D_FWD_DEFINED__
+typedef interface IWineD3D IWineD3D;
+#endif
+
+#ifndef __IWineD3DResource_FWD_DEFINED__
+#define __IWineD3DResource_FWD_DEFINED__
+typedef interface IWineD3DResource IWineD3DResource;
+#endif
+
+#ifndef __IWineD3DRendertargetView_FWD_DEFINED__
+#define __IWineD3DRendertargetView_FWD_DEFINED__
+typedef interface IWineD3DRendertargetView IWineD3DRendertargetView;
+#endif
+
+#ifndef __IWineD3DPalette_FWD_DEFINED__
+#define __IWineD3DPalette_FWD_DEFINED__
+typedef interface IWineD3DPalette IWineD3DPalette;
+#endif
+
+#ifndef __IWineD3DClipper_FWD_DEFINED__
+#define __IWineD3DClipper_FWD_DEFINED__
+typedef interface IWineD3DClipper IWineD3DClipper;
+#endif
+
+#ifndef __IWineD3DSurface_FWD_DEFINED__
+#define __IWineD3DSurface_FWD_DEFINED__
+typedef interface IWineD3DSurface IWineD3DSurface;
+#endif
+
+#ifndef __IWineD3DVolume_FWD_DEFINED__
+#define __IWineD3DVolume_FWD_DEFINED__
+typedef interface IWineD3DVolume IWineD3DVolume;
+#endif
+
+#ifndef __IWineD3DBaseTexture_FWD_DEFINED__
+#define __IWineD3DBaseTexture_FWD_DEFINED__
+typedef interface IWineD3DBaseTexture IWineD3DBaseTexture;
+#endif
+
+#ifndef __IWineD3DTexture_FWD_DEFINED__
+#define __IWineD3DTexture_FWD_DEFINED__
+typedef interface IWineD3DTexture IWineD3DTexture;
+#endif
+
+#ifndef __IWineD3DCubeTexture_FWD_DEFINED__
+#define __IWineD3DCubeTexture_FWD_DEFINED__
+typedef interface IWineD3DCubeTexture IWineD3DCubeTexture;
+#endif
+
+#ifndef __IWineD3DVolumeTexture_FWD_DEFINED__
+#define __IWineD3DVolumeTexture_FWD_DEFINED__
+typedef interface IWineD3DVolumeTexture IWineD3DVolumeTexture;
+#endif
+
+#ifndef __IWineD3DVertexDeclaration_FWD_DEFINED__
+#define __IWineD3DVertexDeclaration_FWD_DEFINED__
+typedef interface IWineD3DVertexDeclaration IWineD3DVertexDeclaration;
+#endif
+
+#ifndef __IWineD3DStateBlock_FWD_DEFINED__
+#define __IWineD3DStateBlock_FWD_DEFINED__
+typedef interface IWineD3DStateBlock IWineD3DStateBlock;
+#endif
+
+#ifndef __IWineD3DQuery_FWD_DEFINED__
+#define __IWineD3DQuery_FWD_DEFINED__
+typedef interface IWineD3DQuery IWineD3DQuery;
+#endif
+
+#ifndef __IWineD3DSwapChain_FWD_DEFINED__
+#define __IWineD3DSwapChain_FWD_DEFINED__
+typedef interface IWineD3DSwapChain IWineD3DSwapChain;
+#endif
+
+#ifndef __IWineD3DBuffer_FWD_DEFINED__
+#define __IWineD3DBuffer_FWD_DEFINED__
+typedef interface IWineD3DBuffer IWineD3DBuffer;
+#endif
+
+#ifndef __IWineD3DBaseShader_FWD_DEFINED__
+#define __IWineD3DBaseShader_FWD_DEFINED__
+typedef interface IWineD3DBaseShader IWineD3DBaseShader;
+#endif
+
+#ifndef __IWineD3DVertexShader_FWD_DEFINED__
+#define __IWineD3DVertexShader_FWD_DEFINED__
+typedef interface IWineD3DVertexShader IWineD3DVertexShader;
+#endif
+
+#ifndef __IWineD3DPixelShader_FWD_DEFINED__
+#define __IWineD3DPixelShader_FWD_DEFINED__
+typedef interface IWineD3DPixelShader IWineD3DPixelShader;
+#endif
+
+#ifndef __IWineD3DDevice_FWD_DEFINED__
+#define __IWineD3DDevice_FWD_DEFINED__
+typedef interface IWineD3DDevice IWineD3DDevice;
+#endif
+
+
 #if 0
 typedef HANDLE HMONITOR;
@@ -53,4 +171,5 @@
 #define WINED3DERR_WASSTILLDRAWING                  MAKE_WINED3DHRESULT(540)
 #define WINEDDERR_NOTAOVERLAYSURFACE                MAKE_WINED3DHRESULT(580)
+#define WINEDDERR_NOTLOCKED                         MAKE_WINED3DHRESULT(584)
 #define WINEDDERR_NODC                              MAKE_WINED3DHRESULT(586)
 #define WINEDDERR_DCALREADYCREATED                  MAKE_WINED3DHRESULT(620)
@@ -70,4 +189,5 @@
 } WINED3DLIGHTTYPE;
 typedef enum _WINED3DPRIMITIVETYPE {
+    WINED3DPT_UNDEFINED = 0,
     WINED3DPT_POINTLIST = 1,
     WINED3DPT_LINELIST = 2,
@@ -76,4 +196,8 @@
     WINED3DPT_TRIANGLESTRIP = 5,
     WINED3DPT_TRIANGLEFAN = 6,
+    WINED3DPT_LINELIST_ADJ = 10,
+    WINED3DPT_LINESTRIP_ADJ = 11,
+    WINED3DPT_TRIANGLELIST_ADJ = 12,
+    WINED3DPT_TRIANGLESTRIP_ADJ = 13,
     WINED3DPT_FORCE_DWORD = 0x7fffffff
 } WINED3DPRIMITIVETYPE;
@@ -94,54 +218,125 @@
 typedef enum _WINED3DFORMAT {
     WINED3DFMT_UNKNOWN = 0,
-    WINED3DFMT_R8G8B8 = 20,
-    WINED3DFMT_A8R8G8B8 = 21,
-    WINED3DFMT_X8R8G8B8 = 22,
-    WINED3DFMT_R5G6B5 = 23,
-    WINED3DFMT_X1R5G5B5 = 24,
-    WINED3DFMT_A1R5G5B5 = 25,
-    WINED3DFMT_A4R4G4B4 = 26,
-    WINED3DFMT_R3G3B2 = 27,
-    WINED3DFMT_A8 = 28,
-    WINED3DFMT_A8R3G3B2 = 29,
-    WINED3DFMT_X4R4G4B4 = 30,
-    WINED3DFMT_A2B10G10R10 = 31,
-    WINED3DFMT_A8B8G8R8 = 32,
-    WINED3DFMT_X8B8G8R8 = 33,
-    WINED3DFMT_G16R16 = 34,
-    WINED3DFMT_A2R10G10B10 = 35,
-    WINED3DFMT_A16B16G16R16 = 36,
-    WINED3DFMT_A8P8 = 40,
-    WINED3DFMT_P8 = 41,
-    WINED3DFMT_L8 = 50,
-    WINED3DFMT_A8L8 = 51,
-    WINED3DFMT_A4L4 = 52,
-    WINED3DFMT_V8U8 = 60,
-    WINED3DFMT_L6V5U5 = 61,
-    WINED3DFMT_X8L8V8U8 = 62,
-    WINED3DFMT_Q8W8V8U8 = 63,
-    WINED3DFMT_V16U16 = 64,
-    WINED3DFMT_W11V11U10 = 65,
-    WINED3DFMT_A2W10V10U10 = 67,
-    WINED3DFMT_D16_LOCKABLE = 70,
-    WINED3DFMT_D32 = 71,
-    WINED3DFMT_D15S1 = 73,
-    WINED3DFMT_D24S8 = 75,
-    WINED3DFMT_D24X8 = 77,
-    WINED3DFMT_D24X4S4 = 79,
-    WINED3DFMT_D16 = 80,
-    WINED3DFMT_L16 = 81,
-    WINED3DFMT_D32F_LOCKABLE = 82,
-    WINED3DFMT_D24FS8 = 83,
-    WINED3DFMT_VERTEXDATA = 100,
-    WINED3DFMT_INDEX16 = 101,
-    WINED3DFMT_INDEX32 = 102,
-    WINED3DFMT_Q16W16V16U16 = 110,
-    WINED3DFMT_R16F = 111,
-    WINED3DFMT_G16R16F = 112,
-    WINED3DFMT_A16B16G16R16F = 113,
-    WINED3DFMT_R32F = 114,
-    WINED3DFMT_G32R32F = 115,
-    WINED3DFMT_A32B32G32R32F = 116,
-    WINED3DFMT_CxV8U8 = 117,
+    WINED3DFMT_R8G8B8 = 1,
+    WINED3DFMT_A8R8G8B8 = 2,
+    WINED3DFMT_X8R8G8B8 = 3,
+    WINED3DFMT_R5G6B5 = 4,
+    WINED3DFMT_X1R5G5B5 = 5,
+    WINED3DFMT_A1R5G5B5 = 6,
+    WINED3DFMT_A4R4G4B4 = 7,
+    WINED3DFMT_R3G3B2 = 8,
+    WINED3DFMT_A8R3G3B2 = 9,
+    WINED3DFMT_X4R4G4B4 = 10,
+    WINED3DFMT_X8B8G8R8 = 11,
+    WINED3DFMT_A2R10G10B10 = 12,
+    WINED3DFMT_A8P8 = 13,
+    WINED3DFMT_P8 = 14,
+    WINED3DFMT_L8 = 15,
+    WINED3DFMT_A8L8 = 16,
+    WINED3DFMT_A4L4 = 17,
+    WINED3DFMT_L6V5U5 = 18,
+    WINED3DFMT_X8L8V8U8 = 19,
+    WINED3DFMT_W11V11U10 = 20,
+    WINED3DFMT_A2W10V10U10 = 21,
+    WINED3DFMT_D16_LOCKABLE = 22,
+    WINED3DFMT_D32 = 23,
+    WINED3DFMT_D15S1 = 24,
+    WINED3DFMT_D24S8 = 25,
+    WINED3DFMT_D24X8 = 26,
+    WINED3DFMT_D24X4S4 = 27,
+    WINED3DFMT_L16 = 28,
+    WINED3DFMT_D32F_LOCKABLE = 29,
+    WINED3DFMT_D24FS8 = 30,
+    WINED3DFMT_VERTEXDATA = 31,
+    WINED3DFMT_CxV8U8 = 32,
+    WINED3DFMT_R32G32B32A32_TYPELESS = 33,
+    WINED3DFMT_R32G32B32A32_FLOAT = 34,
+    WINED3DFMT_R32G32B32A32_UINT = 35,
+    WINED3DFMT_R32G32B32A32_SINT = 36,
+    WINED3DFMT_R32G32B32_TYPELESS = 37,
+    WINED3DFMT_R32G32B32_FLOAT = 38,
+    WINED3DFMT_R32G32B32_UINT = 39,
+    WINED3DFMT_R32G32B32_SINT = 40,
+    WINED3DFMT_R16G16B16A16_TYPELESS = 41,
+    WINED3DFMT_R16G16B16A16_FLOAT = 42,
+    WINED3DFMT_R16G16B16A16_UNORM = 43,
+    WINED3DFMT_R16G16B16A16_UINT = 44,
+    WINED3DFMT_R16G16B16A16_SNORM = 45,
+    WINED3DFMT_R16G16B16A16_SINT = 46,
+    WINED3DFMT_R32G32_TYPELESS = 47,
+    WINED3DFMT_R32G32_FLOAT = 48,
+    WINED3DFMT_R32G32_UINT = 49,
+    WINED3DFMT_R32G32_SINT = 50,
+    WINED3DFMT_R32G8X24_TYPELESS = 51,
+    WINED3DFMT_D32_FLOAT_S8X24_UINT = 52,
+    WINED3DFMT_R32_FLOAT_X8X24_TYPELESS = 53,
+    WINED3DFMT_X32_TYPELESS_G8X24_UINT = 54,
+    WINED3DFMT_R10G10B10A2_TYPELESS = 55,
+    WINED3DFMT_R10G10B10A2_UNORM = 56,
+    WINED3DFMT_R10G10B10A2_UINT = 57,
+    WINED3DFMT_R10G10B10A2_SNORM = 58,
+    WINED3DFMT_R11G11B10_FLOAT = 59,
+    WINED3DFMT_R8G8B8A8_TYPELESS = 60,
+    WINED3DFMT_R8G8B8A8_UNORM = 61,
+    WINED3DFMT_R8G8B8A8_UNORM_SRGB = 62,
+    WINED3DFMT_R8G8B8A8_UINT = 63,
+    WINED3DFMT_R8G8B8A8_SNORM = 64,
+    WINED3DFMT_R8G8B8A8_SINT = 65,
+    WINED3DFMT_R16G16_TYPELESS = 66,
+    WINED3DFMT_R16G16_FLOAT = 67,
+    WINED3DFMT_R16G16_UNORM = 68,
+    WINED3DFMT_R16G16_UINT = 69,
+    WINED3DFMT_R16G16_SNORM = 70,
+    WINED3DFMT_R16G16_SINT = 71,
+    WINED3DFMT_R32_TYPELESS = 72,
+    WINED3DFMT_D32_FLOAT = 73,
+    WINED3DFMT_R32_FLOAT = 74,
+    WINED3DFMT_R32_UINT = 75,
+    WINED3DFMT_R32_SINT = 76,
+    WINED3DFMT_R24G8_TYPELESS = 77,
+    WINED3DFMT_D24_UNORM_S8_UINT = 78,
+    WINED3DFMT_R24_UNORM_X8_TYPELESS = 79,
+    WINED3DFMT_X24_TYPELESS_G8_UINT = 80,
+    WINED3DFMT_R8G8_TYPELESS = 81,
+    WINED3DFMT_R8G8_UNORM = 82,
+    WINED3DFMT_R8G8_UINT = 83,
+    WINED3DFMT_R8G8_SNORM = 84,
+    WINED3DFMT_R8G8_SINT = 85,
+    WINED3DFMT_R16_TYPELESS = 86,
+    WINED3DFMT_R16_FLOAT = 87,
+    WINED3DFMT_D16_UNORM = 88,
+    WINED3DFMT_R16_UNORM = 89,
+    WINED3DFMT_R16_UINT = 90,
+    WINED3DFMT_R16_SNORM = 91,
+    WINED3DFMT_R16_SINT = 92,
+    WINED3DFMT_R8_TYPELESS = 93,
+    WINED3DFMT_R8_UNORM = 94,
+    WINED3DFMT_R8_UINT = 95,
+    WINED3DFMT_R8_SNORM = 96,
+    WINED3DFMT_R8_SINT = 97,
+    WINED3DFMT_A8_UNORM = 98,
+    WINED3DFMT_R1_UNORM = 99,
+    WINED3DFMT_R9G9B9E5_SHAREDEXP = 100,
+    WINED3DFMT_R8G8_B8G8_UNORM = 101,
+    WINED3DFMT_G8R8_G8B8_UNORM = 102,
+    WINED3DFMT_BC1_TYPELESS = 103,
+    WINED3DFMT_BC1_UNORM = 104,
+    WINED3DFMT_BC1_UNORM_SRGB = 105,
+    WINED3DFMT_BC2_TYPELESS = 106,
+    WINED3DFMT_BC2_UNORM = 107,
+    WINED3DFMT_BC2_UNORM_SRGB = 108,
+    WINED3DFMT_BC3_TYPELESS = 109,
+    WINED3DFMT_BC3_UNORM = 110,
+    WINED3DFMT_BC3_UNORM_SRGB = 111,
+    WINED3DFMT_BC4_TYPELESS = 112,
+    WINED3DFMT_BC4_UNORM = 113,
+    WINED3DFMT_BC4_SNORM = 114,
+    WINED3DFMT_BC5_TYPELESS = 115,
+    WINED3DFMT_BC5_UNORM = 116,
+    WINED3DFMT_BC5_SNORM = 117,
+    WINED3DFMT_B5G6R5_UNORM = 118,
+    WINED3DFMT_B5G5R5A1_UNORM = 119,
+    WINED3DFMT_B8G8R8A8_UNORM = 120,
+    WINED3DFMT_B8G8R8X8_UNORM = 121,
     WINED3DFMT_FORCE_DWORD = 0xffffffff
 } WINED3DFORMAT;
@@ -487,33 +682,22 @@
 } WINED3DMULTISAMPLE_TYPE;
 typedef enum _WINED3DTEXTURESTAGESTATETYPE {
-    WINED3DTSS_COLOROP = 1,
-    WINED3DTSS_COLORARG1 = 2,
-    WINED3DTSS_COLORARG2 = 3,
-    WINED3DTSS_ALPHAOP = 4,
-    WINED3DTSS_ALPHAARG1 = 5,
-    WINED3DTSS_ALPHAARG2 = 6,
-    WINED3DTSS_BUMPENVMAT00 = 7,
-    WINED3DTSS_BUMPENVMAT01 = 8,
-    WINED3DTSS_BUMPENVMAT10 = 9,
-    WINED3DTSS_BUMPENVMAT11 = 10,
-    WINED3DTSS_TEXCOORDINDEX = 11,
-    WINED3DTSS_ADDRESS = 12,
-    WINED3DTSS_ADDRESSU = 13,
-    WINED3DTSS_ADDRESSV = 14,
-    WINED3DTSS_BORDERCOLOR = 15,
-    WINED3DTSS_MAGFILTER = 16,
-    WINED3DTSS_MINFILTER = 17,
-    WINED3DTSS_MIPFILTER = 18,
-    WINED3DTSS_MIPMAPLODBIAS = 19,
-    WINED3DTSS_MAXMIPLEVEL = 20,
-    WINED3DTSS_MAXANISOTROPY = 21,
-    WINED3DTSS_BUMPENVLSCALE = 22,
-    WINED3DTSS_BUMPENVLOFFSET = 23,
-    WINED3DTSS_TEXTURETRANSFORMFLAGS = 24,
-    WINED3DTSS_ADDRESSW = 25,
-    WINED3DTSS_COLORARG0 = 26,
-    WINED3DTSS_ALPHAARG0 = 27,
-    WINED3DTSS_RESULTARG = 28,
-    WINED3DTSS_CONSTANT = 32,
+    WINED3DTSS_COLOROP = 0,
+    WINED3DTSS_COLORARG1 = 1,
+    WINED3DTSS_COLORARG2 = 2,
+    WINED3DTSS_ALPHAOP = 3,
+    WINED3DTSS_ALPHAARG1 = 4,
+    WINED3DTSS_ALPHAARG2 = 5,
+    WINED3DTSS_BUMPENVMAT00 = 6,
+    WINED3DTSS_BUMPENVMAT01 = 7,
+    WINED3DTSS_BUMPENVMAT10 = 8,
+    WINED3DTSS_BUMPENVMAT11 = 9,
+    WINED3DTSS_TEXCOORDINDEX = 10,
+    WINED3DTSS_BUMPENVLSCALE = 11,
+    WINED3DTSS_BUMPENVLOFFSET = 12,
+    WINED3DTSS_TEXTURETRANSFORMFLAGS = 13,
+    WINED3DTSS_COLORARG0 = 14,
+    WINED3DTSS_ALPHAARG0 = 15,
+    WINED3DTSS_RESULTARG = 16,
+    WINED3DTSS_CONSTANT = 17,
     WINED3DTSS_FORCE_DWORD = 0x7fffffff
 } WINED3DTEXTURESTAGESTATETYPE;
@@ -616,9 +800,8 @@
     WINED3DRTYPE_VOLUMETEXTURE = 4,
     WINED3DRTYPE_CUBETEXTURE = 5,
-    WINED3DRTYPE_VERTEXBUFFER = 6,
-    WINED3DRTYPE_INDEXBUFFER = 7,
+    WINED3DRTYPE_BUFFER = 6,
     WINED3DRTYPE_FORCE_DWORD = 0x7fffffff
 } WINED3DRESOURCETYPE;
-#define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER + 1)
+#define WINED3DRTYPECOUNT (WINED3DRTYPE_BUFFER + 1)
 
 typedef enum _WINED3DPOOL {
@@ -668,25 +851,4 @@
     WINED3DDECLMETHOD_LOOKUPPRESAMPLED = 6
 } WINED3DDECLMETHOD;
-typedef enum _WINED3DDECLTYPE {
-    WINED3DDECLTYPE_FLOAT1 = 0,
-    WINED3DDECLTYPE_FLOAT2 = 1,
-    WINED3DDECLTYPE_FLOAT3 = 2,
-    WINED3DDECLTYPE_FLOAT4 = 3,
-    WINED3DDECLTYPE_D3DCOLOR = 4,
-    WINED3DDECLTYPE_UBYTE4 = 5,
-    WINED3DDECLTYPE_SHORT2 = 6,
-    WINED3DDECLTYPE_SHORT4 = 7,
-    WINED3DDECLTYPE_UBYTE4N = 8,
-    WINED3DDECLTYPE_SHORT2N = 9,
-    WINED3DDECLTYPE_SHORT4N = 10,
-    WINED3DDECLTYPE_USHORT2N = 11,
-    WINED3DDECLTYPE_USHORT4N = 12,
-    WINED3DDECLTYPE_UDEC3 = 13,
-    WINED3DDECLTYPE_DEC3N = 14,
-    WINED3DDECLTYPE_FLOAT16_2 = 15,
-    WINED3DDECLTYPE_FLOAT16_4 = 16,
-    WINED3DDECLTYPE_UNUSED = 17
-} WINED3DDECLTYPE;
-#define WINED3DDECL_END() {0xFF, 0, WINED3DDECLTYPE_UNUSED, 0, 0, 0, -1}
 typedef enum _WINED3DDECLUSAGE {
     WINED3DDECLUSAGE_POSITION = 0,
@@ -852,5 +1014,5 @@
 #define WINED3DFVF_RESERVED0 (0x1)
 
-#define WINED3DFVF_POSITION_MASK (0xe)
+#define WINED3DFVF_POSITION_MASK (0x400e)
 
 #define WINED3DFVF_XYZ (0x2)
@@ -2123,13 +2285,12 @@
 } WINED3DCLIPSTATUS;
 typedef struct _WINED3DVERTEXELEMENT {
-    WORD Stream;
-    WORD Offset;
-    BYTE Type;
-    BYTE Method;
-    BYTE Usage;
-    BYTE UsageIndex;
-    int Reg;
+    WINED3DFORMAT format;
+    WORD input_slot;
+    WORD offset;
+    UINT output_slot;
+    BYTE method;
+    BYTE usage;
+    BYTE usage_idx;
 } WINED3DVERTEXELEMENT;
-typedef struct _WINED3DVERTEXELEMENT *LPWINED3DVERTEXELEMENT;
 typedef struct _WINED3DDEVICE_CREATION_PARAMETERS {
     UINT AdapterOrdinal;
@@ -2184,5 +2345,5 @@
 } WINED3DRESOURCESTATS;
 typedef struct _WINED3DDEVINFO_RESOURCEMANAGER {
-    WINED3DRESOURCESTATS stats[8];
+    WINED3DRESOURCESTATS stats[7];
 } WINED3DDEVINFO_RESOURCEMANAGER;
 typedef struct _WINED3DDEVINFO_VERTEXSTATS {
@@ -2213,57 +2374,28 @@
     DWORD MagicNumber;
 } WINED3DDEVINFO_VCACHE;
-typedef struct _WINED3DVERTEXBUFFER_DESC {
-    WINED3DFORMAT Format;
+typedef struct _WINED3DBUFFER_DESC {
     WINED3DRESOURCETYPE Type;
     DWORD Usage;
     WINED3DPOOL Pool;
     UINT Size;
-    DWORD FVF;
-} WINED3DVERTEXBUFFER_DESC;
-typedef struct _WINED3DINDEXBUFFER_DESC {
-    WINED3DFORMAT Format;
-    WINED3DRESOURCETYPE Type;
-    DWORD Usage;
-    WINED3DPOOL Pool;
-    UINT Size;
-} WINED3DINDEXBUFFER_DESC;
+} WINED3DBUFFER_DESC;
 typedef struct glDescriptor {
     UINT textureName;
+    UINT srgbTextureName;
     int level;
     int target;
-    int glFormat;
-    int glFormatInternal;
-    int glType;
 } glDescriptor;
 typedef struct WineDirect3DStridedData {
+    WINED3DFORMAT format;
     const BYTE *lpData;
     DWORD dwStride;
-    DWORD dwType;
-    int VBO;
-    UINT streamNo;
 } WineDirect3DStridedData;
 typedef struct WineDirect3DVertexStridedData {
-    union {
-        struct {
-            WineDirect3DStridedData position;
-            WineDirect3DStridedData blendWeights;
-            WineDirect3DStridedData blendMatrixIndices;
-            WineDirect3DStridedData normal;
-            WineDirect3DStridedData pSize;
-            WineDirect3DStridedData diffuse;
-            WineDirect3DStridedData specular;
-            WineDirect3DStridedData texCoords[8];
-            WineDirect3DStridedData position2;
-            WineDirect3DStridedData normal2;
-            WineDirect3DStridedData tangent;
-            WineDirect3DStridedData binormal;
-            WineDirect3DStridedData tessFactor;
-            WineDirect3DStridedData fog;
-            WineDirect3DStridedData depth;
-            WineDirect3DStridedData sample;
-            BOOL position_transformed;
-        } s;
-        WineDirect3DStridedData input[16];
-    } u;
+    WineDirect3DStridedData position;
+    WineDirect3DStridedData normal;
+    WineDirect3DStridedData diffuse;
+    WineDirect3DStridedData specular;
+    WineDirect3DStridedData texCoords[8];
+    BOOL position_transformed;
 } WineDirect3DVertexStridedData;
 typedef struct _WINED3DVSHADERCAPS2_0 {
@@ -2442,4 +2574,12 @@
     DWORD dwFlags;
 } WINEDDOVERLAYFX;
+struct wined3d_buffer_desc {
+    UINT byte_width;
+    DWORD usage;
+    UINT bind_flags;
+    UINT cpu_access_flags;
+    UINT misc_flags;
+};
+
 #ifndef __IWineD3DResource_FWD_DEFINED__
 #define __IWineD3DResource_FWD_DEFINED__
@@ -2467,18 +2607,241 @@
 #endif
 
-typedef HRESULT (STDMETHODCALLTYPE *D3DCB_CREATESURFACEFN)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,DWORD Usage,WINED3DPOOL Pool,UINT Level,WINED3DCUBEMAP_FACES Face,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle);
-typedef HRESULT (STDMETHODCALLTYPE *D3DCB_CREATERENDERTARGETFN)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle);
-typedef HRESULT (STDMETHODCALLTYPE *D3DCB_CREATEDEPTHSTENCILSURFACEFN)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle);
+/*****************************************************************************
+ * IWineD3DDeviceParent interface
+ */
+#ifndef __IWineD3DDeviceParent_INTERFACE_DEFINED__
+#define __IWineD3DDeviceParent_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWineD3DDeviceParent, 0xaeb62dfc, 0xbdcb, 0x4f02, 0x95,0x19, 0x1e,0xee,0xa0,0x0c,0x15,0xcd);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IWineD3DDeviceParent : public IUnknown
+{
+    virtual void STDMETHODCALLTYPE WineD3DDeviceCreated(
+        IWineD3DDevice *device) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateSurface(
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        WINED3DFORMAT format,
+        DWORD usage,
+        WINED3DPOOL pool,
+        UINT level,
+        WINED3DCUBEMAP_FACES face,
+        IWineD3DSurface **surface) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateRenderTarget(
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        WINED3DFORMAT format,
+        WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality,
+        BOOL lockable,
+        IWineD3DSurface **surface) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilSurface(
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        WINED3DFORMAT format,
+        WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality,
+        BOOL discard,
+        IWineD3DSurface **surface) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateVolume(
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        UINT depth,
+        WINED3DFORMAT format,
+        WINED3DPOOL pool,
+        DWORD usage,
+        IWineD3DVolume **volume) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateSwapChain(
+        WINED3DPRESENT_PARAMETERS *present_parameters,
+        IWineD3DSwapChain **swapchain) = 0;
+
+};
+#else
+typedef struct IWineD3DDeviceParentVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWineD3DDeviceParent* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWineD3DDeviceParent* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWineD3DDeviceParent* This);
+
+    /*** IWineD3DDeviceParent methods ***/
+    void (STDMETHODCALLTYPE *WineD3DDeviceCreated)(
+        IWineD3DDeviceParent* This,
+        IWineD3DDevice *device);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSurface)(
+        IWineD3DDeviceParent* This,
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        WINED3DFORMAT format,
+        DWORD usage,
+        WINED3DPOOL pool,
+        UINT level,
+        WINED3DCUBEMAP_FACES face,
+        IWineD3DSurface **surface);
+
+    HRESULT (STDMETHODCALLTYPE *CreateRenderTarget)(
+        IWineD3DDeviceParent* This,
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        WINED3DFORMAT format,
+        WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality,
+        BOOL lockable,
+        IWineD3DSurface **surface);
+
+    HRESULT (STDMETHODCALLTYPE *CreateDepthStencilSurface)(
+        IWineD3DDeviceParent* This,
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        WINED3DFORMAT format,
+        WINED3DMULTISAMPLE_TYPE multisample_type,
+        DWORD multisample_quality,
+        BOOL discard,
+        IWineD3DSurface **surface);
+
+    HRESULT (STDMETHODCALLTYPE *CreateVolume)(
+        IWineD3DDeviceParent* This,
+        IUnknown *superior,
+        UINT width,
+        UINT height,
+        UINT depth,
+        WINED3DFORMAT format,
+        WINED3DPOOL pool,
+        DWORD usage,
+        IWineD3DVolume **volume);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSwapChain)(
+        IWineD3DDeviceParent* This,
+        WINED3DPRESENT_PARAMETERS *present_parameters,
+        IWineD3DSwapChain **swapchain);
+
+    END_INTERFACE
+} IWineD3DDeviceParentVtbl;
+interface IWineD3DDeviceParent {
+    CONST_VTBL IWineD3DDeviceParentVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IWineD3DDeviceParent_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWineD3DDeviceParent_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWineD3DDeviceParent_Release(This) (This)->lpVtbl->Release(This)
+/*** IWineD3DDeviceParent methods ***/
+#define IWineD3DDeviceParent_WineD3DDeviceCreated(This,device) (This)->lpVtbl->WineD3DDeviceCreated(This,device)
+#define IWineD3DDeviceParent_CreateSurface(This,superior,width,height,format,usage,pool,level,face,surface) (This)->lpVtbl->CreateSurface(This,superior,width,height,format,usage,pool,level,face,surface)
+#define IWineD3DDeviceParent_CreateRenderTarget(This,superior,width,height,format,multisample_type,multisample_quality,lockable,surface) (This)->lpVtbl->CreateRenderTarget(This,superior,width,height,format,multisample_type,multisample_quality,lockable,surface)
+#define IWineD3DDeviceParent_CreateDepthStencilSurface(This,superior,width,height,format,multisample_type,multisample_quality,discard,surface) (This)->lpVtbl->CreateDepthStencilSurface(This,superior,width,height,format,multisample_type,multisample_quality,discard,surface)
+#define IWineD3DDeviceParent_CreateVolume(This,superior,width,height,depth,format,pool,usage,volume) (This)->lpVtbl->CreateVolume(This,superior,width,height,depth,format,pool,usage,volume)
+#define IWineD3DDeviceParent_CreateSwapChain(This,present_parameters,swapchain) (This)->lpVtbl->CreateSwapChain(This,present_parameters,swapchain)
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IWineD3DDeviceParent_WineD3DDeviceCreated_Proxy(
+    IWineD3DDeviceParent* This,
+    IWineD3DDevice *device);
+void __RPC_STUB IWineD3DDeviceParent_WineD3DDeviceCreated_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateSurface_Proxy(
+    IWineD3DDeviceParent* This,
+    IUnknown *superior,
+    UINT width,
+    UINT height,
+    WINED3DFORMAT format,
+    DWORD usage,
+    WINED3DPOOL pool,
+    UINT level,
+    WINED3DCUBEMAP_FACES face,
+    IWineD3DSurface **surface);
+void __RPC_STUB IWineD3DDeviceParent_CreateSurface_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateRenderTarget_Proxy(
+    IWineD3DDeviceParent* This,
+    IUnknown *superior,
+    UINT width,
+    UINT height,
+    WINED3DFORMAT format,
+    WINED3DMULTISAMPLE_TYPE multisample_type,
+    DWORD multisample_quality,
+    BOOL lockable,
+    IWineD3DSurface **surface);
+void __RPC_STUB IWineD3DDeviceParent_CreateRenderTarget_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateDepthStencilSurface_Proxy(
+    IWineD3DDeviceParent* This,
+    IUnknown *superior,
+    UINT width,
+    UINT height,
+    WINED3DFORMAT format,
+    WINED3DMULTISAMPLE_TYPE multisample_type,
+    DWORD multisample_quality,
+    BOOL discard,
+    IWineD3DSurface **surface);
+void __RPC_STUB IWineD3DDeviceParent_CreateDepthStencilSurface_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateVolume_Proxy(
+    IWineD3DDeviceParent* This,
+    IUnknown *superior,
+    UINT width,
+    UINT height,
+    UINT depth,
+    WINED3DFORMAT format,
+    WINED3DPOOL pool,
+    DWORD usage,
+    IWineD3DVolume **volume);
+void __RPC_STUB IWineD3DDeviceParent_CreateVolume_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateSwapChain_Proxy(
+    IWineD3DDeviceParent* This,
+    WINED3DPRESENT_PARAMETERS *present_parameters,
+    IWineD3DSwapChain **swapchain);
+void __RPC_STUB IWineD3DDeviceParent_CreateSwapChain_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWineD3DDeviceParent_INTERFACE_DEFINED__ */
+
 typedef ULONG (STDMETHODCALLTYPE *D3DCB_DESTROYSURFACEFN)(IWineD3DSurface *pSurface);
-typedef HRESULT (STDMETHODCALLTYPE *D3DCB_CREATEVOLUMEFN)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,UINT Depth,WINED3DFORMAT Format,WINED3DPOOL Pool,DWORD Usage,IWineD3DVolume **ppVolume,HANDLE *pSharedHandle);
 typedef ULONG (STDMETHODCALLTYPE *D3DCB_DESTROYVOLUMEFN)(IWineD3DVolume *pVolume);
-typedef HRESULT (STDMETHODCALLTYPE *D3DCB_CREATESWAPCHAIN)(IUnknown *pDevice,WINED3DPRESENT_PARAMETERS *pPresentationParameters,IWineD3DSwapChain **pSwapChain);
 typedef ULONG (STDMETHODCALLTYPE *D3DCB_DESTROYSWAPCHAINFN)(IWineD3DSwapChain *pSwapChain);
 typedef HRESULT (STDMETHODCALLTYPE *D3DCB_ENUMRESOURCES)(IWineD3DResource *resource,void *pData);
-#ifndef __IWineD3DBase_FWD_DEFINED__
-#define __IWineD3DBase_FWD_DEFINED__
-typedef interface IWineD3DBase IWineD3DBase;
-#endif
-
 /*****************************************************************************
  * IWineD3DBase interface
@@ -2544,9 +2907,4 @@
 #endif  /* __IWineD3DBase_INTERFACE_DEFINED__ */
 
-#ifndef __IWineD3D_FWD_DEFINED__
-#define __IWineD3D_FWD_DEFINED__
-typedef interface IWineD3D IWineD3D;
-#endif
-
 /*****************************************************************************
  * IWineD3D interface
@@ -2574,6 +2932,6 @@
     virtual HRESULT STDMETHODCALLTYPE EnumAdapterModes(
         UINT adapter_idx,
+        WINED3DFORMAT format,
         UINT mode_idx,
-        WINED3DFORMAT format,
         WINED3DDISPLAYMODE *mode) = 0;
 
@@ -2634,6 +2992,7 @@
         HWND focus_window,
         DWORD behaviour_flags,
-        IWineD3DDevice **device,
-        IUnknown *parent) = 0;
+        IUnknown *parent,
+        IWineD3DDeviceParent *device_parent,
+        IWineD3DDevice **device) = 0;
 
 };
@@ -2679,6 +3038,6 @@
         IWineD3D* This,
         UINT adapter_idx,
+        WINED3DFORMAT format,
         UINT mode_idx,
-        WINED3DFORMAT format,
         WINED3DDISPLAYMODE *mode);
 
@@ -2748,6 +3107,7 @@
         HWND focus_window,
         DWORD behaviour_flags,
-        IWineD3DDevice **device,
-        IUnknown *parent);
+        IUnknown *parent,
+        IWineD3DDeviceParent *device_parent,
+        IWineD3DDevice **device);
 
     END_INTERFACE
@@ -2769,5 +3129,5 @@
 #define IWineD3D_GetAdapterMonitor(This,adapter_idx) (This)->lpVtbl->GetAdapterMonitor(This,adapter_idx)
 #define IWineD3D_GetAdapterModeCount(This,adapter_idx,format) (This)->lpVtbl->GetAdapterModeCount(This,adapter_idx,format)
-#define IWineD3D_EnumAdapterModes(This,adapter_idx,mode_idx,format,mode) (This)->lpVtbl->EnumAdapterModes(This,adapter_idx,mode_idx,format,mode)
+#define IWineD3D_EnumAdapterModes(This,adapter_idx,format,mode_idx,mode) (This)->lpVtbl->EnumAdapterModes(This,adapter_idx,format,mode_idx,mode)
 #define IWineD3D_GetAdapterDisplayMode(This,adapter_idx,mode) (This)->lpVtbl->GetAdapterDisplayMode(This,adapter_idx,mode)
 #define IWineD3D_GetAdapterIdentifier(This,adapter_idx,flags,identifier) (This)->lpVtbl->GetAdapterIdentifier(This,adapter_idx,flags,identifier)
@@ -2778,5 +3138,5 @@
 #define IWineD3D_CheckDeviceFormatConversion(This,adapter_idx,device_type,source_format,target_format) (This)->lpVtbl->CheckDeviceFormatConversion(This,adapter_idx,device_type,source_format,target_format)
 #define IWineD3D_GetDeviceCaps(This,adapter_idx,device_type,caps) (This)->lpVtbl->GetDeviceCaps(This,adapter_idx,device_type,caps)
-#define IWineD3D_CreateDevice(This,adapter_idx,device_type,focus_window,behaviour_flags,device,parent) (This)->lpVtbl->CreateDevice(This,adapter_idx,device_type,focus_window,behaviour_flags,device,parent)
+#define IWineD3D_CreateDevice(This,adapter_idx,device_type,focus_window,behaviour_flags,parent,device_parent,device) (This)->lpVtbl->CreateDevice(This,adapter_idx,device_type,focus_window,behaviour_flags,parent,device_parent,device)
 #endif
 
@@ -2818,6 +3178,6 @@
     IWineD3D* This,
     UINT adapter_idx,
+    WINED3DFORMAT format,
     UINT mode_idx,
-    WINED3DFORMAT format,
     WINED3DDISPLAYMODE *mode);
 void __RPC_STUB IWineD3D_EnumAdapterModes_Stub(
@@ -2923,6 +3283,7 @@
     HWND focus_window,
     DWORD behaviour_flags,
-    IWineD3DDevice **device,
-    IUnknown *parent);
+    IUnknown *parent,
+    IWineD3DDeviceParent *device_parent,
+    IWineD3DDevice **device);
 void __RPC_STUB IWineD3D_CreateDevice_Stub(
     IRpcStubBuffer* This,
@@ -3138,332 +3499,73 @@
 #endif  /* __IWineD3DResource_INTERFACE_DEFINED__ */
 
-#ifndef __IWineD3DVertexBuffer_FWD_DEFINED__
-#define __IWineD3DVertexBuffer_FWD_DEFINED__
-typedef interface IWineD3DVertexBuffer IWineD3DVertexBuffer;
-#endif
-
 /*****************************************************************************
- * IWineD3DVertexBuffer interface
+ * IWineD3DRendertargetView interface
  */
-#ifndef __IWineD3DVertexBuffer_INTERFACE_DEFINED__
-#define __IWineD3DVertexBuffer_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IWineD3DVertexBuffer, 0x217f671e, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
+#ifndef __IWineD3DRendertargetView_INTERFACE_DEFINED__
+#define __IWineD3DRendertargetView_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWineD3DRendertargetView, 0xf7d8abf4, 0xfb93, 0x43e4, 0x9c,0x96, 0x46,0x18,0xcf,0x9b,0x3c,0xbc);
 #if defined(__cplusplus) && !defined(CINTERFACE)
-interface IWineD3DVertexBuffer : public IWineD3DResource
+interface IWineD3DRendertargetView : public IWineD3DBase
 {
-    virtual HRESULT STDMETHODCALLTYPE Lock(
-        UINT offset,
-        UINT size,
-        BYTE **data,
-        DWORD flags) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE Unlock(
-        ) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE GetDesc(
-        WINED3DVERTEXBUFFER_DESC *desc) = 0;
+    virtual HRESULT STDMETHODCALLTYPE GetResource(
+        IWineD3DResource **resource) = 0;
 
 };
 #else
-typedef struct IWineD3DVertexBufferVtbl {
+typedef struct IWineD3DRendertargetViewVtbl {
     BEGIN_INTERFACE
 
     /*** IUnknown methods ***/
     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
-        IWineD3DVertexBuffer* This,
+        IWineD3DRendertargetView* This,
         REFIID riid,
         void **ppvObject);
 
     ULONG (STDMETHODCALLTYPE *AddRef)(
-        IWineD3DVertexBuffer* This);
+        IWineD3DRendertargetView* This);
 
     ULONG (STDMETHODCALLTYPE *Release)(
-        IWineD3DVertexBuffer* This);
+        IWineD3DRendertargetView* This);
 
     /*** IWineD3DBase methods ***/
     HRESULT (STDMETHODCALLTYPE *GetParent)(
-        IWineD3DVertexBuffer* This,
+        IWineD3DRendertargetView* This,
         IUnknown **parent);
 
-    /*** IWineD3DResource methods ***/
-    HRESULT (STDMETHODCALLTYPE *GetDevice)(
-        IWineD3DVertexBuffer* This,
-        IWineD3DDevice **device);
-
-    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
-        IWineD3DVertexBuffer* This,
-        REFGUID guid,
-        const void *data,
-        DWORD data_size,
-        DWORD flags);
-
-    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
-        IWineD3DVertexBuffer* This,
-        REFGUID guid,
-        void *data,
-        DWORD *data_size);
-
-    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
-        IWineD3DVertexBuffer* This,
-        REFGUID guid);
-
-    DWORD (STDMETHODCALLTYPE *SetPriority)(
-        IWineD3DVertexBuffer* This,
-        DWORD new_priority);
-
-    DWORD (STDMETHODCALLTYPE *GetPriority)(
-        IWineD3DVertexBuffer* This);
-
-    void (STDMETHODCALLTYPE *PreLoad)(
-        IWineD3DVertexBuffer* This);
-
-    void (STDMETHODCALLTYPE *UnLoad)(
-        IWineD3DVertexBuffer* This);
-
-    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
-        IWineD3DVertexBuffer* This);
-
-    /*** IWineD3DVertexBuffer methods ***/
-    HRESULT (STDMETHODCALLTYPE *Lock)(
-        IWineD3DVertexBuffer* This,
-        UINT offset,
-        UINT size,
-        BYTE **data,
-        DWORD flags);
-
-    HRESULT (STDMETHODCALLTYPE *Unlock)(
-        IWineD3DVertexBuffer* This);
-
-    HRESULT (STDMETHODCALLTYPE *GetDesc)(
-        IWineD3DVertexBuffer* This,
-        WINED3DVERTEXBUFFER_DESC *desc);
+    /*** IWineD3DRendertargetView methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetResource)(
+        IWineD3DRendertargetView* This,
+        IWineD3DResource **resource);
 
     END_INTERFACE
-} IWineD3DVertexBufferVtbl;
-interface IWineD3DVertexBuffer {
-    CONST_VTBL IWineD3DVertexBufferVtbl* lpVtbl;
+} IWineD3DRendertargetViewVtbl;
+interface IWineD3DRendertargetView {
+    CONST_VTBL IWineD3DRendertargetViewVtbl* lpVtbl;
 };
 
 #ifdef COBJMACROS
 /*** IUnknown methods ***/
-#define IWineD3DVertexBuffer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IWineD3DVertexBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IWineD3DVertexBuffer_Release(This) (This)->lpVtbl->Release(This)
+#define IWineD3DRendertargetView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWineD3DRendertargetView_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWineD3DRendertargetView_Release(This) (This)->lpVtbl->Release(This)
 /*** IWineD3DBase methods ***/
-#define IWineD3DVertexBuffer_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
-/*** IWineD3DResource methods ***/
-#define IWineD3DVertexBuffer_GetDevice(This,device) (This)->lpVtbl->GetDevice(This,device)
-#define IWineD3DVertexBuffer_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
-#define IWineD3DVertexBuffer_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
-#define IWineD3DVertexBuffer_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
-#define IWineD3DVertexBuffer_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
-#define IWineD3DVertexBuffer_GetPriority(This) (This)->lpVtbl->GetPriority(This)
-#define IWineD3DVertexBuffer_PreLoad(This) (This)->lpVtbl->PreLoad(This)
-#define IWineD3DVertexBuffer_UnLoad(This) (This)->lpVtbl->UnLoad(This)
-#define IWineD3DVertexBuffer_GetType(This) (This)->lpVtbl->GetType(This)
-/*** IWineD3DVertexBuffer methods ***/
-#define IWineD3DVertexBuffer_Lock(This,offset,size,data,flags) (This)->lpVtbl->Lock(This,offset,size,data,flags)
-#define IWineD3DVertexBuffer_Unlock(This) (This)->lpVtbl->Unlock(This)
-#define IWineD3DVertexBuffer_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc)
+#define IWineD3DRendertargetView_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
+/*** IWineD3DRendertargetView methods ***/
+#define IWineD3DRendertargetView_GetResource(This,resource) (This)->lpVtbl->GetResource(This,resource)
 #endif
 
 #endif
 
-HRESULT STDMETHODCALLTYPE IWineD3DVertexBuffer_Lock_Proxy(
-    IWineD3DVertexBuffer* This,
-    UINT offset,
-    UINT size,
-    BYTE **data,
-    DWORD flags);
-void __RPC_STUB IWineD3DVertexBuffer_Lock_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DVertexBuffer_Unlock_Proxy(
-    IWineD3DVertexBuffer* This);
-void __RPC_STUB IWineD3DVertexBuffer_Unlock_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DVertexBuffer_GetDesc_Proxy(
-    IWineD3DVertexBuffer* This,
-    WINED3DVERTEXBUFFER_DESC *desc);
-void __RPC_STUB IWineD3DVertexBuffer_GetDesc_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-
-#endif  /* __IWineD3DVertexBuffer_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DIndexBuffer_FWD_DEFINED__
-#define __IWineD3DIndexBuffer_FWD_DEFINED__
-typedef interface IWineD3DIndexBuffer IWineD3DIndexBuffer;
-#endif
-
-/*****************************************************************************
- * IWineD3DIndexBuffer interface
- */
-#ifndef __IWineD3DIndexBuffer_INTERFACE_DEFINED__
-#define __IWineD3DIndexBuffer_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IWineD3DIndexBuffer, 0x3a02a54e, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-interface IWineD3DIndexBuffer : public IWineD3DResource
-{
-    virtual HRESULT STDMETHODCALLTYPE Lock(
-        UINT offset,
-        UINT size,
-        BYTE **data,
-        DWORD flags) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE Unlock(
-        ) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE GetDesc(
-        WINED3DINDEXBUFFER_DESC *desc) = 0;
-
-};
-#else
-typedef struct IWineD3DIndexBufferVtbl {
-    BEGIN_INTERFACE
-
-    /*** IUnknown methods ***/
-    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
-        IWineD3DIndexBuffer* This,
-        REFIID riid,
-        void **ppvObject);
-
-    ULONG (STDMETHODCALLTYPE *AddRef)(
-        IWineD3DIndexBuffer* This);
-
-    ULONG (STDMETHODCALLTYPE *Release)(
-        IWineD3DIndexBuffer* This);
-
-    /*** IWineD3DBase methods ***/
-    HRESULT (STDMETHODCALLTYPE *GetParent)(
-        IWineD3DIndexBuffer* This,
-        IUnknown **parent);
-
-    /*** IWineD3DResource methods ***/
-    HRESULT (STDMETHODCALLTYPE *GetDevice)(
-        IWineD3DIndexBuffer* This,
-        IWineD3DDevice **device);
-
-    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
-        IWineD3DIndexBuffer* This,
-        REFGUID guid,
-        const void *data,
-        DWORD data_size,
-        DWORD flags);
-
-    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
-        IWineD3DIndexBuffer* This,
-        REFGUID guid,
-        void *data,
-        DWORD *data_size);
-
-    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
-        IWineD3DIndexBuffer* This,
-        REFGUID guid);
-
-    DWORD (STDMETHODCALLTYPE *SetPriority)(
-        IWineD3DIndexBuffer* This,
-        DWORD new_priority);
-
-    DWORD (STDMETHODCALLTYPE *GetPriority)(
-        IWineD3DIndexBuffer* This);
-
-    void (STDMETHODCALLTYPE *PreLoad)(
-        IWineD3DIndexBuffer* This);
-
-    void (STDMETHODCALLTYPE *UnLoad)(
-        IWineD3DIndexBuffer* This);
-
-    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
-        IWineD3DIndexBuffer* This);
-
-    /*** IWineD3DIndexBuffer methods ***/
-    HRESULT (STDMETHODCALLTYPE *Lock)(
-        IWineD3DIndexBuffer* This,
-        UINT offset,
-        UINT size,
-        BYTE **data,
-        DWORD flags);
-
-    HRESULT (STDMETHODCALLTYPE *Unlock)(
-        IWineD3DIndexBuffer* This);
-
-    HRESULT (STDMETHODCALLTYPE *GetDesc)(
-        IWineD3DIndexBuffer* This,
-        WINED3DINDEXBUFFER_DESC *desc);
-
-    END_INTERFACE
-} IWineD3DIndexBufferVtbl;
-interface IWineD3DIndexBuffer {
-    CONST_VTBL IWineD3DIndexBufferVtbl* lpVtbl;
-};
-
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define IWineD3DIndexBuffer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IWineD3DIndexBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IWineD3DIndexBuffer_Release(This) (This)->lpVtbl->Release(This)
-/*** IWineD3DBase methods ***/
-#define IWineD3DIndexBuffer_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
-/*** IWineD3DResource methods ***/
-#define IWineD3DIndexBuffer_GetDevice(This,device) (This)->lpVtbl->GetDevice(This,device)
-#define IWineD3DIndexBuffer_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
-#define IWineD3DIndexBuffer_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
-#define IWineD3DIndexBuffer_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
-#define IWineD3DIndexBuffer_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
-#define IWineD3DIndexBuffer_GetPriority(This) (This)->lpVtbl->GetPriority(This)
-#define IWineD3DIndexBuffer_PreLoad(This) (This)->lpVtbl->PreLoad(This)
-#define IWineD3DIndexBuffer_UnLoad(This) (This)->lpVtbl->UnLoad(This)
-#define IWineD3DIndexBuffer_GetType(This) (This)->lpVtbl->GetType(This)
-/*** IWineD3DIndexBuffer methods ***/
-#define IWineD3DIndexBuffer_Lock(This,offset,size,data,flags) (This)->lpVtbl->Lock(This,offset,size,data,flags)
-#define IWineD3DIndexBuffer_Unlock(This) (This)->lpVtbl->Unlock(This)
-#define IWineD3DIndexBuffer_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc)
-#endif
-
-#endif
-
-HRESULT STDMETHODCALLTYPE IWineD3DIndexBuffer_Lock_Proxy(
-    IWineD3DIndexBuffer* This,
-    UINT offset,
-    UINT size,
-    BYTE **data,
-    DWORD flags);
-void __RPC_STUB IWineD3DIndexBuffer_Lock_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DIndexBuffer_Unlock_Proxy(
-    IWineD3DIndexBuffer* This);
-void __RPC_STUB IWineD3DIndexBuffer_Unlock_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DIndexBuffer_GetDesc_Proxy(
-    IWineD3DIndexBuffer* This,
-    WINED3DINDEXBUFFER_DESC *desc);
-void __RPC_STUB IWineD3DIndexBuffer_GetDesc_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-
-#endif  /* __IWineD3DIndexBuffer_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DPalette_FWD_DEFINED__
-#define __IWineD3DPalette_FWD_DEFINED__
-typedef interface IWineD3DPalette IWineD3DPalette;
-#endif
+HRESULT STDMETHODCALLTYPE IWineD3DRendertargetView_GetResource_Proxy(
+    IWineD3DRendertargetView* This,
+    IWineD3DResource **resource);
+void __RPC_STUB IWineD3DRendertargetView_GetResource_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWineD3DRendertargetView_INTERFACE_DEFINED__ */
 
 /*****************************************************************************
@@ -3586,9 +3688,4 @@
 
 #endif  /* __IWineD3DPalette_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DClipper_FWD_DEFINED__
-#define __IWineD3DClipper_FWD_DEFINED__
-typedef interface IWineD3DClipper IWineD3DClipper;
-#endif
 
 /*****************************************************************************
@@ -3844,12 +3941,9 @@
         IWineD3DClipper **clipper) = 0;
 
-    virtual HRESULT STDMETHODCALLTYPE AddDirtyRect(
-        const RECT *dirty_rect) = 0;
-
     virtual HRESULT STDMETHODCALLTYPE LoadTexture(
         BOOL srgb_mode) = 0;
 
     virtual void STDMETHODCALLTYPE BindTexture(
-        ) = 0;
+        BOOL srgb) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE SaveSnapshot(
@@ -4062,8 +4156,4 @@
         IWineD3DClipper **clipper);
 
-    HRESULT (STDMETHODCALLTYPE *AddDirtyRect)(
-        IWineD3DSurface* This,
-        const RECT *dirty_rect);
-
     HRESULT (STDMETHODCALLTYPE *LoadTexture)(
         IWineD3DSurface* This,
@@ -4071,5 +4161,6 @@
 
     void (STDMETHODCALLTYPE *BindTexture)(
-        IWineD3DSurface* This);
+        IWineD3DSurface* This,
+        BOOL srgb);
 
     HRESULT (STDMETHODCALLTYPE *SaveSnapshot)(
@@ -4160,7 +4251,6 @@
 #define IWineD3DSurface_SetClipper(This,clipper) (This)->lpVtbl->SetClipper(This,clipper)
 #define IWineD3DSurface_GetClipper(This,clipper) (This)->lpVtbl->GetClipper(This,clipper)
-#define IWineD3DSurface_AddDirtyRect(This,dirty_rect) (This)->lpVtbl->AddDirtyRect(This,dirty_rect)
 #define IWineD3DSurface_LoadTexture(This,srgb_mode) (This)->lpVtbl->LoadTexture(This,srgb_mode)
-#define IWineD3DSurface_BindTexture(This) (This)->lpVtbl->BindTexture(This)
+#define IWineD3DSurface_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
 #define IWineD3DSurface_SaveSnapshot(This,filename) (This)->lpVtbl->SaveSnapshot(This,filename)
 #define IWineD3DSurface_SetContainer(This,container) (This)->lpVtbl->SetContainer(This,container)
@@ -4393,12 +4483,4 @@
     PRPC_MESSAGE pRpcMessage,
     DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DSurface_AddDirtyRect_Proxy(
-    IWineD3DSurface* This,
-    const RECT *dirty_rect);
-void __RPC_STUB IWineD3DSurface_AddDirtyRect_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
 HRESULT STDMETHODCALLTYPE IWineD3DSurface_LoadTexture_Proxy(
     IWineD3DSurface* This,
@@ -4410,5 +4492,6 @@
     DWORD* pdwStubPhase);
 void STDMETHODCALLTYPE IWineD3DSurface_BindTexture_Proxy(
-    IWineD3DSurface* This);
+    IWineD3DSurface* This,
+    BOOL srgb);
 void __RPC_STUB IWineD3DSurface_BindTexture_Stub(
     IRpcStubBuffer* This,
@@ -4522,10 +4605,4 @@
         ) = 0;
 
-    virtual HRESULT STDMETHODCALLTYPE AddDirtyBox(
-        const WINED3DBOX *dirty_box) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE CleanDirtyBox(
-        ) = 0;
-
     virtual HRESULT STDMETHODCALLTYPE LoadTexture(
         int gl_level,
@@ -4612,11 +4689,4 @@
 
     HRESULT (STDMETHODCALLTYPE *UnlockBox)(
-        IWineD3DVolume* This);
-
-    HRESULT (STDMETHODCALLTYPE *AddDirtyBox)(
-        IWineD3DVolume* This,
-        const WINED3DBOX *dirty_box);
-
-    HRESULT (STDMETHODCALLTYPE *CleanDirtyBox)(
         IWineD3DVolume* This);
 
@@ -4658,6 +4728,4 @@
 #define IWineD3DVolume_LockBox(This,locked_box,box,flags) (This)->lpVtbl->LockBox(This,locked_box,box,flags)
 #define IWineD3DVolume_UnlockBox(This) (This)->lpVtbl->UnlockBox(This)
-#define IWineD3DVolume_AddDirtyBox(This,dirty_box) (This)->lpVtbl->AddDirtyBox(This,dirty_box)
-#define IWineD3DVolume_CleanDirtyBox(This) (This)->lpVtbl->CleanDirtyBox(This)
 #define IWineD3DVolume_LoadTexture(This,gl_level,srgb_mode) (This)->lpVtbl->LoadTexture(This,gl_level,srgb_mode)
 #define IWineD3DVolume_SetContainer(This,container) (This)->lpVtbl->SetContainer(This,container)
@@ -4700,19 +4768,4 @@
     PRPC_MESSAGE pRpcMessage,
     DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DVolume_AddDirtyBox_Proxy(
-    IWineD3DVolume* This,
-    const WINED3DBOX *dirty_box);
-void __RPC_STUB IWineD3DVolume_AddDirtyBox_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DVolume_CleanDirtyBox_Proxy(
-    IWineD3DVolume* This);
-void __RPC_STUB IWineD3DVolume_CleanDirtyBox_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
 HRESULT STDMETHODCALLTYPE IWineD3DVolume_LoadTexture_Proxy(
     IWineD3DVolume* This,
@@ -4734,9 +4787,4 @@
 
 #endif  /* __IWineD3DVolume_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DBaseTexture_FWD_DEFINED__
-#define __IWineD3DBaseTexture_FWD_DEFINED__
-typedef interface IWineD3DBaseTexture IWineD3DBaseTexture;
-#endif
 
 /*****************************************************************************
@@ -4775,5 +4823,5 @@
 
     virtual HRESULT STDMETHODCALLTYPE BindTexture(
-        ) = 0;
+        BOOL srgb) = 0;
 
     virtual UINT STDMETHODCALLTYPE GetTextureDimensions(
@@ -4784,5 +4832,5 @@
 
     virtual void STDMETHODCALLTYPE ApplyStateChanges(
-        const DWORD texture_states[33],
+        const DWORD texture_states[18],
         const DWORD sampler_states[14]) = 0;
 
@@ -4876,5 +4924,6 @@
 
     HRESULT (STDMETHODCALLTYPE *BindTexture)(
-        IWineD3DBaseTexture* This);
+        IWineD3DBaseTexture* This,
+        BOOL srgb);
 
     UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
@@ -4886,5 +4935,5 @@
     void (STDMETHODCALLTYPE *ApplyStateChanges)(
         IWineD3DBaseTexture* This,
-        const DWORD texture_states[33],
+        const DWORD texture_states[18],
         const DWORD sampler_states[14]);
 
@@ -4921,5 +4970,5 @@
 #define IWineD3DBaseTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
 #define IWineD3DBaseTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
-#define IWineD3DBaseTexture_BindTexture(This) (This)->lpVtbl->BindTexture(This)
+#define IWineD3DBaseTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
 #define IWineD3DBaseTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
 #define IWineD3DBaseTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
@@ -4989,5 +5038,6 @@
     DWORD* pdwStubPhase);
 HRESULT STDMETHODCALLTYPE IWineD3DBaseTexture_BindTexture_Proxy(
-    IWineD3DBaseTexture* This);
+    IWineD3DBaseTexture* This,
+    BOOL srgb);
 void __RPC_STUB IWineD3DBaseTexture_BindTexture_Stub(
     IRpcStubBuffer* This,
@@ -5011,5 +5061,5 @@
 void STDMETHODCALLTYPE IWineD3DBaseTexture_ApplyStateChanges_Proxy(
     IWineD3DBaseTexture* This,
-    const DWORD texture_states[33],
+    const DWORD texture_states[18],
     const DWORD sampler_states[14]);
 void __RPC_STUB IWineD3DBaseTexture_ApplyStateChanges_Stub(
@@ -5020,9 +5070,4 @@
 
 #endif  /* __IWineD3DBaseTexture_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DTexture_FWD_DEFINED__
-#define __IWineD3DTexture_FWD_DEFINED__
-typedef interface IWineD3DTexture IWineD3DTexture;
-#endif
 
 /*****************************************************************************
@@ -5148,5 +5193,6 @@
 
     HRESULT (STDMETHODCALLTYPE *BindTexture)(
-        IWineD3DTexture* This);
+        IWineD3DTexture* This,
+        BOOL srgb);
 
     UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
@@ -5158,5 +5204,5 @@
     void (STDMETHODCALLTYPE *ApplyStateChanges)(
         IWineD3DTexture* This,
-        const DWORD texture_states[33],
+        const DWORD texture_states[18],
         const DWORD sampler_states[14]);
 
@@ -5223,5 +5269,5 @@
 #define IWineD3DTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
 #define IWineD3DTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
-#define IWineD3DTexture_BindTexture(This) (This)->lpVtbl->BindTexture(This)
+#define IWineD3DTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
 #define IWineD3DTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
 #define IWineD3DTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
@@ -5294,9 +5340,4 @@
 #endif  /* __IWineD3DTexture_INTERFACE_DEFINED__ */
 
-#ifndef __IWineD3DCubeTexture_FWD_DEFINED__
-#define __IWineD3DCubeTexture_FWD_DEFINED__
-typedef interface IWineD3DCubeTexture IWineD3DCubeTexture;
-#endif
-
 /*****************************************************************************
  * IWineD3DCubeTexture interface
@@ -5425,5 +5466,6 @@
 
     HRESULT (STDMETHODCALLTYPE *BindTexture)(
-        IWineD3DCubeTexture* This);
+        IWineD3DCubeTexture* This,
+        BOOL srgb);
 
     UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
@@ -5435,5 +5477,5 @@
     void (STDMETHODCALLTYPE *ApplyStateChanges)(
         IWineD3DCubeTexture* This,
-        const DWORD texture_states[33],
+        const DWORD texture_states[18],
         const DWORD sampler_states[14]);
 
@@ -5504,5 +5546,5 @@
 #define IWineD3DCubeTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
 #define IWineD3DCubeTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
-#define IWineD3DCubeTexture_BindTexture(This) (This)->lpVtbl->BindTexture(This)
+#define IWineD3DCubeTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
 #define IWineD3DCubeTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
 #define IWineD3DCubeTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
@@ -5579,9 +5621,4 @@
 #endif  /* __IWineD3DCubeTexture_INTERFACE_DEFINED__ */
 
-#ifndef __IWineD3DVolumeTexture_FWD_DEFINED__
-#define __IWineD3DVolumeTexture_FWD_DEFINED__
-typedef interface IWineD3DVolumeTexture IWineD3DVolumeTexture;
-#endif
-
 /*****************************************************************************
  * IWineD3DVolumeTexture interface
@@ -5706,5 +5743,6 @@
 
     HRESULT (STDMETHODCALLTYPE *BindTexture)(
-        IWineD3DVolumeTexture* This);
+        IWineD3DVolumeTexture* This,
+        BOOL srgb);
 
     UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
@@ -5716,5 +5754,5 @@
     void (STDMETHODCALLTYPE *ApplyStateChanges)(
         IWineD3DVolumeTexture* This,
-        const DWORD texture_states[33],
+        const DWORD texture_states[18],
         const DWORD sampler_states[14]);
 
@@ -5781,5 +5819,5 @@
 #define IWineD3DVolumeTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
 #define IWineD3DVolumeTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
-#define IWineD3DVolumeTexture_BindTexture(This) (This)->lpVtbl->BindTexture(This)
+#define IWineD3DVolumeTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
 #define IWineD3DVolumeTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
 #define IWineD3DVolumeTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
@@ -5852,9 +5890,4 @@
 #endif  /* __IWineD3DVolumeTexture_INTERFACE_DEFINED__ */
 
-#ifndef __IWineD3DVertexDeclaration_FWD_DEFINED__
-#define __IWineD3DVertexDeclaration_FWD_DEFINED__
-typedef interface IWineD3DVertexDeclaration IWineD3DVertexDeclaration;
-#endif
-
 /*****************************************************************************
  * IWineD3DVertexDeclaration interface
@@ -5870,12 +5903,4 @@
         IWineD3DDevice **device) = 0;
 
-    virtual HRESULT STDMETHODCALLTYPE GetDeclaration(
-        WINED3DVERTEXELEMENT *elements,
-        UINT *element_count) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE SetDeclaration(
-        const WINED3DVERTEXELEMENT *elements,
-        UINT element_count) = 0;
-
 };
 #else
@@ -5904,14 +5929,4 @@
         IWineD3DVertexDeclaration* This,
         IWineD3DDevice **device);
-
-    HRESULT (STDMETHODCALLTYPE *GetDeclaration)(
-        IWineD3DVertexDeclaration* This,
-        WINED3DVERTEXELEMENT *elements,
-        UINT *element_count);
-
-    HRESULT (STDMETHODCALLTYPE *SetDeclaration)(
-        IWineD3DVertexDeclaration* This,
-        const WINED3DVERTEXELEMENT *elements,
-        UINT element_count);
 
     END_INTERFACE
@@ -5930,6 +5945,4 @@
 /*** IWineD3DVertexDeclaration methods ***/
 #define IWineD3DVertexDeclaration_GetDevice(This,device) (This)->lpVtbl->GetDevice(This,device)
-#define IWineD3DVertexDeclaration_GetDeclaration(This,elements,element_count) (This)->lpVtbl->GetDeclaration(This,elements,element_count)
-#define IWineD3DVertexDeclaration_SetDeclaration(This,elements,element_count) (This)->lpVtbl->SetDeclaration(This,elements,element_count)
 #endif
 
@@ -5944,29 +5957,6 @@
     PRPC_MESSAGE pRpcMessage,
     DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DVertexDeclaration_GetDeclaration_Proxy(
-    IWineD3DVertexDeclaration* This,
-    WINED3DVERTEXELEMENT *elements,
-    UINT *element_count);
-void __RPC_STUB IWineD3DVertexDeclaration_GetDeclaration_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DVertexDeclaration_SetDeclaration_Proxy(
-    IWineD3DVertexDeclaration* This,
-    const WINED3DVERTEXELEMENT *elements,
-    UINT element_count);
-void __RPC_STUB IWineD3DVertexDeclaration_SetDeclaration_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
 
 #endif  /* __IWineD3DVertexDeclaration_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DStateBlock_FWD_DEFINED__
-#define __IWineD3DStateBlock_FWD_DEFINED__
-typedef interface IWineD3DStateBlock IWineD3DStateBlock;
-#endif
 
 /*****************************************************************************
@@ -6081,9 +6071,4 @@
 
 #endif  /* __IWineD3DStateBlock_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DQuery_FWD_DEFINED__
-#define __IWineD3DQuery_FWD_DEFINED__
-typedef interface IWineD3DQuery IWineD3DQuery;
-#endif
 
 /*****************************************************************************
@@ -6474,8 +6459,160 @@
 #endif  /* __IWineD3DSwapChain_INTERFACE_DEFINED__ */
 
-#ifndef __IWineD3DBaseShader_FWD_DEFINED__
-#define __IWineD3DBaseShader_FWD_DEFINED__
-typedef interface IWineD3DBaseShader IWineD3DBaseShader;
+/*****************************************************************************
+ * IWineD3DBuffer interface
+ */
+#ifndef __IWineD3DBuffer_INTERFACE_DEFINED__
+#define __IWineD3DBuffer_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWineD3DBuffer, 0xb3f028e8, 0x1a40, 0x4ab3, 0x92,0x92, 0x5b,0xf6,0xcf,0xd8,0x02,0x09);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IWineD3DBuffer : public IWineD3DResource
+{
+    virtual HRESULT STDMETHODCALLTYPE Map(
+        UINT offset,
+        UINT size,
+        BYTE **data,
+        DWORD flags) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE Unmap(
+        ) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetDesc(
+        WINED3DBUFFER_DESC *desc) = 0;
+
+};
+#else
+typedef struct IWineD3DBufferVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWineD3DBuffer* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWineD3DBuffer* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWineD3DBuffer* This);
+
+    /*** IWineD3DBase methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetParent)(
+        IWineD3DBuffer* This,
+        IUnknown **parent);
+
+    /*** IWineD3DResource methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetDevice)(
+        IWineD3DBuffer* This,
+        IWineD3DDevice **device);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
+        IWineD3DBuffer* This,
+        REFGUID guid,
+        const void *data,
+        DWORD data_size,
+        DWORD flags);
+
+    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
+        IWineD3DBuffer* This,
+        REFGUID guid,
+        void *data,
+        DWORD *data_size);
+
+    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
+        IWineD3DBuffer* This,
+        REFGUID guid);
+
+    DWORD (STDMETHODCALLTYPE *SetPriority)(
+        IWineD3DBuffer* This,
+        DWORD new_priority);
+
+    DWORD (STDMETHODCALLTYPE *GetPriority)(
+        IWineD3DBuffer* This);
+
+    void (STDMETHODCALLTYPE *PreLoad)(
+        IWineD3DBuffer* This);
+
+    void (STDMETHODCALLTYPE *UnLoad)(
+        IWineD3DBuffer* This);
+
+    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
+        IWineD3DBuffer* This);
+
+    /*** IWineD3DBuffer methods ***/
+    HRESULT (STDMETHODCALLTYPE *Map)(
+        IWineD3DBuffer* This,
+        UINT offset,
+        UINT size,
+        BYTE **data,
+        DWORD flags);
+
+    HRESULT (STDMETHODCALLTYPE *Unmap)(
+        IWineD3DBuffer* This);
+
+    HRESULT (STDMETHODCALLTYPE *GetDesc)(
+        IWineD3DBuffer* This,
+        WINED3DBUFFER_DESC *desc);
+
+    END_INTERFACE
+} IWineD3DBufferVtbl;
+interface IWineD3DBuffer {
+    CONST_VTBL IWineD3DBufferVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IWineD3DBuffer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWineD3DBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWineD3DBuffer_Release(This) (This)->lpVtbl->Release(This)
+/*** IWineD3DBase methods ***/
+#define IWineD3DBuffer_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
+/*** IWineD3DResource methods ***/
+#define IWineD3DBuffer_GetDevice(This,device) (This)->lpVtbl->GetDevice(This,device)
+#define IWineD3DBuffer_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
+#define IWineD3DBuffer_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
+#define IWineD3DBuffer_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
+#define IWineD3DBuffer_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
+#define IWineD3DBuffer_GetPriority(This) (This)->lpVtbl->GetPriority(This)
+#define IWineD3DBuffer_PreLoad(This) (This)->lpVtbl->PreLoad(This)
+#define IWineD3DBuffer_UnLoad(This) (This)->lpVtbl->UnLoad(This)
+#define IWineD3DBuffer_GetType(This) (This)->lpVtbl->GetType(This)
+/*** IWineD3DBuffer methods ***/
+#define IWineD3DBuffer_Map(This,offset,size,data,flags) (This)->lpVtbl->Map(This,offset,size,data,flags)
+#define IWineD3DBuffer_Unmap(This) (This)->lpVtbl->Unmap(This)
+#define IWineD3DBuffer_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc)
 #endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IWineD3DBuffer_Map_Proxy(
+    IWineD3DBuffer* This,
+    UINT offset,
+    UINT size,
+    BYTE **data,
+    DWORD flags);
+void __RPC_STUB IWineD3DBuffer_Map_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DBuffer_Unmap_Proxy(
+    IWineD3DBuffer* This);
+void __RPC_STUB IWineD3DBuffer_Unmap_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DBuffer_GetDesc_Proxy(
+    IWineD3DBuffer* This,
+    WINED3DBUFFER_DESC *desc);
+void __RPC_STUB IWineD3DBuffer_GetDesc_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWineD3DBuffer_INTERFACE_DEFINED__ */
 
 /*****************************************************************************
@@ -6548,9 +6685,4 @@
 
 #endif  /* __IWineD3DBaseShader_INTERFACE_DEFINED__ */
-
-#ifndef __IWineD3DVertexShader_FWD_DEFINED__
-#define __IWineD3DVertexShader_FWD_DEFINED__
-typedef interface IWineD3DVertexShader IWineD3DVertexShader;
-#endif
 
 /*****************************************************************************
@@ -6688,9 +6820,4 @@
 #endif  /* __IWineD3DVertexShader_INTERFACE_DEFINED__ */
 
-#ifndef __IWineD3DPixelShader_FWD_DEFINED__
-#define __IWineD3DPixelShader_FWD_DEFINED__
-typedef interface IWineD3DPixelShader IWineD3DPixelShader;
-#endif
-
 /*****************************************************************************
  * IWineD3DPixelShader interface
@@ -6703,7 +6830,4 @@
 interface IWineD3DPixelShader : public IWineD3DBaseShader
 {
-    virtual HRESULT STDMETHODCALLTYPE UpdateSamplers(
-        ) = 0;
-
     virtual HRESULT STDMETHODCALLTYPE GetDevice(
         IWineD3DDevice **device) = 0;
@@ -6741,7 +6865,4 @@
 
     /*** IWineD3DPixelShader methods ***/
-    HRESULT (STDMETHODCALLTYPE *UpdateSamplers)(
-        IWineD3DPixelShader* This);
-
     HRESULT (STDMETHODCALLTYPE *GetDevice)(
         IWineD3DPixelShader* This,
@@ -6769,5 +6890,4 @@
 #define IWineD3DPixelShader_SetFunction(This,function) (This)->lpVtbl->SetFunction(This,function)
 /*** IWineD3DPixelShader methods ***/
-#define IWineD3DPixelShader_UpdateSamplers(This) (This)->lpVtbl->UpdateSamplers(This)
 #define IWineD3DPixelShader_GetDevice(This,device) (This)->lpVtbl->GetDevice(This,device)
 #define IWineD3DPixelShader_GetFunction(This,data,data_size) (This)->lpVtbl->GetFunction(This,data,data_size)
@@ -6776,11 +6896,4 @@
 #endif
 
-HRESULT STDMETHODCALLTYPE IWineD3DPixelShader_UpdateSamplers_Proxy(
-    IWineD3DPixelShader* This);
-void __RPC_STUB IWineD3DPixelShader_UpdateSamplers_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
 HRESULT STDMETHODCALLTYPE IWineD3DPixelShader_GetDevice_Proxy(
     IWineD3DPixelShader* This,
@@ -6813,4 +6926,10 @@
 interface IWineD3DDevice : public IWineD3DBase
 {
+    virtual HRESULT STDMETHODCALLTYPE CreateBuffer(
+        struct wined3d_buffer_desc *desc,
+        const void *data,
+        IUnknown *parent,
+        IWineD3DBuffer **buffer) = 0;
+
     virtual HRESULT STDMETHODCALLTYPE CreateVertexBuffer(
         UINT length,
@@ -6818,6 +6937,5 @@
         DWORD fvf,
         WINED3DPOOL pool,
-        IWineD3DVertexBuffer **vertex_buffer,
-        HANDLE *shared_handle,
+        IWineD3DBuffer **vertex_buffer,
         IUnknown *parent) = 0;
 
@@ -6825,8 +6943,6 @@
         UINT length,
         DWORD usage,
-        WINED3DFORMAT format,
         WINED3DPOOL pool,
-        IWineD3DIndexBuffer **index_buffer,
-        HANDLE *shared_handle,
+        IWineD3DBuffer **index_buffer,
         IUnknown *parent) = 0;
 
@@ -6849,7 +6965,11 @@
         WINED3DMULTISAMPLE_TYPE multisample_type,
         DWORD multisample_quality,
-        HANDLE *shared_handle,
         WINED3DSURFTYPE surface_type,
         IUnknown *parent) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateRendertargetView(
+        IWineD3DResource *resource,
+        IUnknown *parent,
+        IWineD3DRendertargetView **rendertarget_view) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE CreateTexture(
@@ -6861,7 +6981,5 @@
         WINED3DPOOL pool,
         IWineD3DTexture **texture,
-        HANDLE *shared_handle,
-        IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_surface_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,DWORD Usage,WINED3DPOOL Pool,UINT Level,WINED3DCUBEMAP_FACES Face,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle)) = 0;
+        IUnknown *parent) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE CreateVolumeTexture(
@@ -6874,7 +6992,5 @@
         WINED3DPOOL pool,
         IWineD3DVolumeTexture **texture,
-        HANDLE *shared_handle,
-        IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_volume_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,UINT Depth,WINED3DFORMAT Format,WINED3DPOOL Pool,DWORD Usage,IWineD3DVolume **ppVolume,HANDLE *pSharedHandle)) = 0;
+        IUnknown *parent) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE CreateVolume(
@@ -6886,5 +7002,4 @@
         WINED3DPOOL pool,
         IWineD3DVolume **volume,
-        HANDLE *shared_handle,
         IUnknown *parent) = 0;
 
@@ -6896,7 +7011,5 @@
         WINED3DPOOL pool,
         IWineD3DCubeTexture **texture,
-        HANDLE *shared_handle,
-        IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_surface_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,DWORD Usage,WINED3DPOOL Pool,UINT Level,WINED3DCUBEMAP_FACES Face,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle)) = 0;
+        IUnknown *parent) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE CreateQuery(
@@ -6909,6 +7022,4 @@
         IWineD3DSwapChain **swapchain,
         IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_render_target_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle),
-        HRESULT (STDMETHODCALLTYPE * create_depth_stencil_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle),
         WINED3DSURFTYPE surface_type) = 0;
 
@@ -6942,10 +7053,8 @@
 
     virtual HRESULT STDMETHODCALLTYPE Init3D(
-        WINED3DPRESENT_PARAMETERS *present_parameters,
-        HRESULT (STDMETHODCALLTYPE * create_swapchain_callback)(IUnknown *pDevice,WINED3DPRESENT_PARAMETERS *pPresentationParameters,IWineD3DSwapChain **pSwapChain)) = 0;
+        WINED3DPRESENT_PARAMETERS *present_parameters) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE InitGDI(
-        WINED3DPRESENT_PARAMETERS *present_parameters,
-        HRESULT (STDMETHODCALLTYPE * create_swapchain_callback)(IUnknown *pDevice,WINED3DPRESENT_PARAMETERS *pPresentationParameters,IWineD3DSwapChain **pSwapChain)) = 0;
+        WINED3DPRESENT_PARAMETERS *present_parameters) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE Uninit3D(
@@ -7047,10 +7156,4 @@
         IWineD3DSurface **depth_stencil) = 0;
 
-    virtual HRESULT STDMETHODCALLTYPE SetFVF(
-        DWORD fvf) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE GetFVF(
-        DWORD *fvf) = 0;
-
     virtual void STDMETHODCALLTYPE SetGammaRamp(
         UINT swapchain_idx,
@@ -7063,8 +7166,9 @@
 
     virtual HRESULT STDMETHODCALLTYPE SetIndices(
-        IWineD3DIndexBuffer *index_buffer) = 0;
+        IWineD3DBuffer *index_buffer,
+        WINED3DFORMAT format) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE GetIndices(
-        IWineD3DIndexBuffer **index_buffer) = 0;
+        IWineD3DBuffer **index_buffer) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE SetBaseVertexIndex(
@@ -7190,5 +7294,5 @@
     virtual HRESULT STDMETHODCALLTYPE SetStreamSource(
         UINT stream_idx,
-        IWineD3DVertexBuffer *vertex_buffer,
+        IWineD3DBuffer *buffer,
         UINT offset,
         UINT stride) = 0;
@@ -7196,5 +7300,5 @@
     virtual HRESULT STDMETHODCALLTYPE GetStreamSource(
         UINT stream_idx,
-        IWineD3DVertexBuffer **vertex_buffer,
+        IWineD3DBuffer **buffer,
         UINT *offset,
         UINT *stride) = 0;
@@ -7293,7 +7397,8 @@
         UINT dst_idx,
         UINT vertex_count,
-        IWineD3DVertexBuffer *dest_buffer,
+        IWineD3DBuffer *dest_buffer,
         IWineD3DVertexDeclaration *declaration,
-        DWORD flags) = 0;
+        DWORD flags,
+        DWORD DestFVF) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE BeginStateBlock(
@@ -7323,27 +7428,33 @@
         DWORD stencil) = 0;
 
+    virtual void STDMETHODCALLTYPE ClearRendertargetView(
+        IWineD3DRendertargetView *rendertarget_view,
+        const float color[4]) = 0;
+
+    virtual void STDMETHODCALLTYPE SetPrimitiveType(
+        WINED3DPRIMITIVETYPE primitive_topology) = 0;
+
+    virtual void STDMETHODCALLTYPE GetPrimitiveType(
+        WINED3DPRIMITIVETYPE *primitive_topology) = 0;
+
     virtual HRESULT STDMETHODCALLTYPE DrawPrimitive(
-        WINED3DPRIMITIVETYPE primitive_type,
         UINT start_vertex,
-        UINT primitive_count) = 0;
+        UINT vertex_count) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE DrawIndexedPrimitive(
-        WINED3DPRIMITIVETYPE primitive_type,
         UINT min_vertex_idx,
         UINT vertex_count,
         UINT start_idx,
-        UINT primitive_count) = 0;
+        UINT index_count) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE DrawPrimitiveUP(
-        WINED3DPRIMITIVETYPE primitive_type,
-        UINT primitive_count,
+        UINT vertex_count,
         const void *stream_data,
         UINT stream_stride) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE DrawIndexedPrimitiveUP(
-        WINED3DPRIMITIVETYPE primitive_type,
         UINT min_vertex_idx,
         UINT vertex_count,
-        UINT primitive_count,
+        UINT index_count,
         const void *index_data,
         WINED3DFORMAT index_data_format,
@@ -7352,11 +7463,9 @@
 
     virtual HRESULT STDMETHODCALLTYPE DrawPrimitiveStrided(
-        WINED3DPRIMITIVETYPE primitive_type,
-        UINT primitive_count,
+        UINT vertex_count,
         const WineDirect3DVertexStridedData *strided_data) = 0;
 
     virtual HRESULT STDMETHODCALLTYPE DrawIndexedPrimitiveStrided(
-        WINED3DPRIMITIVETYPE primitive_type,
-        UINT primitive_count,
+        UINT index_count,
         const WineDirect3DVertexStridedData *strided_data,
         UINT vertex_count,
@@ -7426,4 +7535,11 @@
 
     /*** IWineD3DDevice methods ***/
+    HRESULT (STDMETHODCALLTYPE *CreateBuffer)(
+        IWineD3DDevice* This,
+        struct wined3d_buffer_desc *desc,
+        const void *data,
+        IUnknown *parent,
+        IWineD3DBuffer **buffer);
+
     HRESULT (STDMETHODCALLTYPE *CreateVertexBuffer)(
         IWineD3DDevice* This,
@@ -7432,6 +7548,5 @@
         DWORD fvf,
         WINED3DPOOL pool,
-        IWineD3DVertexBuffer **vertex_buffer,
-        HANDLE *shared_handle,
+        IWineD3DBuffer **vertex_buffer,
         IUnknown *parent);
 
@@ -7440,8 +7555,6 @@
         UINT length,
         DWORD usage,
-        WINED3DFORMAT format,
         WINED3DPOOL pool,
-        IWineD3DIndexBuffer **index_buffer,
-        HANDLE *shared_handle,
+        IWineD3DBuffer **index_buffer,
         IUnknown *parent);
 
@@ -7466,7 +7579,12 @@
         WINED3DMULTISAMPLE_TYPE multisample_type,
         DWORD multisample_quality,
-        HANDLE *shared_handle,
         WINED3DSURFTYPE surface_type,
         IUnknown *parent);
+
+    HRESULT (STDMETHODCALLTYPE *CreateRendertargetView)(
+        IWineD3DDevice* This,
+        IWineD3DResource *resource,
+        IUnknown *parent,
+        IWineD3DRendertargetView **rendertarget_view);
 
     HRESULT (STDMETHODCALLTYPE *CreateTexture)(
@@ -7479,7 +7597,5 @@
         WINED3DPOOL pool,
         IWineD3DTexture **texture,
-        HANDLE *shared_handle,
-        IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_surface_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,DWORD Usage,WINED3DPOOL Pool,UINT Level,WINED3DCUBEMAP_FACES Face,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle));
+        IUnknown *parent);
 
     HRESULT (STDMETHODCALLTYPE *CreateVolumeTexture)(
@@ -7493,7 +7609,5 @@
         WINED3DPOOL pool,
         IWineD3DVolumeTexture **texture,
-        HANDLE *shared_handle,
-        IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_volume_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,UINT Depth,WINED3DFORMAT Format,WINED3DPOOL Pool,DWORD Usage,IWineD3DVolume **ppVolume,HANDLE *pSharedHandle));
+        IUnknown *parent);
 
     HRESULT (STDMETHODCALLTYPE *CreateVolume)(
@@ -7506,5 +7620,4 @@
         WINED3DPOOL pool,
         IWineD3DVolume **volume,
-        HANDLE *shared_handle,
         IUnknown *parent);
 
@@ -7517,7 +7630,5 @@
         WINED3DPOOL pool,
         IWineD3DCubeTexture **texture,
-        HANDLE *shared_handle,
-        IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_surface_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,DWORD Usage,WINED3DPOOL Pool,UINT Level,WINED3DCUBEMAP_FACES Face,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle));
+        IUnknown *parent);
 
     HRESULT (STDMETHODCALLTYPE *CreateQuery)(
@@ -7532,6 +7643,4 @@
         IWineD3DSwapChain **swapchain,
         IUnknown *parent,
-        HRESULT (STDMETHODCALLTYPE * create_render_target_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle),
-        HRESULT (STDMETHODCALLTYPE * create_depth_stencil_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle),
         WINED3DSURFTYPE surface_type);
 
@@ -7571,11 +7680,9 @@
     HRESULT (STDMETHODCALLTYPE *Init3D)(
         IWineD3DDevice* This,
-        WINED3DPRESENT_PARAMETERS *present_parameters,
-        HRESULT (STDMETHODCALLTYPE * create_swapchain_callback)(IUnknown *pDevice,WINED3DPRESENT_PARAMETERS *pPresentationParameters,IWineD3DSwapChain **pSwapChain));
+        WINED3DPRESENT_PARAMETERS *present_parameters);
 
     HRESULT (STDMETHODCALLTYPE *InitGDI)(
         IWineD3DDevice* This,
-        WINED3DPRESENT_PARAMETERS *present_parameters,
-        HRESULT (STDMETHODCALLTYPE * create_swapchain_callback)(IUnknown *pDevice,WINED3DPRESENT_PARAMETERS *pPresentationParameters,IWineD3DSwapChain **pSwapChain));
+        WINED3DPRESENT_PARAMETERS *present_parameters);
 
     HRESULT (STDMETHODCALLTYPE *Uninit3D)(
@@ -7700,12 +7807,4 @@
         IWineD3DSurface **depth_stencil);
 
-    HRESULT (STDMETHODCALLTYPE *SetFVF)(
-        IWineD3DDevice* This,
-        DWORD fvf);
-
-    HRESULT (STDMETHODCALLTYPE *GetFVF)(
-        IWineD3DDevice* This,
-        DWORD *fvf);
-
     void (STDMETHODCALLTYPE *SetGammaRamp)(
         IWineD3DDevice* This,
@@ -7721,9 +7820,10 @@
     HRESULT (STDMETHODCALLTYPE *SetIndices)(
         IWineD3DDevice* This,
-        IWineD3DIndexBuffer *index_buffer);
+        IWineD3DBuffer *index_buffer,
+        WINED3DFORMAT format);
 
     HRESULT (STDMETHODCALLTYPE *GetIndices)(
         IWineD3DDevice* This,
-        IWineD3DIndexBuffer **index_buffer);
+        IWineD3DBuffer **index_buffer);
 
     HRESULT (STDMETHODCALLTYPE *SetBaseVertexIndex)(
@@ -7879,5 +7979,5 @@
         IWineD3DDevice* This,
         UINT stream_idx,
-        IWineD3DVertexBuffer *vertex_buffer,
+        IWineD3DBuffer *buffer,
         UINT offset,
         UINT stride);
@@ -7886,5 +7986,5 @@
         IWineD3DDevice* This,
         UINT stream_idx,
-        IWineD3DVertexBuffer **vertex_buffer,
+        IWineD3DBuffer **buffer,
         UINT *offset,
         UINT *stride);
@@ -8006,7 +8106,8 @@
         UINT dst_idx,
         UINT vertex_count,
-        IWineD3DVertexBuffer *dest_buffer,
+        IWineD3DBuffer *dest_buffer,
         IWineD3DVertexDeclaration *declaration,
-        DWORD flags);
+        DWORD flags,
+        DWORD DestFVF);
 
     HRESULT (STDMETHODCALLTYPE *BeginStateBlock)(
@@ -8039,22 +8140,32 @@
         DWORD stencil);
 
+    void (STDMETHODCALLTYPE *ClearRendertargetView)(
+        IWineD3DDevice* This,
+        IWineD3DRendertargetView *rendertarget_view,
+        const float color[4]);
+
+    void (STDMETHODCALLTYPE *SetPrimitiveType)(
+        IWineD3DDevice* This,
+        WINED3DPRIMITIVETYPE primitive_topology);
+
+    void (STDMETHODCALLTYPE *GetPrimitiveType)(
+        IWineD3DDevice* This,
+        WINED3DPRIMITIVETYPE *primitive_topology);
+
     HRESULT (STDMETHODCALLTYPE *DrawPrimitive)(
         IWineD3DDevice* This,
-        WINED3DPRIMITIVETYPE primitive_type,
         UINT start_vertex,
-        UINT primitive_count);
+        UINT vertex_count);
 
     HRESULT (STDMETHODCALLTYPE *DrawIndexedPrimitive)(
         IWineD3DDevice* This,
-        WINED3DPRIMITIVETYPE primitive_type,
         UINT min_vertex_idx,
         UINT vertex_count,
         UINT start_idx,
-        UINT primitive_count);
+        UINT index_count);
 
     HRESULT (STDMETHODCALLTYPE *DrawPrimitiveUP)(
         IWineD3DDevice* This,
-        WINED3DPRIMITIVETYPE primitive_type,
-        UINT primitive_count,
+        UINT vertex_count,
         const void *stream_data,
         UINT stream_stride);
@@ -8062,8 +8173,7 @@
     HRESULT (STDMETHODCALLTYPE *DrawIndexedPrimitiveUP)(
         IWineD3DDevice* This,
-        WINED3DPRIMITIVETYPE primitive_type,
         UINT min_vertex_idx,
         UINT vertex_count,
-        UINT primitive_count,
+        UINT index_count,
         const void *index_data,
         WINED3DFORMAT index_data_format,
@@ -8073,12 +8183,10 @@
     HRESULT (STDMETHODCALLTYPE *DrawPrimitiveStrided)(
         IWineD3DDevice* This,
-        WINED3DPRIMITIVETYPE primitive_type,
-        UINT primitive_count,
+        UINT vertex_count,
         const WineDirect3DVertexStridedData *strided_data);
 
     HRESULT (STDMETHODCALLTYPE *DrawIndexedPrimitiveStrided)(
         IWineD3DDevice* This,
-        WINED3DPRIMITIVETYPE primitive_type,
-        UINT primitive_count,
+        UINT index_count,
         const WineDirect3DVertexStridedData *strided_data,
         UINT vertex_count,
@@ -8148,14 +8256,16 @@
 #define IWineD3DDevice_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
 /*** IWineD3DDevice methods ***/
-#define IWineD3DDevice_CreateVertexBuffer(This,length,usage,fvf,pool,vertex_buffer,shared_handle,parent) (This)->lpVtbl->CreateVertexBuffer(This,length,usage,fvf,pool,vertex_buffer,shared_handle,parent)
-#define IWineD3DDevice_CreateIndexBuffer(This,length,usage,format,pool,index_buffer,shared_handle,parent) (This)->lpVtbl->CreateIndexBuffer(This,length,usage,format,pool,index_buffer,shared_handle,parent)
+#define IWineD3DDevice_CreateBuffer(This,desc,data,parent,buffer) (This)->lpVtbl->CreateBuffer(This,desc,data,parent,buffer)
+#define IWineD3DDevice_CreateVertexBuffer(This,length,usage,fvf,pool,vertex_buffer,parent) (This)->lpVtbl->CreateVertexBuffer(This,length,usage,fvf,pool,vertex_buffer,parent)
+#define IWineD3DDevice_CreateIndexBuffer(This,length,usage,pool,index_buffer,parent) (This)->lpVtbl->CreateIndexBuffer(This,length,usage,pool,index_buffer,parent)
 #define IWineD3DDevice_CreateStateBlock(This,type,stateblock,parent) (This)->lpVtbl->CreateStateBlock(This,type,stateblock,parent)
-#define IWineD3DDevice_CreateSurface(This,width,height,format,lockable,discard,level,surface,resource_type,usage,pool,multisample_type,multisample_quality,shared_handle,surface_type,parent) (This)->lpVtbl->CreateSurface(This,width,height,format,lockable,discard,level,surface,resource_type,usage,pool,multisample_type,multisample_quality,shared_handle,surface_type,parent)
-#define IWineD3DDevice_CreateTexture(This,width,height,levels,usage,format,pool,texture,shared_handle,parent,create_surface_callback) (This)->lpVtbl->CreateTexture(This,width,height,levels,usage,format,pool,texture,shared_handle,parent,create_surface_callback)
-#define IWineD3DDevice_CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,shared_handle,parent,create_volume_callback) (This)->lpVtbl->CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,shared_handle,parent,create_volume_callback)
-#define IWineD3DDevice_CreateVolume(This,width,height,depth,usage,format,pool,volume,shared_handle,parent) (This)->lpVtbl->CreateVolume(This,width,height,depth,usage,format,pool,volume,shared_handle,parent)
-#define IWineD3DDevice_CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,shared_handle,parent,create_surface_callback) (This)->lpVtbl->CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,shared_handle,parent,create_surface_callback)
+#define IWineD3DDevice_CreateSurface(This,width,height,format,lockable,discard,level,surface,resource_type,usage,pool,multisample_type,multisample_quality,surface_type,parent) (This)->lpVtbl->CreateSurface(This,width,height,format,lockable,discard,level,surface,resource_type,usage,pool,multisample_type,multisample_quality,surface_type,parent)
+#define IWineD3DDevice_CreateRendertargetView(This,resource,parent,rendertarget_view) (This)->lpVtbl->CreateRendertargetView(This,resource,parent,rendertarget_view)
+#define IWineD3DDevice_CreateTexture(This,width,height,levels,usage,format,pool,texture,parent) (This)->lpVtbl->CreateTexture(This,width,height,levels,usage,format,pool,texture,parent)
+#define IWineD3DDevice_CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,parent) (This)->lpVtbl->CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,parent)
+#define IWineD3DDevice_CreateVolume(This,width,height,depth,usage,format,pool,volume,parent) (This)->lpVtbl->CreateVolume(This,width,height,depth,usage,format,pool,volume,parent)
+#define IWineD3DDevice_CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,parent) (This)->lpVtbl->CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,parent)
 #define IWineD3DDevice_CreateQuery(This,type,query,parent) (This)->lpVtbl->CreateQuery(This,type,query,parent)
-#define IWineD3DDevice_CreateSwapChain(This,present_parameters,swapchain,parent,create_render_target_callback,create_depth_stencil_callback,surface_type) (This)->lpVtbl->CreateSwapChain(This,present_parameters,swapchain,parent,create_render_target_callback,create_depth_stencil_callback,surface_type)
+#define IWineD3DDevice_CreateSwapChain(This,present_parameters,swapchain,parent,surface_type) (This)->lpVtbl->CreateSwapChain(This,present_parameters,swapchain,parent,surface_type)
 #define IWineD3DDevice_CreateVertexDeclaration(This,declaration,parent,elements,element_count) (This)->lpVtbl->CreateVertexDeclaration(This,declaration,parent,elements,element_count)
 #define IWineD3DDevice_CreateVertexDeclarationFromFVF(This,declaration,parent,fvf) (This)->lpVtbl->CreateVertexDeclarationFromFVF(This,declaration,parent,fvf)
@@ -8163,6 +8273,6 @@
 #define IWineD3DDevice_CreatePixelShader(This,function,shader,parent) (This)->lpVtbl->CreatePixelShader(This,function,shader,parent)
 #define IWineD3DDevice_CreatePalette(This,flags,palette_entry,palette,parent) (This)->lpVtbl->CreatePalette(This,flags,palette_entry,palette,parent)
-#define IWineD3DDevice_Init3D(This,present_parameters,create_swapchain_callback) (This)->lpVtbl->Init3D(This,present_parameters,create_swapchain_callback)
-#define IWineD3DDevice_InitGDI(This,present_parameters,create_swapchain_callback) (This)->lpVtbl->InitGDI(This,present_parameters,create_swapchain_callback)
+#define IWineD3DDevice_Init3D(This,present_parameters) (This)->lpVtbl->Init3D(This,present_parameters)
+#define IWineD3DDevice_InitGDI(This,present_parameters) (This)->lpVtbl->InitGDI(This,present_parameters)
 #define IWineD3DDevice_Uninit3D(This,destroy_surface_callback,destroy_swapchain_callback) (This)->lpVtbl->Uninit3D(This,destroy_surface_callback,destroy_swapchain_callback)
 #define IWineD3DDevice_UninitGDI(This,destroy_swapchain_callback) (This)->lpVtbl->UninitGDI(This,destroy_swapchain_callback)
@@ -8193,9 +8303,7 @@
 #define IWineD3DDevice_SetDepthStencilSurface(This,depth_stencil) (This)->lpVtbl->SetDepthStencilSurface(This,depth_stencil)
 #define IWineD3DDevice_GetDepthStencilSurface(This,depth_stencil) (This)->lpVtbl->GetDepthStencilSurface(This,depth_stencil)
-#define IWineD3DDevice_SetFVF(This,fvf) (This)->lpVtbl->SetFVF(This,fvf)
-#define IWineD3DDevice_GetFVF(This,fvf) (This)->lpVtbl->GetFVF(This,fvf)
 #define IWineD3DDevice_SetGammaRamp(This,swapchain_idx,flags,ramp) (This)->lpVtbl->SetGammaRamp(This,swapchain_idx,flags,ramp)
 #define IWineD3DDevice_GetGammaRamp(This,swapchain_idx,ramp) (This)->lpVtbl->GetGammaRamp(This,swapchain_idx,ramp)
-#define IWineD3DDevice_SetIndices(This,index_buffer) (This)->lpVtbl->SetIndices(This,index_buffer)
+#define IWineD3DDevice_SetIndices(This,index_buffer,format) (This)->lpVtbl->SetIndices(This,index_buffer,format)
 #define IWineD3DDevice_GetIndices(This,index_buffer) (This)->lpVtbl->GetIndices(This,index_buffer)
 #define IWineD3DDevice_SetBaseVertexIndex(This,base_index) (This)->lpVtbl->SetBaseVertexIndex(This,base_index)
@@ -8230,6 +8338,6 @@
 #define IWineD3DDevice_SetSoftwareVertexProcessing(This,software) (This)->lpVtbl->SetSoftwareVertexProcessing(This,software)
 #define IWineD3DDevice_GetSoftwareVertexProcessing(This) (This)->lpVtbl->GetSoftwareVertexProcessing(This)
-#define IWineD3DDevice_SetStreamSource(This,stream_idx,vertex_buffer,offset,stride) (This)->lpVtbl->SetStreamSource(This,stream_idx,vertex_buffer,offset,stride)
-#define IWineD3DDevice_GetStreamSource(This,stream_idx,vertex_buffer,offset,stride) (This)->lpVtbl->GetStreamSource(This,stream_idx,vertex_buffer,offset,stride)
+#define IWineD3DDevice_SetStreamSource(This,stream_idx,buffer,offset,stride) (This)->lpVtbl->SetStreamSource(This,stream_idx,buffer,offset,stride)
+#define IWineD3DDevice_GetStreamSource(This,stream_idx,buffer,offset,stride) (This)->lpVtbl->GetStreamSource(This,stream_idx,buffer,offset,stride)
 #define IWineD3DDevice_SetStreamSourceFreq(This,stream_idx,divider) (This)->lpVtbl->SetStreamSourceFreq(This,stream_idx,divider)
 #define IWineD3DDevice_GetStreamSourceFreq(This,stream_idx,divider) (This)->lpVtbl->GetStreamSourceFreq(This,stream_idx,divider)
@@ -8254,5 +8362,5 @@
 #define IWineD3DDevice_MultiplyTransform(This,state,matrix) (This)->lpVtbl->MultiplyTransform(This,state,matrix)
 #define IWineD3DDevice_ValidateDevice(This,num_passes) (This)->lpVtbl->ValidateDevice(This,num_passes)
-#define IWineD3DDevice_ProcessVertices(This,src_start_idx,dst_idx,vertex_count,dest_buffer,declaration,flags) (This)->lpVtbl->ProcessVertices(This,src_start_idx,dst_idx,vertex_count,dest_buffer,declaration,flags)
+#define IWineD3DDevice_ProcessVertices(This,src_start_idx,dst_idx,vertex_count,dest_buffer,declaration,flags,DestFVF) (This)->lpVtbl->ProcessVertices(This,src_start_idx,dst_idx,vertex_count,dest_buffer,declaration,flags,DestFVF)
 #define IWineD3DDevice_BeginStateBlock(This) (This)->lpVtbl->BeginStateBlock(This)
 #define IWineD3DDevice_EndStateBlock(This,stateblock) (This)->lpVtbl->EndStateBlock(This,stateblock)
@@ -8261,10 +8369,13 @@
 #define IWineD3DDevice_Present(This,src_rect,dst_rect,dst_window_override,dirty_region) (This)->lpVtbl->Present(This,src_rect,dst_rect,dst_window_override,dirty_region)
 #define IWineD3DDevice_Clear(This,rect_count,rects,flags,color,z,stencil) (This)->lpVtbl->Clear(This,rect_count,rects,flags,color,z,stencil)
-#define IWineD3DDevice_DrawPrimitive(This,primitive_type,start_vertex,primitive_count) (This)->lpVtbl->DrawPrimitive(This,primitive_type,start_vertex,primitive_count)
-#define IWineD3DDevice_DrawIndexedPrimitive(This,primitive_type,min_vertex_idx,vertex_count,start_idx,primitive_count) (This)->lpVtbl->DrawIndexedPrimitive(This,primitive_type,min_vertex_idx,vertex_count,start_idx,primitive_count)
-#define IWineD3DDevice_DrawPrimitiveUP(This,primitive_type,primitive_count,stream_data,stream_stride) (This)->lpVtbl->DrawPrimitiveUP(This,primitive_type,primitive_count,stream_data,stream_stride)
-#define IWineD3DDevice_DrawIndexedPrimitiveUP(This,primitive_type,min_vertex_idx,vertex_count,primitive_count,index_data,index_data_format,stream_data,stream_stride) (This)->lpVtbl->DrawIndexedPrimitiveUP(This,primitive_type,min_vertex_idx,vertex_count,primitive_count,index_data,index_data_format,stream_data,stream_stride)
-#define IWineD3DDevice_DrawPrimitiveStrided(This,primitive_type,primitive_count,strided_data) (This)->lpVtbl->DrawPrimitiveStrided(This,primitive_type,primitive_count,strided_data)
-#define IWineD3DDevice_DrawIndexedPrimitiveStrided(This,primitive_type,primitive_count,strided_data,vertex_count,index_data,index_data_format) (This)->lpVtbl->DrawIndexedPrimitiveStrided(This,primitive_type,primitive_count,strided_data,vertex_count,index_data,index_data_format)
+#define IWineD3DDevice_ClearRendertargetView(This,rendertarget_view,color) (This)->lpVtbl->ClearRendertargetView(This,rendertarget_view,color)
+#define IWineD3DDevice_SetPrimitiveType(This,primitive_topology) (This)->lpVtbl->SetPrimitiveType(This,primitive_topology)
+#define IWineD3DDevice_GetPrimitiveType(This,primitive_topology) (This)->lpVtbl->GetPrimitiveType(This,primitive_topology)
+#define IWineD3DDevice_DrawPrimitive(This,start_vertex,vertex_count) (This)->lpVtbl->DrawPrimitive(This,start_vertex,vertex_count)
+#define IWineD3DDevice_DrawIndexedPrimitive(This,min_vertex_idx,vertex_count,start_idx,index_count) (This)->lpVtbl->DrawIndexedPrimitive(This,min_vertex_idx,vertex_count,start_idx,index_count)
+#define IWineD3DDevice_DrawPrimitiveUP(This,vertex_count,stream_data,stream_stride) (This)->lpVtbl->DrawPrimitiveUP(This,vertex_count,stream_data,stream_stride)
+#define IWineD3DDevice_DrawIndexedPrimitiveUP(This,min_vertex_idx,vertex_count,index_count,index_data,index_data_format,stream_data,stream_stride) (This)->lpVtbl->DrawIndexedPrimitiveUP(This,min_vertex_idx,vertex_count,index_count,index_data,index_data_format,stream_data,stream_stride)
+#define IWineD3DDevice_DrawPrimitiveStrided(This,vertex_count,strided_data) (This)->lpVtbl->DrawPrimitiveStrided(This,vertex_count,strided_data)
+#define IWineD3DDevice_DrawIndexedPrimitiveStrided(This,index_count,strided_data,vertex_count,index_data,index_data_format) (This)->lpVtbl->DrawIndexedPrimitiveStrided(This,index_count,strided_data,vertex_count,index_data,index_data_format)
 #define IWineD3DDevice_DrawRectPatch(This,handle,num_segs,rect_patch_info) (This)->lpVtbl->DrawRectPatch(This,handle,num_segs,rect_patch_info)
 #define IWineD3DDevice_DrawTriPatch(This,handle,num_segs,tri_patch_info) (This)->lpVtbl->DrawTriPatch(This,handle,num_segs,tri_patch_info)
@@ -8280,4 +8391,15 @@
 #endif
 
+HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateBuffer_Proxy(
+    IWineD3DDevice* This,
+    struct wined3d_buffer_desc *desc,
+    const void *data,
+    IUnknown *parent,
+    IWineD3DBuffer **buffer);
+void __RPC_STUB IWineD3DDevice_CreateBuffer_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateVertexBuffer_Proxy(
     IWineD3DDevice* This,
@@ -8286,6 +8408,5 @@
     DWORD fvf,
     WINED3DPOOL pool,
-    IWineD3DVertexBuffer **vertex_buffer,
-    HANDLE *shared_handle,
+    IWineD3DBuffer **vertex_buffer,
     IUnknown *parent);
 void __RPC_STUB IWineD3DDevice_CreateVertexBuffer_Stub(
@@ -8298,8 +8419,6 @@
     UINT length,
     DWORD usage,
-    WINED3DFORMAT format,
     WINED3DPOOL pool,
-    IWineD3DIndexBuffer **index_buffer,
-    HANDLE *shared_handle,
+    IWineD3DBuffer **index_buffer,
     IUnknown *parent);
 void __RPC_STUB IWineD3DDevice_CreateIndexBuffer_Stub(
@@ -8332,8 +8451,17 @@
     WINED3DMULTISAMPLE_TYPE multisample_type,
     DWORD multisample_quality,
-    HANDLE *shared_handle,
     WINED3DSURFTYPE surface_type,
     IUnknown *parent);
 void __RPC_STUB IWineD3DDevice_CreateSurface_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateRendertargetView_Proxy(
+    IWineD3DDevice* This,
+    IWineD3DResource *resource,
+    IUnknown *parent,
+    IWineD3DRendertargetView **rendertarget_view);
+void __RPC_STUB IWineD3DDevice_CreateRendertargetView_Stub(
     IRpcStubBuffer* This,
     IRpcChannelBuffer* pRpcChannelBuffer,
@@ -8349,7 +8477,5 @@
     WINED3DPOOL pool,
     IWineD3DTexture **texture,
-    HANDLE *shared_handle,
-    IUnknown *parent,
-    HRESULT (STDMETHODCALLTYPE * create_surface_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,DWORD Usage,WINED3DPOOL Pool,UINT Level,WINED3DCUBEMAP_FACES Face,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle));
+    IUnknown *parent);
 void __RPC_STUB IWineD3DDevice_CreateTexture_Stub(
     IRpcStubBuffer* This,
@@ -8367,7 +8493,5 @@
     WINED3DPOOL pool,
     IWineD3DVolumeTexture **texture,
-    HANDLE *shared_handle,
-    IUnknown *parent,
-    HRESULT (STDMETHODCALLTYPE * create_volume_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,UINT Depth,WINED3DFORMAT Format,WINED3DPOOL Pool,DWORD Usage,IWineD3DVolume **ppVolume,HANDLE *pSharedHandle));
+    IUnknown *parent);
 void __RPC_STUB IWineD3DDevice_CreateVolumeTexture_Stub(
     IRpcStubBuffer* This,
@@ -8384,5 +8508,4 @@
     WINED3DPOOL pool,
     IWineD3DVolume **volume,
-    HANDLE *shared_handle,
     IUnknown *parent);
 void __RPC_STUB IWineD3DDevice_CreateVolume_Stub(
@@ -8399,7 +8522,5 @@
     WINED3DPOOL pool,
     IWineD3DCubeTexture **texture,
-    HANDLE *shared_handle,
-    IUnknown *parent,
-    HRESULT (STDMETHODCALLTYPE * create_surface_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,DWORD Usage,WINED3DPOOL Pool,UINT Level,WINED3DCUBEMAP_FACES Face,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle));
+    IUnknown *parent);
 void __RPC_STUB IWineD3DDevice_CreateCubeTexture_Stub(
     IRpcStubBuffer* This,
@@ -8422,6 +8543,4 @@
     IWineD3DSwapChain **swapchain,
     IUnknown *parent,
-    HRESULT (STDMETHODCALLTYPE * create_render_target_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle),
-    HRESULT (STDMETHODCALLTYPE * create_depth_stencil_callback)(IUnknown *pDevice,IUnknown *pSuperior,UINT Width,UINT Height,WINED3DFORMAT Format,WINED3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,IWineD3DSurface **ppSurface,HANDLE *pSharedHandle),
     WINED3DSURFTYPE surface_type);
 void __RPC_STUB IWineD3DDevice_CreateSwapChain_Stub(
@@ -8485,6 +8604,5 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_Init3D_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRESENT_PARAMETERS *present_parameters,
-    HRESULT (STDMETHODCALLTYPE * create_swapchain_callback)(IUnknown *pDevice,WINED3DPRESENT_PARAMETERS *pPresentationParameters,IWineD3DSwapChain **pSwapChain));
+    WINED3DPRESENT_PARAMETERS *present_parameters);
 void __RPC_STUB IWineD3DDevice_Init3D_Stub(
     IRpcStubBuffer* This,
@@ -8494,6 +8612,5 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_InitGDI_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRESENT_PARAMETERS *present_parameters,
-    HRESULT (STDMETHODCALLTYPE * create_swapchain_callback)(IUnknown *pDevice,WINED3DPRESENT_PARAMETERS *pPresentationParameters,IWineD3DSwapChain **pSwapChain));
+    WINED3DPRESENT_PARAMETERS *present_parameters);
 void __RPC_STUB IWineD3DDevice_InitGDI_Stub(
     IRpcStubBuffer* This,
@@ -8734,20 +8851,4 @@
     PRPC_MESSAGE pRpcMessage,
     DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetFVF_Proxy(
-    IWineD3DDevice* This,
-    DWORD fvf);
-void __RPC_STUB IWineD3DDevice_SetFVF_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
-HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetFVF_Proxy(
-    IWineD3DDevice* This,
-    DWORD *fvf);
-void __RPC_STUB IWineD3DDevice_GetFVF_Stub(
-    IRpcStubBuffer* This,
-    IRpcChannelBuffer* pRpcChannelBuffer,
-    PRPC_MESSAGE pRpcMessage,
-    DWORD* pdwStubPhase);
 void STDMETHODCALLTYPE IWineD3DDevice_SetGammaRamp_Proxy(
     IWineD3DDevice* This,
@@ -8771,5 +8872,6 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetIndices_Proxy(
     IWineD3DDevice* This,
-    IWineD3DIndexBuffer *index_buffer);
+    IWineD3DBuffer *index_buffer,
+    WINED3DFORMAT format);
 void __RPC_STUB IWineD3DDevice_SetIndices_Stub(
     IRpcStubBuffer* This,
@@ -8779,5 +8881,5 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetIndices_Proxy(
     IWineD3DDevice* This,
-    IWineD3DIndexBuffer **index_buffer);
+    IWineD3DBuffer **index_buffer);
 void __RPC_STUB IWineD3DDevice_GetIndices_Stub(
     IRpcStubBuffer* This,
@@ -9061,5 +9163,5 @@
     IWineD3DDevice* This,
     UINT stream_idx,
-    IWineD3DVertexBuffer *vertex_buffer,
+    IWineD3DBuffer *buffer,
     UINT offset,
     UINT stride);
@@ -9072,5 +9174,5 @@
     IWineD3DDevice* This,
     UINT stream_idx,
-    IWineD3DVertexBuffer **vertex_buffer,
+    IWineD3DBuffer **buffer,
     UINT *offset,
     UINT *stride);
@@ -9284,7 +9386,8 @@
     UINT dst_idx,
     UINT vertex_count,
-    IWineD3DVertexBuffer *dest_buffer,
+    IWineD3DBuffer *dest_buffer,
     IWineD3DVertexDeclaration *declaration,
-    DWORD flags);
+    DWORD flags,
+    DWORD DestFVF);
 void __RPC_STUB IWineD3DDevice_ProcessVertices_Stub(
     IRpcStubBuffer* This,
@@ -9345,9 +9448,33 @@
     PRPC_MESSAGE pRpcMessage,
     DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IWineD3DDevice_ClearRendertargetView_Proxy(
+    IWineD3DDevice* This,
+    IWineD3DRendertargetView *rendertarget_view,
+    const float color[4]);
+void __RPC_STUB IWineD3DDevice_ClearRendertargetView_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IWineD3DDevice_SetPrimitiveType_Proxy(
+    IWineD3DDevice* This,
+    WINED3DPRIMITIVETYPE primitive_topology);
+void __RPC_STUB IWineD3DDevice_SetPrimitiveType_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IWineD3DDevice_GetPrimitiveType_Proxy(
+    IWineD3DDevice* This,
+    WINED3DPRIMITIVETYPE *primitive_topology);
+void __RPC_STUB IWineD3DDevice_GetPrimitiveType_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawPrimitive_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRIMITIVETYPE primitive_type,
     UINT start_vertex,
-    UINT primitive_count);
+    UINT vertex_count);
 void __RPC_STUB IWineD3DDevice_DrawPrimitive_Stub(
     IRpcStubBuffer* This,
@@ -9357,9 +9484,8 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawIndexedPrimitive_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRIMITIVETYPE primitive_type,
     UINT min_vertex_idx,
     UINT vertex_count,
     UINT start_idx,
-    UINT primitive_count);
+    UINT index_count);
 void __RPC_STUB IWineD3DDevice_DrawIndexedPrimitive_Stub(
     IRpcStubBuffer* This,
@@ -9369,6 +9495,5 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawPrimitiveUP_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRIMITIVETYPE primitive_type,
-    UINT primitive_count,
+    UINT vertex_count,
     const void *stream_data,
     UINT stream_stride);
@@ -9380,8 +9505,7 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawIndexedPrimitiveUP_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRIMITIVETYPE primitive_type,
     UINT min_vertex_idx,
     UINT vertex_count,
-    UINT primitive_count,
+    UINT index_count,
     const void *index_data,
     WINED3DFORMAT index_data_format,
@@ -9395,6 +9519,5 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawPrimitiveStrided_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRIMITIVETYPE primitive_type,
-    UINT primitive_count,
+    UINT vertex_count,
     const WineDirect3DVertexStridedData *strided_data);
 void __RPC_STUB IWineD3DDevice_DrawPrimitiveStrided_Stub(
@@ -9405,6 +9528,5 @@
 HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawIndexedPrimitiveStrided_Proxy(
     IWineD3DDevice* This,
-    WINED3DPRIMITIVETYPE primitive_type,
-    UINT primitive_count,
+    UINT index_count,
     const WineDirect3DVertexStridedData *strided_data,
     UINT vertex_count,
@@ -9509,12 +9631,4 @@
 /* Begin additional prototypes for all interfaces */
 
-ULONG           __RPC_USER HWND_UserSize     (ULONG *, ULONG, HWND *);
-unsigned char * __RPC_USER HWND_UserMarshal  (ULONG *, unsigned char *, HWND *);
-unsigned char * __RPC_USER HWND_UserUnmarshal(ULONG *, unsigned char *, HWND *);
-void            __RPC_USER HWND_UserFree     (ULONG *, HWND *);
-ULONG           __RPC_USER HDC_UserSize     (ULONG *, ULONG, HDC *);
-unsigned char * __RPC_USER HDC_UserMarshal  (ULONG *, unsigned char *, HDC *);
-unsigned char * __RPC_USER HDC_UserUnmarshal(ULONG *, unsigned char *, HDC *);
-void            __RPC_USER HDC_UserFree     (ULONG *, HDC *);
 
 /* End additional prototypes */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.idl	(revision 19678)
@@ -24,4 +24,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "unknwn.idl";
 
@@ -75,4 +84,5 @@
 cpp_quote("#define WINED3DERR_WASSTILLDRAWING                  MAKE_WINED3DHRESULT(540)")
 cpp_quote("#define WINEDDERR_NOTAOVERLAYSURFACE                MAKE_WINED3DHRESULT(580)")
+cpp_quote("#define WINEDDERR_NOTLOCKED                         MAKE_WINED3DHRESULT(584)")
 cpp_quote("#define WINEDDERR_NODC                              MAKE_WINED3DHRESULT(586)")
 cpp_quote("#define WINEDDERR_DCALREADYCREATED                  MAKE_WINED3DHRESULT(620)")
@@ -97,4 +107,5 @@
 typedef enum _WINED3DPRIMITIVETYPE
 {
+    WINED3DPT_UNDEFINED                     = 0,
     WINED3DPT_POINTLIST                     = 1,
     WINED3DPT_LINELIST                      = 2,
@@ -103,4 +114,8 @@
     WINED3DPT_TRIANGLESTRIP                 = 5,
     WINED3DPT_TRIANGLEFAN                   = 6,
+    WINED3DPT_LINELIST_ADJ                  = 10,
+    WINED3DPT_LINESTRIP_ADJ                 = 11,
+    WINED3DPT_TRIANGLELIST_ADJ              = 12,
+    WINED3DPT_TRIANGLESTRIP_ADJ             = 13,
     WINED3DPT_FORCE_DWORD                   = 0x7fffffff
 } WINED3DPRIMITIVETYPE;
@@ -126,56 +141,129 @@
 typedef enum _WINED3DFORMAT
 {
-    WINED3DFMT_UNKNOWN                      = 0,
-    WINED3DFMT_R8G8B8                       = 20,
-    WINED3DFMT_A8R8G8B8                     = 21,
-    WINED3DFMT_X8R8G8B8                     = 22,
-    WINED3DFMT_R5G6B5                       = 23,
-    WINED3DFMT_X1R5G5B5                     = 24,
-    WINED3DFMT_A1R5G5B5                     = 25,
-    WINED3DFMT_A4R4G4B4                     = 26,
-    WINED3DFMT_R3G3B2                       = 27,
-    WINED3DFMT_A8                           = 28,
-    WINED3DFMT_A8R3G3B2                     = 29,
-    WINED3DFMT_X4R4G4B4                     = 30,
-    WINED3DFMT_A2B10G10R10                  = 31,
-    WINED3DFMT_A8B8G8R8                     = 32,
-    WINED3DFMT_X8B8G8R8                     = 33,
-    WINED3DFMT_G16R16                       = 34,
-    WINED3DFMT_A2R10G10B10                  = 35,
-    WINED3DFMT_A16B16G16R16                 = 36,
-    WINED3DFMT_A8P8                         = 40,
-    WINED3DFMT_P8                           = 41,
-    WINED3DFMT_L8                           = 50,
-    WINED3DFMT_A8L8                         = 51,
-    WINED3DFMT_A4L4                         = 52,
-    WINED3DFMT_V8U8                         = 60,
-    WINED3DFMT_L6V5U5                       = 61,
-    WINED3DFMT_X8L8V8U8                     = 62,
-    WINED3DFMT_Q8W8V8U8                     = 63,
-    WINED3DFMT_V16U16                       = 64,
-    WINED3DFMT_W11V11U10                    = 65,
-    WINED3DFMT_A2W10V10U10                  = 67,
-    WINED3DFMT_D16_LOCKABLE                 = 70,
-    WINED3DFMT_D32                          = 71,
-    WINED3DFMT_D15S1                        = 73,
-    WINED3DFMT_D24S8                        = 75,
-    WINED3DFMT_D24X8                        = 77,
-    WINED3DFMT_D24X4S4                      = 79,
-    WINED3DFMT_D16                          = 80,
-    WINED3DFMT_L16                          = 81,
-    WINED3DFMT_D32F_LOCKABLE                = 82,
-    WINED3DFMT_D24FS8                       = 83,
-    WINED3DFMT_VERTEXDATA                   = 100,
-    WINED3DFMT_INDEX16                      = 101,
-    WINED3DFMT_INDEX32                      = 102,
-    WINED3DFMT_Q16W16V16U16                 = 110,
-    WINED3DFMT_R16F                         = 111,
-    WINED3DFMT_G16R16F                      = 112,
-    WINED3DFMT_A16B16G16R16F                = 113,
-    WINED3DFMT_R32F                         = 114,
-    WINED3DFMT_G32R32F                      = 115,
-    WINED3DFMT_A32B32G32R32F                = 116,
-    WINED3DFMT_CxV8U8                       = 117,
-    WINED3DFMT_FORCE_DWORD                  = 0xffffffff
+    WINED3DFMT_UNKNOWN,
+    WINED3DFMT_R8G8B8,
+    WINED3DFMT_A8R8G8B8,
+    WINED3DFMT_X8R8G8B8,
+    WINED3DFMT_R5G6B5,
+    WINED3DFMT_X1R5G5B5,
+    WINED3DFMT_A1R5G5B5,
+    WINED3DFMT_A4R4G4B4,
+    WINED3DFMT_R3G3B2,
+    WINED3DFMT_A8R3G3B2,
+    WINED3DFMT_X4R4G4B4,
+    WINED3DFMT_X8B8G8R8,
+    WINED3DFMT_A2R10G10B10,
+    WINED3DFMT_A8P8,
+    WINED3DFMT_P8,
+    WINED3DFMT_L8,
+    WINED3DFMT_A8L8,
+    WINED3DFMT_A4L4,
+    WINED3DFMT_L6V5U5,
+    WINED3DFMT_X8L8V8U8,
+    WINED3DFMT_W11V11U10,
+    WINED3DFMT_A2W10V10U10,
+    WINED3DFMT_D16_LOCKABLE,
+    WINED3DFMT_D32,
+    WINED3DFMT_D15S1,
+    WINED3DFMT_D24S8,
+    WINED3DFMT_D24X8,
+    WINED3DFMT_D24X4S4,
+    WINED3DFMT_L16,
+    WINED3DFMT_D32F_LOCKABLE,
+    WINED3DFMT_D24FS8,
+    WINED3DFMT_VERTEXDATA,
+    WINED3DFMT_CxV8U8,
+    /* DXGI formats */
+    WINED3DFMT_R32G32B32A32_TYPELESS,
+    WINED3DFMT_R32G32B32A32_FLOAT,
+    WINED3DFMT_R32G32B32A32_UINT,
+    WINED3DFMT_R32G32B32A32_SINT,
+    WINED3DFMT_R32G32B32_TYPELESS,
+    WINED3DFMT_R32G32B32_FLOAT,
+    WINED3DFMT_R32G32B32_UINT,
+    WINED3DFMT_R32G32B32_SINT,
+    WINED3DFMT_R16G16B16A16_TYPELESS,
+    WINED3DFMT_R16G16B16A16_FLOAT,
+    WINED3DFMT_R16G16B16A16_UNORM,
+    WINED3DFMT_R16G16B16A16_UINT,
+    WINED3DFMT_R16G16B16A16_SNORM,
+    WINED3DFMT_R16G16B16A16_SINT,
+    WINED3DFMT_R32G32_TYPELESS,
+    WINED3DFMT_R32G32_FLOAT,
+    WINED3DFMT_R32G32_UINT,
+    WINED3DFMT_R32G32_SINT,
+    WINED3DFMT_R32G8X24_TYPELESS,
+    WINED3DFMT_D32_FLOAT_S8X24_UINT,
+    WINED3DFMT_R32_FLOAT_X8X24_TYPELESS,
+    WINED3DFMT_X32_TYPELESS_G8X24_UINT,
+    WINED3DFMT_R10G10B10A2_TYPELESS,
+    WINED3DFMT_R10G10B10A2_UNORM,
+    WINED3DFMT_R10G10B10A2_UINT,
+    WINED3DFMT_R10G10B10A2_SNORM,
+    WINED3DFMT_R11G11B10_FLOAT,
+    WINED3DFMT_R8G8B8A8_TYPELESS,
+    WINED3DFMT_R8G8B8A8_UNORM,
+    WINED3DFMT_R8G8B8A8_UNORM_SRGB,
+    WINED3DFMT_R8G8B8A8_UINT,
+    WINED3DFMT_R8G8B8A8_SNORM,
+    WINED3DFMT_R8G8B8A8_SINT,
+    WINED3DFMT_R16G16_TYPELESS,
+    WINED3DFMT_R16G16_FLOAT,
+    WINED3DFMT_R16G16_UNORM,
+    WINED3DFMT_R16G16_UINT,
+    WINED3DFMT_R16G16_SNORM,
+    WINED3DFMT_R16G16_SINT,
+    WINED3DFMT_R32_TYPELESS,
+    WINED3DFMT_D32_FLOAT,
+    WINED3DFMT_R32_FLOAT,
+    WINED3DFMT_R32_UINT,
+    WINED3DFMT_R32_SINT,
+    WINED3DFMT_R24G8_TYPELESS,
+    WINED3DFMT_D24_UNORM_S8_UINT,
+    WINED3DFMT_R24_UNORM_X8_TYPELESS,
+    WINED3DFMT_X24_TYPELESS_G8_UINT,
+    WINED3DFMT_R8G8_TYPELESS,
+    WINED3DFMT_R8G8_UNORM,
+    WINED3DFMT_R8G8_UINT,
+    WINED3DFMT_R8G8_SNORM,
+    WINED3DFMT_R8G8_SINT,
+    WINED3DFMT_R16_TYPELESS,
+    WINED3DFMT_R16_FLOAT,
+    WINED3DFMT_D16_UNORM,
+    WINED3DFMT_R16_UNORM,
+    WINED3DFMT_R16_UINT,
+    WINED3DFMT_R16_SNORM,
+    WINED3DFMT_R16_SINT,
+    WINED3DFMT_R8_TYPELESS,
+    WINED3DFMT_R8_UNORM,
+    WINED3DFMT_R8_UINT,
+    WINED3DFMT_R8_SNORM,
+    WINED3DFMT_R8_SINT,
+    WINED3DFMT_A8_UNORM,
+    WINED3DFMT_R1_UNORM,
+    WINED3DFMT_R9G9B9E5_SHAREDEXP,
+    WINED3DFMT_R8G8_B8G8_UNORM,
+    WINED3DFMT_G8R8_G8B8_UNORM,
+    WINED3DFMT_BC1_TYPELESS,
+    WINED3DFMT_BC1_UNORM,
+    WINED3DFMT_BC1_UNORM_SRGB,
+    WINED3DFMT_BC2_TYPELESS,
+    WINED3DFMT_BC2_UNORM,
+    WINED3DFMT_BC2_UNORM_SRGB,
+    WINED3DFMT_BC3_TYPELESS,
+    WINED3DFMT_BC3_UNORM,
+    WINED3DFMT_BC3_UNORM_SRGB,
+    WINED3DFMT_BC4_TYPELESS,
+    WINED3DFMT_BC4_UNORM,
+    WINED3DFMT_BC4_SNORM,
+    WINED3DFMT_BC5_TYPELESS,
+    WINED3DFMT_BC5_UNORM,
+    WINED3DFMT_BC5_SNORM,
+    WINED3DFMT_B5G6R5_UNORM,
+    WINED3DFMT_B5G5R5A1_UNORM,
+    WINED3DFMT_B8G8R8A8_UNORM,
+    WINED3DFMT_B8G8R8X8_UNORM,
+
+    WINED3DFMT_FORCE_DWORD = 0xffffffff
 } WINED3DFORMAT;
 cpp_quote("#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \\")
@@ -555,33 +643,22 @@
 typedef enum _WINED3DTEXTURESTAGESTATETYPE
 {
-    WINED3DTSS_COLOROP                      = 1,
-    WINED3DTSS_COLORARG1                    = 2,
-    WINED3DTSS_COLORARG2                    = 3,
-    WINED3DTSS_ALPHAOP                      = 4,
-    WINED3DTSS_ALPHAARG1                    = 5,
-    WINED3DTSS_ALPHAARG2                    = 6,
-    WINED3DTSS_BUMPENVMAT00                 = 7,
-    WINED3DTSS_BUMPENVMAT01                 = 8,
-    WINED3DTSS_BUMPENVMAT10                 = 9,
-    WINED3DTSS_BUMPENVMAT11                 = 10,
-    WINED3DTSS_TEXCOORDINDEX                = 11,
-    WINED3DTSS_ADDRESS                      = 12,
-    WINED3DTSS_ADDRESSU                     = 13,
-    WINED3DTSS_ADDRESSV                     = 14,
-    WINED3DTSS_BORDERCOLOR                  = 15,
-    WINED3DTSS_MAGFILTER                    = 16,
-    WINED3DTSS_MINFILTER                    = 17,
-    WINED3DTSS_MIPFILTER                    = 18,
-    WINED3DTSS_MIPMAPLODBIAS                = 19,
-    WINED3DTSS_MAXMIPLEVEL                  = 20,
-    WINED3DTSS_MAXANISOTROPY                = 21,
-    WINED3DTSS_BUMPENVLSCALE                = 22,
-    WINED3DTSS_BUMPENVLOFFSET               = 23,
-    WINED3DTSS_TEXTURETRANSFORMFLAGS        = 24,
-    WINED3DTSS_ADDRESSW                     = 25,
-    WINED3DTSS_COLORARG0                    = 26,
-    WINED3DTSS_ALPHAARG0                    = 27,
-    WINED3DTSS_RESULTARG                    = 28,
-    WINED3DTSS_CONSTANT                     = 32,
+    WINED3DTSS_COLOROP                      = 0,
+    WINED3DTSS_COLORARG1                    = 1,
+    WINED3DTSS_COLORARG2                    = 2,
+    WINED3DTSS_ALPHAOP                      = 3,
+    WINED3DTSS_ALPHAARG1                    = 4,
+    WINED3DTSS_ALPHAARG2                    = 5,
+    WINED3DTSS_BUMPENVMAT00                 = 6,
+    WINED3DTSS_BUMPENVMAT01                 = 7,
+    WINED3DTSS_BUMPENVMAT10                 = 8,
+    WINED3DTSS_BUMPENVMAT11                 = 9,
+    WINED3DTSS_TEXCOORDINDEX                = 10,
+    WINED3DTSS_BUMPENVLSCALE                = 11,
+    WINED3DTSS_BUMPENVLOFFSET               = 12,
+    WINED3DTSS_TEXTURETRANSFORMFLAGS        = 13,
+    WINED3DTSS_COLORARG0                    = 14,
+    WINED3DTSS_ALPHAARG0                    = 15,
+    WINED3DTSS_RESULTARG                    = 16,
+    WINED3DTSS_CONSTANT                     = 17,
     WINED3DTSS_FORCE_DWORD                  = 0x7fffffff
 } WINED3DTEXTURESTAGESTATETYPE;
@@ -699,9 +776,8 @@
     WINED3DRTYPE_VOLUMETEXTURE              = 4,
     WINED3DRTYPE_CUBETEXTURE                = 5,
-    WINED3DRTYPE_VERTEXBUFFER               = 6,
-    WINED3DRTYPE_INDEXBUFFER                = 7,
+    WINED3DRTYPE_BUFFER                     = 6,
     WINED3DRTYPE_FORCE_DWORD                = 0x7fffffff
 } WINED3DRESOURCETYPE;
-const UINT WINED3DRTYPECOUNT                = WINED3DRTYPE_INDEXBUFFER + 1;
+const UINT WINED3DRTYPECOUNT                = WINED3DRTYPE_BUFFER + 1;
 
 typedef enum _WINED3DPOOL
@@ -757,28 +833,4 @@
 } WINED3DDECLMETHOD;
 
-typedef enum _WINED3DDECLTYPE
-{
-    WINED3DDECLTYPE_FLOAT1                  = 0,
-    WINED3DDECLTYPE_FLOAT2                  = 1,
-    WINED3DDECLTYPE_FLOAT3                  = 2,
-    WINED3DDECLTYPE_FLOAT4                  = 3,
-    WINED3DDECLTYPE_D3DCOLOR                = 4,
-    WINED3DDECLTYPE_UBYTE4                  = 5,
-    WINED3DDECLTYPE_SHORT2                  = 6,
-    WINED3DDECLTYPE_SHORT4                  = 7,
-    /* VS 2.0 */
-    WINED3DDECLTYPE_UBYTE4N                 = 8,
-    WINED3DDECLTYPE_SHORT2N                 = 9,
-    WINED3DDECLTYPE_SHORT4N                 = 10,
-    WINED3DDECLTYPE_USHORT2N                = 11,
-    WINED3DDECLTYPE_USHORT4N                = 12,
-    WINED3DDECLTYPE_UDEC3                   = 13,
-    WINED3DDECLTYPE_DEC3N                   = 14,
-    WINED3DDECLTYPE_FLOAT16_2               = 15,
-    WINED3DDECLTYPE_FLOAT16_4               = 16,
-    WINED3DDECLTYPE_UNUSED                  = 17,
-} WINED3DDECLTYPE;
-cpp_quote("#define WINED3DDECL_END() {0xFF, 0, WINED3DDECLTYPE_UNUSED, 0, 0, 0, -1}")
-
 typedef enum _WINED3DDECLUSAGE
 {
@@ -890,5 +942,5 @@
 /* FVF (Flexible Vertex Format) codes */
 const UINT WINED3DFVF_RESERVED0                                 = 0x0001;
-const UINT WINED3DFVF_POSITION_MASK                             = 0x000e;
+const UINT WINED3DFVF_POSITION_MASK                             = 0x400e;
 const UINT WINED3DFVF_XYZ                                       = 0x0002;
 const UINT WINED3DFVF_XYZRHW                                    = 0x0004;
@@ -1700,12 +1752,12 @@
 typedef struct _WINED3DVERTEXELEMENT
 {
-  WORD Stream;
-  WORD Offset;
-  BYTE Type;
-  BYTE Method;
-  BYTE Usage;
-  BYTE UsageIndex;
-  int Reg; /* DirectX 8 */
-} WINED3DVERTEXELEMENT, *LPWINED3DVERTEXELEMENT;
+    WINED3DFORMAT format;
+    WORD input_slot;
+    WORD offset;
+    UINT output_slot; /* D3D 8 & 10 */
+    BYTE method;
+    BYTE usage;
+    BYTE usage_idx;
+} WINED3DVERTEXELEMENT;
 
 typedef struct _WINED3DDEVICE_CREATION_PARAMETERS
@@ -1820,79 +1872,34 @@
 } WINED3DDEVINFO_VCACHE;
 
-typedef struct _WINED3DVERTEXBUFFER_DESC
-{
-    WINED3DFORMAT Format;
+typedef struct _WINED3DBUFFER_DESC
+{
     WINED3DRESOURCETYPE Type;
     DWORD Usage;
     WINED3DPOOL Pool;
     UINT Size;
-    DWORD FVF;
-} WINED3DVERTEXBUFFER_DESC;
-
-typedef struct _WINED3DINDEXBUFFER_DESC
-{
-    WINED3DFORMAT Format;
-    WINED3DRESOURCETYPE Type;
-    DWORD Usage;
-    WINED3DPOOL Pool;
-    UINT Size;
-} WINED3DINDEXBUFFER_DESC;
+} WINED3DBUFFER_DESC;
 
 typedef struct glDescriptor
 {
-    UINT textureName;
+    UINT textureName, srgbTextureName;
     int level;
     int /*GLenum*/ target;
-    int /*GLenum*/ glFormat;
-    int /*GLenum*/ glFormatInternal;
-    int /*GLenum*/ glType;
 } glDescriptor;
 
 typedef struct WineDirect3DStridedData
 {
-    const BYTE *lpData; /* Pointer to start of data */
-    DWORD dwStride;     /* Stride between occurrences of this data */
-    DWORD dwType;       /* Type (as in D3DVSDT_TYPE) */
-    int VBO;            /* Vertex buffer object this data is in */
-    UINT streamNo;      /* D3D stream number */
+    WINED3DFORMAT format;   /* Format of the data */
+    const BYTE *lpData;     /* Pointer to start of data */
+    DWORD dwStride;         /* Stride between occurrences of this data */
 } WineDirect3DStridedData;
 
 typedef struct WineDirect3DVertexStridedData
 {
-    /*
-     * IMPORTANT:
-     * This structure can be accessed in two ways: Named access, and array
-     * access. Please note that named access is only valid with the fixed
-     * function vertex pipeline, and the arrays are only valid with the
-     * programmable vertex pipeline(vertex shaders).
-     */
-    union
-    {
-        struct
-        {
-            /* Do not add or reorder fields here,
-             * so this can be indexed as an array */
-            WineDirect3DStridedData position;
-            WineDirect3DStridedData blendWeights;
-            WineDirect3DStridedData blendMatrixIndices;
-            WineDirect3DStridedData normal;
-            WineDirect3DStridedData pSize;
-            WineDirect3DStridedData diffuse;
-            WineDirect3DStridedData specular;
-            WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD];
-            WineDirect3DStridedData position2;  /* tween data */
-            WineDirect3DStridedData normal2;    /* tween data */
-            WineDirect3DStridedData tangent;
-            WineDirect3DStridedData binormal;
-            WineDirect3DStridedData tessFactor;
-            WineDirect3DStridedData fog;
-            WineDirect3DStridedData depth;
-            WineDirect3DStridedData sample;
-
-            /* Add fields here */
-            BOOL position_transformed;
-        } s;
-        WineDirect3DStridedData input[16];  /* Indexed by constants in D3DVSDE_REGISTER */
-    } u;
+    WineDirect3DStridedData position;
+    WineDirect3DStridedData normal;
+    WineDirect3DStridedData diffuse;
+    WineDirect3DStridedData specular;
+    WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD];
+    BOOL position_transformed;
 } WineDirect3DVertexStridedData;
 
@@ -2111,4 +2118,13 @@
 } WINEDDOVERLAYFX;
 
+struct wined3d_buffer_desc
+{
+    UINT byte_width;
+    DWORD usage;
+    UINT bind_flags;
+    UINT cpu_access_flags;
+    UINT misc_flags;
+};
+
 interface IWineD3DResource;
 interface IWineD3DSurface;
@@ -2117,20 +2133,67 @@
 interface IWineD3DDevice;
 
-typedef HRESULT (*D3DCB_CREATESURFACEFN)(IUnknown *pDevice, IUnknown *pSuperior, UINT Width,
-        UINT Height, WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, WINED3DCUBEMAP_FACES Face,
-        IWineD3DSurface **ppSurface, HANDLE *pSharedHandle);
-typedef HRESULT (*D3DCB_CREATERENDERTARGETFN)(IUnknown *pDevice, IUnknown *pSuperior, UINT Width,
-        UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality,
-        BOOL Lockable, IWineD3DSurface **ppSurface, HANDLE *pSharedHandle);
-typedef HRESULT (*D3DCB_CREATEDEPTHSTENCILSURFACEFN)(IUnknown *pDevice, IUnknown *pSuperior, UINT Width,
-        UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality,
-        BOOL Discard, IWineD3DSurface **ppSurface, HANDLE *pSharedHandle);
+[
+    object,
+    local,
+    uuid(aeb62dfc-bdcb-4f02-9519-1eeea00c15cd)
+]
+interface IWineD3DDeviceParent : IUnknown
+{
+    void WineD3DDeviceCreated(
+        [in] IWineD3DDevice *device
+    );
+
+    HRESULT CreateSurface(
+        [in] IUnknown *superior,
+        [in] UINT width,
+        [in] UINT height,
+        [in] WINED3DFORMAT format,
+        [in] DWORD usage,
+        [in] WINED3DPOOL pool,
+        [in] UINT level,
+        [in] WINED3DCUBEMAP_FACES face,
+        [out] IWineD3DSurface **surface
+    );
+
+    HRESULT CreateRenderTarget(
+        [in] IUnknown *superior,
+        [in] UINT width,
+        [in] UINT height,
+        [in] WINED3DFORMAT format,
+        [in] WINED3DMULTISAMPLE_TYPE multisample_type,
+        [in] DWORD multisample_quality,
+        [in] BOOL lockable,
+        [out] IWineD3DSurface **surface
+    );
+
+    HRESULT CreateDepthStencilSurface(
+        [in] IUnknown *superior,
+        [in] UINT width,
+        [in] UINT height,
+        [in] WINED3DFORMAT format,
+        [in] WINED3DMULTISAMPLE_TYPE multisample_type,
+        [in] DWORD multisample_quality,
+        [in] BOOL discard,
+        [out] IWineD3DSurface **surface
+    );
+
+    HRESULT CreateVolume(
+        [in] IUnknown *superior,
+        [in] UINT width,
+        [in] UINT height,
+        [in] UINT depth,
+        [in] WINED3DFORMAT format,
+        [in] WINED3DPOOL pool,
+        [in] DWORD usage,
+        [out] IWineD3DVolume **volume
+    );
+
+    HRESULT CreateSwapChain(
+        [in, out] WINED3DPRESENT_PARAMETERS *present_parameters,
+        [out] IWineD3DSwapChain **swapchain
+    );
+}
 typedef ULONG (*D3DCB_DESTROYSURFACEFN)(IWineD3DSurface *pSurface);
-typedef HRESULT (*D3DCB_CREATEVOLUMEFN)(IUnknown *pDevice, IUnknown *pSuperior, UINT Width,
-        UINT Height, UINT Depth, WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
-        IWineD3DVolume **ppVolume, HANDLE *pSharedHandle);
 typedef ULONG (*D3DCB_DESTROYVOLUMEFN)(IWineD3DVolume *pVolume);
-typedef HRESULT (*D3DCB_CREATESWAPCHAIN)(IUnknown *pDevice, WINED3DPRESENT_PARAMETERS *pPresentationParameters,
-        IWineD3DSwapChain **pSwapChain);
 typedef ULONG (*D3DCB_DESTROYSWAPCHAINFN)(IWineD3DSwapChain *pSwapChain);
 typedef HRESULT (*D3DCB_ENUMRESOURCES)(IWineD3DResource *resource, void *pData);
@@ -2169,6 +2232,6 @@
     HRESULT EnumAdapterModes(
         [in] UINT adapter_idx,
+        [in] WINED3DFORMAT format,
         [in] UINT mode_idx,
-        [in] WINED3DFORMAT format,
         [out] WINED3DDISPLAYMODE *mode
     );
@@ -2229,6 +2292,7 @@
         [in] HWND focus_window,
         [in] DWORD behaviour_flags,
-        [out] IWineD3DDevice **device,
-        [in] IUnknown *parent
+        [in] IUnknown *parent,
+        [in] IWineD3DDeviceParent *device_parent,
+        [out] IWineD3DDevice **device
     );
 }
@@ -2274,38 +2338,10 @@
     object,
     local,
-    uuid(217f671e-6f30-11d9-c687-00046142c14f)
+    uuid(f7d8abf4-fb93-43e4-9c96-4618cf9b3cbc)
 ]
-interface IWineD3DVertexBuffer : IWineD3DResource
-{
-    HRESULT Lock(
-        [in] UINT offset,
-        [in] UINT size,
-        [out] BYTE **data,
-        [in] DWORD flags
-    );
-    HRESULT Unlock(
-    );
-    HRESULT GetDesc(
-        [out] WINED3DVERTEXBUFFER_DESC *desc
-    );
-}
-
-[
-    object,
-    local,
-    uuid(3a02a54e-6f30-11d9-c687-00046142c14f)
-]
-interface IWineD3DIndexBuffer : IWineD3DResource
-{
-    HRESULT Lock(
-        [in] UINT offset,
-        [in] UINT size,
-        [out] BYTE **data,
-        [in] DWORD flags
-    );
-    HRESULT Unlock(
-    );
-    HRESULT GetDesc(
-        [out] WINED3DINDEXBUFFER_DESC *desc
+interface IWineD3DRendertargetView : IWineD3DBase
+{
+    HRESULT GetResource(
+        [out] IWineD3DResource **resource
     );
 }
@@ -2461,11 +2497,9 @@
         [out] IWineD3DClipper **clipper
     );
-    HRESULT AddDirtyRect(
-        [in] const RECT *dirty_rect
-    );
     HRESULT LoadTexture(
         [in] BOOL srgb_mode
     );
     void BindTexture(
+        [in] BOOL srgb
     );
     HRESULT SaveSnapshot(
@@ -2520,9 +2554,4 @@
     HRESULT UnlockBox(
     );
-    HRESULT AddDirtyBox(
-        [in] const WINED3DBOX *dirty_box
-    );
-    HRESULT CleanDirtyBox(
-    );
     HRESULT LoadTexture(
         [in] int gl_level,
@@ -2561,4 +2590,5 @@
     );
     HRESULT BindTexture(
+        [in] BOOL srgb
     );
     UINT GetTextureDimensions(
@@ -2682,12 +2712,4 @@
         [out] IWineD3DDevice **device
     );
-    HRESULT GetDeclaration(
-        [out] WINED3DVERTEXELEMENT *elements,
-        [out] UINT *element_count
-    );
-    HRESULT SetDeclaration(
-        [in] const WINED3DVERTEXELEMENT *elements,
-        [in] UINT element_count
-    );
 }
 
@@ -2786,4 +2808,24 @@
     object,
     local,
+    uuid(b3f028e8-1a40-4ab3-9292-5bf6cfd80209)
+]
+interface IWineD3DBuffer : IWineD3DResource
+{
+    HRESULT Map(
+        [in] UINT offset,
+        [in] UINT size,
+        [out] BYTE **data,
+        [in] DWORD flags
+    );
+    HRESULT Unmap(
+    );
+    HRESULT GetDesc(
+        [out] WINED3DBUFFER_DESC *desc
+    );
+}
+
+[
+    object,
+    local,
     uuid(eac93065-a4df-446f-86a1-9ef2bca40a3c)
 ]
@@ -2826,6 +2868,4 @@
 interface IWineD3DPixelShader : IWineD3DBaseShader
 {
-    HRESULT UpdateSamplers(
-    );
     HRESULT GetDevice(
         [out] IWineD3DDevice **device
@@ -2844,4 +2884,10 @@
 interface IWineD3DDevice : IWineD3DBase
 {
+    HRESULT CreateBuffer(
+        [in] struct wined3d_buffer_desc *desc,
+        [in] const void *data,
+        [in] IUnknown *parent,
+        [out] IWineD3DBuffer **buffer
+    );
     HRESULT CreateVertexBuffer(
         [in] UINT length,
@@ -2849,6 +2895,5 @@
         [in] DWORD fvf,
         [in] WINED3DPOOL pool,
-        [out] IWineD3DVertexBuffer **vertex_buffer,
-        [in] HANDLE *shared_handle,
+        [out] IWineD3DBuffer **vertex_buffer,
         [in] IUnknown *parent
     );
@@ -2856,8 +2901,6 @@
         [in] UINT length,
         [in] DWORD usage,
-        [in] WINED3DFORMAT format,
         [in] WINED3DPOOL pool,
-        [out] IWineD3DIndexBuffer **index_buffer,
-        [in] HANDLE *shared_handle,
+        [out] IWineD3DBuffer **index_buffer,
         [in] IUnknown *parent
     );
@@ -2880,7 +2923,11 @@
         [in] WINED3DMULTISAMPLE_TYPE multisample_type,
         [in] DWORD multisample_quality,
-        [in] HANDLE *shared_handle,
         [in] WINED3DSURFTYPE surface_type,
         [in] IUnknown *parent
+    );
+    HRESULT CreateRendertargetView(
+        [in] IWineD3DResource *resource,
+        [in] IUnknown *parent,
+        [out] IWineD3DRendertargetView **rendertarget_view
     );
     HRESULT CreateTexture(
@@ -2892,7 +2939,5 @@
         [in] WINED3DPOOL pool,
         [out] IWineD3DTexture **texture,
-        [in] HANDLE *shared_handle,
-        [in] IUnknown *parent,
-        [in] D3DCB_CREATESURFACEFN create_surface_callback
+        [in] IUnknown *parent
     );
     HRESULT CreateVolumeTexture(
@@ -2905,7 +2950,5 @@
         [in] WINED3DPOOL pool,
         [out] IWineD3DVolumeTexture **texture,
-        [in] HANDLE *shared_handle,
-        [in] IUnknown *parent,
-        [in] D3DCB_CREATEVOLUMEFN create_volume_callback
+        [in] IUnknown *parent
     );
     HRESULT CreateVolume(
@@ -2917,5 +2960,4 @@
         [in] WINED3DPOOL pool,
         [out] IWineD3DVolume **volume,
-        [in] HANDLE *shared_handle,
         [in] IUnknown *parent
     );
@@ -2927,7 +2969,5 @@
         [in] WINED3DPOOL pool,
         [out] IWineD3DCubeTexture **texture,
-        [in] HANDLE *shared_handle,
-        [in] IUnknown *parent,
-        [in] D3DCB_CREATESURFACEFN create_surface_callback
+        [in] IUnknown *parent
     );
     HRESULT CreateQuery(
@@ -2940,6 +2980,4 @@
         [out] IWineD3DSwapChain **swapchain,
         [in] IUnknown *parent,
-        [in] D3DCB_CREATERENDERTARGETFN create_render_target_callback,
-        [in] D3DCB_CREATEDEPTHSTENCILSURFACEFN create_depth_stencil_callback,
         [in] WINED3DSURFTYPE surface_type
     );
@@ -2973,10 +3011,8 @@
     );
     HRESULT Init3D(
-        [in] WINED3DPRESENT_PARAMETERS *present_parameters,
-        [in] D3DCB_CREATESWAPCHAIN create_swapchain_callback
+        [in] WINED3DPRESENT_PARAMETERS *present_parameters
     );
     HRESULT InitGDI(
-        [in] WINED3DPRESENT_PARAMETERS *present_parameters,
-        [in] D3DCB_CREATESWAPCHAIN create_swapchain_callback
+        [in] WINED3DPRESENT_PARAMETERS *present_parameters
     );
     HRESULT Uninit3D(
@@ -3073,10 +3109,4 @@
         [out] IWineD3DSurface **depth_stencil
     );
-    HRESULT SetFVF(
-        [in] DWORD fvf
-    );
-    HRESULT GetFVF(
-        [out] DWORD *fvf
-    );
     void SetGammaRamp(
         [in] UINT swapchain_idx,
@@ -3089,8 +3119,9 @@
     );
     HRESULT SetIndices(
-        [in] IWineD3DIndexBuffer *index_buffer
+        [in] IWineD3DBuffer *index_buffer,
+        [in] WINED3DFORMAT format
     );
     HRESULT GetIndices(
-        [out] IWineD3DIndexBuffer **index_buffer
+        [out] IWineD3DBuffer **index_buffer
     );
     HRESULT SetBaseVertexIndex(
@@ -3214,5 +3245,5 @@
     HRESULT SetStreamSource(
         [in] UINT stream_idx,
-        [in] IWineD3DVertexBuffer *vertex_buffer,
+        [in] IWineD3DBuffer *buffer,
         [in] UINT offset,
         [in] UINT stride
@@ -3220,5 +3251,5 @@
     HRESULT GetStreamSource(
         [in] UINT stream_idx,
-        [out] IWineD3DVertexBuffer **vertex_buffer,
+        [out] IWineD3DBuffer **buffer,
         [out] UINT *offset,
         [out] UINT *stride
@@ -3317,7 +3348,8 @@
         [in] UINT dst_idx,
         [in] UINT vertex_count,
-        [in] IWineD3DVertexBuffer *dest_buffer,
+        [in] IWineD3DBuffer *dest_buffer,
         [in] IWineD3DVertexDeclaration *declaration,
-        [in] DWORD flags
+        [in] DWORD flags,
+        [in] DWORD DestFVF
     );
     HRESULT BeginStateBlock(
@@ -3344,27 +3376,33 @@
         [in] DWORD stencil
     );
+    void ClearRendertargetView(
+        [in] IWineD3DRendertargetView *rendertarget_view,
+        [in] const float color[4]
+    );
+    void SetPrimitiveType(
+        [in] WINED3DPRIMITIVETYPE primitive_topology
+    );
+    void GetPrimitiveType(
+        [out] WINED3DPRIMITIVETYPE *primitive_topology
+    );
     HRESULT DrawPrimitive(
-        [in] WINED3DPRIMITIVETYPE primitive_type,
         [in] UINT start_vertex,
-        [in] UINT primitive_count
+        [in] UINT vertex_count
     );
     HRESULT DrawIndexedPrimitive(
-        [in] WINED3DPRIMITIVETYPE primitive_type,
         [in] UINT min_vertex_idx,
         [in] UINT vertex_count,
         [in] UINT start_idx,
-        [in] UINT primitive_count
+        [in] UINT index_count
     );
     HRESULT DrawPrimitiveUP(
-        [in] WINED3DPRIMITIVETYPE primitive_type,
-        [in] UINT primitive_count,
+        [in] UINT vertex_count,
         [in] const void *stream_data,
         [in] UINT stream_stride
     );
     HRESULT DrawIndexedPrimitiveUP(
-        [in] WINED3DPRIMITIVETYPE primitive_type,
         [in] UINT min_vertex_idx,
         [in] UINT vertex_count,
-        [in] UINT primitive_count,
+        [in] UINT index_count,
         [in] const void *index_data,
         [in] WINED3DFORMAT index_data_format,
@@ -3373,11 +3411,9 @@
     );
     HRESULT DrawPrimitiveStrided(
-        [in] WINED3DPRIMITIVETYPE primitive_type,
-        [in] UINT primitive_count,
+        [in] UINT vertex_count,
         [in] const WineDirect3DVertexStridedData *strided_data
     );
     HRESULT DrawIndexedPrimitiveStrided(
-        [in] WINED3DPRIMITIVETYPE primitive_type,
-        [in] UINT primitive_count,
+        [in] UINT index_count,
         [in] const WineDirect3DVertexStridedData *strided_data,
         [in] UINT vertex_count,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/winedxgi.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/winedxgi.idl	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/winedxgi.idl	(revision 19678)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2008-2009 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+import "dxgi.idl";
+
+[
+    object,
+    local,
+    uuid(a07ad9ab-fb01-4574-8bfb-0a70a7373f04)
+]
+interface IWineDXGIFactory : IDXGIFactory
+{
+    struct IWineD3D *get_wined3d();
+}
+
+[
+    object,
+    local,
+    uuid(ab1de34c-2963-4ffd-8493-40f580e510e5)
+]
+interface IWineDXGIAdapter : IDXGIAdapter
+{
+    UINT get_ordinal();
+}
+
+[
+    object,
+    local,
+    uuid(3e1ff30b-c951-48c3-b010-0fb49f3dca71)
+]
+interface IWineDXGIDevice : IDXGIDevice
+{
+    struct IWineD3DDevice *get_wined3d_device();
+    HRESULT create_surface(
+        [in] const DXGI_SURFACE_DESC *desc,
+        [in] DXGI_USAGE usage,
+        [in] const DXGI_SHARED_RESOURCE *shared_resource,
+        [in] IUnknown *outer,
+        [out] void **surface
+    );
+    HRESULT create_swapchain(
+        [in] struct _WINED3DPRESENT_PARAMETERS *present_parameters,
+        [out] struct IWineD3DSwapChain **wined3d_swapchain
+    );
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winerror.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winerror.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winerror.h	(revision 19678)
@@ -75,10 +75,10 @@
 
 #define MAKE_HRESULT(sev,fac,code) \
-    ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
+    ((HRESULT) (((unsigned int)(sev)<<31) | ((unsigned int)(fac)<<16) | ((unsigned int)(code))) )
 #define MAKE_SCODE(sev,fac,code) \
-        ((SCODE) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
+        ((SCODE) (((unsigned int)(sev)<<31) | ((unsigned int)(fac)<<16) | ((unsigned int)(code))) )
 #define SUCCEEDED(stat) ((HRESULT)(stat)>=0)
 #define FAILED(stat) ((HRESULT)(stat)<0)
-#define IS_ERROR(stat) (((unsigned long)(stat)>>31) == SEVERITY_ERROR)
+#define IS_ERROR(stat) (((unsigned int)(stat)>>31) == SEVERITY_ERROR)
 
 #define HRESULT_CODE(hr) ((hr) & 0xFFFF)
@@ -100,5 +100,5 @@
 # endif
 #endif
-static HRESULT HRESULT_FROM_WIN32(unsigned long x)
+static HRESULT HRESULT_FROM_WIN32(unsigned int x)
 {
     return (HRESULT)x > 0 ? ((HRESULT) ((x & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)) : (HRESULT)x;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wingdi.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wingdi.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wingdi.h	(revision 19678)
@@ -781,4 +781,6 @@
 #define NONANTIALIASED_QUALITY 3
 #define ANTIALIASED_QUALITY    4
+#define CLEARTYPE_QUALITY          5
+#define CLEARTYPE_NATURAL_QUALITY  6
 
   /* lfPitchAndFamily pitch values */
@@ -1307,5 +1309,9 @@
 
 #ifdef __WINESRC__
-#define WINE_GGO_GRAY16_BITMAP 0x7f
+#define WINE_GGO_GRAY16_BITMAP 0x10
+#define WINE_GGO_HRGB_BITMAP   0x11
+#define WINE_GGO_HBGR_BITMAP   0x12
+#define WINE_GGO_VRGB_BITMAP   0x13
+#define WINE_GGO_VBGR_BITMAP   0x14
 #endif
 
@@ -1434,4 +1440,5 @@
 
 #ifdef __WINESRC__
+#define WINE_TT_SUBPIXEL_RENDERING_ENABLED 0x4000
 #define WINE_TT_HINTER_ENABLED 0x8000
 #endif
@@ -1879,4 +1886,6 @@
 #define BI_RLE4          2
 #define BI_BITFIELDS     3
+#define BI_JPEG          4
+#define BI_PNG           5
 
 typedef struct tagBITMAPINFO
@@ -3263,6 +3272,6 @@
 #define GRADIENT_FILL_OP_FLAG     0x000000ff
 
-#define GDI_ERROR                               (0xFFFFFFFFL)
-#define HGDI_ERROR                              ((HANDLE)0xFFFFFFFFL)
+#define GDI_ERROR                               (~0u)
+#define HGDI_ERROR                              ((HANDLE)~(ULONG_PTR)0)
 
 /* AddFontResourceEx flags */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wininet.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wininet.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wininet.h	(revision 19678)
@@ -550,4 +550,5 @@
 #define INTERNET_OPTION_FROM_CACHE_TIMEOUT      63
 #define INTERNET_OPTION_BYPASS_EDITED_ENTRY     64
+#define INTERNET_OPTION_HTTP_DECODING           65
 #define INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO  67
 #define INTERNET_OPTION_CODEPAGE                68
@@ -580,4 +581,8 @@
 #define INTERNET_OPTION_PROXY_SETTINGS_CHANGED  95
 #define INTERNET_OPTION_DATAFILE_EXT            96
+
+#define INTERNET_OPTION_CODEPAGE_PATH           100
+#define INTERNET_OPTION_CODEPAGE_EXTRA          101
+#define INTERNET_OPTION_IDN                     102
 
 #define INTERNET_FIRST_OPTION                   INTERNET_OPTION_CALLBACK
@@ -1361,4 +1366,21 @@
 #define InternetConfirmZoneCrossing WINELIB_NAME_AW(InternetConfirmZoneCrossing)
 
+#define PRIVACY_TEMPLATE_NO_COOKIES  0
+#define PRIVACY_TEMPLATE_HIGH        1
+#define PRIVACY_TEMPLATE_MEDIUM_HIGH 2
+#define PRIVACY_TEMPLATE_MEDIUM      3
+#define PRIVACY_TEMPLATE_MEDIUM_LOW  4
+#define PRIVACY_TEMPLATE_LOW         5
+#define PRIVACY_TEMPLATE_CUSTOM      100
+#define PRIVACY_TEMPLATE_ADVANCED    101
+
+#define PRIVACY_TEMPLATE_MAX         PRIVACY_TEMPLATE_LOW
+
+#define PRIVACY_TYPE_FIRST_PARTY 0
+#define PRIVACY_TYPE_THIRD_PARTY 1
+
+INTERNETAPI DWORD WINAPI PrivacySetZonePreferenceW(DWORD,DWORD,DWORD,LPCWSTR);
+INTERNETAPI DWORD WINAPI PrivacyGetZonePreferenceW(DWORD,DWORD,LPDWORD,LPWSTR,LPDWORD);
+
 #define INTERNET_ERROR_BASE                     12000
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winioctl.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winioctl.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winioctl.h	(revision 19678)
@@ -388,40 +388,4 @@
 /* End: _WIN32_WINNT >= 0x0400 */
 
-/* Device Io Stuff - Most VxD support.
- * NOTE: All VxD messages seem to start with a hiword or 0
- */
-typedef struct tagDIOCRegs {
-    DWORD   reg_EBX;
-    DWORD   reg_EDX;
-    DWORD   reg_ECX;
-    DWORD   reg_EAX;
-    DWORD   reg_EDI;
-    DWORD   reg_ESI;
-    DWORD   reg_Flags;
-} DIOC_REGISTERS, *PDIOC_REGISTERS;
-
-/* Start VWIN32 information:
- * VWIN32 is a VxD which supports the MSDOS Io routines.
- */
-#define VWIN32_DIOC_DOS_IOCTL     1 /* This is the specified MS-DOS device I/O ctl - Interrupt 21h Function 4400h - 4411h */
-#define VWIN32_DIOC_DOS_INT25     2 /* This is the Absolute Disk Read command - Interrupt 25h */
-#define VWIN32_DIOC_DOS_INT26     3 /* This is the Absolute Disk Write command - Interrupt 25h */
-#define VWIN32_DIOC_DOS_INT13     4 /* This is Interrupt 13h commands */
-#define VWIN32_DIOC_SIMCTRLC      5 /* Simulate Ctrl-C */
-#define VWIN32_DIOC_DOS_DRIVEINFO 6 /* This is Interrupt 21h Function 730X commands */
-
-/* Important: All MS_DOS data structures must be packed on a one-byte boundary - good old 16 bit. */
-
-#include <pshpack1.h>
-typedef struct tagMID {
-    WORD  midInfoLevel;
-    DWORD midSerialNum;
-    BYTE  midVolLabel[11];
-    BYTE  midFileSysType[8];
-} MID, *PMID;
-#include <poppack.h>
-
-/* End VWIN32 information */
-
 /*
  *	NT I/O-Manager
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winnt.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winnt.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winnt.h	(revision 19678)
@@ -256,4 +256,5 @@
 /* C99 unaligned support */
 
+#ifndef UNALIGNED
 #if defined(_MSC_VER) && (defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64))
 # define UNALIGNED __unaligned
@@ -266,4 +267,5 @@
 # define UNALIGNED
 # define UNALIGNED64
+#endif
 #endif
 
@@ -548,5 +550,10 @@
 #define PROCESSOR_ARM_7TDMI      70001
 
+#ifdef _WIN64
+#define MAXIMUM_PROCESSORS       64
+#else
 #define MAXIMUM_PROCESSORS       32
+#endif
+
 typedef struct _MEMORY_BASIC_INFORMATION
 {
@@ -854,4 +861,7 @@
         } Bits;
     } HighWord;
+#ifdef _WIN64  /* FIXME: 64-bit code should not be using the LDT */
+    DWORD BaseHigh;
+#endif
 } LDT_ENTRY, *PLDT_ENTRY;
 
@@ -879,108 +889,115 @@
 
 typedef struct _XMM_SAVE_AREA32 {
-    WORD ControlWord;
-    WORD StatusWord;
-    BYTE TagWord;
-    BYTE Reserved1;
-    WORD ErrorOpcode;
-    DWORD ErrorOffset;
-    WORD ErrorSelector;
-    WORD Reserved2;
-    DWORD DataOffset;
-    WORD DataSelector;
-    WORD Reserved3;
-    DWORD MxCsr;
-    DWORD MxCsr_Mask;
-    M128A FloatRegisters[8];
-    M128A XmmRegisters[16];
-    BYTE Reserved4[96];
+    WORD ControlWord;        /* 000 */
+    WORD StatusWord;         /* 002 */
+    BYTE TagWord;            /* 004 */
+    BYTE Reserved1;          /* 005 */
+    WORD ErrorOpcode;        /* 006 */
+    DWORD ErrorOffset;       /* 008 */
+    WORD ErrorSelector;      /* 00c */
+    WORD Reserved2;          /* 00e */
+    DWORD DataOffset;        /* 010 */
+    WORD DataSelector;       /* 014 */
+    WORD Reserved3;          /* 016 */
+    DWORD MxCsr;             /* 018 */
+    DWORD MxCsr_Mask;        /* 01c */
+    M128A FloatRegisters[8]; /* 020 */
+    M128A XmmRegisters[16];  /* 0a0 */
+    BYTE Reserved4[96];      /* 1a0 */
 } XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
 
 typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
-    DWORD64 P1Home;
-    DWORD64 P2Home;
-    DWORD64 P3Home;
-    DWORD64 P4Home;
-    DWORD64 P5Home;
-    DWORD64 P6Home;
+    DWORD64 P1Home;          /* 000 */
+    DWORD64 P2Home;          /* 008 */
+    DWORD64 P3Home;          /* 010 */
+    DWORD64 P4Home;          /* 018 */
+    DWORD64 P5Home;          /* 020 */
+    DWORD64 P6Home;          /* 028 */
 
     /* Control flags */
-    DWORD ContextFlags;
-    DWORD MxCsr;
+    DWORD ContextFlags;      /* 030 */
+    DWORD MxCsr;             /* 034 */
 
     /* Segment */
-    WORD SegCs;
-    WORD SegDs;
-    WORD SegEs;
-    WORD SegFs;
-    WORD SegGs;
-    WORD SegSs;
-    DWORD EFlags;
+    WORD SegCs;              /* 038 */
+    WORD SegDs;              /* 03a */
+    WORD SegEs;              /* 03c */
+    WORD SegFs;              /* 03e */
+    WORD SegGs;              /* 040 */
+    WORD SegSs;              /* 042 */
+    DWORD EFlags;            /* 044 */
 
     /* Debug */
-    DWORD64 Dr0;
-    DWORD64 Dr1;
-    DWORD64 Dr2;
-    DWORD64 Dr3;
-    DWORD64 Dr6;
-    DWORD64 Dr7;
+    DWORD64 Dr0;             /* 048 */
+    DWORD64 Dr1;             /* 050 */
+    DWORD64 Dr2;             /* 058 */
+    DWORD64 Dr3;             /* 060 */
+    DWORD64 Dr6;             /* 068 */
+    DWORD64 Dr7;             /* 070 */
 
     /* Integer */
-    DWORD64 Rax;
-    DWORD64 Rcx;
-    DWORD64 Rdx;
-    DWORD64 Rbx;
-    DWORD64 Rsp;
-    DWORD64 Rbp;
-    DWORD64 Rsi;
-    DWORD64 Rdi;
-    DWORD64 R8;
-    DWORD64 R9;
-    DWORD64 R10;
-    DWORD64 R11;
-    DWORD64 R12;
-    DWORD64 R13;
-    DWORD64 R14;
-    DWORD64 R15;
+    DWORD64 Rax;             /* 078 */
+    DWORD64 Rcx;             /* 080 */
+    DWORD64 Rdx;             /* 088 */
+    DWORD64 Rbx;             /* 090 */
+    DWORD64 Rsp;             /* 098 */
+    DWORD64 Rbp;             /* 0a0 */
+    DWORD64 Rsi;             /* 0a8 */
+    DWORD64 Rdi;             /* 0b0 */
+    DWORD64 R8;              /* 0b8 */
+    DWORD64 R9;              /* 0c0 */
+    DWORD64 R10;             /* 0c8 */
+    DWORD64 R11;             /* 0d0 */
+    DWORD64 R12;             /* 0d8 */
+    DWORD64 R13;             /* 0e0 */
+    DWORD64 R14;             /* 0e8 */
+    DWORD64 R15;             /* 0f0 */
 
     /* Counter */
-    DWORD64 Rip;
+    DWORD64 Rip;             /* 0f8 */
 
     /* Floating point */
     union {
-        XMM_SAVE_AREA32 FltSave;
+        XMM_SAVE_AREA32 FltSave;  /* 100 */
         struct {
-            M128A Header[2];
-            M128A Legacy[8];
-            M128A Xmm0;
-            M128A Xmm1;
-            M128A Xmm2;
-            M128A Xmm3;
-            M128A Xmm4;
-            M128A Xmm5;
-            M128A Xmm6;
-            M128A Xmm7;
-            M128A Xmm8;
-            M128A Xmm9;
-            M128A Xmm10;
-            M128A Xmm11;
-            M128A Xmm12;
-            M128A Xmm13;
-            M128A Xmm14;
-            M128A Xmm15;
+            M128A Header[2];      /* 100 */
+            M128A Legacy[8];      /* 120 */
+            M128A Xmm0;           /* 1a0 */
+            M128A Xmm1;           /* 1b0 */
+            M128A Xmm2;           /* 1c0 */
+            M128A Xmm3;           /* 1d0 */
+            M128A Xmm4;           /* 1e0 */
+            M128A Xmm5;           /* 1f0 */
+            M128A Xmm6;           /* 200 */
+            M128A Xmm7;           /* 210 */
+            M128A Xmm8;           /* 220 */
+            M128A Xmm9;           /* 230 */
+            M128A Xmm10;          /* 240 */
+            M128A Xmm11;          /* 250 */
+            M128A Xmm12;          /* 260 */
+            M128A Xmm13;          /* 270 */
+            M128A Xmm14;          /* 280 */
+            M128A Xmm15;          /* 290 */
         } DUMMYSTRUCTNAME;
     } DUMMYUNIONNAME;
 
     /* Vector */
-    M128A VectorRegister[26];
-    DWORD64 VectorControl;
+    M128A VectorRegister[26];     /* 300 */
+    DWORD64 VectorControl;        /* 4a0 */
 
     /* Debug control */
-    DWORD64 DebugControl;
-    DWORD64 LastBranchToRip;
-    DWORD64 LastBranchFromRip;
-    DWORD64 LastExceptionToRip;
-    DWORD64 LastExceptionFromRip;
+    DWORD64 DebugControl;         /* 4a8 */
+    DWORD64 LastBranchToRip;      /* 4b0 */
+    DWORD64 LastBranchFromRip;    /* 4b8 */
+    DWORD64 LastExceptionToRip;   /* 4c0 */
+    DWORD64 LastExceptionFromRip; /* 4c8 */
 } CONTEXT;
+
+typedef struct _RUNTIME_FUNCTION
+{
+    DWORD BeginAddress;
+    DWORD EndAddress;
+    DWORD UnwindData;
+} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
 
 #endif /* __x86_64__ */
@@ -1457,4 +1474,243 @@
 
 #endif  /* __sparc__ */
+
+#ifdef __ia64__
+
+#define CONTEXT_IA64                  0x00080000
+#define CONTEXT_CONTROL               (CONTEXT_IA64 | 0x00000001)
+#define CONTEXT_LOWER_FLOATING_POINT  (CONTEXT_IA64 | 0x00000002)
+#define CONTEXT_HIGHER_FLOATING_POINT (CONTEXT_IA64 | 0x00000004)
+#define CONTEXT_INTEGER               (CONTEXT_IA64 | 0x00000008)
+#define CONTEXT_DEBUG                 (CONTEXT_IA64 | 0x00000010)
+#define CONTEXT_IA32_CONTROL          (CONTEXT_IA64 | 0x00000020)
+#define CONTEXT_FLOATING_POINT        (CONTEXT_LOWER_FLOATING_POINT | CONTEXT_HIGHER_FLOATING_POINT)
+#define CONTEXT_FULL                  (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER | CONTEXT_IA32_CONTROL)
+#define CONTEXT_ALL                   (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER | CONTEXT_DEBUG | CONTEXT_IA32_CONTROL)
+
+#define CONTEXT_EXCEPTION_ACTIVE      0x8000000
+#define CONTEXT_SERVICE_ACTIVE        0x10000000
+#define CONTEXT_EXCEPTION_REQUEST     0x40000000
+#define CONTEXT_EXCEPTION_REPORTING   0x80000000
+
+typedef struct _CONTEXT
+{
+    DWORD ContextFlags;
+    DWORD Fill1[3];
+    ULONGLONG DbI0;
+    ULONGLONG DbI1;
+    ULONGLONG DbI2;
+    ULONGLONG DbI3;
+    ULONGLONG DbI4;
+    ULONGLONG DbI5;
+    ULONGLONG DbI6;
+    ULONGLONG DbI7;
+    ULONGLONG DbD0;
+    ULONGLONG DbD1;
+    ULONGLONG DbD2;
+    ULONGLONG DbD3;
+    ULONGLONG DbD4;
+    ULONGLONG DbD5;
+    ULONGLONG DbD6;
+    ULONGLONG DbD7;
+    FLOAT128 FltS0;
+    FLOAT128 FltS1;
+    FLOAT128 FltS2;
+    FLOAT128 FltS3;
+    FLOAT128 FltT0;
+    FLOAT128 FltT1;
+    FLOAT128 FltT2;
+    FLOAT128 FltT3;
+    FLOAT128 FltT4;
+    FLOAT128 FltT5;
+    FLOAT128 FltT6;
+    FLOAT128 FltT7;
+    FLOAT128 FltT8;
+    FLOAT128 FltT9;
+    FLOAT128 FltS4;
+    FLOAT128 FltS5;
+    FLOAT128 FltS6;
+    FLOAT128 FltS7;
+    FLOAT128 FltS8;
+    FLOAT128 FltS9;
+    FLOAT128 FltS10;
+    FLOAT128 FltS11;
+    FLOAT128 FltS12;
+    FLOAT128 FltS13;
+    FLOAT128 FltS14;
+    FLOAT128 FltS15;
+    FLOAT128 FltS16;
+    FLOAT128 FltS17;
+    FLOAT128 FltS18;
+    FLOAT128 FltS19;
+    FLOAT128 FltF32;
+    FLOAT128 FltF33;
+    FLOAT128 FltF34;
+    FLOAT128 FltF35;
+    FLOAT128 FltF36;
+    FLOAT128 FltF37;
+    FLOAT128 FltF38;
+    FLOAT128 FltF39;
+    FLOAT128 FltF40;
+    FLOAT128 FltF41;
+    FLOAT128 FltF42;
+    FLOAT128 FltF43;
+    FLOAT128 FltF44;
+    FLOAT128 FltF45;
+    FLOAT128 FltF46;
+    FLOAT128 FltF47;
+    FLOAT128 FltF48;
+    FLOAT128 FltF49;
+    FLOAT128 FltF50;
+    FLOAT128 FltF51;
+    FLOAT128 FltF52;
+    FLOAT128 FltF53;
+    FLOAT128 FltF54;
+    FLOAT128 FltF55;
+    FLOAT128 FltF56;
+    FLOAT128 FltF57;
+    FLOAT128 FltF58;
+    FLOAT128 FltF59;
+    FLOAT128 FltF60;
+    FLOAT128 FltF61;
+    FLOAT128 FltF62;
+    FLOAT128 FltF63;
+    FLOAT128 FltF64;
+    FLOAT128 FltF65;
+    FLOAT128 FltF66;
+    FLOAT128 FltF67;
+    FLOAT128 FltF68;
+    FLOAT128 FltF69;
+    FLOAT128 FltF70;
+    FLOAT128 FltF71;
+    FLOAT128 FltF72;
+    FLOAT128 FltF73;
+    FLOAT128 FltF74;
+    FLOAT128 FltF75;
+    FLOAT128 FltF76;
+    FLOAT128 FltF77;
+    FLOAT128 FltF78;
+    FLOAT128 FltF79;
+    FLOAT128 FltF80;
+    FLOAT128 FltF81;
+    FLOAT128 FltF82;
+    FLOAT128 FltF83;
+    FLOAT128 FltF84;
+    FLOAT128 FltF85;
+    FLOAT128 FltF86;
+    FLOAT128 FltF87;
+    FLOAT128 FltF88;
+    FLOAT128 FltF89;
+    FLOAT128 FltF90;
+    FLOAT128 FltF91;
+    FLOAT128 FltF92;
+    FLOAT128 FltF93;
+    FLOAT128 FltF94;
+    FLOAT128 FltF95;
+    FLOAT128 FltF96;
+    FLOAT128 FltF97;
+    FLOAT128 FltF98;
+    FLOAT128 FltF99;
+    FLOAT128 FltF100;
+    FLOAT128 FltF101;
+    FLOAT128 FltF102;
+    FLOAT128 FltF103;
+    FLOAT128 FltF104;
+    FLOAT128 FltF105;
+    FLOAT128 FltF106;
+    FLOAT128 FltF107;
+    FLOAT128 FltF108;
+    FLOAT128 FltF109;
+    FLOAT128 FltF110;
+    FLOAT128 FltF111;
+    FLOAT128 FltF112;
+    FLOAT128 FltF113;
+    FLOAT128 FltF114;
+    FLOAT128 FltF115;
+    FLOAT128 FltF116;
+    FLOAT128 FltF117;
+    FLOAT128 FltF118;
+    FLOAT128 FltF119;
+    FLOAT128 FltF120;
+    FLOAT128 FltF121;
+    FLOAT128 FltF122;
+    FLOAT128 FltF123;
+    FLOAT128 FltF124;
+    FLOAT128 FltF125;
+    FLOAT128 FltF126;
+    FLOAT128 FltF127;
+    ULONGLONG StFPSR;
+    ULONGLONG IntGp;
+    ULONGLONG IntT0;
+    ULONGLONG IntT1;
+    ULONGLONG IntS0;
+    ULONGLONG IntS1;
+    ULONGLONG IntS2;
+    ULONGLONG IntS3;
+    ULONGLONG IntV0;
+    ULONGLONG IntT2;
+    ULONGLONG IntT3;
+    ULONGLONG IntT4;
+    ULONGLONG IntSp;
+    ULONGLONG IntTeb;
+    ULONGLONG IntT5;
+    ULONGLONG IntT6;
+    ULONGLONG IntT7;
+    ULONGLONG IntT8;
+    ULONGLONG IntT9;
+    ULONGLONG IntT10;
+    ULONGLONG IntT11;
+    ULONGLONG IntT12;
+    ULONGLONG IntT13;
+    ULONGLONG IntT14;
+    ULONGLONG IntT15;
+    ULONGLONG IntT16;
+    ULONGLONG IntT17;
+    ULONGLONG IntT18;
+    ULONGLONG IntT19;
+    ULONGLONG IntT20;
+    ULONGLONG IntT21;
+    ULONGLONG IntT22;
+    ULONGLONG IntNats;
+    ULONGLONG Preds;
+    ULONGLONG BrRp;
+    ULONGLONG BrS0;
+    ULONGLONG BrS1;
+    ULONGLONG BrS2;
+    ULONGLONG BrS3;
+    ULONGLONG BrS4;
+    ULONGLONG BrT0;
+    ULONGLONG BrT1;
+    ULONGLONG ApUNAT;
+    ULONGLONG ApLC;
+    ULONGLONG ApEC;
+    ULONGLONG ApCCV;
+    ULONGLONG ApDCR;
+    ULONGLONG RsPFS;
+    ULONGLONG RsBSP;
+    ULONGLONG RsBSPSTORE;
+    ULONGLONG RsRSC;
+    ULONGLONG RsRNAT;
+    ULONGLONG StIPSR;
+    ULONGLONG StIIP;
+    ULONGLONG StIFS;
+    ULONGLONG StFCR;
+    ULONGLONG Eflag;
+    ULONGLONG SegCSD;
+    ULONGLONG SegSSD;
+    ULONGLONG Cflag;
+    ULONGLONG StFSR;
+    ULONGLONG StFIR;
+    ULONGLONG StFDR;
+    ULONGLONG UNUSEDPACK;
+} CONTEXT, *PCONTEXT;
+
+typedef struct _RUNTIME_FUNCTION
+{
+    ULONG BeginAddress;
+    ULONG EndAddress;
+    ULONG UnwindInfoAddress;
+} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
+
+#endif /* __ia64__ */
 
 #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
@@ -2020,5 +2276,5 @@
 }
 #elif defined(__x86_64__) && defined(__GNUC__)
-extern inline struct _TEB * WINAPI NtCurrentTeb(void)
+static inline struct _TEB * WINAPI NtCurrentTeb(void)
 {
     struct _TEB *teb;
@@ -3357,5 +3613,19 @@
   TokenGroupsAndPrivileges,
   TokenSessionReference,
-  TokenSandBoxInert
+  TokenSandBoxInert,
+  TokenAuditPolicy,
+  TokenOrigin,
+  TokenElevationType,
+  TokenLinkedToken,
+  TokenElevation,
+  TokenHasRestrictions,
+  TokenAccessInformation,
+  TokenVirtualizationAllowed,
+  TokenVirtualizationEnabled,
+  TokenIntegrityLevel,
+  TokenUIAccess,
+  TokenMandatoryPolicy,
+  TokenLogonSid,
+  MaxTokenInfoClass
 } TOKEN_INFORMATION_CLASS;
 
@@ -3638,4 +3908,12 @@
 #define DOMAIN_GROUP_RID_ENTERPRISE_ADMINS      0x00000207L
 #define DOMAIN_GROUP_RID_POLICY_ADMINS          0x00000208L
+
+#define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16}
+#define SECURITY_MANDATORY_UNTRUSTED_RID        0x00000000L
+#define SECURITY_MANDATORY_LOW_RID              0x00001000L
+#define SECURITY_MANDATORY_MEDIUM_RID           0x00002000L
+#define SECURITY_MANDATORY_HIGH_RID             0x00003000L
+#define SECURITY_MANDATORY_SYSTEM_RID           0x00004000L
+#define SECURITY_MANDATORY_PROTECTED_PROCESS_RID 0x00005000L
 
 #define DOMAIN_ALIAS_RID_ADMINS                 0x00000220L
@@ -3729,5 +4007,20 @@
     WinBuiltinAuthorizationAccessSid            = 59,
     WinBuiltinTerminalServerLicenseServersSid   = 60,
-    WinBuiltinDCOMUsersSid                      = 61
+    WinBuiltinDCOMUsersSid                      = 61,
+    WinBuiltinIUsersSid                         = 62,
+    WinIUserSid                                 = 63,
+    WinBuiltinCryptoOperatorsSid                = 64,
+    WinUntrustedLabelSid                        = 65,
+    WinLowLabelSid                              = 66,
+    WinMediumLabelSid                           = 67,
+    WinHighLabelSid                             = 68,
+    WinSystemLabelSid                           = 69,
+    WinWriteRestrictedCodeSid                   = 70,
+    WinCreatorOwnerRightsSid                    = 71,
+    WinCacheablePrincipalsGroupSid              = 72,
+    WinNonCacheablePrincipalsGroupSid           = 73,
+    WinEnterpriseReadonlyControllersSid         = 74,
+    WinAccountReadonlyControllersSid            = 75,
+    WinBuiltinEventLogReadersGroup              = 76,
 } WELL_KNOWN_SID_TYPE;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winreg.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winreg.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winreg.h	(revision 19678)
@@ -35,11 +35,11 @@
 #endif /* defined(__cplusplus) */
 
-#define HKEY_CLASSES_ROOT       ((HKEY) 0x80000000)
-#define HKEY_CURRENT_USER       ((HKEY) 0x80000001)
-#define HKEY_LOCAL_MACHINE      ((HKEY) 0x80000002)
-#define HKEY_USERS              ((HKEY) 0x80000003)
-#define HKEY_PERFORMANCE_DATA   ((HKEY) 0x80000004)
-#define HKEY_CURRENT_CONFIG     ((HKEY) 0x80000005)
-#define HKEY_DYN_DATA           ((HKEY) 0x80000006)
+#define HKEY_CLASSES_ROOT       ((HKEY)(LONG_PTR)(LONG)0x80000000)
+#define HKEY_CURRENT_USER       ((HKEY)(LONG_PTR)(LONG)0x80000001)
+#define HKEY_LOCAL_MACHINE      ((HKEY)(LONG_PTR)(LONG)0x80000002)
+#define HKEY_USERS              ((HKEY)(LONG_PTR)(LONG)0x80000003)
+#define HKEY_PERFORMANCE_DATA   ((HKEY)(LONG_PTR)(LONG)0x80000004)
+#define HKEY_CURRENT_CONFIG     ((HKEY)(LONG_PTR)(LONG)0x80000005)
+#define HKEY_DYN_DATA           ((HKEY)(LONG_PTR)(LONG)0x80000006)
 
 /*
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsafer.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsafer.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsafer.h	(revision 19678)
@@ -0,0 +1,59 @@
+/*
+ * Winsafer definitions
+ *
+ * Copyright (C) 2009 Nikolay Sivov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WINE_WINSAFER_H
+#define __WINE_WINSAFER_H
+
+#include <guiddef.h>
+#include <wincrypt.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DECLARE_HANDLE(SAFER_LEVEL_HANDLE);
+
+#define SAFER_SCOPEID_MACHINE  1
+#define SAFER_SCOPEID_USER     2
+
+#define SAFER_LEVELID_DISALLOWED   0x00000
+#define SAFER_LEVELID_UNTRUSTED    0x01000
+#define SAFER_LEVELID_CONSTRAINED  0x10000
+#define SAFER_LEVELID_NORMALUSER   0x20000
+#define SAFER_LEVELID_FULLYTRUSTED 0x40000
+
+#define SAFER_LEVEL_OPEN   1
+
+WINADVAPI BOOL WINAPI SaferCreateLevel(DWORD,DWORD,DWORD,SAFER_LEVEL_HANDLE*,LPVOID);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_WINSAFER_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock.h	(revision 19678)
@@ -89,4 +89,5 @@
 #  define timeval unix_timeval
 #  define select unix_select
+#  define socklen_t unix_socklen_t
 #  include <sys/types.h>
 #  include <time.h>
@@ -95,4 +96,5 @@
 #  undef timeval
 #  undef select
+#  undef socklen_t
 #  undef FD_SETSIZE
 #  undef FD_CLR
@@ -100,4 +102,5 @@
 #  undef FD_ZERO
 #  undef FD_ISSET
+#  undef _TIMEVAL_DEFINED
 
 #  define WS_DEFINE_SELECT
@@ -130,5 +133,5 @@
 typedef unsigned int   WS_u_long;
 #endif
-#elif (defined(_MSC_VER) || defined(__MINGW_H) || defined(__WATCOMC__)) && !defined(_BSDTYPES_DEFINED)
+#elif (defined(_MSC_VER) || defined(__MINGW32__) || defined(__WATCOMC__)) && !defined(_BSDTYPES_DEFINED)
 /* MinGW doesn't define the u_xxx types */
 typedef unsigned char  u_char;
@@ -152,7 +155,4 @@
 extern "C" {
 #endif /* defined(__cplusplus) */
-
-/* proper 4-byte packing */
-#include <pshpack4.h>
 
 /*
@@ -374,6 +374,11 @@
     char* s_name;                  /* official service name */
     char** s_aliases;              /* alias list */
+#ifdef _WIN64
+    char* s_proto;                 /* protocol to use */
+    short s_port;                  /* port # */
+#else
     short s_port;                  /* port # */
     char* s_proto;                 /* protocol to use */
+#endif
 } SERVENT, *PSERVENT, *LPSERVENT;
 
@@ -656,4 +661,11 @@
     WORD                    wVersion;
     WORD                    wHighVersion;
+#ifdef _WIN64
+    WORD                    iMaxSockets;
+    WORD                    iMaxUdpDg;
+    char                   *lpVendorInfo;
+    char                    szDescription[WSADESCRIPTION_LEN+1];
+    char                    szSystemStatus[WSASYS_STATUS_LEN+1];
+#else
     char                    szDescription[WSADESCRIPTION_LEN+1];
     char                    szSystemStatus[WSASYS_STATUS_LEN+1];
@@ -661,4 +673,5 @@
     WORD                    iMaxUdpDg;
     char                   *lpVendorInfo;
+#endif
 } WSADATA, *LPWSADATA;
 
@@ -801,4 +814,6 @@
 #define MSG_PEEK                   0x0002
 #define MSG_DONTROUTE              0x0004
+#define MSG_WAITALL                0x0008
+#define MSG_INTERRUPT              0x0010
 #define MSG_PARTIAL                0x8000
 #define MSG_MAXIOVLEN              16
@@ -809,4 +824,6 @@
 #define WS_MSG_PEEK                0x0002
 #define WS_MSG_DONTROUTE           0x0004
+#define WS_MSG_WAITALL             0x0008
+#define WS_MSG_INTERRUPT           0x0010
 #define WS_MSG_PARTIAL             0x8000
 #define WS_MSG_MAXIOVLEN           16
@@ -1056,7 +1073,4 @@
 #endif /* !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES */
 
-
-#include <poppack.h>
-
 #ifdef __cplusplus
 }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock2.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock2.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock2.h	(revision 19678)
@@ -57,4 +57,5 @@
 #undef  __WINE_WINSOCK2__
 
+#include <ws2def.h>
 
 #ifdef __cplusplus
@@ -431,26 +432,4 @@
 #endif
 
-#ifndef __CSADDR_DEFINED__
-#define __CSADDR_DEFINED__
-
-typedef struct _SOCKET_ADDRESS {
-        LPSOCKADDR      lpSockaddr;
-        INT             iSockaddrLength;
-} SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS;
-
-typedef struct _CSADDR_INFO {
-        SOCKET_ADDRESS  LocalAddr;
-        SOCKET_ADDRESS  RemoteAddr;
-        INT             iSocketType;
-        INT             iProtocol;
-} CSADDR_INFO, *PCSADDR_INFO, *LPCSADDR_INFO;
-#endif
-
-/*socket address list */
-typedef struct _SOCKET_ADDRESS_LIST {
-        INT             iAddressCount;
-        SOCKET_ADDRESS  Address[1];
-} SOCKET_ADDRESS_LIST, *LPSOCKET_ADDRESS_LIST;
-
 /*   addressfamily protocol pairs */
 typedef struct _AFPROTOCOLS {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winternl.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winternl.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winternl.h	(revision 19678)
@@ -229,74 +229,73 @@
  */
 typedef struct _PEB
-{
-    BOOLEAN                      InheritedAddressSpace;             /*  00 */
-    BOOLEAN                      ReadImageFileExecOptions;          /*  01 */
-    BOOLEAN                      BeingDebugged;                     /*  02 */
-    BOOLEAN                      SpareBool;                         /*  03 */
-    HANDLE                       Mutant;                            /*  04 */
-    HMODULE                      ImageBaseAddress;                  /*  08 */
-    PPEB_LDR_DATA                LdrData;                           /*  0c */
-    RTL_USER_PROCESS_PARAMETERS *ProcessParameters;                 /*  10 */
-    PVOID                        SubSystemData;                     /*  14 */
-    HANDLE                       ProcessHeap;                       /*  18 */
-    PRTL_CRITICAL_SECTION        FastPebLock;                       /*  1c */
-    PVOID /*PPEBLOCKROUTINE*/    FastPebLockRoutine;                /*  20 */
-    PVOID /*PPEBLOCKROUTINE*/    FastPebUnlockRoutine;              /*  24 */
-    ULONG                        EnvironmentUpdateCount;            /*  28 */
-    PVOID                        KernelCallbackTable;               /*  2c */
-    PVOID                        EventLogSection;                   /*  30 */
-    PVOID                        EventLog;                          /*  34 */
-    PVOID /*PPEB_FREE_BLOCK*/    FreeList;                          /*  38 */
-    ULONG                        TlsExpansionCounter;               /*  3c */
-    PRTL_BITMAP                  TlsBitmap;                         /*  40 */
-    ULONG                        TlsBitmapBits[2];                  /*  44 */
-    PVOID                        ReadOnlySharedMemoryBase;          /*  4c */
-    PVOID                        ReadOnlySharedMemoryHeap;          /*  50 */
-    PVOID                       *ReadOnlyStaticServerData;          /*  54 */
-    PVOID                        AnsiCodePageData;                  /*  58 */
-    PVOID                        OemCodePageData;                   /*  5c */
-    PVOID                        UnicodeCaseTableData;              /*  60 */
-    ULONG                        NumberOfProcessors;                /*  64 */
-    ULONG                        NtGlobalFlag;                      /*  68 */
-    BYTE                         Spare2[4];                         /*  6c */
-    LARGE_INTEGER                CriticalSectionTimeout;            /*  70 */
-    ULONG                        HeapSegmentReserve;                /*  78 */
-    ULONG                        HeapSegmentCommit;                 /*  7c */
-    ULONG                        HeapDeCommitTotalFreeThreshold;    /*  80 */
-    ULONG                        HeapDeCommitFreeBlockThreshold;    /*  84 */
-    ULONG                        NumberOfHeaps;                     /*  88 */
-    ULONG                        MaximumNumberOfHeaps;              /*  8c */
-    PVOID                       *ProcessHeaps;                      /*  90 */
-    PVOID                        GdiSharedHandleTable;              /*  94 */
-    PVOID                        ProcessStarterHelper;              /*  98 */
-    PVOID                        GdiDCAttributeList;                /*  9c */
-    PVOID                        LoaderLock;                        /*  a0 */
-    ULONG                        OSMajorVersion;                    /*  a4 */
-    ULONG                        OSMinorVersion;                    /*  a8 */
-    ULONG                        OSBuildNumber;                     /*  ac */
-    ULONG                        OSPlatformId;                      /*  b0 */
-    ULONG                        ImageSubSystem;                    /*  b4 */
-    ULONG                        ImageSubSystemMajorVersion;        /*  b8 */
-    ULONG                        ImageSubSystemMinorVersion;        /*  bc */
-    ULONG                        ImageProcessAffinityMask;          /*  c0 */
-    ULONG                        GdiHandleBuffer[34];               /*  c4 */
-    ULONG                        PostProcessInitRoutine;            /* 14c */
-    PRTL_BITMAP                  TlsExpansionBitmap;                /* 150 */
-    ULONG                        TlsExpansionBitmapBits[32];        /* 154 */
-    ULONG                        SessionId;                         /* 1d4 */
-    ULARGE_INTEGER               AppCompatFlags;                    /* 1d8 */
-    ULARGE_INTEGER               AppCompatFlagsUser;                /* 1e0 */
-    PVOID                        ShimData;                          /* 1e8 */
-    PVOID                        AppCompatInfo;                     /* 1ec */
-    UNICODE_STRING               CSDVersion;                        /* 1f0 */
-    PVOID                        ActivationContextData;             /* 1f8 */
-    PVOID                        ProcessAssemblyStorageMap;         /* 1fc */
-    PVOID                        SystemDefaultActivationData;       /* 200 */
-    PVOID                        SystemAssemblyStorageMap;          /* 204 */
-    ULONG                        MinimumStackCommit;                /* 208 */
-    PVOID                       *FlsCallback;                       /* 20c */
-    LIST_ENTRY                   FlsListHead;                       /* 210 */
-    PRTL_BITMAP                  FlsBitmap;                         /* 218 */
-    ULONG                        FlsBitmapBits[4];                  /* 21c */
+{                                                                 /* win32/win64 */
+    BOOLEAN                      InheritedAddressSpace;             /* 000/000 */
+    BOOLEAN                      ReadImageFileExecOptions;          /* 001/001 */
+    BOOLEAN                      BeingDebugged;                     /* 002/002 */
+    BOOLEAN                      SpareBool;                         /* 003/003 */
+    HANDLE                       Mutant;                            /* 004/008 */
+    HMODULE                      ImageBaseAddress;                  /* 008/010 */
+    PPEB_LDR_DATA                LdrData;                           /* 00c/018 */
+    RTL_USER_PROCESS_PARAMETERS *ProcessParameters;                 /* 010/020 */
+    PVOID                        SubSystemData;                     /* 014/028 */
+    HANDLE                       ProcessHeap;                       /* 018/030 */
+    PRTL_CRITICAL_SECTION        FastPebLock;                       /* 01c/038 */
+    PVOID /*PPEBLOCKROUTINE*/    FastPebLockRoutine;                /* 020/040 */
+    PVOID /*PPEBLOCKROUTINE*/    FastPebUnlockRoutine;              /* 024/048 */
+    ULONG                        EnvironmentUpdateCount;            /* 028/050 */
+    PVOID                        KernelCallbackTable;               /* 02c/058 */
+    ULONG                        Reserved[2];                       /* 030/060 */
+    PVOID /*PPEB_FREE_BLOCK*/    FreeList;                          /* 038/068 */
+    ULONG                        TlsExpansionCounter;               /* 03c/070 */
+    PRTL_BITMAP                  TlsBitmap;                         /* 040/078 */
+    ULONG                        TlsBitmapBits[2];                  /* 044/080 */
+    PVOID                        ReadOnlySharedMemoryBase;          /* 04c/088 */
+    PVOID                        ReadOnlySharedMemoryHeap;          /* 050/090 */
+    PVOID                       *ReadOnlyStaticServerData;          /* 054/098 */
+    PVOID                        AnsiCodePageData;                  /* 058/0a0 */
+    PVOID                        OemCodePageData;                   /* 05c/0a8 */
+    PVOID                        UnicodeCaseTableData;              /* 060/0b0 */
+    ULONG                        NumberOfProcessors;                /* 064/0b8 */
+    ULONG                        NtGlobalFlag;                      /* 068/0bc */
+    LARGE_INTEGER                CriticalSectionTimeout;            /* 070/0c0 */
+    SIZE_T                       HeapSegmentReserve;                /* 078/0c8 */
+    SIZE_T                       HeapSegmentCommit;                 /* 07c/0d0 */
+    SIZE_T                       HeapDeCommitTotalFreeThreshold;    /* 080/0d8 */
+    SIZE_T                       HeapDeCommitFreeBlockThreshold;    /* 084/0e0 */
+    ULONG                        NumberOfHeaps;                     /* 088/0e8 */
+    ULONG                        MaximumNumberOfHeaps;              /* 08c/0ec */
+    PVOID                       *ProcessHeaps;                      /* 090/0f0 */
+    PVOID                        GdiSharedHandleTable;              /* 094/0f8 */
+    PVOID                        ProcessStarterHelper;              /* 098/100 */
+    PVOID                        GdiDCAttributeList;                /* 09c/108 */
+    PVOID                        LoaderLock;                        /* 0a0/110 */
+    ULONG                        OSMajorVersion;                    /* 0a4/118 */
+    ULONG                        OSMinorVersion;                    /* 0a8/11c */
+    ULONG                        OSBuildNumber;                     /* 0ac/120 */
+    ULONG                        OSPlatformId;                      /* 0b0/124 */
+    ULONG                        ImageSubSystem;                    /* 0b4/128 */
+    ULONG                        ImageSubSystemMajorVersion;        /* 0b8/12c */
+    ULONG                        ImageSubSystemMinorVersion;        /* 0bc/130 */
+    ULONG                        ImageProcessAffinityMask;          /* 0c0/134 */
+    HANDLE                       GdiHandleBuffer[28];               /* 0c4/138 */
+    ULONG                        unknown[6];                        /* 134/218 */
+    PVOID                        PostProcessInitRoutine;            /* 14c/230 */
+    PRTL_BITMAP                  TlsExpansionBitmap;                /* 150/238 */
+    ULONG                        TlsExpansionBitmapBits[32];        /* 154/240 */
+    ULONG                        SessionId;                         /* 1d4/2c0 */
+    ULARGE_INTEGER               AppCompatFlags;                    /* 1d8/2c8 */
+    ULARGE_INTEGER               AppCompatFlagsUser;                /* 1e0/2d0 */
+    PVOID                        ShimData;                          /* 1e8/2d8 */
+    PVOID                        AppCompatInfo;                     /* 1ec/2e0 */
+    UNICODE_STRING               CSDVersion;                        /* 1f0/2e8 */
+    PVOID                        ActivationContextData;             /* 1f8/2f8 */
+    PVOID                        ProcessAssemblyStorageMap;         /* 1fc/300 */
+    PVOID                        SystemDefaultActivationData;       /* 200/308 */
+    PVOID                        SystemAssemblyStorageMap;          /* 204/310 */
+    SIZE_T                       MinimumStackCommit;                /* 208/318 */
+    PVOID                       *FlsCallback;                       /* 20c/320 */
+    LIST_ENTRY                   FlsListHead;                       /* 210/328 */
+    PRTL_BITMAP                  FlsBitmap;                         /* 218/338 */
+    ULONG                        FlsBitmapBits[4];                  /* 21c/340 */
 } PEB, *PPEB;
 
@@ -306,70 +305,73 @@
  */
 typedef struct _TEB
-{
-    NT_TIB          Tib;                        /* 000 */
-    PVOID           EnvironmentPointer;         /* 01c */
-    CLIENT_ID       ClientId;                   /* 020 */
-    PVOID           ActiveRpcHandle;            /* 028 */
-    PVOID           ThreadLocalStoragePointer;  /* 02c */
-    PPEB            Peb;                        /* 030 */
-    ULONG           LastErrorValue;             /* 034 */
-    ULONG           CountOfOwnedCriticalSections;/* 038 */
-    PVOID           CsrClientThread;            /* 03c */
-    PVOID           Win32ThreadInfo;            /* 040 */
-    ULONG           Win32ClientInfo[31];        /* 044 used for user32 private data in Wine */
-    PVOID           WOW32Reserved;              /* 0c0 */
-    ULONG           CurrentLocale;              /* 0c4 */
-    ULONG           FpSoftwareStatusRegister;   /* 0c8 */
-    PVOID           SystemReserved1[54];        /* 0cc used for kernel32 private data in Wine */
-    LONG            ExceptionCode;              /* 1a4 */
-    ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8 */
-    BYTE            SpareBytes1[24];            /* 1bc used for ntdll private data in Wine */
-    PVOID           SystemReserved2[10];        /* 1d4 used for ntdll private data in Wine */
-    GDI_TEB_BATCH   GdiTebBatch;                /* 1fc used for vm86 private data in Wine */
-    ULONG           gdiRgn;                     /* 6dc */
-    ULONG           gdiPen;                     /* 6e0 */
-    ULONG           gdiBrush;                   /* 6e4 */
-    CLIENT_ID       RealClientId;               /* 6e8 */
-    HANDLE          GdiCachedProcessHandle;     /* 6f0 */
-    ULONG           GdiClientPID;               /* 6f4 */
-    ULONG           GdiClientTID;               /* 6f8 */
-    PVOID           GdiThreadLocaleInfo;        /* 6fc */
-    PVOID           UserReserved[5];            /* 700 */
-    PVOID           glDispachTable[280];        /* 714 */
-    ULONG           glReserved1[26];            /* b74 */
-    PVOID           glReserved2;                /* bdc */
-    PVOID           glSectionInfo;              /* be0 */
-    PVOID           glSection;                  /* be4 */
-    PVOID           glTable;                    /* be8 */
-    PVOID           glCurrentRC;                /* bec */
-    PVOID           glContext;                  /* bf0 */
-    ULONG           LastStatusValue;            /* bf4 */
-    UNICODE_STRING  StaticUnicodeString;        /* bf8 used by advapi32 */
-    WCHAR           StaticUnicodeBuffer[261];   /* c00 used by advapi32 */
-    PVOID           DeallocationStack;          /* e0c */
-    PVOID           TlsSlots[64];               /* e10 */
-    LIST_ENTRY      TlsLinks;                   /* f10 */
-    PVOID           Vdm;                        /* f18 */
-    PVOID           ReservedForNtRpc;           /* f1c */
-    PVOID           DbgSsReserved[2];           /* f20 */
-    ULONG           HardErrorDisabled;          /* f28 */
-    PVOID           Instrumentation[16];        /* f2c */
-    PVOID           WinSockData;                /* f6c */
-    ULONG           GdiBatchCount;              /* f70 */
-    ULONG           Spare2;                     /* f74 */
-    ULONG           Spare3;                     /* f78 */
-    ULONG           Spare4;                     /* f7c */
-    PVOID           ReservedForOle;             /* f80 */
-    ULONG           WaitingOnLoaderLock;        /* f84 */
-    PVOID           Reserved5[3];               /* f88 */
-    PVOID          *TlsExpansionSlots;          /* f94 */
-    ULONG           ImpersonationLocale;        /* f98 */
-    ULONG           IsImpersonating;            /* f9c */
-    PVOID           NlsCache;                   /* fa0 */
-    PVOID           ShimData;                   /* fa4 */
-    ULONG           HeapVirtualAffinity;        /* fa8 */
-    PVOID           CurrentTransactionHandle;   /* fac */
-    PVOID           ActiveFrame;                /* fb0 */
-    PVOID          *FlsSlots;                   /* fb4 */
+{                                                                 /* win32/win64 */
+    NT_TIB                       Tib;                               /* 000/0000 */
+    PVOID                        EnvironmentPointer;                /* 01c/0038 */
+    CLIENT_ID                    ClientId;                          /* 020/0040 */
+    PVOID                        ActiveRpcHandle;                   /* 028/0050 */
+    PVOID                        ThreadLocalStoragePointer;         /* 02c/0058 */
+    PPEB                         Peb;                               /* 030/0060 */
+    ULONG                        LastErrorValue;                    /* 034/0068 */
+    ULONG                        CountOfOwnedCriticalSections;      /* 038/006c */
+    PVOID                        CsrClientThread;                   /* 03c/0070 */
+    PVOID                        Win32ThreadInfo;                   /* 040/0078 */
+    ULONG                        Win32ClientInfo[31];               /* 044/0080 used for user32 private data in Wine */
+    PVOID                        WOW32Reserved;                     /* 0c0/0100 */
+    ULONG                        CurrentLocale;                     /* 0c4/0108 */
+    ULONG                        FpSoftwareStatusRegister;          /* 0c8/010c */
+    PVOID                        SystemReserved1[54];               /* 0cc/0110 used for kernel32 private data in Wine */
+    LONG                         ExceptionCode;                     /* 1a4/02c0 */
+    ACTIVATION_CONTEXT_STACK     ActivationContextStack;            /* 1a8/02c8 */
+    BYTE                         SpareBytes1[24];                   /* 1bc/02e8 used for ntdll private data in Wine */
+    PVOID                        SystemReserved2[10];               /* 1d4/0300 used for ntdll private data in Wine */
+    GDI_TEB_BATCH                GdiTebBatch;                       /* 1fc/0350 used for vm86 private data in Wine */
+    HANDLE                       gdiRgn;                            /* 6dc/0838 */
+    HANDLE                       gdiPen;                            /* 6e0/0840 */
+    HANDLE                       gdiBrush;                          /* 6e4/0848 */
+    CLIENT_ID                    RealClientId;                      /* 6e8/0850 */
+    HANDLE                       GdiCachedProcessHandle;            /* 6f0/0860 */
+    ULONG                        GdiClientPID;                      /* 6f4/0868 */
+    ULONG                        GdiClientTID;                      /* 6f8/086c */
+    PVOID                        GdiThreadLocaleInfo;               /* 6fc/0870 */
+    ULONG                        UserReserved[5];                   /* 700/0878 */
+    PVOID                        glDispachTable[280];               /* 714/0890 */
+    PVOID                        glReserved1[26];                   /* b74/1150 */
+    PVOID                        glReserved2;                       /* bdc/1220 */
+    PVOID                        glSectionInfo;                     /* be0/1228 */
+    PVOID                        glSection;                         /* be4/1230 */
+    PVOID                        glTable;                           /* be8/1238 */
+    PVOID                        glCurrentRC;                       /* bec/1240 */
+    PVOID                        glContext;                         /* bf0/1248 */
+    ULONG                        LastStatusValue;                   /* bf4/1250 */
+    UNICODE_STRING               StaticUnicodeString;               /* bf8/1258 used by advapi32 */
+    WCHAR                        StaticUnicodeBuffer[261];          /* c00/1268 used by advapi32 */
+    PVOID                        DeallocationStack;                 /* e0c/1478 */
+    PVOID                        TlsSlots[64];                      /* e10/1480 */
+    LIST_ENTRY                   TlsLinks;                          /* f10/1680 */
+    PVOID                        Vdm;                               /* f18/1690 */
+    PVOID                        ReservedForNtRpc;                  /* f1c/1698 */
+    PVOID                        DbgSsReserved[2];                  /* f20/16a0 */
+    ULONG                        HardErrorDisabled;                 /* f28/16b0 */
+    PVOID                        Instrumentation[16];               /* f2c/16b8 */
+    PVOID                        WinSockData;                       /* f6c/1738 */
+    ULONG                        GdiBatchCount;                     /* f70/1740 */
+    ULONG                        Spare2;                            /* f74/1744 */
+    PVOID                        Spare3;                            /* f78/1748 */
+    PVOID                        Spare4;                            /* f7c/1750 */
+    PVOID                        ReservedForOle;                    /* f80/1758 */
+    ULONG                        WaitingOnLoaderLock;               /* f84/1760 */
+    PVOID                        Reserved5[3];                      /* f88/1768 */
+    PVOID                       *TlsExpansionSlots;                 /* f94/1780 */
+    ULONG                        ImpersonationLocale;               /* f98/1788 */
+    ULONG                        IsImpersonating;                   /* f9c/178c */
+    PVOID                        NlsCache;                          /* fa0/1790 */
+    PVOID                        ShimData;                          /* fa4/1798 */
+    ULONG                        HeapVirtualAffinity;               /* fa8/17a0 */
+    PVOID                        CurrentTransactionHandle;          /* fac/17a8 */
+    PVOID                        ActiveFrame;                       /* fb0/17b0 */
+#ifdef _WIN64
+    PVOID                        unknown[2];                        /*     17b8 */
+#endif
+    PVOID                       *FlsSlots;                          /* fb4/17c8 */
 } TEB, *PTEB;
 
@@ -854,10 +856,4 @@
 #define UNWIND_HISTORY_TABLE_SIZE 12
 
-typedef struct _RUNTIME_FUNCTION {
-  ULONG BeginAddress;
-  ULONG EndAddress;
-  ULONG UnwindInfoAddress;
-} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
-
 typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
   ULONG64 ImageBase;
@@ -874,5 +870,140 @@
 } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
 
+typedef struct _KNONVOLATILE_CONTEXT_POINTERS
+{
+    PFLOAT128  FltS0;
+    PFLOAT128  FltS1;
+    PFLOAT128  FltS2;
+    PFLOAT128  FltS3;
+    PFLOAT128  HighFloatingContext[10];
+    PFLOAT128  FltS4;
+    PFLOAT128  FltS5;
+    PFLOAT128  FltS6;
+    PFLOAT128  FltS7;
+    PFLOAT128  FltS8;
+    PFLOAT128  FltS9;
+    PFLOAT128  FltS10;
+    PFLOAT128  FltS11;
+    PFLOAT128  FltS12;
+    PFLOAT128  FltS13;
+    PFLOAT128  FltS14;
+    PFLOAT128  FltS15;
+    PFLOAT128  FltS16;
+    PFLOAT128  FltS17;
+    PFLOAT128  FltS18;
+    PFLOAT128  FltS19;
+    PULONGLONG IntS0;
+    PULONGLONG IntS1;
+    PULONGLONG IntS2;
+    PULONGLONG IntS3;
+    PULONGLONG IntSp;
+    PULONGLONG IntS0Nat;
+    PULONGLONG IntS1Nat;
+    PULONGLONG IntS2Nat;
+    PULONGLONG IntS3Nat;
+    PULONGLONG IntSpNat;
+    PULONGLONG Preds;
+    PULONGLONG BrRp;
+    PULONGLONG BrS0;
+    PULONGLONG BrS1;
+    PULONGLONG BrS2;
+    PULONGLONG BrS3;
+    PULONGLONG BrS4;
+    PULONGLONG ApUNAT;
+    PULONGLONG ApLC;
+    PULONGLONG ApEC;
+    PULONGLONG RsPFS;
+    PULONGLONG StFSR;
+    PULONGLONG StFIR;
+    PULONGLONG StFDR;
+    PULONGLONG Cflag;
+} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+
+ULONGLONG WINAPI RtlVirtualUnwind(ULONGLONG,ULONGLONG,RUNTIME_FUNCTION*,CONTEXT*,BOOLEAN*,FRAME_POINTERS*,KNONVOLATILE_CONTEXT_POINTERS*);
+
 #endif /* defined(__ia64__) */
+
+/***********************************************************************
+ * x86-64 specific types and data structures
+ */
+
+#ifdef __x86_64__
+
+#define UNWIND_HISTORY_TABLE_SIZE 12
+
+typedef struct _UNWIND_HISTORY_TABLE_ENTRY
+{
+    ULONG64 ImageBase;
+    PRUNTIME_FUNCTION FunctionEntry;
+} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
+
+#define UNWIND_HISTORY_TABLE_NONE 0
+#define UNWIND_HISTORY_TABLE_GLOBAL 1
+#define UNWIND_HISTORY_TABLE_LOCAL 2
+
+typedef struct _UNWIND_HISTORY_TABLE
+{
+    ULONG Count;
+    UCHAR Search;
+    ULONG64 LowAddress;
+    ULONG64 HighAddress;
+    UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
+} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
+
+typedef struct _KNONVOLATILE_CONTEXT_POINTERS
+{
+    union
+    {
+        PM128A FloatingContext[16];
+        struct
+        {
+            PM128A Xmm0;
+            PM128A Xmm1;
+            PM128A Xmm2;
+            PM128A Xmm3;
+            PM128A Xmm4;
+            PM128A Xmm5;
+            PM128A Xmm6;
+            PM128A Xmm7;
+            PM128A Xmm8;
+            PM128A Xmm9;
+            PM128A Xmm10;
+            PM128A Xmm11;
+            PM128A Xmm12;
+            PM128A Xmm13;
+            PM128A Xmm14;
+            PM128A Xmm15;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME1;
+
+    union
+    {
+        PULONG64 IntegerContext[16];
+        struct
+        {
+            PULONG64 Rax;
+            PULONG64 Rcx;
+            PULONG64 Rdx;
+            PULONG64 Rbx;
+            PULONG64 Rsp;
+            PULONG64 Rbp;
+            PULONG64 Rsi;
+            PULONG64 Rdi;
+            PULONG64 R8;
+            PULONG64 R9;
+            PULONG64 R10;
+            PULONG64 R11;
+            PULONG64 R12;
+            PULONG64 R13;
+            PULONG64 R14;
+            PULONG64 R15;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME2;
+} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+
+PVOID WINAPI RtlVirtualUnwind(ULONG,ULONG64,ULONG64,RUNTIME_FUNCTION*,CONTEXT*,PVOID*,ULONG64*,KNONVOLATILE_CONTEXT_POINTERS*);
+
+#endif  /* __x86_64 */
+
 
 /***********************************************************************
@@ -881,18 +1012,18 @@
 
 /* This is used by NtQuerySystemInformation */
-typedef struct _SYSTEM_THREAD_INFORMATION{
-    FILETIME    ftKernelTime;
-    FILETIME    ftUserTime;
-    FILETIME    ftCreateTime;
-    DWORD       dwTickCount;
-    DWORD       dwStartAddress;
-    DWORD       dwOwningPID;
-    DWORD       dwThreadID;
-    DWORD       dwCurrentPriority;
-    DWORD       dwBasePriority;
-    DWORD       dwContextSwitches;
-    DWORD       dwThreadState;
-    DWORD       dwWaitReason;
-    DWORD       dwUnknown;
+typedef struct _SYSTEM_THREAD_INFORMATION
+{                                    /* win32/win64 */
+    LARGE_INTEGER KernelTime;          /* 00/00 */
+    LARGE_INTEGER UserTime;            /* 08/08 */
+    LARGE_INTEGER CreateTime;          /* 10/10 */
+    DWORD         dwTickCount;         /* 18/18 */
+    LPVOID        StartAddress;        /* 1c/20 */
+    CLIENT_ID     ClientId;            /* 20/28 */
+    DWORD         dwCurrentPriority;   /* 28/38 */
+    DWORD         dwBasePriority;      /* 2c/3c */
+    DWORD         dwContextSwitches;   /* 30/40 */
+    DWORD         dwThreadState;       /* 34/44 */
+    DWORD         dwWaitReason;        /* 38/48 */
+    DWORD         dwUnknown;           /* 3c/4c */
 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
 
@@ -1002,4 +1133,8 @@
     LARGE_INTEGER  CreateTime;
 } OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
+
+typedef struct _OBJECT_NAME_INFORMATION {
+    UNICODE_STRING Name;
+} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
 
 typedef struct _PROCESS_BASIC_INFORMATION {
@@ -1177,7 +1312,9 @@
     ULONG PeakSize;
     ULONG PageFaultCount;
+#ifndef _WIN64
     ULONG MinimumWorkingSet;
     ULONG MaximumWorkingSet;
     ULONG unused[4];
+#endif
 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
 
@@ -1234,36 +1371,37 @@
     SIZE_T PagefileUsage;
     SIZE_T PeakPagefileUsage;
+    SIZE_T PrivatePageCount;
 } VM_COUNTERS, *PVM_COUNTERS;
 
 typedef struct _SYSTEM_PROCESS_INFORMATION {
-#ifdef __WINESRC__
-    DWORD dwOffset;
-    DWORD dwThreadCount;
-    DWORD dwUnknown1[6];
-    FILETIME ftCreationTime;
-    FILETIME ftUserTime;
-    FILETIME ftKernelTime;
-    UNICODE_STRING ProcessName;
-    DWORD dwBasePriority;
-    DWORD dwProcessID;
-    DWORD dwParentProcessID;
-    DWORD dwHandleCount;
-    DWORD dwUnknown3;
-    DWORD dwUnknown4;
-    VM_COUNTERS vmCounters;
-    IO_COUNTERS ioCounters;
-    SYSTEM_THREAD_INFORMATION ti[1];
+#ifdef __WINESRC__                  /* win32/win64 */
+    ULONG NextEntryOffset;             /* 00/00 */
+    DWORD dwThreadCount;               /* 04/04 */
+    DWORD dwUnknown1[6];               /* 08/08 */
+    LARGE_INTEGER CreationTime;        /* 20/20 */
+    LARGE_INTEGER UserTime;            /* 28/28 */
+    LARGE_INTEGER KernelTime;          /* 30/30 */
+    UNICODE_STRING ProcessName;        /* 38/38 */
+    DWORD dwBasePriority;              /* 40/48 */
+    HANDLE UniqueProcessId;            /* 44/50 */
+    HANDLE ParentProcessId;            /* 48/58 */
+    ULONG HandleCount;                 /* 4c/60 */
+    DWORD dwUnknown3;                  /* 50/64 */
+    DWORD dwUnknown4;                  /* 54/68 */
+    VM_COUNTERS vmCounters;            /* 58/70 */
+    IO_COUNTERS ioCounters;            /* 88/d0 */
+    SYSTEM_THREAD_INFORMATION ti[1];   /* b8/100 */
 #else
-    ULONG NextEntryOffset;
-    BYTE Reserved1[52];
-    PVOID Reserved2[3];
-    HANDLE UniqueProcessId;
-    PVOID Reserved3;
-    ULONG HandleCount;
-    BYTE Reserved4[4];
-    PVOID Reserved5[11];
-    SIZE_T PeakPagefileUsage;
-    SIZE_T PrivatePageCount;
-    LARGE_INTEGER Reserved6[6];
+    ULONG NextEntryOffset;             /* 00/00 */
+    BYTE Reserved1[52];                /* 04/04 */
+    PVOID Reserved2[3];                /* 38/38 */
+    HANDLE UniqueProcessId;            /* 44/50 */
+    PVOID Reserved3;                   /* 48/58 */
+    ULONG HandleCount;                 /* 4c/60 */
+    BYTE Reserved4[4];                 /* 50/64 */
+    PVOID Reserved5[11];               /* 54/68 */
+    SIZE_T PeakPagefileUsage;          /* 80/c0 */
+    SIZE_T PrivatePageCount;           /* 84/c8 */
+    LARGE_INTEGER Reserved6[6];        /* 88/d0 */
 #endif
 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
@@ -1675,6 +1813,6 @@
   USHORT VirtualRangesOffset;
   CLIENT_ID ClientId;
-  ULONG MessageId;
-  ULONG SectionSize;
+  ULONG_PTR MessageId;
+  ULONG_PTR SectionSize;
   UCHAR Data[ANYSIZE_ARRAY];
 } LPC_MESSAGE, *PLPC_MESSAGE;
@@ -1817,14 +1955,14 @@
 typedef struct _SYSTEM_MODULE
 {
-    ULONG               Reserved1;
-    ULONG               Reserved2;
-    PVOID               ImageBaseAddress;
-    ULONG               ImageSize;
-    ULONG               Flags;
-    WORD                Id;
-    WORD                Rank;
-    WORD                Unknown;
-    WORD                NameOffset;
-    BYTE                Name[MAXIMUM_FILENAME_LENGTH];
+    PVOID               Reserved1;                      /* 00/00 */
+    PVOID               Reserved2;                      /* 04/08 */
+    PVOID               ImageBaseAddress;               /* 08/10 */
+    ULONG               ImageSize;                      /* 0c/18 */
+    ULONG               Flags;                          /* 10/1c */
+    WORD                Id;                             /* 14/20 */
+    WORD                Rank;                           /* 16/22 */
+    WORD                Unknown;                        /* 18/24 */
+    WORD                NameOffset;                     /* 1a/26 */
+    BYTE                Name[MAXIMUM_FILENAME_LENGTH];  /* 1c/28 */
 } SYSTEM_MODULE, *PSYSTEM_MODULE;
 
@@ -1859,5 +1997,5 @@
 NTSYSAPI NTSTATUS  WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
 NTSYSAPI NTSTATUS  WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG*);
-IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT);
+IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT_PTR);
 NTSYSAPI NTSTATUS  WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*);
 NTSYSAPI void      WINAPI LdrShutdownProcess(void);
@@ -2127,4 +2265,5 @@
 NTSYSAPI LONG      WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
 NTSYSAPI LONG      WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
+NTSYSAPI NTSTATUS  WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
 NTSYSAPI DWORD     WINAPI RtlComputeCrc32(DWORD,const BYTE*,INT);
 NTSYSAPI NTSTATUS  WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
@@ -2149,4 +2288,5 @@
 NTSYSAPI NTSTATUS  WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
 NTSYSAPI void      WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
+NTSYSAPI NTSTATUS  WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
 NTSYSAPI NTSTATUS  WINAPI RtlDeleteAce(PACL,DWORD);
 NTSYSAPI NTSTATUS  WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
@@ -2212,5 +2352,5 @@
 NTSYSAPI BOOLEAN   WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
 NTSYSAPI NTSTATUS  WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
-NTSYSAPI NTSTATUS  WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,LPWSTR,ULONG);
+NTSYSAPI NTSTATUS  WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG);
 NTSYSAPI void      WINAPI RtlFreeAnsiString(PANSI_STRING);
 NTSYSAPI BOOLEAN   WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
@@ -2222,4 +2362,5 @@
 NTSYSAPI NTSTATUS  WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
 NTSYSAPI NTSTATUS  WINAPI RtlGetActiveActivationContext(HANDLE*);
+NTSYSAPI NTSTATUS  WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
 NTSYSAPI NTSTATUS  WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
 NTSYSAPI NTSTATUS  WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
@@ -2381,12 +2522,12 @@
 NTSYSAPI NTSTATUS  WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
 NTSYSAPI NTSTATUS  WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
-NTSYSAPI NTSTATUS  WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,va_list);
-NTSYSAPI NTSTATUS  WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_list);
+NTSYSAPI NTSTATUS  WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,__ms_va_list);
+NTSYSAPI NTSTATUS  WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,__ms_va_list);
 
 /* Wine internal functions */
 
-NTSYSAPI NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
-                                             UINT disposition, BOOLEAN check_case );
-NTSYSAPI NTSTATUS wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
+NTSYSAPI NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
+                                                   UINT disposition, BOOLEAN check_case );
+NTSYSAPI NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
 
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winuser.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winuser.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winuser.h	(revision 19678)
@@ -2088,7 +2088,7 @@
 #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
 
-#define MAKELPARAM(low,high)   ((LPARAM)MAKELONG(low,high))
-#define MAKEWPARAM(low,high)   ((WPARAM)MAKELONG(low,high))
-#define MAKELRESULT(low,high)  ((LRESULT)MAKELONG(low,high))
+#define MAKELPARAM(low,high)   ((LPARAM)(DWORD)MAKELONG(low,high))
+#define MAKEWPARAM(low,high)   ((WPARAM)(DWORD)MAKELONG(low,high))
+#define MAKELRESULT(low,high)  ((LRESULT)(DWORD)MAKELONG(low,high))
 
 /* Cursors / Icons */
@@ -5078,6 +5078,6 @@
 WINUSERAPI INT        WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
 #define                       wsprintf WINELIB_NAME_AW(wsprintf)
-WINUSERAPI INT         WINAPI wvsprintfA(LPSTR,LPCSTR,va_list);
-WINUSERAPI INT         WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list);
+WINUSERAPI INT         WINAPI wvsprintfA(LPSTR,LPCSTR,__ms_va_list);
+WINUSERAPI INT         WINAPI wvsprintfW(LPWSTR,LPCWSTR,__ms_va_list);
 #define                       wvsprintf WINELIB_NAME_AW(wvsprintf)
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winuser.rh
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winuser.rh	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winuser.rh	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -76,4 +85,34 @@
 #define WS_EX_PALETTEWINDOW    (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST)
 
+/* Standard dialog button IDs */
+#define IDOK                1
+#define IDCANCEL            2
+#define IDABORT             3
+#define IDRETRY             4
+#define IDIGNORE            5
+#define IDYES               6
+#define IDNO                7
+#define IDCLOSE             8
+#define IDHELP              9
+#define IDTRYAGAIN         10
+#define IDCONTINUE         11
+
+/* Win32 button control messages */
+#define BM_GETCHECK          0x00f0
+#define BM_SETCHECK          0x00f1
+#define BM_GETSTATE          0x00f2
+#define BM_SETSTATE          0x00f3
+#define BM_SETSTYLE          0x00f4
+#define BM_CLICK             0x00f5
+#define BM_GETIMAGE          0x00f6
+#define BM_SETIMAGE          0x00f7
+
+/* Button states */
+#define BST_UNCHECKED        0x0000
+#define BST_CHECKED          0x0001
+#define BST_INDETERMINATE    0x0002
+#define BST_PUSHED           0x0004
+#define BST_FOCUS            0x0008
+
 /* Button control styles */
 #define BS_PUSHBUTTON          0x00000000L
@@ -155,4 +194,36 @@
 #define ES_WANTRETURN   0x00001000
 #define ES_NUMBER       0x00002000
+
+
+#define HELP_CONTEXT        0x0001
+#define HELP_QUIT           0x0002
+#define HELP_INDEX          0x0003
+#define HELP_CONTENTS       0x0003
+#define HELP_HELPONHELP     0x0004
+#define HELP_SETINDEX       0x0005
+#define HELP_SETCONTENTS    0x0005
+#define HELP_CONTEXTPOPUP   0x0008
+#define HELP_FORCEFILE      0x0009
+#define HELP_KEY            0x0101
+#define HELP_COMMAND        0x0102
+#define HELP_PARTIALKEY     0x0105
+#define HELP_MULTIKEY       0x0201
+#define HELP_SETWINPOS      0x0203
+#define HELP_CONTEXTMENU    0x000a
+#define HELP_FINDER	    0x000b
+#define HELP_WM_HELP	    0x000c
+#define HELP_SETPOPUP_POS   0x000d
+
+#define HELP_TCARD	    0x8000
+#define HELP_TCARD_DATA	    0x0010
+#define HELP_TCARD_OTHER_CALLER 0x0011
+
+
+#define IDH_NO_HELP             28440
+#define IDH_MISSING_CONTEXT     28441
+#define IDH_GENERIC_HELP_BUTTON 28442
+#define IDH_OK                  28443
+#define IDH_CANCEL              28444
+#define IDH_HELP                28445
 
 /* Listbox styles */
@@ -174,4 +245,103 @@
 #define LBS_COMBOBOX             0x8000
 #define LBS_STANDARD  (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
+
+/* Menu flags */
+#define MF_INSERT          0x0000
+#define MF_CHANGE          0x0080
+#define MF_APPEND          0x0100
+#define MF_DELETE          0x0200
+#define MF_REMOVE          0x1000
+#define MF_END             0x0080
+
+#define MF_ENABLED         0x0000
+#define MF_GRAYED          0x0001
+#define MF_DISABLED        0x0002
+#define MF_STRING          0x0000
+#define MF_BITMAP          0x0004
+#define MF_UNCHECKED       0x0000
+#define MF_CHECKED         0x0008
+#define MF_POPUP           0x0010
+#define MF_MENUBARBREAK    0x0020
+#define MF_MENUBREAK       0x0040
+#define MF_UNHILITE        0x0000
+#define MF_HILITE          0x0080
+#define MF_OWNERDRAW       0x0100
+#define MF_USECHECKBITMAPS 0x0200
+#define MF_BYCOMMAND       0x0000
+#define MF_BYPOSITION      0x0400
+#define MF_SEPARATOR       0x0800
+#define MF_DEFAULT         0x1000
+#define MF_SYSMENU         0x2000
+#define MF_HELP            0x4000
+#define MF_RIGHTJUSTIFY    0x4000
+#define MF_MOUSESELECT     0x8000
+
+/* Flags for extended menu item types.  */
+#define MFT_STRING         MF_STRING
+#define MFT_BITMAP         MF_BITMAP
+#define MFT_MENUBARBREAK   MF_MENUBARBREAK
+#define MFT_MENUBREAK      MF_MENUBREAK
+#define MFT_OWNERDRAW      MF_OWNERDRAW
+#define MFT_RADIOCHECK     0x00000200L
+#define MFT_SEPARATOR      MF_SEPARATOR
+#define MFT_RIGHTORDER     0x00002000L
+#define MFT_RIGHTJUSTIFY   MF_RIGHTJUSTIFY
+
+/* Flags for extended menu item states.  */
+#define MFS_GRAYED          0x00000003L
+#define MFS_DISABLED        MFS_GRAYED
+#define MFS_CHECKED         MF_CHECKED
+#define MFS_HILITE          MF_HILITE
+#define MFS_ENABLED         MF_ENABLED
+#define MFS_UNCHECKED       MF_UNCHECKED
+#define MFS_UNHILITE        MF_UNHILITE
+#define MFS_DEFAULT         MF_DEFAULT
+#define MFS_MASK            0x0000108BL
+#define MFS_HOTTRACKDRAWN   0x10000000L
+#define MFS_CACHEDBMP       0x20000000L
+#define MFS_BOTTOMGAPDROP   0x40000000L
+#define MFS_TOPGAPDROP      0x80000000L
+#define MFS_GAPDROP         0xC0000000L
+/* Scrollbar styles */
+#define SBS_HORZ                    0x0000L
+#define SBS_VERT                    0x0001L
+#define SBS_TOPALIGN                0x0002L
+#define SBS_LEFTALIGN               0x0002L
+#define SBS_BOTTOMALIGN             0x0004L
+#define SBS_RIGHTALIGN              0x0004L
+#define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
+#define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
+#define SBS_SIZEBOX                 0x0008L
+#define SBS_SIZEGRIP                0x0010L
+
+/* WM_SYSCOMMAND parameters */
+#ifdef SC_SIZE /* at least HP-UX: already defined in /usr/include/sys/signal.h */
+#undef SC_SIZE
+#endif
+#define SC_SIZE         0xf000
+#define SC_MOVE         0xf010
+#define SC_MINIMIZE     0xf020
+#define SC_MAXIMIZE     0xf030
+#define SC_NEXTWINDOW   0xf040
+#define SC_PREVWINDOW   0xf050
+#define SC_CLOSE        0xf060
+#define SC_VSCROLL      0xf070
+#define SC_HSCROLL      0xf080
+#define SC_MOUSEMENU    0xf090
+#define SC_KEYMENU      0xf100
+#define SC_ARRANGE      0xf110
+#define SC_RESTORE      0xf120
+#define SC_TASKLIST     0xf130
+#define SC_SCREENSAVE   0xf140
+#define SC_HOTKEY       0xf150
+  /* Win32 4.0 */
+#define SC_DEFAULT      0xf160
+#define SC_MONITORPOWER 0xf170
+#define SC_CONTEXTHELP  0xf180
+#define SC_SEPARATOR    0xf00f
+
+/* obsolete names(SC_ICON and SC_ZOOM) */
+#define SC_ICON   SC_MINIMIZE
+#define SC_ZOOM   SC_MAXIMIZE
 
 /* Static Control Styles */
@@ -209,2 +379,31 @@
 #define SS_WORDELLIPSIS     0x0000C000L
 #define SS_ELLIPSISMASK     0x0000C000L
+
+/* ShowWindow() codes */
+#define SW_HIDE             0
+#define SW_SHOWNORMAL       1
+#define SW_NORMAL           1
+#define SW_SHOWMINIMIZED    2
+#define SW_SHOWMAXIMIZED    3
+#define SW_MAXIMIZE         3
+#define SW_SHOWNOACTIVATE   4
+#define SW_SHOW             5
+#define SW_MINIMIZE         6
+#define SW_SHOWMINNOACTIVE  7
+#define SW_SHOWNA           8
+#define SW_RESTORE          9
+#define SW_SHOWDEFAULT	    10
+#define SW_FORCEMINIMIZE    11
+#define SW_MAX              11
+
+/* Predefined resources */
+#define IDI_APPLICATION    MAKEINTRESOURCE(32512)
+#define IDI_HAND           MAKEINTRESOURCE(32513)
+#define IDI_QUESTION       MAKEINTRESOURCE(32514)
+#define IDI_EXCLAMATION    MAKEINTRESOURCE(32515)
+#define IDI_ASTERISK       MAKEINTRESOURCE(32516)
+#define IDI_WINLOGO        MAKEINTRESOURCE(32517)
+
+#define IDI_WARNING        IDI_EXCLAMATION
+#define IDI_ERROR          IDI_HAND
+#define IDI_INFORMATION    IDI_ASTERISK
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2def.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2def.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2def.h	(revision 19678)
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2009 Robert Shearman
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef _WS2DEF_
+#define _WS2DEF_
+
+/* FIXME: #include <inaddr.h> */
+
+#ifdef USE_WS_PREFIX
+#define WS(x)    WS_##x
+#else
+#define WS(x)    x
+#endif
+
+#ifndef __CSADDR_DEFINED__
+#define __CSADDR_DEFINED__
+
+typedef struct _SOCKET_ADDRESS {
+        LPSOCKADDR      lpSockaddr;
+        INT             iSockaddrLength;
+} SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS;
+
+typedef struct _CSADDR_INFO {
+        SOCKET_ADDRESS  LocalAddr;
+        SOCKET_ADDRESS  RemoteAddr;
+        INT             iSocketType;
+        INT             iProtocol;
+} CSADDR_INFO, *PCSADDR_INFO, *LPCSADDR_INFO;
+#endif
+
+#ifdef USE_WS_PREFIX
+#define WS__SS_MAXSIZE 128
+#define WS__SS_ALIGNSIZE (sizeof(__int64))
+#define WS__SS_PAD1SIZE (WS__SS_ALIGNSIZE - sizeof(short))
+#define WS__SS_PAD2SIZE (WS__SS_MAXSIZE - 2 * WS__SS_ALIGNSIZE)
+#else
+#define _SS_MAXSIZE 128
+#define _SS_ALIGNSIZE (sizeof(__int64))
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(short))
+#define _SS_PAD2SIZE (_SS_MAXSIZE - 2 * _SS_ALIGNSIZE)
+#endif
+
+typedef struct WS(sockaddr_storage) {
+        short ss_family;
+        char __ss_pad1[WS(_SS_PAD1SIZE)];
+        __int64 __ss_align;
+        char __ss_pad2[WS(_SS_PAD2SIZE)];
+} SOCKADDR_STORAGE, *PSOCKADDR_STORAGE, *LPSOCKADDR_STORAGE;
+
+/*socket address list */
+typedef struct _SOCKET_ADDRESS_LIST {
+        INT             iAddressCount;
+        SOCKET_ADDRESS  Address[1];
+} SOCKET_ADDRESS_LIST, *LPSOCKET_ADDRESS_LIST;
+
+#endif /* _WS2DEF_ */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2ipdef.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2ipdef.h	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2ipdef.h	(revision 19678)
@@ -0,0 +1,280 @@
+/*
+ * Copyright (C) 2009 Robert Shearman
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#ifndef __WS2IPDEF__
+#define __WS2IPDEF__
+
+#include <in6addr.h>
+
+#ifdef USE_WS_PREFIX
+#define WS(x)    WS_##x
+#else
+#define WS(x)    x
+#endif
+
+typedef struct WS(sockaddr_in6_old)
+{
+   SHORT    sin6_family;
+   USHORT   sin6_port;
+   ULONG    sin6_flowinfo;
+   IN6_ADDR sin6_addr;
+} SOCKADDR_IN6_OLD,*PSOCKADDR_IN6_OLD, *LPSOCKADDR_IN6_OLD;
+
+typedef union sockaddr_gen
+{
+   struct WS(sockaddr) Address;
+   struct WS(sockaddr_in)  AddressIn;
+   struct WS(sockaddr_in6_old) AddressIn6;
+} WS(sockaddr_gen);
+
+/* Structure to keep interface specific information */
+typedef struct _INTERFACE_INFO
+{
+    WS(u_long)        iiFlags;             /* Interface flags */
+    WS(sockaddr_gen)  iiAddress;           /* Interface address */
+    WS(sockaddr_gen)  iiBroadcastAddress;  /* Broadcast address */
+    WS(sockaddr_gen)  iiNetmask;           /* Network mask */
+} INTERFACE_INFO, * LPINTERFACE_INFO;
+
+/* Possible flags for the  iiFlags - bitmask  */
+#ifndef USE_WS_PREFIX
+#define IFF_UP                0x00000001 /* Interface is up */
+#define IFF_BROADCAST         0x00000002 /* Broadcast is  supported */
+#define IFF_LOOPBACK          0x00000004 /* this is loopback interface */
+#define IFF_POINTTOPOINT      0x00000008 /* this is point-to-point interface */
+#define IFF_MULTICAST         0x00000010 /* multicast is supported */
+#else
+#define WS_IFF_UP             0x00000001 /* Interface is up */
+#define WS_IFF_BROADCAST      0x00000002 /* Broadcast is  supported */
+#define WS_IFF_LOOPBACK       0x00000004 /* this is loopback interface */
+#define WS_IFF_POINTTOPOINT   0x00000008 /* this is point-to-point interface */
+#define WS_IFF_MULTICAST      0x00000010 /* multicast is supported */
+#endif /* USE_WS_PREFIX */
+
+#ifndef USE_WS_PREFIX
+#define IP_OPTIONS                      1
+#define IP_HDRINCL                      2
+#define IP_TOS                          3
+#define IP_TTL                          4
+#define IP_MULTICAST_IF                 9
+#define IP_MULTICAST_TTL                10
+#define IP_MULTICAST_LOOP               11
+#define IP_ADD_MEMBERSHIP               12
+#define IP_DROP_MEMBERSHIP              13
+#define IP_DONTFRAGMENT                 14
+#define IP_ADD_SOURCE_MEMBERSHIP        15
+#define IP_DROP_SOURCE_MEMBERSHIP       16
+#define IP_BLOCK_SOURCE                 17
+#define IP_UNBLOCK_SOURCE               18
+#define IP_PKTINFO                      19
+#define IP_HOPLIMIT                     21
+#define IP_RECEIVE_BROADCAST            22
+#define IP_RECVIF                       24
+#define IP_RECVDSTADDR                  25
+#define IP_IFLIST                       28
+#define IP_ADD_IFLIST                   29
+#define IP_DEL_IFLIST                   30
+#define IP_UNICAST_IF                   31
+#define IP_RTHDR                        32
+#define IP_RECVRTHDR                    38
+#else
+#define WS_IP_OPTIONS                   1
+#define WS_IP_HDRINCL                   2
+#define WS_IP_TOS                       3
+#define WS_IP_TTL                       4
+#define WS_IP_MULTICAST_IF              9
+#define WS_IP_MULTICAST_TTL             10
+#define WS_IP_MULTICAST_LOOP            11
+#define WS_IP_ADD_MEMBERSHIP            12
+#define WS_IP_DROP_MEMBERSHIP           13
+#define WS_IP_DONTFRAGMENT              14
+#define WS_IP_ADD_SOURCE_MEMBERSHIP     15
+#define WS_IP_DROP_SOURCE_MEMBERSHIP    16
+#define WS_IP_BLOCK_SOURCE              17
+#define WS_IP_UNBLOCK_SOURCE            18
+#define WS_IP_PKTINFO                   19
+#define WS_IP_HOPLIMIT                  21
+#define WS_IP_RECEIVE_BROADCAST         22
+#define WS_IP_RECVIF                    24
+#define WS_IP_RECVDSTADDR               25
+#define WS_IP_IFLIST                    28
+#define WS_IP_ADD_IFLIST                29
+#define WS_IP_DEL_IFLIST                30
+#define WS_IP_UNICAST_IF                31
+#define WS_IP_RTHDR                     32
+#define WS_IP_RECVRTHDR                 38
+#endif /* USE_WS_PREFIX */
+
+typedef struct WS(sockaddr_in6)
+{
+   SHORT    sin6_family;
+   USHORT   sin6_port;
+   ULONG    sin6_flowinfo;
+   IN6_ADDR sin6_addr;
+   ULONG    sin6_scope_id;
+} SOCKADDR_IN6,*PSOCKADDR_IN6, *LPSOCKADDR_IN6;
+
+/*
+ * Multicast group information
+ */
+
+struct WS(ip_mreq)
+{
+    struct WS(in_addr) imr_multiaddr;
+    struct WS(in_addr) imr_interface;
+} WS(IP_MREQ), *WS(PIP_MREQ);
+
+struct WS(ip_mreq_source) {
+    struct WS(in_addr) imr_multiaddr;
+    struct WS(in_addr) imr_sourceaddr;
+    struct WS(in_addr) imr_interface;
+} WS(IP_MREQ_SOURCE), *WS(PIP_MREQ_SOURCE);
+
+struct WS(ip_msfilter) {
+    struct WS(in_addr) imsf_multiaddr;
+    struct WS(in_addr) imsf_interface;
+    WS(u_long)         imsf_fmode;
+    WS(u_long)         imsf_numsrc;
+    struct WS(in_addr) imsf_slist[1];
+} WS(IP_MSFILTER), *WS(PIP_MSFILTER);
+
+#ifndef USE_WS_PREFIX
+#define IPV6_OPTIONS                    1
+#define IPV6_HDRINCL                    2
+#define IPV6_UNICAST_HOPS               4
+#define IPV6_MULTICAST_IF               9
+#define IPV6_MULTICAST_HOPS             10
+#define IPV6_MULTICAST_LOOP             11
+#define IPV6_ADD_MEMBERSHIP             12
+#define IPV6_JOIN_GROUP                 IPV6_ADD_MEMBERSHIP
+#define IPV6_DROP_MEMBERSHIP            13
+#define IPV6_LEAVE_GROUP                IPV6_DROP_MEMBERSHIP
+#define IPV6_DONTFRAG                   14
+#define IPV6_PKTINFO                    19
+#define IPV6_HOPLIMIT                   21
+#define IPV6_PROTECTION_LEVEL           23
+#define IPV6_RECVIF                     24
+#define IPV6_RECVDSTADDR                25
+#define IPV6_CHECKSUM                   26
+#define IPV6_V6ONLY                     27
+#define IPV6_IFLIST                     28
+#define IPV6_ADD_IFLIST                 29
+#define IPV6_DEL_IFLIST                 30
+#define IPV6_UNICAST_IF                 31
+#define IPV6_RTHDR                      32
+#define IPV6_RECVRTHDR                  38
+#else
+#define WS_IPV6_OPTIONS                 1
+#define WS_IPV6_HDRINCL                 2
+#define WS_IPV6_UNICAST_HOPS            4
+#define WS_IPV6_MULTICAST_IF            9
+#define WS_IPV6_MULTICAST_HOPS          10
+#define WS_IPV6_MULTICAST_LOOP          11
+#define WS_IPV6_ADD_MEMBERSHIP          12
+#define WS_IPV6_DROP_MEMBERSHIP         13
+#define WS_IPV6_LEAVE_GROUP             WS_IPV6_DROP_MEMBERSHIP
+#define WS_IPV6_DONTFRAG                14
+#define WS_IPV6_PKTINFO                 19
+#define WS_IPV6_HOPLIMIT                21
+#define WS_IPV6_PROTECTION_LEVEL        23
+#define WS_IPV6_RECVIF                  24
+#define WS_IPV6_RECVDSTADDR             25
+#define WS_IPV6_CHECKSUM                26
+#define WS_IPV6_V6ONLY                  27
+#define WS_IPV6_IFLIST                  28
+#define WS_IPV6_ADD_IFLIST              29
+#define WS_IPV6_DEL_IFLIST              30
+#define WS_IPV6_UNICAST_IF              31
+#define WS_IPV6_RTHDR                   32
+#define WS_IPV6_RECVRTHDR               38
+#endif /* USE_WS_PREFIX */
+
+#ifndef USE_WS_PREFIX
+#define TCP_OFFLOAD_NO_PREFERENCE       0
+#define TCP_OFFLOAD_NOT_PREFERRED       1
+#define TCP_OFFLOAD_PREFERRED           2
+#else
+#define WS_TCP_OFFLOAD_NO_PREFERENCE    0
+#define WS_TCP_OFFLOAD_NOT_PREFERRED    1
+#define WS_TCP_OFFLOAD_PREFERRED        2
+#endif /* USE_WS_PREFIX */
+
+#ifndef USE_WS_PREFIX
+/* TCP_NODELAY is defined elsewhere */
+#define TCP_EXPEDITED_1122              2
+#define TCP_KEEPALIVE                   3
+#define TCP_MAXSEG                      4
+#define TCP_MAXRT                       5
+#define TCP_STDURG                      6
+#define TCP_NOURG                       7
+#define TCP_ATMARK                      8
+#define TCP_NOSYNRETRIES                9
+#define TCP_TIMESTAMPS                  10
+#define TCP_OFFLOAD_PREFERENCE          11
+#define TCP_CONGESTION_ALGORITHM        12
+#define TCP_DELAY_FIN_ACK               13
+#else
+/* WS_TCP_NODELAY is defined elsewhere */
+#define WS_TCP_EXPEDITED_1122           2
+#define WS_TCP_KEEPALIVE                3
+#define WS_TCP_MAXSEG                   4
+#define WS_TCP_MAXRT                    5
+#define WS_TCP_STDURG                   6
+#define WS_TCP_NOURG                    7
+#define WS_TCP_ATMARK                   8
+#define WS_TCP_NOSYNRETRIES             9
+#define WS_TCP_TIMESTAMPS               10
+#define WS_TCP_OFFLOAD_PREFERENCE       11
+#define WS_TCP_CONGESTION_ALGORITHM     12
+#define WS_TCP_DELAY_FIN_ACK            13
+#endif /* USE_WS_PREFIX */
+
+#ifndef USE_WS_PREFIX
+#define INET_ADDRSTRLEN         22
+#define INET6_ADDRSTRLEN        65
+#define IN6ADDR_ANY_INIT        { 0 }
+#define IN6ADDR_LOOPBACK_INIT   { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
+#else
+#define WS_INET_ADDRSTRLEN      22
+#define WS_INET6_ADDRSTRLEN     65
+#define WS_IN6ADDR_ANY_INIT     { 0 }
+#define WS_IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
+#endif /* USE_WS_PREFIX */
+
+static inline BOOL WS(IN6_IS_ADDR_LOOPBACK) ( const IN6_ADDR *a )
+{
+    return (BOOL)((a->s6_words[0] == 0) &&
+                  (a->s6_words[1] == 0) &&
+                  (a->s6_words[2] == 0) &&
+                  (a->s6_words[3] == 0) &&
+                  (a->s6_words[4] == 0) &&
+                  (a->s6_words[5] == 0) &&
+                  (a->s6_words[6] == 0) &&
+                  (a->s6_words[7] == 0x0100));
+}
+
+#endif /* __WS2IPDEF__ */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2tcpip.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2tcpip.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ws2tcpip.h	(revision 19678)
@@ -30,5 +30,5 @@
 
 #include <winsock2.h>
-/* FIXME: #include <ws2ipdef.h> */
+#include <ws2ipdef.h>
 #include <limits.h>
 
@@ -38,7 +38,4 @@
 #define WS(x)    x
 #endif
-
-/* FIXME: This gets defined by some Unix (Linux) header and messes things */
-#undef s6_addr
 
 /* for addrinfo calls */
@@ -70,117 +67,4 @@
 
 typedef ADDRINFOA ADDRINFO, *LPADDRINFO;
-
-/*
- * Multicast group information
- */
-
-struct WS(ip_mreq)
-{
-    struct WS(in_addr) imr_multiaddr;
-    struct WS(in_addr) imr_interface;
-};
-
-struct WS(ip_mreq_source) {
-    struct WS(in_addr) imr_multiaddr;
-    struct WS(in_addr) imr_sourceaddr;
-    struct WS(in_addr) imr_interface;
-};
-
-struct WS(ip_msfilter) {
-    struct WS(in_addr) imsf_multiaddr;
-    struct WS(in_addr) imsf_interface;
-    WS(u_long)         imsf_fmode;
-    WS(u_long)         imsf_numsrc;
-    struct WS(in_addr) imsf_slist[1];
-};
-
-typedef struct WS(in_addr6)
-{
-   WS(u_char) s6_addr[16]; /* IPv6 address */
-} IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR;
-
-typedef struct WS(sockaddr_in6)
-{
-   short   sin6_family;            /* AF_INET6 */
-   WS(u_short) sin6_port;          /* Transport level port number */
-   WS(u_long) sin6_flowinfo;       /* IPv6 flow information */
-   struct  WS(in_addr6) sin6_addr; /* IPv6 address */
-   WS(u_long) sin6_scope_id;       /* IPv6 scope id */
-} SOCKADDR_IN6,*PSOCKADDR_IN6, *LPSOCKADDR_IN6;
-
-typedef struct WS(sockaddr_in6_old)
-{
-   short   sin6_family;            /* AF_INET6 */
-   WS(u_short) sin6_port;              /* Transport level port number */
-   WS(u_long) sin6_flowinfo;          /* IPv6 flow information */
-   struct  WS(in_addr6) sin6_addr; /* IPv6 address */
-} SOCKADDR_IN6_OLD,*PSOCKADDR_IN6_OLD, *LPSOCKADDR_IN6_OLD;
-
-typedef union sockaddr_gen
-{
-   struct WS(sockaddr) Address;
-   struct WS(sockaddr_in)  AddressIn;
-   struct WS(sockaddr_in6_old) AddressIn6;
-} WS(sockaddr_gen);
-
-/* Structure to keep interface specific information */
-typedef struct _INTERFACE_INFO
-{
-    WS(u_long)        iiFlags;             /* Interface flags */
-    WS(sockaddr_gen)  iiAddress;           /* Interface address */
-    WS(sockaddr_gen)  iiBroadcastAddress;  /* Broadcast address */
-    WS(sockaddr_gen)  iiNetmask;           /* Network mask */
-} INTERFACE_INFO, * LPINTERFACE_INFO;
-
-/* Possible flags for the  iiFlags - bitmask  */
-#ifndef USE_WS_PREFIX
-#define IFF_UP                0x00000001 /* Interface is up */
-#define IFF_BROADCAST         0x00000002 /* Broadcast is  supported */
-#define IFF_LOOPBACK          0x00000004 /* this is loopback interface */
-#define IFF_POINTTOPOINT      0x00000008 /* this is point-to-point interface */
-#define IFF_MULTICAST         0x00000010 /* multicast is supported */
-#else
-#define WS_IFF_UP             0x00000001 /* Interface is up */
-#define WS_IFF_BROADCAST      0x00000002 /* Broadcast is  supported */
-#define WS_IFF_LOOPBACK       0x00000004 /* this is loopback interface */
-#define WS_IFF_POINTTOPOINT   0x00000008 /* this is point-to-point interface */
-#define WS_IFF_MULTICAST      0x00000010 /* multicast is supported */
-#endif /* USE_WS_PREFIX */
-
-#ifndef USE_WS_PREFIX
-#define IP_OPTIONS                      1
-#define IP_HDRINCL                      2
-#define IP_TOS                          3
-#define IP_TTL                          4
-#define IP_MULTICAST_IF                 9
-#define IP_MULTICAST_TTL                10
-#define IP_MULTICAST_LOOP               11
-#define IP_ADD_MEMBERSHIP               12
-#define IP_DROP_MEMBERSHIP              13
-#define IP_DONTFRAGMENT                 14
-#define IP_ADD_SOURCE_MEMBERSHIP        15
-#define IP_DROP_SOURCE_MEMBERSHIP       16
-#define IP_BLOCK_SOURCE                 17
-#define IP_UNBLOCK_SOURCE               18
-#define IP_PKTINFO                      19
-#define IP_RECEIVE_BROADCAST            22
-#else
-#define WS_IP_OPTIONS                   1
-#define WS_IP_HDRINCL                   2
-#define WS_IP_TOS                       3
-#define WS_IP_TTL                       4
-#define WS_IP_MULTICAST_IF              9
-#define WS_IP_MULTICAST_TTL             10
-#define WS_IP_MULTICAST_LOOP            11
-#define WS_IP_ADD_MEMBERSHIP            12
-#define WS_IP_DROP_MEMBERSHIP           13
-#define WS_IP_DONTFRAGMENT              14
-#define WS_IP_ADD_SOURCE_MEMBERSHIP     15
-#define WS_IP_DROP_SOURCE_MEMBERSHIP    16
-#define WS_IP_BLOCK_SOURCE              17
-#define WS_IP_UNBLOCK_SOURCE            18
-#define WS_IP_PKTINFO                   19
-#define WS_IP_RECEIVE_BROADCAST         22
-#endif /* USE_WS_PREFIX */
 
 /* Possible Windows flags for getaddrinfo() */
@@ -215,4 +99,12 @@
 #endif
 
+#ifndef USE_WS_PREFIX
+# define NI_MAXHOST         1025
+# define NI_MAXSERV         32
+#else
+# define WS_NI_MAXHOST      1025
+# define WS_NI_MAXSERV      32
+#endif
+
 /* Possible Windows flags for getnameinfo() */
 #ifndef USE_WS_PREFIX
@@ -233,4 +125,36 @@
 #ifdef __cplusplus
 extern "C" {
+#endif
+
+#define GAI_STRERROR_BUFFER_SIZE        1024
+
+static inline char *gai_strerrorA(int errcode)
+{
+    static char buffer[GAI_STRERROR_BUFFER_SIZE + 1];
+
+    /* FIXME: should format message from system, ignoring inserts in neutral
+     * language */
+    buffer[0] = '\0';
+
+    return buffer;
+}
+
+static inline WCHAR *gai_strerrorW(int errcode)
+{
+    static WCHAR buffer[GAI_STRERROR_BUFFER_SIZE + 1];
+
+    /* FIXME: should format message from system, ignoring inserts in neutral
+     * language */
+    buffer[0] = '\0';
+
+    return buffer;
+}
+
+#ifdef USE_WS_PREFIX
+# define WS_gai_strerror WINELIB_NAME_AW(gai_strerror)
+#elif defined(WINE_NO_UNICODE_MACROS)
+# define gai_strerror gai_strerrorA
+#else
+# define gai_strerror WINELIB_NAME_AW(gai_strerror)
 #endif
 
@@ -247,4 +171,12 @@
 INT WINAPI  GetNameInfoW(const SOCKADDR*,WS(socklen_t),PWCHAR,DWORD,PWCHAR,DWORD,INT);
 #define     GetNameInfo WINELIB_NAME_AW(GetNameInfo)
+PCSTR WINAPI WS(inet_ntop)(INT,PVOID,PSTR,SIZE_T);
+#define     InetNtopA WS(inet_ntop)
+PCWSTR WINAPI InetNtopW(INT,PVOID,PWSTR,SIZE_T);
+#define     InetNtop WINELIB_NAME_AW(InetNtop)
+int WINAPI  WS(inet_pton)(INT,PCSTR,PVOID);
+#define     InetPtonA WS(inet_pton)
+int WINAPI  InetPtonW(INT,PCWSTR,PVOID);
+#define     InetPton WINELIB_NAME_AW(InetPton)
 
 /*
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wtypes.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wtypes.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wtypes.idl	(revision 19678)
@@ -19,4 +19,13 @@
  */
 
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
 import "basetsd.h";
 import "guiddef.h";
@@ -88,4 +97,5 @@
 typedef LONG HRESULT;
 typedef DWORD LCID;
+typedef USHORT LANGID;
 
 typedef unsigned __int64 DWORDLONG;
@@ -434,5 +444,5 @@
   case WDT_INPROC_CALL: long               hInproc;
   case WDT_REMOTE_CALL: FLAGGED_BYTE_BLOB *hRemote;
-  default:              long               hGlobal;
+  case WDT_INPROC64_CALL: __int64          hInproc64;
 } userHGLOBAL;
 
@@ -450,5 +460,5 @@
   case WDT_INPROC_CALL: long       hInproc;
   case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
-  default:              long       hGlobal;
+  case WDT_INPROC64_CALL: __int64  hInproc64;
 } userHMETAFILE;
 
@@ -465,5 +475,5 @@
   case WDT_INPROC_CALL: long                hInproc;
   case WDT_REMOTE_CALL: remoteMETAFILEPICT *hRemote;
-  default:              long                hGlobal;
+  case WDT_INPROC64_CALL: __int64           hInproc64;
 } userHMETAFILEPICT;
 
@@ -478,5 +488,5 @@
   case WDT_INPROC_CALL: long       hInproc;
   case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
-  default:              long       hGlobal;
+  case WDT_INPROC64_CALL: __int64  hInproc64;
 } userHENHMETAFILE;
 
@@ -503,5 +513,5 @@
   case WDT_INPROC_CALL: long        hInproc;
   case WDT_REMOTE_CALL: userBITMAP *hRemote;
-  default:              long        hGlobal;
+  case WDT_INPROC64_CALL: __int64   hInproc64;
 } userHBITMAP;
 
@@ -522,5 +532,5 @@
   case WDT_INPROC_CALL: long           hInproc;
   case WDT_REMOTE_CALL: rpcLOGPALETTE *hRemote;
-  default:              long           hGlobal;
+  case WDT_INPROC64_CALL: __int64      hInproc64;
 } userHPALETTE;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wuapi.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wuapi.idl	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wuapi.idl	(revision 19678)
@@ -0,0 +1,368 @@
+/*
+ * Copyright 2008 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+cpp_quote("DEFINE_GUID(CLSID_AutomaticUpdates, 0xbfe18e9c,0x6d87,0x4450,0xb3,0x7c,0xe0,0x2f,0x0b,0x37,0x38,0x03);")
+cpp_quote("DEFINE_GUID(CLSID_UpdateSession, 0x4cb43d7f,0x7eee,0x4906,0x86,0x98,0x60,0xda,0x1c,0x38,0xf2,0xfe);")
+
+import "oaidl.idl";
+
+interface IAutomaticUpdates;
+interface IAutomaticUpdatesSettings;
+interface IDownloadJob;
+interface IDownloadResult;
+interface IInstallationJob;
+interface IInstallationResult;
+interface ISearchJob;
+interface ISearchResult;
+interface IUpdateCollection;
+interface IUpdateDownloader;
+interface IUpdateHistoryEntryCollection;
+interface IUpdateInstaller;
+interface IUpdateSearcher;
+interface IUpdateSession;
+interface IWebProxy;
+
+typedef [public] enum tagDownloadPriority
+{
+    dpLow    = 1,
+    dpNormal = 2,
+    dpHigh   = 3,
+} DownloadPriority;
+
+typedef [public] enum tagServerSelection
+{
+    ssDefault       = 0,
+    ssManagedServer = 1,
+    ssWindowsUpdate = 2,
+    ssOthers        = 3,
+} ServerSelection;
+
+[
+    object,
+    uuid(673425bf-c082-4c7c-bdfd-569464b8e0ce),
+    oleautomation,
+    dual,
+    nonextensible,
+    pointer_default(unique),
+    hidden
+]
+interface IAutomaticUpdates : IDispatch
+{
+    HRESULT DetectNow();
+    HRESULT Pause();
+    HRESULT Resume();
+    HRESULT ShowSettingsDialog();
+
+    [propget]
+    HRESULT Settings(
+        [out, retval] IAutomaticUpdatesSettings **retval);
+
+    [propget]
+    HRESULT ServiceEnabled(
+        [out, retval] VARIANT_BOOL *retval);
+
+    HRESULT EnableService();
+}
+
+[
+    object,
+    uuid(816858a4-260d-4260-933a-2585f1abc76b),
+    oleautomation,
+    dual,
+    nonextensible,
+    pointer_default(unique),
+]
+interface IUpdateSession : IDispatch
+{
+    [propget]
+    HRESULT ClientApplicationID(
+        [out, retval] BSTR *retval);
+
+    [propput]
+    HRESULT ClientApplicationID(
+        [in] BSTR value);
+
+    [propget]
+    HRESULT ReadOnly(
+        [out, retval] VARIANT_BOOL *retval);
+
+    [propget]
+    HRESULT WebProxy(
+        [out, retval] IWebProxy **retval);
+
+    [propput]
+    HRESULT WebProxy(
+        [in, unique] IWebProxy *value);
+
+    HRESULT CreateUpdateSearcher(
+        [out, retval] IUpdateSearcher **retval);
+
+    HRESULT CreateUpdateDownloader(
+        [out, retval] IUpdateDownloader **retval);
+
+    HRESULT CreateUpdateInstaller(
+        [out, retval] IUpdateInstaller **retval);
+}
+
+[
+    object,
+    uuid(8f45abf1-f9ae-4b95-a933-f0f66e5056ea),
+    oleautomation,
+    dual,
+    nonextensible,
+    pointer_default(unique),
+]
+interface IUpdateSearcher : IDispatch
+{
+    [propget]
+    HRESULT CanAutomaticallyUpgradeService(
+        [out, retval] VARIANT_BOOL *retval);
+
+    [propput]
+    HRESULT CanAutomaticallyUpgradeService(
+        [in] VARIANT_BOOL value);
+
+    [propget]
+    HRESULT ClientApplicationID(
+        [out, retval] BSTR *retval);
+
+    [propput]
+    HRESULT ClientApplicationID(
+        [in] BSTR value);
+
+    [propget]
+    HRESULT IncludePotentiallySupersededUpdates(
+        [out, retval] VARIANT_BOOL *retval);
+
+    [propput]
+    HRESULT IncludePotentiallySupersededUpdates(
+        [in] VARIANT_BOOL value);
+
+    [propget]
+    HRESULT ServerSelection(
+        [out, retval] ServerSelection *retval);
+
+    [propput]
+    HRESULT ServerSelection(
+        [in] ServerSelection value);
+
+    HRESULT BeginSearch(
+        [in] BSTR criteria,
+        [in] IUnknown *onCompleted,
+        [in] VARIANT state,
+        [out, retval] ISearchJob **retval);
+
+    HRESULT EndSearch(
+        [in] ISearchJob *searchJob,
+        [out, retval] ISearchResult **retval);
+
+    HRESULT EscapeString(
+        [in] BSTR unescaped,
+        [out, retval] BSTR *retval);
+
+    HRESULT QueryHistory(
+        [in] LONG startIndex,
+        [in] LONG count,
+        [out, retval] IUpdateHistoryEntryCollection **retval);
+
+    HRESULT Search(
+        [in] BSTR criteria,
+        [out, retval] ISearchResult **retval);
+
+    [propget]
+    HRESULT Online(
+        [out, retval] VARIANT_BOOL *retval);
+
+    [propput]
+    HRESULT Online(
+        [in] VARIANT_BOOL value);
+
+    HRESULT GetTotalHistoryCount(
+        [out, retval] LONG *retval);
+
+    [propget]
+    HRESULT ServiceID(
+        [out, retval] BSTR *retval);
+
+    [propput]
+    HRESULT ServiceID(
+        [in] BSTR value);
+}
+
+[
+    object,
+    uuid(68f1c6f9-7ecc-4666-a464-247fe12496c3),
+    oleautomation,
+    dual,
+    nonextensible,
+    pointer_default(unique),
+    hidden
+]
+interface IUpdateDownloader : IDispatch
+{
+    [propget]
+    HRESULT ClientApplicationID(
+        [out, retval] BSTR *retval);
+
+    [propput]
+    HRESULT ClientApplicationID(
+        [in] BSTR value);
+
+    [propget]
+    HRESULT IsForced(
+        [out, retval] VARIANT_BOOL *retval);
+
+    [propput]
+    HRESULT IsForced(
+        [in] VARIANT_BOOL value);
+
+    [propget]
+    HRESULT Priority(
+        [out, retval] DownloadPriority *retval);
+
+    [propput]
+    HRESULT Priority(
+        [in] DownloadPriority value);
+
+    [propget]
+    HRESULT Updates(
+        [out, retval] IUpdateCollection **retval);
+
+    [propput]
+    HRESULT Updates(
+        [in] IUpdateCollection *value);
+
+    HRESULT BeginDownload(
+        [in] IUnknown *onProgressChanged,
+        [in] IUnknown *onCompleted,
+        [in] VARIANT state,
+        [out, retval] IDownloadJob **retval);
+
+    HRESULT Download(
+        [out, retval] IDownloadResult **retval);
+
+    HRESULT EndDownload(
+        [in] IDownloadJob *value,
+        [out, retval] IDownloadResult **retval);
+}
+
+[
+    object,
+    uuid(7b929c68-ccdc-4226-96b1-8724600b54c2),
+    oleautomation,
+    dual,
+    nonextensible,
+    pointer_default(unique),
+]
+interface IUpdateInstaller : IDispatch
+{
+    [propget]
+    HRESULT ClientApplicationID(
+        [out, retval] BSTR *retval);
+
+    [propput]
+    HRESULT ClientApplicationID(
+        [in] BSTR value);
+
+    [propget]
+    HRESULT IsForced(
+        [out, retval] VARIANT_BOOL *retval);
+
+    [propput]
+    HRESULT IsForced(
+        [in] VARIANT_BOOL value);
+
+    [propget, restricted]
+    HRESULT ParentHwnd(
+        [out, retval] HWND *retval);
+
+    [propput, restricted]
+    HRESULT ParentHwnd(
+        [in, unique] HWND value);
+
+    [propput]
+    HRESULT ParentWindow(
+        [in, unique] IUnknown *value);
+
+    [propget]
+    HRESULT ParentWindow(
+        [out, retval] IUnknown **retval);
+
+    [propget]
+    HRESULT Updates(
+        [out, retval] IUpdateCollection **retval);
+
+    [propput]
+    HRESULT Updates(
+        [in] IUpdateCollection *value);
+
+    HRESULT BeginInstall(
+        [in] IUnknown *onProgressChanged,
+        [in] IUnknown *onCompleted,
+        [in] VARIANT state,
+        [out, retval] IInstallationJob **retval);
+
+    HRESULT BeginUninstall(
+        [in] IUnknown *onProgressChanged,
+        [in] IUnknown *onCompleted,
+        [in] VARIANT state,
+        [out, retval] IInstallationJob **retval);
+
+    HRESULT EndInstall(
+        [in] IInstallationJob *value,
+        [out, retval] IInstallationResult **retval);
+
+    HRESULT EndUninstall(
+        [in] IInstallationJob *value,
+        [out, retval] IInstallationResult **retval);
+
+    HRESULT Install(
+        [out, retval] IInstallationResult **retval);
+
+    HRESULT RunWizard(
+        [in, defaultvalue("")] BSTR dialogTitle,
+        [out, retval] IInstallationResult **retval);
+
+    [propget]
+    HRESULT IsBusy(
+        [out, retval] VARIANT_BOOL *retval);
+
+    HRESULT Uninstall(
+        [out, retval] IInstallationResult **retval);
+
+    [propget]
+    HRESULT AllowSourcePrompts(
+        [out, retval] VARIANT_BOOL *retval);
+
+    [propput]
+    HRESULT AllowSourcePrompts(
+        [in] VARIANT_BOOL value);
+
+    [propget]
+    HRESULT RebootRequiredBeforeInstallation(
+        [out, retval] VARIANT_BOOL *retval);
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xcmc.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xcmc.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xcmc.h	(revision 19678)
@@ -35,7 +35,7 @@
 typedef char                CMC_sint8;
 typedef short               CMC_sint16;
-typedef long int            CMC_sint32;
+typedef LONG                CMC_sint32;
 typedef unsigned short int  CMC_uint16;
-typedef unsigned long int   CMC_uint32;
+typedef ULONG               CMC_uint32;
 typedef void*               CMC_buffer;
 typedef char*               CMC_string;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xinput.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xinput.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xinput.h	(revision 19678)
@@ -212,3 +212,37 @@
 } XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;
 
+/*
+ * Defines the structure for a joystick input event which is
+ * retrieved using the function XInputGetKeystroke
+ */
+typedef struct _XINPUT_KEYSTROKE {
+    WORD VirtualKey;
+    WCHAR Unicode;
+    WORD Flags;
+    BYTE UserIndex;
+    BYTE HidCode;
+} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE;
+
+typedef struct _XINPUT_BATTERY_INFORMATION
+{
+    BYTE BatteryType;
+    BYTE BatteryLevel;
+} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void WINAPI XInputEnable(BOOL);
+DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
+DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*);
+DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE);
+DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*);
+DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*);
+DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __WINE_XINPUT_H */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xmldom.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xmldom.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xmldom.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
@@ -265,5 +274,5 @@
 
     [propget, id(DISPID_READYSTATE)]
-    HRESULT readyState( [out,retval] long *value );
+    HRESULT readyState( [out,retval] LONG *value );
 
     [propget, id(DISPID_XMLDOM_DOCUMENT_PARSEERROR)]
@@ -331,9 +340,9 @@
 {
     [propget, id(DISPID_VALUE)]
-    HRESULT item( [in] long index,
+    HRESULT item( [in] LONG index,
                   [out,retval] IXMLDOMNode **listItem );
 
     [propget, id(DISPID_DOM_NODELIST_LENGTH)]
-    HRESULT length( [out,retval] long *listLength );
+    HRESULT length( [out,retval] LONG *listLength );
 
     [id(DISPID_XMLDOM_NODELIST_NEXTNODE)]
@@ -372,9 +381,9 @@
 
     [propget, id(DISPID_VALUE)]
-    HRESULT item( [in] long index,
+    HRESULT item( [in] LONG index,
                   [out,retval] IXMLDOMNode **listItem );
 
     [propget, id(DISPID_DOM_NODELIST_LENGTH)]
-    HRESULT length( [out,retval] long *listLength );
+    HRESULT length( [out,retval] LONG *listLength );
 
     [id(DISPID_XMLDOM_NAMEDNODEMAP_GETQUALIFIEDITEM)]
@@ -432,9 +441,9 @@
 
     [propget, id(DISPID_DOM_DATA_LENGTH)]
-    HRESULT length( [out,retval] long *dataLength );
+    HRESULT length( [out,retval] LONG *dataLength );
 
     [id(DISPID_DOM_DATA_SUBSTRING)]
-    HRESULT substringData( [in] long offset,
-                           [in] long count,
+    HRESULT substringData( [in] LONG offset,
+                           [in] LONG count,
                            [out,retval] BSTR *data );
 
@@ -443,14 +452,14 @@
 
     [id(DISPID_DOM_DATA_INSERT)]
-    HRESULT insertData( [in] long offset,
+    HRESULT insertData( [in] LONG offset,
                         [in] BSTR data );
 
     [id(DISPID_DOM_DATA_DELETE)]
-    HRESULT deleteData( [in] long offset,
-                        [in] long count );
+    HRESULT deleteData( [in] LONG offset,
+                        [in] LONG count );
 
     [id(DISPID_DOM_DATA_REPLACE)]
-    HRESULT replaceData( [in] long offset,
-                         [in] long count,
+    HRESULT replaceData( [in] LONG offset,
+                         [in] LONG count,
                          [in] BSTR data );
 }
@@ -537,5 +546,5 @@
 {
     [id(DISPID_DOM_TEXT_SPLITTEXT)]
-    HRESULT splitText( [in] long offset,
+    HRESULT splitText( [in] LONG offset,
                        [out,retval] IXMLDOMText **rightHandTextNode );
 }
@@ -700,5 +709,5 @@
 {
     [propget, id(DISPID_VALUE)]
-    HRESULT errorCode([retval, out] long *errCode);
+    HRESULT errorCode([retval, out] LONG *errCode);
 
     [propget, id(DISPID_DOM_ERROR_URL)]
@@ -712,11 +721,11 @@
 
     [propget, id(DISPID_DOM_ERROR_LINE)]
-    HRESULT line([retval, out] long *lineNo);
+    HRESULT line([retval, out] LONG *lineNo);
 
     [propget, id(DISPID_DOM_ERROR_LINEPOS)]
-    HRESULT linepos([retval, out] long * linePos);
+    HRESULT linepos([retval, out] LONG * linePos);
 
     [propget, id(DISPID_DOM_ERROR_FILEPOS)]
-    HRESULT filepos([retval, out] long * filePos);
+    HRESULT filepos([retval, out] LONG * filePos);
 }
 
@@ -785,5 +794,5 @@
 
     [propget, id(7)]
-    HRESULT status([out, retval] long *plStatus);
+    HRESULT status([out, retval] LONG *plStatus);
 
     [propget, id(8)]
@@ -803,5 +812,5 @@
 
     [propget, id(13)]
-    HRESULT readyState([out, retval] long *plState);
+    HRESULT readyState([out, retval] LONG *plState);
 
     [propput, id(14)]
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xmldso.idl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xmldso.idl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/xmldso.idl	(revision 19678)
@@ -15,4 +15,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
  */
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1250.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1250.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1250.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1250 (ANSI Eastern Europe) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1250.txt */
 /* DO NOT EDIT!! */
 
@@ -41,5 +41,5 @@
 };
 
-static const unsigned char uni2cp_low[4608] =
+static const unsigned char uni2cp_low[4352] =
 {
     /* 0x0000 .. 0x00ff */
@@ -67,12 +67,12 @@
     0xa8, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0x97,
     0xb0, 0xb1, 0x32, 0x33, 0xb4, 0xb5, 0xb6, 0xb7,
-    0xb8, 0x31, 0x6f, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xb8, 0x31, 0x6f, 0xbb, 0x31, 0x31, 0x33, 0x3f,
     0x41, 0xc1, 0xc2, 0x41, 0xc4, 0x41, 0x41, 0xc7,
     0x45, 0xc9, 0x45, 0xcb, 0x49, 0xcd, 0xce, 0x49,
-    0xd0, 0x4e, 0x4f, 0xd3, 0xd4, 0x4f, 0xd6, 0xd7,
+    0x3f, 0x4e, 0x4f, 0xd3, 0xd4, 0x4f, 0xd6, 0xd7,
     0x4f, 0x55, 0xda, 0x55, 0xdc, 0xdd, 0x3f, 0xdf,
     0x61, 0xe1, 0xe2, 0x61, 0xe4, 0x61, 0x61, 0xe7,
     0x65, 0xe9, 0x65, 0xeb, 0x69, 0xed, 0xee, 0x69,
-    0x64, 0x6e, 0x6f, 0xf3, 0xf4, 0x6f, 0xf6, 0xf7,
+    0x3f, 0x6e, 0x6f, 0xf3, 0xf4, 0x6f, 0xf6, 0xf7,
     0x6f, 0x75, 0xfa, 0x75, 0xfc, 0xfd, 0x3f, 0x79,
     /* 0x0100 .. 0x01ff */
@@ -92,8 +92,8 @@
     0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0xd9, 0xf9,
     0xdb, 0xfb, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x59, 0x8f, 0x9f, 0xaf, 0xbf, 0x8e, 0x9e, 0x73,
+    0x59, 0x8f, 0x9f, 0xaf, 0xbf, 0x8e, 0x9e, 0x3f,
     0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
+    0x3f, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
     0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
     0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -103,18 +103,18 @@
     0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc,
-    0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4,
-    0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67,
+    0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55,
+    0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67,
     0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f,
+    0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0xd6, 0xf6, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -132,168 +132,168 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0xb4, 0xbd, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x27, 0x22, 0x91, 0x27, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0xa1,
-    0x27, 0x97, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
+    0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0xa2, 0xff, 0xb0, 0xb2, 0x7e, 0xbd, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0300 .. 0x03ff */
-    0x60, 0xb4, 0x5e, 0x7e, 0x97, 0x97, 0xa2, 0xff,
-    0xa8, 0x3f, 0xb0, 0xbd, 0xa1, 0x3f, 0x22, 0x3f,
+    0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0xa2, 0xff,
+    0xa8, 0x3f, 0xb0, 0x3f, 0xa1, 0x3f, 0x22, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8,
-    0xb2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x8c, 0x9c, 0x8a, 0x9a,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2,
-    0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0xc3, 0xe3,
-    0xc3, 0xe3, 0xc3, 0xe3, 0xc3, 0xe3, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0400 .. 0x04ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x68, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0500 .. 0x05ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0600 .. 0x06ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x25, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0xb4, 0xbd, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x97, 0x3f,
+    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x95, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x27, 0x94, 0x3f, 0x60, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xb0, 0x3f, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f,
+    0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -309,25 +309,25 @@
     /* 0x2100 .. 0x21ff */
     0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
+    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x3f,
     0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
     0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
     0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f,
-    0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65,
+    0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65,
     0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x8b, 0x5e, 0x9b, 0xa1, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x7c, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -341,18 +341,18 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xb0, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
+    0x3f, 0x3f, 0x3f, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -374,105 +374,138 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xa6, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
+    0xa6, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3d, 0xa6, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0xac,
+    0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x54, 0x3f,
+    0x3f, 0xa6, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2600 .. 0x26ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xa2, 0xa2, 0x30, 0x3f, 0x3f, 0x3f,
+    0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f,
+    0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2700 .. 0x27ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x7c, 0x3f, 0x3f, 0x91, 0x92, 0x93, 0x94, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x3000 .. 0x30ff */
     0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
@@ -504,71 +537,5 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x97, 0x97, 0x97, 0x97, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0xb7, 0x97, 0x3f, 0x3f, 0x3f,
     /* 0xff00 .. 0xffff */
     0x3f, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
@@ -600,6 +567,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x63, 0x4c, 0xac, 0x97, 0xa6, 0x59, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x5e, 0x9b, 0xa1, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -641,36 +608,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0400, 0x0500, 0x0600,
-    0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x0d00, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x0e00, 0x1100, 0x1100, 0x0f00, 0x1000
+    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x0700, 0x0800, 0x0900, 0x0a00, 0x1000, 0x0b00, 0x0c00, 0x0d00,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x0e00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0f00
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1251.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1251.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1251.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1251 (ANSI Cyrillic) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1251.txt */
 /* DO NOT EDIT!! */
 
@@ -41,5 +41,5 @@
 };
 
-static const unsigned char uni2cp_low[4864] =
+static const unsigned char uni2cp_low[2816] =
 {
     /* 0x0000 .. 0x00ff */
@@ -64,15 +64,15 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa0, 0x21, 0x63, 0x4c, 0xa4, 0x59, 0xa6, 0xa7,
-    0x22, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0x97,
-    0xb0, 0xb1, 0x32, 0x33, 0x27, 0xb5, 0xb6, 0xb7,
-    0x2c, 0x31, 0x6f, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43,
+    0xa0, 0x3f, 0x3f, 0x3f, 0xa4, 0x3f, 0xa6, 0xa7,
+    0x3f, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0x3f,
+    0xb0, 0xb1, 0x3f, 0x3f, 0x3f, 0xb5, 0xb6, 0xb7,
+    0x3f, 0x3f, 0x3f, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x43,
     0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
-    0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78,
+    0x3f, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f,
     0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f,
-    0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63,
+    0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x3f, 0x63,
     0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69,
-    0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f,
+    0x3f, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f,
     0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79,
     /* 0x0100 .. 0x01ff */
@@ -83,99 +83,33 @@
     0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68,
     0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69,
-    0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
+    0x49, 0x3f, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
     0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f,
     0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e,
     0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72,
+    0x4f, 0x6f, 0x3f, 0x3f, 0x52, 0x72, 0x52, 0x72,
     0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
     0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
     0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
     0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73,
+    0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x3f,
     0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
     0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
     0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55,
-    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
     0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55,
     0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67,
     0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f,
-    /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0x27, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76,
-    0x27, 0x97, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x0300 .. 0x03ff */
-    0x60, 0x27, 0x5e, 0x7e, 0x97, 0x97, 0x3f, 0x3f,
-    0x22, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0400 .. 0x04ff */
-    0xc5, 0xa8, 0x80, 0x81, 0xaa, 0xbd, 0xb2, 0xaf,
-    0xa3, 0x8a, 0x8c, 0x8e, 0x8d, 0xc8, 0xa1, 0x8f,
+    0x3f, 0xa8, 0x80, 0x81, 0xaa, 0xbd, 0xb2, 0xaf,
+    0xa3, 0x8a, 0x8c, 0x8e, 0x8d, 0x3f, 0xa1, 0x8f,
     0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
     0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -186,6 +120,6 @@
     0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
     0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
-    0xe5, 0xb8, 0x90, 0x83, 0xba, 0xbe, 0xb3, 0xbf,
-    0xbc, 0x9a, 0x9c, 0x9e, 0x9d, 0xe8, 0xa2, 0x9f,
+    0x3f, 0xb8, 0x90, 0x83, 0xba, 0xbe, 0xb3, 0xbf,
+    0xbc, 0x9a, 0x9c, 0x9e, 0x9d, 0x3f, 0xa2, 0x9f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -200,133 +134,34 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xc6, 0xe6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xc0, 0xe0, 0xc0, 0xe0, 0x3f, 0x3f, 0xc5, 0xe5,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xc6, 0xe6, 0xc7, 0xe7,
-    0x3f, 0x3f, 0xc8, 0xe8, 0xc8, 0xe8, 0xce, 0xee,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xdd, 0xfd, 0xd3, 0xf3,
-    0xd3, 0xf3, 0xd3, 0xf3, 0xd7, 0xf7, 0x3f, 0x3f,
-    0xdb, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0x27, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x97, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -341,26 +176,26 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2100 .. 0x21ff */
-    0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
-    0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0xb9, 0x3f,
-    0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f,
-    0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65,
-    0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x5e, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb9, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0xa6, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -374,29 +209,29 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x95, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -407,183 +242,84 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x3000 .. 0x30ff */
-    0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x97, 0x97, 0x97, 0x97, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3d, 0xa6, 0x2d, 0xe3, 0xe3, 0xac, 0xac, 0xac,
+    0x4c, 0x4c, 0x4c, 0x2d, 0x2d, 0x2d, 0xa6, 0xa6,
+    0xa6, 0xa6, 0xa6, 0xa6, 0x54, 0x54, 0x54, 0xa6,
+    0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2600 .. 0x26ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x4f, 0x4f, 0x30, 0x3f, 0x3f, 0x3f,
+    0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f,
+    0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -633,6 +369,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x63, 0x4c, 0xac, 0x97, 0xa6, 0x59, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x5e, 0x9b, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -674,36 +410,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0500, 0x0600, 0x0700,
-    0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100
+    0x0000, 0x0100, 0x0a00, 0x0a00, 0x0200, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0300, 0x0400, 0x0500, 0x0600, 0x0a00, 0x0700, 0x0800, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0900
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1252.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1252.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1252.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1252 (ANSI Latin 1) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1252.txt */
 /* DO NOT EDIT!! */
 
@@ -41,5 +41,5 @@
 };
 
-static const unsigned char uni2cp_low[4608] =
+static const unsigned char uni2cp_low[4352] =
 {
     /* 0x0000 .. 0x00ff */
@@ -92,8 +92,8 @@
     0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
     0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x9f, 0x5a, 0x7a, 0x5a, 0x7a, 0x8e, 0x9e, 0x73,
+    0x9f, 0x5a, 0x7a, 0x5a, 0x7a, 0x8e, 0x9e, 0x3f,
     0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
+    0x3f, 0x83, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
     0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
     0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -103,18 +103,18 @@
     0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc,
-    0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4,
-    0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67,
+    0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55,
+    0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67,
     0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8,
+    0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -132,168 +132,168 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0xb4, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x76,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x27, 0x22, 0x3f, 0x27, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x3f,
     0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xb0, 0x3f, 0x98, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xb0, 0x3f, 0x98, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0300 .. 0x03ff */
-    0x60, 0xb4, 0x88, 0x98, 0xaf, 0xaf, 0x3f, 0x3f,
-    0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f,
+    0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f,
+    0xa8, 0x3f, 0xb0, 0x3f, 0x3f, 0x3f, 0x22, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x47, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x54, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x53, 0x3f, 0x3f, 0x46, 0x3f,
+    0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x61, 0xdf, 0x3f, 0x64, 0x65, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0xf0, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x8a, 0x9a,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2,
-    0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea,
-    0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
+    0x70, 0x3f, 0x3f, 0x73, 0x74, 0x3f, 0x66, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0400 .. 0x04ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x68, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0500 .. 0x05ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0600 .. 0x06ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x25, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0xb4, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0xaf, 0x3f,
+    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3d,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0xb7, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x27, 0x3f, 0x3f, 0x60, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xb0, 0x3f, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x6e,
     0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
+    0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x50,
     0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -309,5 +309,5 @@
     /* 0x2100 .. 0x21ff */
     0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
+    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x3f,
     0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
     0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
@@ -315,19 +315,19 @@
     0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65,
     0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x88, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -344,15 +344,15 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
+    0xb0, 0xb7, 0x76, 0x3f, 0x3f, 0x3f, 0x38, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x98, 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3d, 0x3f, 0x3f, 0x3d, 0x3d, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -374,201 +374,168 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xa6, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x28, 0x29, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
+    0x2d, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x2b, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x2b, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0xa6, 0xa6,
+    0xa6, 0xa6, 0xa6, 0xa6, 0x2d, 0x2d, 0x2d, 0x2d,
+    0x2d, 0x2d, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xaf, 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f,
+    0xa6, 0xa6, 0xa6, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2600 .. 0x26ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xa4, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2700 .. 0x27ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x7c, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x3000 .. 0x30ff */
     0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0xff00 .. 0xffff */
     0x3f, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
@@ -600,6 +567,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x88, 0x9b, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -641,36 +608,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0400, 0x0500, 0x0600,
-    0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x0d00, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x0e00, 0x1100, 0x1100, 0x0f00, 0x1000
+    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x0700, 0x0800, 0x0900, 0x0a00, 0x1000, 0x0b00, 0x0c00, 0x0d00,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x0e00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0f00
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1253.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1253.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1253.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1253 (ANSI Greek) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1253.txt */
 /* DO NOT EDIT!! */
 
@@ -28,18 +28,18 @@
     0x0098, 0x2122, 0x009a, 0x203a, 0x009c, 0x009d, 0x009e, 0x009f,
     0x00a0, 0x0385, 0x0386, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
-    0x00a8, 0x00a9, 0x003f, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x2015,
+    0x00a8, 0x00a9, 0xf8f9, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x2015,
     0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x00b5, 0x00b6, 0x00b7,
     0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
     0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
     0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
-    0x03a0, 0x03a1, 0x003f, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
+    0x03a0, 0x03a1, 0xf8fa, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
     0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
     0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
     0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
     0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
-    0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x003f
+    0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xf8fb
 };
 
-static const unsigned char uni2cp_low[4608] =
+static const unsigned char uni2cp_low[3072] =
 {
     /* 0x0000 .. 0x00ff */
@@ -64,15 +64,15 @@
     0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x98, 0x3f, 0x9a, 0x3f, 0x9c, 0x9d, 0x9e, 0x9f,
-    0xa0, 0x21, 0x63, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
-    0xa8, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0x97,
-    0xb0, 0xb1, 0xb2, 0xb3, 0x27, 0xb5, 0xb6, 0xb7,
-    0x2c, 0x31, 0x6f, 0xbb, 0x3f, 0xbd, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43,
+    0xa0, 0x3f, 0x3f, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+    0xa8, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0x3f,
+    0xb0, 0xb1, 0xb2, 0xb3, 0x2f, 0xb5, 0xb6, 0xb7,
+    0x3f, 0x3f, 0x3f, 0xbb, 0x3f, 0xbd, 0x3f, 0x3f,
+    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x43,
     0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
-    0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78,
-    0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0xe2,
-    0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63,
+    0x3f, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f,
+    0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f,
+    0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x3f, 0x63,
     0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69,
-    0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f,
+    0x3f, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f,
     0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79,
     /* 0x0100 .. 0x01ff */
@@ -83,81 +83,48 @@
     0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68,
     0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69,
-    0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
+    0x49, 0x3f, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
     0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f,
     0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e,
     0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72,
+    0x4f, 0x6f, 0x3f, 0x3f, 0x52, 0x72, 0x52, 0x72,
     0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
     0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
     0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
     0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73,
+    0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x3f,
     0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x83, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
     0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
     0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55,
-    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
     0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55,
     0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67,
     0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f,
-    /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0x27, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76,
-    0x27, 0x97, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0300 .. 0x03ff */
-    0x60, 0x27, 0x5e, 0x7e, 0x97, 0x97, 0x3f, 0x3f,
-    0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0x27, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa1, 0xa2, 0xb7,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa1, 0xa2, 0x3f,
     0xb8, 0xb9, 0xba, 0x3f, 0xbc, 0x3f, 0xbe, 0xbf,
     0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
@@ -169,131 +136,32 @@
     0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
     0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x3f,
-    0xe2, 0xe8, 0xd5, 0xd5, 0xd5, 0xf6, 0xf0, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xea, 0xf1, 0xf2, 0x3f, 0xc8, 0xe5, 0x3f, 0x3f,
-    0x3f, 0xd3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe2, 0xe3, 0xe4,
-    0xf6, 0xf7, 0x69, 0x72, 0x75, 0x76, 0xe2, 0xe3,
-    0xf1, 0xf6, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0xe8,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1,
-    0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1,
-    0xe5, 0xe5, 0xe5, 0xe5, 0xe5, 0xe5, 0x3f, 0x3f,
-    0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0x3f, 0x3f,
-    0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
-    0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
-    0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9,
-    0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9,
-    0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0x3f, 0x3f,
-    0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0x3f, 0x3f,
-    0xf5, 0xf5, 0xf5, 0xf5, 0xf5, 0xf5, 0xf5, 0xf5,
-    0x3f, 0xd5, 0x3f, 0xd5, 0x3f, 0xd5, 0x3f, 0xd5,
-    0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
-    0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9,
-    0xe1, 0xdc, 0xe5, 0xdd, 0xe7, 0xde, 0xe9, 0xdf,
-    0xef, 0xfc, 0xf5, 0xfd, 0xf9, 0xfe, 0x3f, 0x3f,
-    0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1,
-    0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1,
-    0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
-    0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
-    0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
-    0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9,
-    0xe1, 0xe1, 0xe1, 0xe1, 0xdc, 0x3f, 0xe1, 0xe1,
-    0xc1, 0xc1, 0xc1, 0xa2, 0xc1, 0x3f, 0xe9, 0x3f,
-    0x3f, 0xa8, 0xe7, 0xe7, 0xde, 0x3f, 0xe7, 0xe7,
-    0xc5, 0xb8, 0xc7, 0xb9, 0xc7, 0x3f, 0x3f, 0x3f,
-    0xe9, 0xe9, 0xfa, 0xc0, 0x3f, 0x3f, 0xe9, 0xfa,
-    0xc9, 0xc9, 0xc9, 0xba, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xf5, 0xf5, 0xfb, 0xe0, 0xf1, 0xf1, 0xf5, 0xfb,
-    0xd5, 0xd5, 0xd5, 0xbe, 0xd1, 0xa8, 0xa1, 0x60,
-    0x3f, 0x3f, 0xf9, 0xf9, 0xfe, 0x3f, 0xf9, 0xf9,
-    0xcf, 0xbc, 0xd9, 0xbf, 0xd9, 0x27, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0xaf, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0x27, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x97, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x63, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x96, 0x97, 0xaf, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -308,26 +176,26 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2100 .. 0x21ff */
-    0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
-    0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
-    0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0xd9, 0x3f,
-    0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65,
-    0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0xf0, 0xe3, 0xc3, 0xd0,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x5e, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0xa6, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -341,29 +209,29 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -374,201 +242,135 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x3000 .. 0x30ff */
-    0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x97, 0x97, 0x97, 0x97, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3d, 0xa6, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0xac,
+    0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x54, 0x3f,
+    0x3f, 0xa6, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2600 .. 0x26ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x4f, 0x4f, 0x30, 0x3f, 0x3f, 0x3f,
+    0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f,
+    0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0xf800 .. 0xf8ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0xaa, 0xd2, 0xff, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0xff00 .. 0xffff */
     0x3f, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
@@ -600,6 +402,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x63, 0xa3, 0xac, 0x97, 0xa6, 0xa5, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x5e, 0x9b, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -641,36 +443,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0400, 0x0500, 0x0600,
-    0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x0d00, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x0e00, 0x1100, 0x1100, 0x0f00, 0x1000
+    0x0000, 0x0100, 0x0b00, 0x0200, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0300, 0x0400, 0x0500, 0x0600, 0x0b00, 0x0700, 0x0800, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00,
+    0x0900, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0a00
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1254.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1254.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1254.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1254 (ANSI Turkish) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1254.txt */
 /* DO NOT EDIT!! */
 
@@ -41,5 +41,5 @@
 };
 
-static const unsigned char uni2cp_low[4608] =
+static const unsigned char uni2cp_low[4352] =
 {
     /* 0x0000 .. 0x00ff */
@@ -70,9 +70,9 @@
     0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
     0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
-    0x44, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
+    0x3f, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
     0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x59, 0x3f, 0xdf,
     0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
     0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
-    0x64, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+    0x3f, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
     0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x79, 0x3f, 0xff,
     /* 0x0100 .. 0x01ff */
@@ -92,8 +92,8 @@
     0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
     0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x9f, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73,
+    0x9f, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x3f,
     0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
+    0x3f, 0x83, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
     0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
     0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -103,18 +103,18 @@
     0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc,
-    0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4,
-    0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67,
+    0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55,
+    0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67,
     0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8,
+    0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -132,168 +132,168 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0xb4, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x76,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x27, 0x22, 0x91, 0x27, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x5e,
     0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xb0, 0x3f, 0x98, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x5e, 0x27, 0xb0, 0xb8, 0x98, 0xa8, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0300 .. 0x03ff */
-    0x60, 0xb4, 0x88, 0x98, 0xaf, 0xaf, 0x3f, 0x3f,
-    0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f,
+    0x60, 0xb4, 0x5e, 0x98, 0xaf, 0xaf, 0x88, 0xb7,
+    0xa8, 0x3f, 0xa7, 0x3f, 0x88, 0x3f, 0xa8, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x8a, 0x9a,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2,
-    0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea,
-    0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0400 .. 0x04ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x68, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0500 .. 0x05ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x0600 .. 0x06ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x25, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0xb4, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0xaf, 0x3f,
+    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x95, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x27, 0xa8, 0x3f, 0x60, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xb0, 0x3f, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xb0, 0x30, 0xb2, 0xb3, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -309,5 +309,5 @@
     /* 0x2100 .. 0x21ff */
     0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
+    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x3f,
     0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
     0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
@@ -315,19 +315,19 @@
     0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65,
     0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x88, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x8b, 0x5e, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x7c, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -344,15 +344,15 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xb0, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
+    0x3f, 0x3f, 0x3f, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x98, 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -374,201 +374,168 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xa6, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
+    0xa6, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3d, 0xa6, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0xac,
+    0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x54, 0x3f,
+    0x3f, 0xa6, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2600 .. 0x26ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x4f, 0x4f, 0x30, 0x3f, 0x3f, 0x3f,
+    0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f,
+    0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2700 .. 0x27ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x7c, 0x3f, 0x3f, 0x91, 0x92, 0x93, 0x94, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x3000 .. 0x30ff */
     0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x5b, 0x3d, 0x3f, 0x22, 0x22, 0x84,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0xb7, 0x97, 0x3f, 0x3f, 0x3f,
     /* 0xff00 .. 0xffff */
     0x3f, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
@@ -600,6 +567,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x88, 0x9b, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -641,36 +608,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0400, 0x0500, 0x0600,
-    0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x0d00, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x0e00, 0x1100, 0x1100, 0x0f00, 0x1000
+    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x0700, 0x0800, 0x0900, 0x0a00, 0x1000, 0x0b00, 0x0c00, 0x0d00,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x0e00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
+    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0f00
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1255.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1255.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1255.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1255 (ANSI Hebrew) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1255.txt */
 /* DO NOT EDIT!! */
 
@@ -32,14 +32,14 @@
     0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
     0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7,
-    0x05b8, 0x05b9, 0x003f, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf,
+    0x05b8, 0x05b9, 0x05ba, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf,
     0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05f0, 0x05f1, 0x05f2, 0x05f3,
-    0x05f4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00de, 0x00df,
+    0x05f4, 0xf88d, 0xf88e, 0xf88f, 0xf890, 0xf891, 0xf892, 0xf893,
     0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7,
     0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
     0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
-    0x05e8, 0x05e9, 0x05ea, 0x003f, 0x003f, 0x200e, 0x200f, 0x003f
+    0x05e8, 0x05e9, 0x05ea, 0xf894, 0xf895, 0x200e, 0x200f, 0xf896
 };
 
-static const unsigned char uni2cp_low[4864] =
+static const unsigned char uni2cp_low[2304] =
 {
     /* 0x0000 .. 0x00ff */
@@ -64,111 +64,78 @@
     0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x9a, 0x3f, 0x9c, 0x9d, 0x9e, 0x9f,
-    0xa0, 0xa1, 0xa2, 0xa3, 0x3f, 0xa5, 0xa6, 0xa7,
-    0xa8, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0xaf,
+    0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+    0xa8, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0xaf,
     0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
-    0xb8, 0xb9, 0x6f, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43,
-    0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
-    0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0xaa,
-    0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0xdf,
-    0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63,
-    0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69,
-    0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0xba,
-    0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79,
+    0xb8, 0xb9, 0x3f, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xaa,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xba,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0100 .. 0x01ff */
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63,
-    0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64,
-    0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67,
-    0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68,
-    0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69,
-    0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
-    0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f,
-    0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e,
-    0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72,
-    0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73,
-    0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
-    0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55,
-    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55,
-    0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67,
-    0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0xb4, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x76,
-    0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xb0, 0x3f, 0x98, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x0300 .. 0x03ff */
-    0x60, 0xb4, 0x88, 0x98, 0xaf, 0xaf, 0x3f, 0x3f,
-    0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x98, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -199,5 +166,5 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
-    0xc8, 0xc9, 0x3f, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+    0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
     0xd0, 0xd1, 0xd2, 0xd3, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -208,125 +175,26 @@
     0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0xfd, 0xfe,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0xb4, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0xaf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfd, 0xfe,
+    0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0xa4, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -341,254 +209,56 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2100 .. 0x21ff */
-    0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
-    0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
-    0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f,
-    0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65,
-    0x45, 0x46, 0x3f, 0x4d, 0x6f, 0xe0, 0xe1, 0xe2,
-    0xe3, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x88, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x98, 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x3000 .. 0x30ff */
-    0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0x3f, 0xd6,
-    0xf2, 0xe0, 0xe3, 0xe4, 0xeb, 0xec, 0xed, 0xf8,
-    0xfa, 0x2b, 0xf9, 0xf9, 0xf9, 0xf9, 0xe0, 0xe0,
-    0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x3f,
-    0xe8, 0xe9, 0xea, 0xeb, 0xec, 0x3f, 0xee, 0x3f,
-    0xf0, 0xf1, 0x3f, 0xf3, 0xf4, 0x3f, 0xf6, 0xf7,
-    0xf8, 0xf9, 0xfa, 0xe5, 0xe1, 0xeb, 0xf4, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0xf800 .. 0xf8ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd9, 0xda, 0xdb,
+    0xdc, 0xdd, 0xde, 0xdf, 0xfb, 0xfc, 0xff, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -633,6 +303,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x88, 0x9b, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -674,36 +344,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x0400, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0500, 0x0600, 0x0700,
-    0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100
+    0x0000, 0x0100, 0x0200, 0x0800, 0x0800, 0x0300, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0400, 0x0500, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800,
+    0x0600, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0700
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1256.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1256.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1256.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1256 (ANSI Arabic) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1256.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1256.txt */
 /* DO NOT EDIT!! */
 
@@ -41,5 +41,5 @@
 };
 
-static const unsigned char uni2cp_low[4864] =
+static const unsigned char uni2cp_low[2560] =
 {
     /* 0x0000 .. 0x00ff */
@@ -64,110 +64,77 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa0, 0x21, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
-    0xa8, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0xaf,
+    0xa0, 0x3f, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+    0xa8, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0xaf,
     0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
-    0xb8, 0xb9, 0x6f, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43,
-    0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
-    0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0xd7,
-    0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f,
-    0xe0, 0x61, 0xe2, 0x61, 0x61, 0x61, 0x61, 0xe7,
-    0xe8, 0xe9, 0xea, 0xeb, 0x69, 0x69, 0xee, 0xef,
-    0x64, 0x6e, 0x6f, 0x6f, 0xf4, 0x6f, 0x6f, 0xf7,
-    0x6f, 0xf9, 0x75, 0xfb, 0xfc, 0x79, 0x3f, 0x79,
+    0xb8, 0xb9, 0x3f, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f,
+    0x41, 0x3f, 0x41, 0x3f, 0x3f, 0x3f, 0x3f, 0x43,
+    0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, 0x49, 0x49,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0xd7,
+    0x3f, 0x55, 0x3f, 0x55, 0x55, 0x3f, 0x3f, 0x3f,
+    0xe0, 0x3f, 0xe2, 0x3f, 0x3f, 0x3f, 0x3f, 0xe7,
+    0xe8, 0xe9, 0xea, 0xeb, 0x3f, 0x3f, 0xee, 0xef,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xf4, 0x3f, 0x3f, 0xf7,
+    0x3f, 0xf9, 0x3f, 0xfb, 0xfc, 0x3f, 0x3f, 0x3f,
     /* 0x0100 .. 0x01ff */
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63,
-    0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64,
-    0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67,
-    0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68,
-    0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69,
-    0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
-    0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f,
-    0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e,
-    0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x8c, 0x9c, 0x52, 0x72, 0x52, 0x72,
-    0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73,
-    0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
-    0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55,
-    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0xfc, 0x55,
-    0xfc, 0x55, 0xfc, 0x55, 0xfc, 0x3f, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67,
-    0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x8c, 0x9c, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0xb4, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x76,
-    0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x0300 .. 0x03ff */
-    0x60, 0xb4, 0x88, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f,
-    0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -188,6 +155,6 @@
     0xf6, 0xf8, 0xfa, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x8a, 0x3f, 0x3f, 0x3f, 0x3f, 0x81, 0x3f,
@@ -200,133 +167,34 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x9f, 0x3f, 0x3f, 0x3f, 0xaa, 0x3f,
-    0x3f, 0xc0, 0xc0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xff, 0xff, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0x43, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0xef,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0xe2, 0x41, 0xe2,
-    0x41, 0xe2, 0x41, 0xe2, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0xea,
-    0x45, 0xea, 0x45, 0xea, 0x45, 0xea, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0xf4, 0x4f, 0xf4, 0x4f, 0xf4, 0x4f, 0xf4,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
+    0x3f, 0xc0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xed, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x9d, 0x9e, 0xfd, 0xfe,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0xb4, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0xaf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x9e, 0xfd, 0xfe,
+    0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -341,174 +209,9 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2100 .. 0x21ff */
-    0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
-    0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
-    0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f,
-    0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65,
-    0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x88, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x3000 .. 0x30ff */
-    0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -544,21 +247,21 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x81, 0x81,
+    0x81, 0x81, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8a, 0x8a,
+    0x8a, 0x8a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x8d, 0x8d, 0x8d, 0x8d, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x8f, 0x8f, 0x8e, 0x8e, 0x9a, 0x9a, 0x98, 0x98,
+    0x98, 0x98, 0x90, 0x90, 0x90, 0x90, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9f, 0x9f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc0, 0xc0,
+    0xc0, 0xc0, 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -581,26 +284,26 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xf0, 0xf0, 0xf1, 0x3f, 0xf2, 0x3f, 0xf3, 0xf3,
+    0xf5, 0xf5, 0xf6, 0xf6, 0xf8, 0xf8, 0xfa, 0xfa,
+    0xc1, 0xc2, 0xc2, 0xc3, 0xc3, 0xc4, 0xc4, 0xc5,
+    0xc5, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0xc7, 0xc8,
+    0xc8, 0xc8, 0xc8, 0xc9, 0xc9, 0xca, 0xca, 0xca,
+    0xca, 0xcb, 0xcb, 0xcb, 0xcb, 0xcc, 0xcc, 0xcc,
+    0xcc, 0xcd, 0xcd, 0xcd, 0xcd, 0xce, 0xce, 0xce,
+    0xce, 0xcf, 0xcf, 0xd0, 0xd0, 0xd1, 0xd1, 0xd2,
+    0xd2, 0xd3, 0xd3, 0xd3, 0xd3, 0xd4, 0xd4, 0xd4,
+    0xd4, 0xd5, 0xd5, 0xd5, 0xd5, 0xd6, 0xd6, 0xd6,
+    0xd6, 0xd8, 0xd8, 0xd8, 0xd8, 0xd9, 0xd9, 0xd9,
+    0xd9, 0xda, 0xda, 0xda, 0xda, 0xdb, 0xdb, 0xdb,
+    0xdb, 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0xde, 0xde,
+    0xde, 0xdf, 0xdf, 0xdf, 0xdf, 0xe1, 0xe1, 0xe1,
+    0xe1, 0xe3, 0xe3, 0xe3, 0xe3, 0xe4, 0xe4, 0xe4,
+    0xe4, 0xe5, 0xe5, 0xe5, 0xe5, 0xe6, 0xe6, 0xec,
+    0xec, 0xed, 0xed, 0xed, 0xed, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0xff00 .. 0xffff */
@@ -633,6 +336,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x88, 0x9b, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -674,36 +377,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x0400, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0500, 0x0600, 0x0700,
-    0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100
+    0x0000, 0x0100, 0x0200, 0x0900, 0x0900, 0x0900, 0x0300, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0400, 0x0500, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900,
+    0x0900, 0x0900, 0x0900, 0x0600, 0x0900, 0x0900, 0x0700, 0x0800
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1257.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1257.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1257.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1257 (ANSI Baltic) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1257.txt */
 /* DO NOT EDIT!! */
 
@@ -27,5 +27,5 @@
     0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
     0x0098, 0x2122, 0x009a, 0x203a, 0x009c, 0x00af, 0x02db, 0x009f,
-    0x00a0, 0x003f, 0x00a2, 0x00a3, 0x00a4, 0x003f, 0x00a6, 0x00a7,
+    0x00a0, 0xf8fc, 0x00a2, 0x00a3, 0x00a4, 0xf8fd, 0x00a6, 0x00a7,
     0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6,
     0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
@@ -41,5 +41,5 @@
 };
 
-static const unsigned char uni2cp_low[4608] =
+static const unsigned char uni2cp_low[2048] =
 {
     /* 0x0000 .. 0x00ff */
@@ -64,236 +64,104 @@
     0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x98, 0x3f, 0x9a, 0x3f, 0x9c, 0x3f, 0x3f, 0x9f,
-    0xa0, 0x21, 0xa2, 0xa3, 0xa4, 0x59, 0xa6, 0xa7,
-    0x8d, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0x9d,
+    0xa0, 0x3f, 0xa2, 0xa3, 0xa4, 0x3f, 0xa6, 0xa7,
+    0x8d, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0x9d,
     0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
-    0x8f, 0xb9, 0x6f, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0xc4, 0xc5, 0xaf, 0x43,
-    0x45, 0xc9, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
-    0x44, 0x4e, 0x4f, 0xd3, 0x4f, 0xd5, 0xd6, 0xd7,
-    0xa8, 0x55, 0x55, 0x55, 0xdc, 0x59, 0x3f, 0xdf,
-    0x61, 0x61, 0x61, 0x61, 0xe4, 0xe5, 0xbf, 0x63,
-    0x65, 0xe9, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69,
-    0x64, 0x6e, 0x6f, 0xf3, 0x6f, 0xf5, 0xf6, 0xf7,
-    0xb8, 0x75, 0x75, 0x75, 0xfc, 0x79, 0x3f, 0x79,
+    0x8f, 0xb9, 0x3f, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xc4, 0xc5, 0xaf, 0x3f,
+    0x3f, 0xc9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0xd3, 0x3f, 0xd5, 0xd6, 0xd7,
+    0xa8, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0xdf,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xe4, 0xe5, 0xbf, 0x3f,
+    0x3f, 0xe9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0xf3, 0x3f, 0xf5, 0xf6, 0xf7,
+    0xb8, 0x3f, 0x3f, 0x3f, 0xfc, 0x3f, 0x3f, 0x3f,
     /* 0x0100 .. 0x01ff */
-    0xc2, 0xe2, 0x41, 0x61, 0xc0, 0xe0, 0xc3, 0xe3,
-    0x43, 0x63, 0x43, 0x63, 0xc8, 0xe8, 0x44, 0x64,
-    0x44, 0x64, 0xc7, 0xe7, 0x45, 0x65, 0xcb, 0xeb,
-    0xc6, 0xe6, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67,
-    0x47, 0x67, 0xcc, 0xec, 0x48, 0x68, 0x48, 0x68,
-    0x49, 0x69, 0xce, 0xee, 0x49, 0x69, 0xc1, 0xe1,
-    0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0xcd, 0xed,
-    0x3f, 0x4c, 0x6c, 0xcf, 0xef, 0x4c, 0x6c, 0x3f,
-    0x3f, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x4e,
-    0x6e, 0x3f, 0x3f, 0x3f, 0xd4, 0xf4, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0xaa, 0xba,
-    0x52, 0x72, 0xda, 0xfa, 0x53, 0x73, 0x53, 0x73,
-    0xd0, 0xf0, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x55, 0x75, 0xdb, 0xfb, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0xd8, 0xf8, 0x57, 0x77, 0x59, 0x79,
-    0x59, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x73,
-    0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
-    0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55,
-    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc,
-    0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4,
-    0x41, 0x61, 0xaf, 0xbf, 0x47, 0x67, 0x47, 0x67,
-    0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0xc5, 0xe5, 0xaf, 0xbf, 0xa8, 0xb8,
+    0xc2, 0xe2, 0x3f, 0x3f, 0xc0, 0xe0, 0xc3, 0xe3,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xc8, 0xe8, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xc7, 0xe7, 0x3f, 0x3f, 0xcb, 0xeb,
+    0xc6, 0xe6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xcc, 0xec, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xce, 0xee, 0x3f, 0x3f, 0xc1, 0xe1,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xcd, 0xed,
+    0x3f, 0x3f, 0x3f, 0xcf, 0xef, 0x3f, 0x3f, 0x3f,
+    0x3f, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xd4, 0xf4, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xaa, 0xba,
+    0x3f, 0x3f, 0xda, 0xfa, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xd0, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xdb, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0xd8, 0xf8, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0xb4, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x8e,
-    0x27, 0x9d, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xff, 0xb0, 0x9e, 0x7e, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x0300 .. 0x03ff */
-    0x60, 0xb4, 0x5e, 0x7e, 0x9d, 0x9d, 0x3f, 0xff,
-    0x8d, 0x3f, 0xb0, 0x22, 0x8e, 0x3f, 0x22, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8f,
-    0x9e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0xb4, 0x3f, 0x3f, 0x8d, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x8d, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xaf, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0xc7, 0xe7, 0xc7, 0xe7,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5,
-    0xd4, 0xf4, 0xd4, 0xf4, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0xda, 0xfa, 0xd0, 0xf0,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0xdb, 0xfb, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0x8d, 0x8d, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8e,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0xff, 0x3f, 0x9e, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0xb4, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x9d, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -308,267 +176,69 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2100 .. 0x21ff */
-    0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
-    0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
-    0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f,
-    0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65,
-    0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x5e, 0x9b, 0x8e, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x3000 .. 0x30ff */
-    0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x9d, 0x9d, 0x9d, 0x9d, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0xf800 .. 0xf8ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0xa5, 0x3f, 0x3f,
     /* 0xff00 .. 0xffff */
     0x3f, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
@@ -600,6 +270,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa2, 0xa3, 0xac, 0x9d, 0xa6, 0x59, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x5e, 0x9b, 0x8e, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -641,36 +311,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0400, 0x0500, 0x0600,
-    0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x0d00, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x0e00, 0x1100, 0x1100, 0x0f00, 0x1000
+    0x0000, 0x0100, 0x0200, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0300, 0x0400, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0500, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0600
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1258.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1258.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_1258.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 1258 (ANSI/OEM Viet Nam) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1258.txt */
 /* DO NOT EDIT!! */
 
@@ -41,5 +41,5 @@
 };
 
-static const unsigned char uni2cp_low[4608] =
+static const unsigned char uni2cp_low[2048] =
 {
     /* 0x0000 .. 0x00ff */
@@ -68,232 +68,133 @@
     0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
     0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
-    0xc0, 0xc1, 0xc2, 0x41, 0xc4, 0xc5, 0xc6, 0xc7,
-    0xc8, 0xc9, 0xca, 0xcb, 0x49, 0xcd, 0xce, 0xcf,
-    0xd0, 0xd1, 0x4f, 0xd3, 0xd4, 0x4f, 0xd6, 0xd7,
-    0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x59, 0x3f, 0xdf,
-    0xe0, 0xe1, 0xe2, 0x61, 0xe4, 0xe5, 0xe6, 0xe7,
-    0xe8, 0xe9, 0xea, 0xeb, 0x69, 0xed, 0xee, 0xef,
-    0x64, 0xf1, 0x6f, 0xf3, 0xf4, 0x6f, 0xf6, 0xf7,
-    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x79, 0x3f, 0xff,
+    0xc0, 0xc1, 0xc2, 0x3f, 0xc4, 0xc5, 0xc6, 0xc7,
+    0xc8, 0xc9, 0xca, 0xcb, 0x3f, 0xcd, 0xce, 0xcf,
+    0x3f, 0xd1, 0x3f, 0xd3, 0xd4, 0x3f, 0xd6, 0xd7,
+    0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x3f, 0x3f, 0xdf,
+    0xe0, 0xe1, 0xe2, 0x3f, 0xe4, 0xe5, 0xe6, 0xe7,
+    0xe8, 0xe9, 0xea, 0xeb, 0x3f, 0xed, 0xee, 0xef,
+    0x3f, 0xf1, 0x3f, 0xf3, 0xf4, 0x3f, 0xf6, 0xf7,
+    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x3f, 0x3f, 0xff,
     /* 0x0100 .. 0x01ff */
-    0x41, 0x61, 0xc3, 0xe3, 0x41, 0x61, 0x43, 0x63,
-    0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64,
-    0xd0, 0xf0, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67,
-    0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68,
-    0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69,
-    0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
-    0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f,
-    0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e,
-    0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x8c, 0x9c, 0x52, 0x72, 0x52, 0x72,
-    0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x9f, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73,
-    0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
-    0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
+    0x3f, 0x3f, 0xc3, 0xe3, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xd0, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x8c, 0x9c, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0xd5, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0xdd,
-    0xfd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc,
-    0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4,
-    0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67,
-    0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xdd,
+    0xfd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0xd6, 0xf6, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0xb4, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x76,
-    0x27, 0xaf, 0xb4, 0xcc, 0x3f, 0x5f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xb0, 0x3f, 0x98, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x98, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x0300 .. 0x03ff */
-    0xcc, 0xec, 0x88, 0xde, 0xaf, 0xaf, 0x3f, 0x3f,
-    0xa8, 0xd2, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0xf2, 0x3f, 0x3f, 0x3f, 0xb8,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xcc, 0xec, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xec, 0xa8, 0x41, 0xb7,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2,
-    0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0xc3, 0xe3,
-    0xc3, 0xe3, 0xc3, 0xe3, 0xc3, 0xe3, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea,
-    0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4,
-    0x4f, 0x6f, 0xd5, 0xf5, 0xd5, 0xf5, 0xd5, 0xf5,
-    0xd5, 0xf5, 0xd5, 0xf5, 0x55, 0x75, 0x55, 0x75,
-    0xdd, 0xfd, 0xdd, 0xfd, 0xdd, 0xfd, 0xdd, 0xfd,
-    0xdd, 0xfd, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f,
+    0xcc, 0xec, 0x3f, 0xde, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0xd2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x82, 0x91, 0x93, 0x94, 0x84, 0x3f,
-    0x86, 0x87, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x89, 0x3f, 0xb4, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0xaf, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f,
+    0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0xfe, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -308,249 +209,18 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2100 .. 0x21ff */
-    0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
-    0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
-    0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f,
-    0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65,
-    0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x88, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a,
-    0xb0, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x98, 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b,
-    0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x3000 .. 0x30ff */
-    0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x8b, 0x9b, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -600,6 +270,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f,
-    0x7c, 0x8b, 0x88, 0x9b, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -641,36 +311,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0400, 0x0500, 0x0600,
-    0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x0d00, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100,
-    0x1100, 0x1100, 0x1100, 0x0e00, 0x1100, 0x1100, 0x0f00, 0x1000
+    0x0000, 0x0100, 0x0200, 0x0300, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0400, 0x0500, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700,
+    0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0600
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_874.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_874.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_874.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 874 (ANSI/OEM Thai) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP874.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit874.txt */
 /* DO NOT EDIT!! */
 
@@ -34,9 +34,9 @@
     0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
     0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37,
-    0x0e38, 0x0e39, 0x0e3a, 0x003f, 0x003f, 0x003f, 0x00de, 0x0e3f,
+    0x0e38, 0x0e39, 0x0e3a, 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, 0x0e3f,
     0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
     0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
     0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
-    0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x003f, 0x003f, 0x00fe, 0x003f,
+    0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8,
     /* glyphs */
     0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
@@ -67,12 +67,12 @@
     0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
     0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37,
-    0x0e38, 0x0e39, 0x0e3a, 0x003f, 0x003f, 0x003f, 0x00de, 0x0e3f,
+    0x0e38, 0x0e39, 0x0e3a, 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, 0x0e3f,
     0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
     0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
     0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
-    0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x003f, 0x003f, 0x00fe, 0x003f
+    0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8
 };
 
-static const unsigned char uni2cp_low[4864] =
+static const unsigned char uni2cp_low[2816] =
 {
     /* 0x0000 .. 0x00ff */
@@ -97,110 +97,11 @@
     0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
-    0xa0, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0x3f,
-    0x22, 0x63, 0x61, 0x3c, 0x3f, 0x2d, 0x72, 0x97,
-    0x3f, 0x3f, 0x32, 0x33, 0x27, 0x75, 0x3f, 0x3f,
-    0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43,
-    0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
-    0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78,
-    0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0x3f,
-    0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63,
-    0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69,
-    0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f,
-    0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0xfe, 0x79,
-    /* 0x0100 .. 0x01ff */
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63,
-    0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64,
-    0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67,
-    0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68,
-    0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69,
-    0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b,
-    0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f,
-    0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e,
-    0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72,
-    0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79,
-    0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73,
-    0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49,
-    0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55,
-    0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49,
-    0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55,
-    0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67,
-    0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f,
-    0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f,
-    0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f,
-    /* 0x0200 .. 0x02ff */
-    0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75,
-    0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61,
-    0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77,
-    0x79, 0x27, 0x22, 0x91, 0x92, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76,
-    0x27, 0x97, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x22, 0x3f, 0x3f,
-    0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x0300 .. 0x03ff */
-    0x60, 0x27, 0x5e, 0x7e, 0x97, 0x97, 0x3f, 0x3f,
-    0x22, 0x3f, 0x3f, 0x22, 0x76, 0x3f, 0x22, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f,
-    0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f,
-    0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48,
-    0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f,
-    0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58,
-    0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f,
+    0xa0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x15,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x14, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -241,125 +142,26 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1d00 .. 0x1dff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f,
-    0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b,
-    0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52,
-    0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62,
-    0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b,
-    0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74,
-    0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f,
-    0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1e00 .. 0x1eff */
-    0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62,
-    0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64,
-    0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66,
-    0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68,
-    0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69,
-    0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c,
-    0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d,
-    0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e,
-    0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70,
-    0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72,
-    0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
-    0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74,
-    0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76,
-    0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77,
-    0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79,
-    0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74,
-    0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65,
-    0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f,
-    0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75,
-    0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79,
-    0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x1f00 .. 0x1fff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f,
     /* 0x2000 .. 0x20ff */
-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-    0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x96, 0x3f, 0x5f,
-    0x91, 0x92, 0x2c, 0x91, 0x93, 0x94, 0x2c, 0x3f,
-    0x3f, 0x3f, 0x95, 0x3f, 0x2e, 0x3f, 0x85, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x91, 0x3f, 0x3f,
-    0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x97, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e,
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-    0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f,
-    0x61, 0x65, 0x6f, 0x78, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f,
+    0x91, 0x92, 0x3f, 0x3f, 0x93, 0x94, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x13, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -374,26 +176,26 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2100 .. 0x21ff */
-    0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45,
-    0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68,
-    0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f,
-    0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f,
-    0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65,
-    0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65,
-    0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d,
-    0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x1b, 0x18, 0x1a, 0x19, 0x1d, 0x12, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x17, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -407,18 +209,18 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2200 .. 0x22ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a,
-    0x3f, 0x95, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c,
-    0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x1c,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -440,195 +242,129 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2300 .. 0x23ff */
-    0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x2400 .. 0x24ff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x42,
-    0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
-    0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
-    0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
-    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
-    0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-    0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x7f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     /* 0x2500 .. 0x25ff */
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c,
-    0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54,
-    0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c,
-    0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b,
-    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0x3000 .. 0x30ff */
-    0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x2c,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfb00 .. 0xfbff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    /* 0xfe00 .. 0xfeff */
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x97, 0x97, 0x97, 0x97, 0x5f, 0x5f, 0x5f,
-    0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21,
-    0x97, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23,
-    0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f,
-    0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xc4, 0x3f, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xda, 0x3f, 0x3f, 0x3f,
+    0xbf, 0x3f, 0x3f, 0x3f, 0xc0, 0x3f, 0x3f, 0x3f,
+    0xd9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0xcd, 0xba, 0x3f, 0x3f, 0xc9, 0x3f, 0x3f, 0xbb,
+    0x3f, 0x3f, 0xc8, 0x3f, 0x3f, 0xbc, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x16, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x1e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x10, 0x3f, 0x1f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x11, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x09, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x08, 0x0a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0x2600 .. 0x26ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x01, 0x02, 0x0f, 0x3f, 0x3f, 0x3f,
+    0x0c, 0x3f, 0x0b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x06, 0x3f, 0x3f, 0x05, 0x3f, 0x03, 0x04, 0x3f,
+    0x3f, 0x3f, 0x0d, 0x0e, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    /* 0xf800 .. 0xf8ff */
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0xdb, 0xdc, 0xdd, 0xde, 0xfc, 0xfd, 0xfe,
+    0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -666,6 +402,6 @@
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
-    0x63, 0x4c, 0x3f, 0x97, 0x7c, 0x59, 0x3f, 0x3f,
-    0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+    0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
     0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
@@ -707,36 +443,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0500, 0x0600, 0x0700,
-    0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200,
-    0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100
+    0x0000, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0100, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0200, 0x0300, 0x0400, 0x0500, 0x0a00, 0x0600, 0x0700, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00,
+    0x0800, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0900
 };
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_932.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_932.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_932.c	(revision 19678)
@@ -1,9 +1,9 @@
 /* code page 932 (ANSI/OEM Japanese Shift-JIS) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit932.txt */
 /* DO NOT EDIT!! */
 
 #include "wine/unicode.h"
 
-static const WCHAR cp2uni[12032] =
+static const WCHAR cp2uni[15616] =
 {
     0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -27,5 +27,5 @@
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x003f, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67,
+    0xf8f0, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67,
     0xff68, 0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f,
     0xff70, 0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77,
@@ -38,47 +38,14 @@
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x003f, 0x00fe, 0x003f,
-    /* unused lead bytes */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf8f1, 0xf8f2, 0xf8f3,
     /* lead byte 81 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b,
     0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e,
@@ -88,5 +55,5 @@
     0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b,
     0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e,
-    0x300f, 0x3010, 0x3011, 0xff0b, 0xff0d, 0x00b1, 0x00d7, 0x003f,
+    0x300f, 0x3010, 0x3011, 0xff0b, 0xff0d, 0x00b1, 0x00d7, 0x30fb,
     0x00f7, 0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e,
     0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5,
@@ -94,36 +61,36 @@
     0x00a7, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6,
     0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x203b, 0x3012,
-    0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x2227, 0x2228, 0xffe2, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x2227, 0x2228, 0xffe2, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261,
     0x2252, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x2235, 0x222b,
-    0x222c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x222c, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, 0x2021, 0x00b6,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x25ef, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x25ef, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 82 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xff10,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0xff10,
     0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18,
-    0xff19, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xff19, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28,
     0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30,
     0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38,
-    0xff39, 0xff3a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47,
+    0xff39, 0xff3a, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47,
     0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f,
     0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57,
-    0xff58, 0xff59, 0xff5a, 0x003f, 0x003f, 0x003f, 0x003f, 0x3041,
+    0xff58, 0xff59, 0xff5a, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x3041,
     0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049,
     0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, 0x3051,
@@ -136,15 +103,15 @@
     0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089,
     0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090, 0x3091,
-    0x3092, 0x3093, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x3092, 0x3093, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 83 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
     0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
@@ -154,108 +121,174 @@
     0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
     0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
-    0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x003f,
+    0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30fb,
     0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7,
     0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef,
-    0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0391,
+    0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x0391,
     0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399,
     0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1,
-    0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x03b1,
+    0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x03b1,
     0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9,
     0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1,
-    0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 84 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416,
     0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
     0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426,
     0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e,
-    0x042f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x042f, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436,
-    0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x003f,
+    0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x30fb,
     0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445,
     0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d,
-    0x044e, 0x044f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x2500,
+    0x044e, 0x044f, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x2500,
     0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c, 0x2524,
     0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b, 0x2517,
     0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f, 0x2528,
-    0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte 85 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte 86 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 87 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
     0x2468, 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f,
     0x2470, 0x2471, 0x2472, 0x2473, 0x2160, 0x2161, 0x2162, 0x2163,
-    0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x003f, 0x3349,
+    0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x30fb, 0x3349,
     0x3314, 0x3322, 0x334d, 0x3318, 0x3327, 0x3303, 0x3336, 0x3351,
     0x3357, 0x330d, 0x3326, 0x3323, 0x332b, 0x334a, 0x333b, 0x339c,
-    0x339d, 0x339e, 0x338e, 0x338f, 0x33c4, 0x33a1, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x337b, 0x003f,
+    0x339d, 0x339e, 0x338e, 0x338f, 0x33c4, 0x33a1, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x337b, 0x30fb,
     0x301d, 0x301f, 0x2116, 0x33cd, 0x2121, 0x32a4, 0x32a5, 0x32a6,
     0x32a7, 0x32a8, 0x3231, 0x3232, 0x3239, 0x337e, 0x337d, 0x337c,
     0x2252, 0x2261, 0x222b, 0x222e, 0x2211, 0x221a, 0x22a5, 0x2220,
-    0x221f, 0x22bf, 0x2235, 0x2229, 0x222a, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x221f, 0x22bf, 0x2235, 0x2229, 0x222a, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 88 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x4e9c,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x4e9c,
     0x5516, 0x5a03, 0x963f, 0x54c0, 0x611b, 0x6328, 0x59f6, 0x9022,
     0x8475, 0x831c, 0x7a50, 0x60aa, 0x63e1, 0x6e25, 0x65ed, 0x8466,
@@ -269,14 +302,14 @@
     0x90c1, 0x78ef, 0x4e00, 0x58f1, 0x6ea2, 0x9038, 0x7a32, 0x8328,
     0x828b, 0x9c2f, 0x5141, 0x5370, 0x54bd, 0x54e1, 0x56e0, 0x59fb,
-    0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d, 0x003f, 0x003f, 0x003f,
+    0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 89 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x9662, 0x9670, 0x96a0, 0x97fb, 0x540b, 0x53f3, 0x5b87, 0x70cf,
     0x7fbd, 0x8fc2, 0x96e8, 0x536f, 0x9d5c, 0x7aba, 0x4e11, 0x7893,
@@ -286,5 +319,5 @@
     0x6804, 0x6c38, 0x6cf3, 0x6d29, 0x745b, 0x76c8, 0x7a4e, 0x9834,
     0x82f1, 0x885b, 0x8a60, 0x92ed, 0x6db2, 0x75ab, 0x76ca, 0x99c5,
-    0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, 0x003f,
+    0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, 0x30fb,
     0x5712, 0x5830, 0x5944, 0x5bb4, 0x5ef6, 0x6028, 0x63a9, 0x63f4,
     0x6cbf, 0x6f14, 0x708e, 0x7114, 0x7159, 0x71d5, 0x733f, 0x7e01,
@@ -302,14 +335,14 @@
     0x82bd, 0x86fe, 0x8cc0, 0x96c5, 0x9913, 0x99d5, 0x4ecb, 0x4f1a,
     0x89e3, 0x56de, 0x584a, 0x58ca, 0x5efb, 0x5feb, 0x602a, 0x6094,
-    0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539, 0x003f, 0x003f, 0x003f,
+    0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 8a */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x9b41, 0x6666, 0x68b0, 0x6d77, 0x7070, 0x754c, 0x7686, 0x7d75,
     0x82a5, 0x87f9, 0x958b, 0x968e, 0x8c9d, 0x51f1, 0x52be, 0x5916,
@@ -319,5 +352,5 @@
     0x64b9, 0x683c, 0x6838, 0x6bbb, 0x7372, 0x78ba, 0x7a6b, 0x899a,
     0x89d2, 0x8d6b, 0x8f03, 0x90ed, 0x95a3, 0x9694, 0x9769, 0x5b66,
-    0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, 0x003f,
+    0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, 0x30fb,
     0x6a7f, 0x68b6, 0x9c0d, 0x6f5f, 0x5272, 0x559d, 0x6070, 0x62ec,
     0x6d3b, 0x6e07, 0x6ed1, 0x845b, 0x8910, 0x8f44, 0x4e14, 0x9c39,
@@ -335,14 +368,14 @@
     0x9858, 0x4f01, 0x4f0e, 0x5371, 0x559c, 0x5668, 0x57fa, 0x5947,
     0x5b09, 0x5bc4, 0x5c90, 0x5e0c, 0x5e7e, 0x5fcc, 0x63ee, 0x673a,
-    0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4, 0x003f, 0x003f, 0x003f,
+    0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 8b */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x6a5f, 0x5e30, 0x6bc5, 0x6c17, 0x6c7d, 0x757f, 0x7948, 0x5b63,
     0x7a00, 0x7d00, 0x5fbd, 0x898f, 0x8a18, 0x8cb4, 0x8d77, 0x8ecc,
@@ -352,5 +385,5 @@
     0x5403, 0x55ab, 0x6854, 0x6a58, 0x8a70, 0x7827, 0x6775, 0x9ecd,
     0x5374, 0x5ba2, 0x811a, 0x8650, 0x9006, 0x4e18, 0x4e45, 0x4ec7,
-    0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, 0x003f,
+    0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, 0x30fb,
     0x673d, 0x6c42, 0x6c72, 0x6ce3, 0x7078, 0x7403, 0x7a76, 0x7aae,
     0x7b08, 0x7d1a, 0x7cfe, 0x7d66, 0x65e7, 0x725b, 0x53bb, 0x5c45,
@@ -368,14 +401,14 @@
     0x7396, 0x77e9, 0x82e6, 0x8eaf, 0x99c6, 0x99c8, 0x99d2, 0x5177,
     0x611a, 0x865e, 0x55b0, 0x7a7a, 0x5076, 0x5bd3, 0x9047, 0x9685,
-    0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48, 0x003f, 0x003f, 0x003f,
+    0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 8c */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x6398, 0x7a9f, 0x6c93, 0x9774, 0x8f61, 0x7aaa, 0x718a, 0x9688,
     0x7c82, 0x6817, 0x7e70, 0x6851, 0x936c, 0x52f2, 0x541b, 0x85ab,
@@ -385,5 +418,5 @@
     0x656c, 0x666f, 0x6842, 0x6e13, 0x7566, 0x7a3d, 0x7cfb, 0x7d4c,
     0x7d99, 0x7e4b, 0x7f6b, 0x830e, 0x834a, 0x86cd, 0x8a08, 0x8a63,
-    0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, 0x003f,
+    0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, 0x30fb,
     0x5287, 0x621f, 0x6483, 0x6fc0, 0x9699, 0x6841, 0x5091, 0x6b20,
     0x6c7a, 0x6f54, 0x7a74, 0x7d50, 0x8840, 0x8a23, 0x6708, 0x4ef6,
@@ -401,14 +434,14 @@
     0x745a, 0x7881, 0x8a9e, 0x8aa4, 0x8b77, 0x9190, 0x4e5e, 0x9bc9,
     0x4ea4, 0x4f7c, 0x4faf, 0x5019, 0x5016, 0x5149, 0x516c, 0x529f,
-    0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411, 0x003f, 0x003f, 0x003f,
+    0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 8d */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x540e, 0x5589, 0x5751, 0x57a2, 0x597d, 0x5b54, 0x5b5d, 0x5b8f,
     0x5de5, 0x5de7, 0x5df7, 0x5e78, 0x5e83, 0x5e9a, 0x5eb7, 0x5f18,
@@ -418,5 +451,5 @@
     0x7d18, 0x7d5e, 0x7db1, 0x8015, 0x8003, 0x80af, 0x80b1, 0x8154,
     0x818f, 0x822a, 0x8352, 0x884c, 0x8861, 0x8b1b, 0x8ca2, 0x8cfc,
-    0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, 0x003f,
+    0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, 0x30fb,
     0x9805, 0x9999, 0x9ad8, 0x9d3b, 0x525b, 0x52ab, 0x53f7, 0x5408,
     0x58d5, 0x62f7, 0x6fe0, 0x8c6a, 0x8f5f, 0x9eb9, 0x514b, 0x523b,
@@ -434,14 +467,14 @@
     0x5d0e, 0x57fc, 0x7895, 0x9dfa, 0x4f5c, 0x524a, 0x548b, 0x643e,
     0x6628, 0x6714, 0x67f5, 0x7a84, 0x7b56, 0x7d22, 0x932f, 0x685c,
-    0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237, 0x003f, 0x003f, 0x003f,
+    0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 8e */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x5bdf, 0x62f6, 0x64ae, 0x64e6, 0x672d, 0x6bba, 0x85a9, 0x96d1,
     0x7690, 0x9bd6, 0x634c, 0x9306, 0x9bab, 0x76bf, 0x6652, 0x4e09,
@@ -451,5 +484,5 @@
     0x523a, 0x53f8, 0x53f2, 0x55e3, 0x56db, 0x58eb, 0x59cb, 0x59c9,
     0x59ff, 0x5b50, 0x5c4d, 0x5e02, 0x5e2b, 0x5fd7, 0x601d, 0x6307,
-    0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, 0x003f,
+    0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, 0x30fb,
     0x6b7b, 0x6c0f, 0x7345, 0x7949, 0x79c1, 0x7cf8, 0x7d19, 0x7d2b,
     0x80a2, 0x8102, 0x81f3, 0x8996, 0x8a5e, 0x8a69, 0x8a66, 0x8a8c,
@@ -467,14 +500,14 @@
     0x624b, 0x6731, 0x6b8a, 0x72e9, 0x73e0, 0x7a2e, 0x816b, 0x8da3,
     0x9152, 0x9996, 0x5112, 0x53d7, 0x546a, 0x5bff, 0x6388, 0x6a39,
-    0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468, 0x003f, 0x003f, 0x003f,
+    0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 8f */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x5b97, 0x5c31, 0x5dde, 0x4fee, 0x6101, 0x62fe, 0x6d32, 0x79c0,
     0x79cb, 0x7d42, 0x7e4d, 0x7fd2, 0x81ed, 0x821f, 0x8490, 0x8846,
@@ -484,5 +517,5 @@
     0x5bbf, 0x6dd1, 0x795d, 0x7e2e, 0x7c9b, 0x587e, 0x719f, 0x51fa,
     0x8853, 0x8ff0, 0x4fca, 0x5cfb, 0x6625, 0x77ac, 0x7ae3, 0x821c,
-    0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, 0x003f,
+    0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, 0x30fb,
     0x6e96, 0x6f64, 0x76fe, 0x7d14, 0x5de1, 0x9075, 0x9187, 0x9806,
     0x51e6, 0x521d, 0x6240, 0x6691, 0x66d9, 0x6e1a, 0x5eb6, 0x7dd2,
@@ -500,14 +533,14 @@
     0x5270, 0x57ce, 0x5834, 0x58cc, 0x5b22, 0x5e38, 0x60c5, 0x64fe,
     0x6761, 0x6756, 0x6d44, 0x72b6, 0x7573, 0x7a63, 0x84b8, 0x8b72,
-    0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe, 0x003f, 0x003f, 0x003f,
+    0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 90 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x62ed, 0x690d, 0x6b96, 0x71ed, 0x7e54, 0x8077, 0x8272, 0x89e6,
     0x98df, 0x8755, 0x8fb1, 0x5c3b, 0x4f38, 0x4fe1, 0x4fb5, 0x5507,
@@ -517,5 +550,5 @@
     0x8f9b, 0x9032, 0x91dd, 0x9707, 0x4eba, 0x4ec1, 0x5203, 0x5875,
     0x58ec, 0x5c0b, 0x751a, 0x5c3d, 0x814e, 0x8a0a, 0x8fc5, 0x9663,
-    0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, 0x003f,
+    0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, 0x30fb,
     0x9017, 0x5439, 0x5782, 0x5e25, 0x63a8, 0x6c34, 0x708a, 0x7761,
     0x7c8b, 0x7fe0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968f,
@@ -533,14 +566,14 @@
     0x5360, 0x5ba3, 0x5c02, 0x5c16, 0x5ddd, 0x6226, 0x6247, 0x64b0,
     0x6813, 0x6834, 0x6cc9, 0x6d45, 0x6d17, 0x67d3, 0x6f5c, 0x714e,
-    0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda, 0x003f, 0x003f, 0x003f,
+    0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 91 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x7e4a, 0x7fa8, 0x817a, 0x821b, 0x8239, 0x85a6, 0x8a6e, 0x8cce,
     0x8df5, 0x9078, 0x9077, 0x92ad, 0x9291, 0x9583, 0x9bae, 0x524d,
@@ -550,5 +583,5 @@
     0x8607, 0x8a34, 0x963b, 0x9061, 0x9f20, 0x50e7, 0x5275, 0x53cc,
     0x53e2, 0x5009, 0x55aa, 0x58ee, 0x594f, 0x723d, 0x5b8b, 0x5c64,
-    0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, 0x003f,
+    0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, 0x30fb,
     0x64cd, 0x65e9, 0x66f9, 0x5de3, 0x69cd, 0x69fd, 0x6f15, 0x71e5,
     0x4e89, 0x75e9, 0x76f8, 0x7a93, 0x7cdf, 0x7dcf, 0x7d9c, 0x8061,
@@ -566,14 +599,14 @@
     0x984c, 0x9df9, 0x6edd, 0x7027, 0x5353, 0x5544, 0x5b85, 0x6258,
     0x629e, 0x62d3, 0x6ca2, 0x6fef, 0x7422, 0x8a17, 0x9438, 0x6fc1,
-    0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea, 0x003f, 0x003f, 0x003f,
+    0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 92 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x53e9, 0x4f46, 0x9054, 0x8fb0, 0x596a, 0x8131, 0x5dfd, 0x7aea,
     0x8fbf, 0x68da, 0x8c37, 0x72f8, 0x9c48, 0x6a3d, 0x8ab0, 0x4e39,
@@ -583,5 +616,5 @@
     0x6a80, 0x6bb5, 0x7537, 0x8ac7, 0x5024, 0x77e5, 0x5730, 0x5f1b,
     0x6065, 0x667a, 0x6c60, 0x75f4, 0x7a1a, 0x7f6e, 0x81f4, 0x8718,
-    0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, 0x003f,
+    0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, 0x30fb,
     0x9010, 0x79e9, 0x7a92, 0x8336, 0x5ae1, 0x7740, 0x4e2d, 0x4ef2,
     0x5b99, 0x5fe0, 0x62bd, 0x663c, 0x67f1, 0x6ce8, 0x866b, 0x8877,
@@ -599,14 +632,14 @@
     0x5b9a, 0x5e1d, 0x5e95, 0x5ead, 0x5ef7, 0x5f1f, 0x608c, 0x62b5,
     0x633a, 0x63d0, 0x68af, 0x6c40, 0x7887, 0x798e, 0x7a0b, 0x7de0,
-    0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013, 0x003f, 0x003f, 0x003f,
+    0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 93 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x90b8, 0x912d, 0x91d8, 0x9f0e, 0x6ce5, 0x6458, 0x64e2, 0x6575,
     0x6ef4, 0x7684, 0x7b1b, 0x9069, 0x93d1, 0x6eba, 0x54f2, 0x5fb9,
@@ -616,5 +649,5 @@
     0x5857, 0x59ac, 0x5c60, 0x5f92, 0x6597, 0x675c, 0x6e21, 0x767b,
     0x83df, 0x8ced, 0x9014, 0x90fd, 0x934d, 0x7825, 0x783a, 0x52aa,
-    0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, 0x003f,
+    0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, 0x30fb,
     0x51cd, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5b95, 0x5cf6,
     0x5d8b, 0x60bc, 0x6295, 0x642d, 0x6771, 0x6843, 0x68bc, 0x68df,
@@ -632,14 +665,14 @@
     0x6962, 0x99b4, 0x7e04, 0x7577, 0x5357, 0x6960, 0x8edf, 0x96e3,
     0x6c5d, 0x4e8c, 0x5c3c, 0x5f10, 0x8fe9, 0x5302, 0x8cd1, 0x8089,
-    0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165, 0x003f, 0x003f, 0x003f,
+    0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 94 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x5982, 0x5c3f, 0x97ee, 0x4efb, 0x598a, 0x5fcd, 0x8a8d, 0x6fe1,
     0x79b0, 0x7962, 0x5be7, 0x8471, 0x732b, 0x71b1, 0x5e74, 0x5ff5,
@@ -649,5 +682,5 @@
     0x6d3e, 0x7436, 0x7834, 0x5a46, 0x7f75, 0x82ad, 0x99ac, 0x4ff3,
     0x5ec3, 0x62dd, 0x6392, 0x6557, 0x676f, 0x76c3, 0x724c, 0x80cc,
-    0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, 0x003f,
+    0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, 0x30fb,
     0x6973, 0x7164, 0x72fd, 0x8cb7, 0x58f2, 0x8ce0, 0x966a, 0x9019,
     0x877f, 0x79e4, 0x77e7, 0x8429, 0x4f2f, 0x5265, 0x535a, 0x62cd,
@@ -665,14 +698,14 @@
     0x7891, 0x79d8, 0x7dcb, 0x7f77, 0x80a5, 0x88ab, 0x8ab9, 0x8cbb,
     0x907f, 0x975e, 0x98db, 0x6a0b, 0x7c38, 0x5099, 0x5c3e, 0x5fae,
-    0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e, 0x003f, 0x003f, 0x003f,
+    0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 95 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x9f3b, 0x67ca, 0x7a17, 0x5339, 0x758b, 0x9aed, 0x5f66, 0x819d,
     0x83f1, 0x8098, 0x5f3c, 0x5fc5, 0x7562, 0x7b46, 0x903c, 0x6867,
@@ -682,5 +715,5 @@
     0x9c2d, 0x54c1, 0x5f6c, 0x658c, 0x6d5c, 0x7015, 0x8ca7, 0x8cd3,
     0x983b, 0x654f, 0x74f6, 0x4e0d, 0x4ed8, 0x57e0, 0x592b, 0x5a66,
-    0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, 0x003f,
+    0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, 0x30fb,
     0x65a7, 0x666e, 0x6d6e, 0x7236, 0x7b26, 0x8150, 0x819a, 0x8299,
     0x8b5c, 0x8ca0, 0x8ce6, 0x8d74, 0x961c, 0x9644, 0x4fae, 0x64ab,
@@ -698,14 +731,14 @@
     0x620a, 0x66ae, 0x6bcd, 0x7c3f, 0x83e9, 0x5023, 0x4ff8, 0x5305,
     0x5446, 0x5831, 0x5949, 0x5b9d, 0x5cf0, 0x5cef, 0x5d29, 0x5e96,
-    0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b, 0x003f, 0x003f, 0x003f,
+    0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 96 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x6cd5, 0x6ce1, 0x70f9, 0x7832, 0x7e2b, 0x80de, 0x82b3, 0x840c,
     0x84ec, 0x8702, 0x8912, 0x8a2a, 0x8c4a, 0x90a6, 0x92d2, 0x98fd,
@@ -715,5 +748,5 @@
     0x9632, 0x5420, 0x982c, 0x5317, 0x50d5, 0x535c, 0x58a8, 0x64b2,
     0x6734, 0x7267, 0x7766, 0x7a46, 0x91e6, 0x52c3, 0x6ca1, 0x6b86,
-    0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, 0x003f,
+    0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, 0x30fb,
     0x6469, 0x78e8, 0x9b54, 0x9ebb, 0x57cb, 0x59b9, 0x6627, 0x679a,
     0x6bce, 0x54e9, 0x69d9, 0x5e55, 0x819c, 0x6795, 0x9baa, 0x67fe,
@@ -731,14 +764,14 @@
     0x51b6, 0x591c, 0x723a, 0x8036, 0x91ce, 0x5f25, 0x77e2, 0x5384,
     0x5f79, 0x7d04, 0x85ac, 0x8a33, 0x8e8d, 0x9756, 0x67f3, 0x85ae,
-    0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652, 0x003f, 0x003f, 0x003f,
+    0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 97 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x8aed, 0x8f38, 0x552f, 0x4f51, 0x512a, 0x52c7, 0x53cb, 0x5ba5,
     0x5e7d, 0x60a0, 0x6182, 0x63d6, 0x6709, 0x67da, 0x6e67, 0x6d8c,
@@ -748,5 +781,5 @@
     0x63fa, 0x64c1, 0x66dc, 0x694a, 0x69d8, 0x6d0b, 0x6eb6, 0x7194,
     0x7528, 0x7aaf, 0x7f8a, 0x8000, 0x8449, 0x84c9, 0x8981, 0x8b21,
-    0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, 0x003f,
+    0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, 0x30fb,
     0x6c83, 0x6d74, 0x7fcc, 0x7ffc, 0x6dc0, 0x7f85, 0x87ba, 0x88f8,
     0x6765, 0x83b1, 0x983c, 0x96f7, 0x6d1b, 0x7d61, 0x843d, 0x916a,
@@ -764,14 +797,14 @@
     0x82d3, 0x9234, 0x96b7, 0x96f6, 0x970a, 0x9e97, 0x9f62, 0x66a6,
     0x6b74, 0x5217, 0x52a3, 0x70c8, 0x88c2, 0x5ec9, 0x604b, 0x6190,
-    0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f, 0x003f, 0x003f, 0x003f,
+    0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 98 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x84ee, 0x9023, 0x932c, 0x5442, 0x9b6f, 0x6ad3, 0x7089, 0x8cc2,
     0x8def, 0x9732, 0x52b4, 0x5a41, 0x5eca, 0x5f04, 0x6717, 0x697c,
@@ -780,10 +813,10 @@
     0x502d, 0x548c, 0x8a71, 0x6b6a, 0x8cc4, 0x8107, 0x60d1, 0x67a0,
     0x9df2, 0x4e99, 0x4e98, 0x9c10, 0x8a6b, 0x85c1, 0x8568, 0x6900,
-    0x6e7e, 0x7897, 0x8155, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x5f0c,
+    0x6e7e, 0x7897, 0x8155, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x5f0c,
     0x4e10, 0x4e15, 0x4e2a, 0x4e31, 0x4e36, 0x4e3c, 0x4e3f, 0x4e42,
     0x4e56, 0x4e58, 0x4e82, 0x4e85, 0x8c6b, 0x4e8a, 0x8212, 0x5f0d,
@@ -797,14 +830,14 @@
     0x5029, 0x502c, 0x4ffe, 0x4fef, 0x5011, 0x5006, 0x5043, 0x5047,
     0x6703, 0x5055, 0x5050, 0x5048, 0x505a, 0x5056, 0x506c, 0x5078,
-    0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2, 0x003f, 0x003f, 0x003f,
+    0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 99 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x50c9, 0x50ca, 0x50b3, 0x50c2, 0x50d6, 0x50de, 0x50e5, 0x50ed,
     0x50e3, 0x50ee, 0x50f9, 0x50f5, 0x5109, 0x5101, 0x5102, 0x5116,
@@ -814,5 +847,5 @@
     0x5191, 0x5193, 0x5195, 0x5196, 0x51a4, 0x51a6, 0x51a2, 0x51a9,
     0x51aa, 0x51ab, 0x51b3, 0x51b1, 0x51b2, 0x51b0, 0x51b5, 0x51bd,
-    0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, 0x003f,
+    0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, 0x30fb,
     0x51f0, 0x51f5, 0x51fe, 0x5204, 0x520b, 0x5214, 0x520e, 0x5227,
     0x522a, 0x522e, 0x5233, 0x5239, 0x524f, 0x5244, 0x524b, 0x524c,
@@ -830,14 +863,14 @@
     0x5475, 0x548e, 0x545f, 0x5471, 0x5477, 0x5470, 0x5492, 0x547b,
     0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54c7, 0x54a2, 0x54b8,
-    0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8, 0x003f, 0x003f, 0x003f,
+    0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 9a */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x54ab, 0x54c2, 0x54a4, 0x54be, 0x54bc, 0x54d8, 0x54e5, 0x54e6,
     0x550f, 0x5514, 0x54fd, 0x54ee, 0x54ed, 0x54fa, 0x54e2, 0x5539,
@@ -847,5 +880,5 @@
     0x5587, 0x55a8, 0x55da, 0x55c5, 0x55df, 0x55c4, 0x55dc, 0x55e4,
     0x55d4, 0x5614, 0x55f7, 0x5616, 0x55fe, 0x55fd, 0x561b, 0x55f9,
-    0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, 0x003f,
+    0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, 0x30fb,
     0x566b, 0x5664, 0x562f, 0x566c, 0x566a, 0x5686, 0x5680, 0x568a,
     0x56a0, 0x5694, 0x568f, 0x56a5, 0x56ae, 0x56b6, 0x56b4, 0x56c2,
@@ -863,14 +896,14 @@
     0x590a, 0x5910, 0x591b, 0x68a6, 0x5925, 0x592c, 0x592d, 0x5932,
     0x5938, 0x593e, 0x7ad2, 0x5955, 0x5950, 0x594e, 0x595a, 0x5958,
-    0x5962, 0x5960, 0x5967, 0x596c, 0x5969, 0x003f, 0x003f, 0x003f,
+    0x5962, 0x5960, 0x5967, 0x596c, 0x5969, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 9b */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x5978, 0x5981, 0x599d, 0x4f5e, 0x4fab, 0x59a3, 0x59b2, 0x59c6,
     0x59e8, 0x59dc, 0x598d, 0x59d9, 0x59da, 0x5a25, 0x5a1f, 0x5a11,
@@ -880,5 +913,5 @@
     0x5b0b, 0x5b16, 0x5b32, 0x5ad0, 0x5b2a, 0x5b36, 0x5b3e, 0x5b43,
     0x5b45, 0x5b40, 0x5b51, 0x5b55, 0x5b5a, 0x5b5b, 0x5b65, 0x5b69,
-    0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, 0x003f,
+    0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, 0x30fb,
     0x5b83, 0x5ba6, 0x5bb8, 0x5bc3, 0x5bc7, 0x5bc9, 0x5bd4, 0x5bd0,
     0x5be4, 0x5be6, 0x5be2, 0x5bde, 0x5be5, 0x5beb, 0x5bf0, 0x5bf6,
@@ -896,14 +929,14 @@
     0x5e44, 0x5e43, 0x5e40, 0x5e4e, 0x5e57, 0x5e54, 0x5e5f, 0x5e62,
     0x5e64, 0x5e47, 0x5e75, 0x5e76, 0x5e7a, 0x9ebc, 0x5e7f, 0x5ea0,
-    0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf, 0x003f, 0x003f, 0x003f,
+    0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 9c */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x5ed6, 0x5ee3, 0x5edd, 0x5eda, 0x5edb, 0x5ee2, 0x5ee1, 0x5ee8,
     0x5ee9, 0x5eec, 0x5ef1, 0x5ef3, 0x5ef0, 0x5ef4, 0x5ef8, 0x5efe,
@@ -913,5 +946,5 @@
     0x5f82, 0x5f7f, 0x5f8a, 0x5f88, 0x5f91, 0x5f87, 0x5f9e, 0x5f99,
     0x5f98, 0x5fa0, 0x5fa8, 0x5fad, 0x5fbc, 0x5fd6, 0x5ffb, 0x5fe4,
-    0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, 0x003f,
+    0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, 0x30fb,
     0x6019, 0x6010, 0x6029, 0x600e, 0x6031, 0x601b, 0x6015, 0x602b,
     0x6026, 0x600f, 0x603a, 0x605a, 0x6041, 0x606a, 0x6077, 0x605f,
@@ -929,14 +962,14 @@
     0x61c6, 0x61ba, 0x61cb, 0x7f79, 0x61cd, 0x61e6, 0x61e3, 0x61f6,
     0x61fa, 0x61f4, 0x61ff, 0x61fd, 0x61fc, 0x61fe, 0x6200, 0x6208,
-    0x6209, 0x620d, 0x620c, 0x6214, 0x621b, 0x003f, 0x003f, 0x003f,
+    0x6209, 0x620d, 0x620c, 0x6214, 0x621b, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 9d */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x621e, 0x6221, 0x622a, 0x622e, 0x6230, 0x6232, 0x6233, 0x6241,
     0x624e, 0x625e, 0x6263, 0x625b, 0x6260, 0x6268, 0x627c, 0x6282,
@@ -946,5 +979,5 @@
     0x62ee, 0x62f1, 0x6327, 0x6302, 0x6308, 0x62ef, 0x62f5, 0x6350,
     0x633e, 0x634d, 0x641c, 0x634f, 0x6396, 0x638e, 0x6380, 0x63ab,
-    0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, 0x003f,
+    0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, 0x30fb,
     0x6369, 0x63be, 0x63e9, 0x63c0, 0x63c6, 0x63e3, 0x63c9, 0x63d2,
     0x63f6, 0x63c4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436,
@@ -962,14 +995,14 @@
     0x6641, 0x665e, 0x665d, 0x6664, 0x6667, 0x6668, 0x665f, 0x6662,
     0x6670, 0x6683, 0x6688, 0x668e, 0x6689, 0x6684, 0x6698, 0x669d,
-    0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc, 0x003f, 0x003f, 0x003f,
+    0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 9e */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x66c4, 0x66b8, 0x66d6, 0x66da, 0x66e0, 0x663f, 0x66e6, 0x66e9,
     0x66f0, 0x66f5, 0x66f7, 0x670f, 0x6716, 0x671e, 0x6726, 0x6727,
@@ -979,5 +1012,5 @@
     0x67ef, 0x67b4, 0x67ec, 0x67b3, 0x67e9, 0x67b8, 0x67e4, 0x67de,
     0x67dd, 0x67e2, 0x67ee, 0x67b9, 0x67ce, 0x67c6, 0x67e7, 0x6a9c,
-    0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, 0x003f,
+    0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, 0x30fb,
     0x68b3, 0x682b, 0x6859, 0x6863, 0x6877, 0x687f, 0x689f, 0x688f,
     0x68ad, 0x6894, 0x689d, 0x689b, 0x6883, 0x6aae, 0x68b9, 0x6874,
@@ -995,14 +1028,14 @@
     0x6ac1, 0x6a23, 0x6a13, 0x6a44, 0x6a0c, 0x6a72, 0x6a36, 0x6a78,
     0x6a47, 0x6a62, 0x6a59, 0x6a66, 0x6a48, 0x6a38, 0x6a22, 0x6a90,
-    0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3, 0x003f, 0x003f, 0x003f,
+    0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte 9f */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x6a97, 0x8617, 0x6abb, 0x6ac3, 0x6ac2, 0x6ab8, 0x6ab3, 0x6aac,
     0x6ade, 0x6ad1, 0x6adf, 0x6aaa, 0x6ada, 0x6aea, 0x6afb, 0x6b05,
@@ -1012,5 +1045,5 @@
     0x6b84, 0x6b83, 0x6b8d, 0x6b98, 0x6b95, 0x6b9e, 0x6ba4, 0x6baa,
     0x6bab, 0x6baf, 0x6bb2, 0x6bb1, 0x6bb3, 0x6bb7, 0x6bbc, 0x6bc6,
-    0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, 0x003f,
+    0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, 0x30fb,
     0x9ebe, 0x6c08, 0x6c13, 0x6c14, 0x6c1b, 0x6c24, 0x6c23, 0x6c5e,
     0x6c55, 0x6c62, 0x6c6a, 0x6c82, 0x6c8d, 0x6c9a, 0x6c81, 0x6c9b,
@@ -1028,14 +1061,14 @@
     0x6eaf, 0x6ec4, 0x6eb2, 0x6ed4, 0x6ed5, 0x6e8f, 0x6ea5, 0x6ec2,
     0x6e9f, 0x6f41, 0x6f11, 0x704c, 0x6eec, 0x6ef8, 0x6efe, 0x6f3f,
-    0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc, 0x003f, 0x003f, 0x003f,
+    0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e0 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x6f3e, 0x6f13, 0x6ef7, 0x6f86, 0x6f7a, 0x6f78, 0x6f81, 0x6f80,
     0x6f6f, 0x6f5b, 0x6ff3, 0x6f6d, 0x6f82, 0x6f7c, 0x6f58, 0x6f8e,
@@ -1045,5 +1078,5 @@
     0x6ffe, 0x701b, 0x701a, 0x6f74, 0x701d, 0x7018, 0x701f, 0x7030,
     0x703e, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70af, 0x70f1,
-    0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, 0x003f,
+    0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, 0x30fb,
     0x70d9, 0x7109, 0x70fd, 0x711c, 0x7119, 0x7165, 0x7155, 0x7188,
     0x7166, 0x7162, 0x714c, 0x7156, 0x716c, 0x718f, 0x71fb, 0x7184,
@@ -1061,14 +1094,14 @@
     0x7432, 0x743a, 0x7455, 0x743f, 0x745f, 0x7459, 0x7441, 0x745c,
     0x7469, 0x7470, 0x7463, 0x746a, 0x7476, 0x747e, 0x748b, 0x749e,
-    0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1, 0x003f, 0x003f, 0x003f,
+    0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e1 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x74e0, 0x74e3, 0x74e7, 0x74e9, 0x74ee, 0x74f2, 0x74f0, 0x74f1,
     0x74f8, 0x74f7, 0x7504, 0x7503, 0x7505, 0x750c, 0x750e, 0x750d,
@@ -1078,5 +1111,5 @@
     0x7589, 0x7582, 0x7594, 0x759a, 0x759d, 0x75a5, 0x75a3, 0x75c2,
     0x75b3, 0x75c3, 0x75b5, 0x75bd, 0x75b8, 0x75bc, 0x75b1, 0x75cd,
-    0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, 0x003f,
+    0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, 0x30fb,
     0x75fc, 0x7601, 0x75f0, 0x75fa, 0x75f2, 0x75f3, 0x760b, 0x760d,
     0x7609, 0x761f, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634,
@@ -1094,14 +1127,14 @@
     0x792a, 0x7845, 0x788e, 0x7874, 0x7886, 0x787c, 0x789a, 0x788c,
     0x78a3, 0x78b5, 0x78aa, 0x78af, 0x78d1, 0x78c6, 0x78cb, 0x78d4,
-    0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec, 0x003f, 0x003f, 0x003f,
+    0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e2 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x78e7, 0x78da, 0x78fd, 0x78f4, 0x7907, 0x7912, 0x7911, 0x7919,
     0x792c, 0x792b, 0x7940, 0x7960, 0x7957, 0x795f, 0x795a, 0x7955,
@@ -1111,5 +1144,5 @@
     0x7980, 0x7a31, 0x7a3b, 0x7a3e, 0x7a37, 0x7a43, 0x7a57, 0x7a49,
     0x7a61, 0x7a62, 0x7a69, 0x9f9d, 0x7a70, 0x7a79, 0x7a7d, 0x7a88,
-    0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, 0x003f,
+    0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, 0x30fb,
     0x7ab6, 0x7ac5, 0x7ac4, 0x7abf, 0x9083, 0x7ac7, 0x7aca, 0x7acd,
     0x7acf, 0x7ad5, 0x7ad3, 0x7ad9, 0x7ada, 0x7add, 0x7ae1, 0x7ae2,
@@ -1127,14 +1160,14 @@
     0x7ca8, 0x7cb3, 0x7cb2, 0x7cb1, 0x7cae, 0x7cb9, 0x7cbd, 0x7cc0,
     0x7cc5, 0x7cc2, 0x7cd8, 0x7cd2, 0x7cdc, 0x7ce2, 0x9b3b, 0x7cef,
-    0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06, 0x003f, 0x003f, 0x003f,
+    0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e3 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x7d02, 0x7d1c, 0x7d15, 0x7d0a, 0x7d45, 0x7d4b, 0x7d2e, 0x7d32,
     0x7d3f, 0x7d35, 0x7d46, 0x7d73, 0x7d56, 0x7d4e, 0x7d72, 0x7d68,
@@ -1144,5 +1177,5 @@
     0x7ddd, 0x7de4, 0x7dde, 0x7dfb, 0x7df2, 0x7de1, 0x7e05, 0x7e0a,
     0x7e23, 0x7e21, 0x7e12, 0x7e31, 0x7e1f, 0x7e09, 0x7e0b, 0x7e22,
-    0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, 0x003f,
+    0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, 0x30fb,
     0x7e32, 0x7e3a, 0x7e67, 0x7e5d, 0x7e56, 0x7e5e, 0x7e59, 0x7e5a,
     0x7e79, 0x7e6a, 0x7e69, 0x7e7c, 0x7e7b, 0x7e83, 0x7dd5, 0x7e7d,
@@ -1160,14 +1193,14 @@
     0x809b, 0x8093, 0x809a, 0x80ad, 0x5190, 0x80ac, 0x80db, 0x80e5,
     0x80d9, 0x80dd, 0x80c4, 0x80da, 0x80d6, 0x8109, 0x80ef, 0x80f1,
-    0x811b, 0x8129, 0x8123, 0x812f, 0x814b, 0x003f, 0x003f, 0x003f,
+    0x811b, 0x8129, 0x8123, 0x812f, 0x814b, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e4 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x968b, 0x8146, 0x813e, 0x8153, 0x8151, 0x80fc, 0x8171, 0x816e,
     0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818a, 0x8180, 0x8182,
@@ -1177,5 +1210,5 @@
     0x81e7, 0x81fa, 0x81fb, 0x81fe, 0x8201, 0x8202, 0x8205, 0x8207,
     0x820a, 0x820d, 0x8210, 0x8216, 0x8229, 0x822b, 0x8238, 0x8233,
-    0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, 0x003f,
+    0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, 0x30fb,
     0x8262, 0x8268, 0x826a, 0x826b, 0x822e, 0x8271, 0x8277, 0x8278,
     0x827e, 0x828d, 0x8292, 0x82ab, 0x829f, 0x82bb, 0x82ac, 0x82e1,
@@ -1193,14 +1226,14 @@
     0x84bb, 0x84da, 0x84d0, 0x84c1, 0x84c6, 0x84d6, 0x84a1, 0x8521,
     0x84ff, 0x84f4, 0x8517, 0x8518, 0x852c, 0x851f, 0x8515, 0x8514,
-    0x84fc, 0x8540, 0x8563, 0x8558, 0x8548, 0x003f, 0x003f, 0x003f,
+    0x84fc, 0x8540, 0x8563, 0x8558, 0x8548, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e5 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x8541, 0x8602, 0x854b, 0x8555, 0x8580, 0x85a4, 0x8588, 0x8591,
     0x858a, 0x85a8, 0x856d, 0x8594, 0x859b, 0x85ea, 0x8587, 0x859c,
@@ -1210,5 +1243,5 @@
     0x4e55, 0x8654, 0x865f, 0x8667, 0x8671, 0x8693, 0x86a3, 0x86a9,
     0x86aa, 0x868b, 0x868c, 0x86b6, 0x86af, 0x86c4, 0x86c6, 0x86b0,
-    0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, 0x003f,
+    0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, 0x30fb,
     0x86df, 0x86db, 0x86ef, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703,
     0x86fb, 0x8711, 0x8709, 0x870d, 0x86f9, 0x870a, 0x8734, 0x873f,
@@ -1226,14 +1259,14 @@
     0x88f4, 0x88e8, 0x88f2, 0x8904, 0x890c, 0x890a, 0x8913, 0x8943,
     0x891e, 0x8925, 0x892a, 0x892b, 0x8941, 0x8944, 0x893b, 0x8936,
-    0x8938, 0x894c, 0x891d, 0x8960, 0x895e, 0x003f, 0x003f, 0x003f,
+    0x8938, 0x894c, 0x891d, 0x8960, 0x895e, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e6 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x8966, 0x8964, 0x896d, 0x896a, 0x896f, 0x8974, 0x8977, 0x897e,
     0x8983, 0x8988, 0x898a, 0x8993, 0x8998, 0x89a1, 0x89a9, 0x89a6,
@@ -1243,5 +1276,5 @@
     0x8a46, 0x8a48, 0x8a7c, 0x8a6d, 0x8a6c, 0x8a62, 0x8a85, 0x8a82,
     0x8a84, 0x8aa8, 0x8aa1, 0x8a91, 0x8aa5, 0x8aa6, 0x8a9a, 0x8aa3,
-    0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, 0x003f,
+    0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, 0x30fb,
     0x8ae4, 0x8af1, 0x8b14, 0x8ae0, 0x8ae2, 0x8af7, 0x8ade, 0x8adb,
     0x8b0c, 0x8b07, 0x8b1a, 0x8ae1, 0x8b16, 0x8b10, 0x8b17, 0x8b20,
@@ -1259,14 +1292,14 @@
     0x8dd6, 0x8dcc, 0x8ddb, 0x8dcb, 0x8dea, 0x8deb, 0x8ddf, 0x8de3,
     0x8dfc, 0x8e08, 0x8e09, 0x8dff, 0x8e1d, 0x8e1e, 0x8e10, 0x8e1f,
-    0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a, 0x003f, 0x003f, 0x003f,
+    0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e7 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x8e47, 0x8e49, 0x8e4c, 0x8e50, 0x8e48, 0x8e59, 0x8e64, 0x8e60,
     0x8e2a, 0x8e63, 0x8e55, 0x8e76, 0x8e72, 0x8e7c, 0x8e81, 0x8e87,
@@ -1276,5 +1309,5 @@
     0x8f0a, 0x8f05, 0x8f15, 0x8f12, 0x8f19, 0x8f13, 0x8f1c, 0x8f1f,
     0x8f1b, 0x8f0c, 0x8f26, 0x8f33, 0x8f3b, 0x8f39, 0x8f45, 0x8f42,
-    0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, 0x003f,
+    0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, 0x30fb,
     0x8f62, 0x8f63, 0x8f64, 0x8f9c, 0x8f9f, 0x8fa3, 0x8fad, 0x8faf,
     0x8fb7, 0x8fda, 0x8fe5, 0x8fe2, 0x8fea, 0x8fef, 0x9087, 0x8ff4,
@@ -1292,14 +1325,14 @@
     0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923f, 0x924b, 0x9250,
     0x929c, 0x9296, 0x9293, 0x929b, 0x925a, 0x92cf, 0x92b9, 0x92b7,
-    0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e, 0x003f, 0x003f, 0x003f,
+    0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e8 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x9319, 0x9322, 0x931a, 0x9323, 0x933a, 0x9335, 0x933b, 0x935c,
     0x9360, 0x937c, 0x936e, 0x9356, 0x93b0, 0x93ac, 0x93ad, 0x9394,
@@ -1309,5 +1342,5 @@
     0x9444, 0x945b, 0x9460, 0x9462, 0x945e, 0x946a, 0x9229, 0x9470,
     0x9475, 0x9477, 0x947d, 0x945a, 0x947c, 0x947e, 0x9481, 0x947f,
-    0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, 0x003f,
+    0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, 0x30fb,
     0x95a0, 0x95a8, 0x95a7, 0x95ad, 0x95bc, 0x95bb, 0x95b9, 0x95be,
     0x95ca, 0x6ff6, 0x95c3, 0x95cd, 0x95cc, 0x95d5, 0x95d4, 0x95d6,
@@ -1325,14 +1358,14 @@
     0x97cb, 0x97dc, 0x97ed, 0x9f4f, 0x97f2, 0x7adf, 0x97f6, 0x97f5,
     0x980f, 0x980c, 0x9838, 0x9824, 0x9821, 0x9837, 0x983d, 0x9846,
-    0x984f, 0x984b, 0x986b, 0x986f, 0x9870, 0x003f, 0x003f, 0x003f,
+    0x984f, 0x984b, 0x986b, 0x986f, 0x9870, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte e9 */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x9871, 0x9874, 0x9873, 0x98aa, 0x98af, 0x98b1, 0x98b6, 0x98c4,
     0x98c3, 0x98c6, 0x98e9, 0x98eb, 0x9903, 0x9909, 0x9912, 0x9914,
@@ -1342,5 +1375,5 @@
     0x99bc, 0x99df, 0x99db, 0x99dd, 0x99d8, 0x99d1, 0x99ed, 0x99ee,
     0x99f1, 0x99f2, 0x99fb, 0x99f8, 0x9a01, 0x9a0f, 0x9a05, 0x99e2,
-    0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, 0x003f,
+    0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, 0x30fb,
     0x9a3e, 0x9a55, 0x9a4d, 0x9a5b, 0x9a57, 0x9a5f, 0x9a62, 0x9a65,
     0x9a64, 0x9a69, 0x9a6b, 0x9a6a, 0x9aad, 0x9ab0, 0x9abc, 0x9ac0,
@@ -1358,14 +1391,14 @@
     0x9ce7, 0x9cec, 0x9cf0, 0x9d09, 0x9d08, 0x9ceb, 0x9d03, 0x9d06,
     0x9d2a, 0x9d26, 0x9daf, 0x9d23, 0x9d1f, 0x9d44, 0x9d15, 0x9d12,
-    0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48, 0x003f, 0x003f, 0x003f,
+    0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte ea */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x9d5d, 0x9d5e, 0x9d64, 0x9d51, 0x9d50, 0x9d59, 0x9d72, 0x9d89,
     0x9d87, 0x9dab, 0x9d6f, 0x9d7a, 0x9d9a, 0x9da4, 0x9da9, 0x9db2,
@@ -1375,30 +1408,96 @@
     0x9e8c, 0x9e92, 0x9e95, 0x9e91, 0x9e9d, 0x9ea5, 0x9ea9, 0x9eb8,
     0x9eaa, 0x9ead, 0x9761, 0x9ecc, 0x9ece, 0x9ecf, 0x9ed0, 0x9ed4,
-    0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, 0x003f,
+    0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, 0x30fb,
     0x9ef4, 0x9ef6, 0x9ef7, 0x9ef9, 0x9efb, 0x9efc, 0x9efd, 0x9f07,
     0x9f08, 0x76b7, 0x9f15, 0x9f21, 0x9f2c, 0x9f3e, 0x9f4a, 0x9f52,
     0x9f54, 0x9f63, 0x9f5f, 0x9f60, 0x9f61, 0x9f66, 0x9f67, 0x9f6c,
     0x9f6a, 0x9f77, 0x9f72, 0x9f76, 0x9f95, 0x9f9c, 0x9fa0, 0x582f,
-    0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte eb */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte ec */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte ed */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x7e8a, 0x891c, 0x9348, 0x9288, 0x84dc, 0x4fc9, 0x70bb, 0x6631,
     0x68c8, 0x92f9, 0x66fb, 0x5f45, 0x4e28, 0x4ee1, 0x4efc, 0x4f00,
@@ -1408,5 +1507,5 @@
     0x529c, 0x52a6, 0x52c0, 0x52db, 0x5300, 0x5307, 0x5324, 0x5372,
     0x5393, 0x53b2, 0x53dd, 0xfa0e, 0x549c, 0x548a, 0x54a9, 0x54ff,
-    0x5586, 0x5759, 0x5765, 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0x003f,
+    0x5586, 0x5759, 0x5765, 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0x30fb,
     0xfa10, 0x589e, 0x58b2, 0x590b, 0x5953, 0x595b, 0x595d, 0x5963,
     0x59a4, 0x59ba, 0x5b56, 0x5bc0, 0x752f, 0x5bd8, 0x5bec, 0x5c1e,
@@ -1424,14 +1523,14 @@
     0x6e5c, 0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005,
     0x7007, 0x7028, 0x7085, 0x70ab, 0x710f, 0x7104, 0x715c, 0x7146,
-    0x7147, 0xfa15, 0x71c1, 0x71fe, 0x72b1, 0x003f, 0x003f, 0x003f,
+    0x7147, 0xfa15, 0x71c1, 0x71fe, 0x72b1, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte ee */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x72be, 0x7324, 0xfa16, 0x7377, 0x73bd, 0x73c9, 0x73d6, 0x73e3,
     0x73d2, 0x7407, 0x73f5, 0x7426, 0x742a, 0x7429, 0x742e, 0x7462,
@@ -1441,5 +1540,5 @@
     0x7ae7, 0xfa1c, 0x7aeb, 0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7,
     0x7da0, 0x7dd6, 0x7e52, 0x7f47, 0x7fa1, 0xfa1e, 0x8301, 0x8362,
-    0x837f, 0x83c7, 0x83f6, 0x8448, 0x84b4, 0x8553, 0x8559, 0x003f,
+    0x837f, 0x83c7, 0x83f6, 0x8448, 0x84b4, 0x8553, 0x8559, 0x30fb,
     0x856b, 0xfa1f, 0x85b0, 0xfa20, 0xfa21, 0x8807, 0x88f5, 0x8a12,
     0x8a37, 0x8a79, 0x8aa7, 0x8abe, 0x8adf, 0xfa22, 0x8af6, 0x8b53,
@@ -1455,16 +1554,379 @@
     0x9857, 0x9865, 0xfa2a, 0xfa2b, 0x9927, 0xfa2c, 0x999e, 0x9a4e,
     0x9ad9, 0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00,
-    0x9d70, 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0x003f, 0x003f, 0x2170,
+    0x9d70, 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0x30fb, 0x30fb, 0x2170,
     0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178,
-    0x2179, 0xffe2, 0xffe4, 0xff07, 0xff02, 0x003f, 0x003f, 0x003f,
+    0x2179, 0xffe2, 0xffe4, 0xff07, 0xff02, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte ef */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f0 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, 0xe007,
+    0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, 0xe00f,
+    0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, 0xe017,
+    0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, 0xe01f,
+    0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026, 0xe027,
+    0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e, 0xe02f,
+    0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036, 0xe037,
+    0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e, 0x30fb,
+    0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, 0xe046,
+    0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, 0xe04e,
+    0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, 0xe056,
+    0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, 0xe05e,
+    0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064, 0xe065, 0xe066,
+    0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c, 0xe06d, 0xe06e,
+    0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074, 0xe075, 0xe076,
+    0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c, 0xe07d, 0xe07e,
+    0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084, 0xe085, 0xe086,
+    0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, 0xe08d, 0xe08e,
+    0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, 0xe095, 0xe096,
+    0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, 0xe09d, 0xe09e,
+    0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4, 0xe0a5, 0xe0a6,
+    0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac, 0xe0ad, 0xe0ae,
+    0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4, 0xe0b5, 0xe0b6,
+    0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f1 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe0bc, 0xe0bd, 0xe0be, 0xe0bf, 0xe0c0, 0xe0c1, 0xe0c2, 0xe0c3,
+    0xe0c4, 0xe0c5, 0xe0c6, 0xe0c7, 0xe0c8, 0xe0c9, 0xe0ca, 0xe0cb,
+    0xe0cc, 0xe0cd, 0xe0ce, 0xe0cf, 0xe0d0, 0xe0d1, 0xe0d2, 0xe0d3,
+    0xe0d4, 0xe0d5, 0xe0d6, 0xe0d7, 0xe0d8, 0xe0d9, 0xe0da, 0xe0db,
+    0xe0dc, 0xe0dd, 0xe0de, 0xe0df, 0xe0e0, 0xe0e1, 0xe0e2, 0xe0e3,
+    0xe0e4, 0xe0e5, 0xe0e6, 0xe0e7, 0xe0e8, 0xe0e9, 0xe0ea, 0xe0eb,
+    0xe0ec, 0xe0ed, 0xe0ee, 0xe0ef, 0xe0f0, 0xe0f1, 0xe0f2, 0xe0f3,
+    0xe0f4, 0xe0f5, 0xe0f6, 0xe0f7, 0xe0f8, 0xe0f9, 0xe0fa, 0x30fb,
+    0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, 0xe100, 0xe101, 0xe102,
+    0xe103, 0xe104, 0xe105, 0xe106, 0xe107, 0xe108, 0xe109, 0xe10a,
+    0xe10b, 0xe10c, 0xe10d, 0xe10e, 0xe10f, 0xe110, 0xe111, 0xe112,
+    0xe113, 0xe114, 0xe115, 0xe116, 0xe117, 0xe118, 0xe119, 0xe11a,
+    0xe11b, 0xe11c, 0xe11d, 0xe11e, 0xe11f, 0xe120, 0xe121, 0xe122,
+    0xe123, 0xe124, 0xe125, 0xe126, 0xe127, 0xe128, 0xe129, 0xe12a,
+    0xe12b, 0xe12c, 0xe12d, 0xe12e, 0xe12f, 0xe130, 0xe131, 0xe132,
+    0xe133, 0xe134, 0xe135, 0xe136, 0xe137, 0xe138, 0xe139, 0xe13a,
+    0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, 0xe140, 0xe141, 0xe142,
+    0xe143, 0xe144, 0xe145, 0xe146, 0xe147, 0xe148, 0xe149, 0xe14a,
+    0xe14b, 0xe14c, 0xe14d, 0xe14e, 0xe14f, 0xe150, 0xe151, 0xe152,
+    0xe153, 0xe154, 0xe155, 0xe156, 0xe157, 0xe158, 0xe159, 0xe15a,
+    0xe15b, 0xe15c, 0xe15d, 0xe15e, 0xe15f, 0xe160, 0xe161, 0xe162,
+    0xe163, 0xe164, 0xe165, 0xe166, 0xe167, 0xe168, 0xe169, 0xe16a,
+    0xe16b, 0xe16c, 0xe16d, 0xe16e, 0xe16f, 0xe170, 0xe171, 0xe172,
+    0xe173, 0xe174, 0xe175, 0xe176, 0xe177, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f2 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe178, 0xe179, 0xe17a, 0xe17b, 0xe17c, 0xe17d, 0xe17e, 0xe17f,
+    0xe180, 0xe181, 0xe182, 0xe183, 0xe184, 0xe185, 0xe186, 0xe187,
+    0xe188, 0xe189, 0xe18a, 0xe18b, 0xe18c, 0xe18d, 0xe18e, 0xe18f,
+    0xe190, 0xe191, 0xe192, 0xe193, 0xe194, 0xe195, 0xe196, 0xe197,
+    0xe198, 0xe199, 0xe19a, 0xe19b, 0xe19c, 0xe19d, 0xe19e, 0xe19f,
+    0xe1a0, 0xe1a1, 0xe1a2, 0xe1a3, 0xe1a4, 0xe1a5, 0xe1a6, 0xe1a7,
+    0xe1a8, 0xe1a9, 0xe1aa, 0xe1ab, 0xe1ac, 0xe1ad, 0xe1ae, 0xe1af,
+    0xe1b0, 0xe1b1, 0xe1b2, 0xe1b3, 0xe1b4, 0xe1b5, 0xe1b6, 0x30fb,
+    0xe1b7, 0xe1b8, 0xe1b9, 0xe1ba, 0xe1bb, 0xe1bc, 0xe1bd, 0xe1be,
+    0xe1bf, 0xe1c0, 0xe1c1, 0xe1c2, 0xe1c3, 0xe1c4, 0xe1c5, 0xe1c6,
+    0xe1c7, 0xe1c8, 0xe1c9, 0xe1ca, 0xe1cb, 0xe1cc, 0xe1cd, 0xe1ce,
+    0xe1cf, 0xe1d0, 0xe1d1, 0xe1d2, 0xe1d3, 0xe1d4, 0xe1d5, 0xe1d6,
+    0xe1d7, 0xe1d8, 0xe1d9, 0xe1da, 0xe1db, 0xe1dc, 0xe1dd, 0xe1de,
+    0xe1df, 0xe1e0, 0xe1e1, 0xe1e2, 0xe1e3, 0xe1e4, 0xe1e5, 0xe1e6,
+    0xe1e7, 0xe1e8, 0xe1e9, 0xe1ea, 0xe1eb, 0xe1ec, 0xe1ed, 0xe1ee,
+    0xe1ef, 0xe1f0, 0xe1f1, 0xe1f2, 0xe1f3, 0xe1f4, 0xe1f5, 0xe1f6,
+    0xe1f7, 0xe1f8, 0xe1f9, 0xe1fa, 0xe1fb, 0xe1fc, 0xe1fd, 0xe1fe,
+    0xe1ff, 0xe200, 0xe201, 0xe202, 0xe203, 0xe204, 0xe205, 0xe206,
+    0xe207, 0xe208, 0xe209, 0xe20a, 0xe20b, 0xe20c, 0xe20d, 0xe20e,
+    0xe20f, 0xe210, 0xe211, 0xe212, 0xe213, 0xe214, 0xe215, 0xe216,
+    0xe217, 0xe218, 0xe219, 0xe21a, 0xe21b, 0xe21c, 0xe21d, 0xe21e,
+    0xe21f, 0xe220, 0xe221, 0xe222, 0xe223, 0xe224, 0xe225, 0xe226,
+    0xe227, 0xe228, 0xe229, 0xe22a, 0xe22b, 0xe22c, 0xe22d, 0xe22e,
+    0xe22f, 0xe230, 0xe231, 0xe232, 0xe233, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f3 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe234, 0xe235, 0xe236, 0xe237, 0xe238, 0xe239, 0xe23a, 0xe23b,
+    0xe23c, 0xe23d, 0xe23e, 0xe23f, 0xe240, 0xe241, 0xe242, 0xe243,
+    0xe244, 0xe245, 0xe246, 0xe247, 0xe248, 0xe249, 0xe24a, 0xe24b,
+    0xe24c, 0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, 0xe252, 0xe253,
+    0xe254, 0xe255, 0xe256, 0xe257, 0xe258, 0xe259, 0xe25a, 0xe25b,
+    0xe25c, 0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, 0xe262, 0xe263,
+    0xe264, 0xe265, 0xe266, 0xe267, 0xe268, 0xe269, 0xe26a, 0xe26b,
+    0xe26c, 0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, 0xe272, 0x30fb,
+    0xe273, 0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, 0xe27a,
+    0xe27b, 0xe27c, 0xe27d, 0xe27e, 0xe27f, 0xe280, 0xe281, 0xe282,
+    0xe283, 0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a,
+    0xe28b, 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0xe292,
+    0xe293, 0xe294, 0xe295, 0xe296, 0xe297, 0xe298, 0xe299, 0xe29a,
+    0xe29b, 0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0, 0xe2a1, 0xe2a2,
+    0xe2a3, 0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, 0xe2a8, 0xe2a9, 0xe2aa,
+    0xe2ab, 0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, 0xe2b0, 0xe2b1, 0xe2b2,
+    0xe2b3, 0xe2b4, 0xe2b5, 0xe2b6, 0xe2b7, 0xe2b8, 0xe2b9, 0xe2ba,
+    0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, 0xe2bf, 0xe2c0, 0xe2c1, 0xe2c2,
+    0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, 0xe2c8, 0xe2c9, 0xe2ca,
+    0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, 0xe2d0, 0xe2d1, 0xe2d2,
+    0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, 0xe2d8, 0xe2d9, 0xe2da,
+    0xe2db, 0xe2dc, 0xe2dd, 0xe2de, 0xe2df, 0xe2e0, 0xe2e1, 0xe2e2,
+    0xe2e3, 0xe2e4, 0xe2e5, 0xe2e6, 0xe2e7, 0xe2e8, 0xe2e9, 0xe2ea,
+    0xe2eb, 0xe2ec, 0xe2ed, 0xe2ee, 0xe2ef, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f4 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe2f0, 0xe2f1, 0xe2f2, 0xe2f3, 0xe2f4, 0xe2f5, 0xe2f6, 0xe2f7,
+    0xe2f8, 0xe2f9, 0xe2fa, 0xe2fb, 0xe2fc, 0xe2fd, 0xe2fe, 0xe2ff,
+    0xe300, 0xe301, 0xe302, 0xe303, 0xe304, 0xe305, 0xe306, 0xe307,
+    0xe308, 0xe309, 0xe30a, 0xe30b, 0xe30c, 0xe30d, 0xe30e, 0xe30f,
+    0xe310, 0xe311, 0xe312, 0xe313, 0xe314, 0xe315, 0xe316, 0xe317,
+    0xe318, 0xe319, 0xe31a, 0xe31b, 0xe31c, 0xe31d, 0xe31e, 0xe31f,
+    0xe320, 0xe321, 0xe322, 0xe323, 0xe324, 0xe325, 0xe326, 0xe327,
+    0xe328, 0xe329, 0xe32a, 0xe32b, 0xe32c, 0xe32d, 0xe32e, 0x30fb,
+    0xe32f, 0xe330, 0xe331, 0xe332, 0xe333, 0xe334, 0xe335, 0xe336,
+    0xe337, 0xe338, 0xe339, 0xe33a, 0xe33b, 0xe33c, 0xe33d, 0xe33e,
+    0xe33f, 0xe340, 0xe341, 0xe342, 0xe343, 0xe344, 0xe345, 0xe346,
+    0xe347, 0xe348, 0xe349, 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0xe34e,
+    0xe34f, 0xe350, 0xe351, 0xe352, 0xe353, 0xe354, 0xe355, 0xe356,
+    0xe357, 0xe358, 0xe359, 0xe35a, 0xe35b, 0xe35c, 0xe35d, 0xe35e,
+    0xe35f, 0xe360, 0xe361, 0xe362, 0xe363, 0xe364, 0xe365, 0xe366,
+    0xe367, 0xe368, 0xe369, 0xe36a, 0xe36b, 0xe36c, 0xe36d, 0xe36e,
+    0xe36f, 0xe370, 0xe371, 0xe372, 0xe373, 0xe374, 0xe375, 0xe376,
+    0xe377, 0xe378, 0xe379, 0xe37a, 0xe37b, 0xe37c, 0xe37d, 0xe37e,
+    0xe37f, 0xe380, 0xe381, 0xe382, 0xe383, 0xe384, 0xe385, 0xe386,
+    0xe387, 0xe388, 0xe389, 0xe38a, 0xe38b, 0xe38c, 0xe38d, 0xe38e,
+    0xe38f, 0xe390, 0xe391, 0xe392, 0xe393, 0xe394, 0xe395, 0xe396,
+    0xe397, 0xe398, 0xe399, 0xe39a, 0xe39b, 0xe39c, 0xe39d, 0xe39e,
+    0xe39f, 0xe3a0, 0xe3a1, 0xe3a2, 0xe3a3, 0xe3a4, 0xe3a5, 0xe3a6,
+    0xe3a7, 0xe3a8, 0xe3a9, 0xe3aa, 0xe3ab, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f5 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe3ac, 0xe3ad, 0xe3ae, 0xe3af, 0xe3b0, 0xe3b1, 0xe3b2, 0xe3b3,
+    0xe3b4, 0xe3b5, 0xe3b6, 0xe3b7, 0xe3b8, 0xe3b9, 0xe3ba, 0xe3bb,
+    0xe3bc, 0xe3bd, 0xe3be, 0xe3bf, 0xe3c0, 0xe3c1, 0xe3c2, 0xe3c3,
+    0xe3c4, 0xe3c5, 0xe3c6, 0xe3c7, 0xe3c8, 0xe3c9, 0xe3ca, 0xe3cb,
+    0xe3cc, 0xe3cd, 0xe3ce, 0xe3cf, 0xe3d0, 0xe3d1, 0xe3d2, 0xe3d3,
+    0xe3d4, 0xe3d5, 0xe3d6, 0xe3d7, 0xe3d8, 0xe3d9, 0xe3da, 0xe3db,
+    0xe3dc, 0xe3dd, 0xe3de, 0xe3df, 0xe3e0, 0xe3e1, 0xe3e2, 0xe3e3,
+    0xe3e4, 0xe3e5, 0xe3e6, 0xe3e7, 0xe3e8, 0xe3e9, 0xe3ea, 0x30fb,
+    0xe3eb, 0xe3ec, 0xe3ed, 0xe3ee, 0xe3ef, 0xe3f0, 0xe3f1, 0xe3f2,
+    0xe3f3, 0xe3f4, 0xe3f5, 0xe3f6, 0xe3f7, 0xe3f8, 0xe3f9, 0xe3fa,
+    0xe3fb, 0xe3fc, 0xe3fd, 0xe3fe, 0xe3ff, 0xe400, 0xe401, 0xe402,
+    0xe403, 0xe404, 0xe405, 0xe406, 0xe407, 0xe408, 0xe409, 0xe40a,
+    0xe40b, 0xe40c, 0xe40d, 0xe40e, 0xe40f, 0xe410, 0xe411, 0xe412,
+    0xe413, 0xe414, 0xe415, 0xe416, 0xe417, 0xe418, 0xe419, 0xe41a,
+    0xe41b, 0xe41c, 0xe41d, 0xe41e, 0xe41f, 0xe420, 0xe421, 0xe422,
+    0xe423, 0xe424, 0xe425, 0xe426, 0xe427, 0xe428, 0xe429, 0xe42a,
+    0xe42b, 0xe42c, 0xe42d, 0xe42e, 0xe42f, 0xe430, 0xe431, 0xe432,
+    0xe433, 0xe434, 0xe435, 0xe436, 0xe437, 0xe438, 0xe439, 0xe43a,
+    0xe43b, 0xe43c, 0xe43d, 0xe43e, 0xe43f, 0xe440, 0xe441, 0xe442,
+    0xe443, 0xe444, 0xe445, 0xe446, 0xe447, 0xe448, 0xe449, 0xe44a,
+    0xe44b, 0xe44c, 0xe44d, 0xe44e, 0xe44f, 0xe450, 0xe451, 0xe452,
+    0xe453, 0xe454, 0xe455, 0xe456, 0xe457, 0xe458, 0xe459, 0xe45a,
+    0xe45b, 0xe45c, 0xe45d, 0xe45e, 0xe45f, 0xe460, 0xe461, 0xe462,
+    0xe463, 0xe464, 0xe465, 0xe466, 0xe467, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f6 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe468, 0xe469, 0xe46a, 0xe46b, 0xe46c, 0xe46d, 0xe46e, 0xe46f,
+    0xe470, 0xe471, 0xe472, 0xe473, 0xe474, 0xe475, 0xe476, 0xe477,
+    0xe478, 0xe479, 0xe47a, 0xe47b, 0xe47c, 0xe47d, 0xe47e, 0xe47f,
+    0xe480, 0xe481, 0xe482, 0xe483, 0xe484, 0xe485, 0xe486, 0xe487,
+    0xe488, 0xe489, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, 0xe48f,
+    0xe490, 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, 0xe497,
+    0xe498, 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, 0xe49f,
+    0xe4a0, 0xe4a1, 0xe4a2, 0xe4a3, 0xe4a4, 0xe4a5, 0xe4a6, 0x30fb,
+    0xe4a7, 0xe4a8, 0xe4a9, 0xe4aa, 0xe4ab, 0xe4ac, 0xe4ad, 0xe4ae,
+    0xe4af, 0xe4b0, 0xe4b1, 0xe4b2, 0xe4b3, 0xe4b4, 0xe4b5, 0xe4b6,
+    0xe4b7, 0xe4b8, 0xe4b9, 0xe4ba, 0xe4bb, 0xe4bc, 0xe4bd, 0xe4be,
+    0xe4bf, 0xe4c0, 0xe4c1, 0xe4c2, 0xe4c3, 0xe4c4, 0xe4c5, 0xe4c6,
+    0xe4c7, 0xe4c8, 0xe4c9, 0xe4ca, 0xe4cb, 0xe4cc, 0xe4cd, 0xe4ce,
+    0xe4cf, 0xe4d0, 0xe4d1, 0xe4d2, 0xe4d3, 0xe4d4, 0xe4d5, 0xe4d6,
+    0xe4d7, 0xe4d8, 0xe4d9, 0xe4da, 0xe4db, 0xe4dc, 0xe4dd, 0xe4de,
+    0xe4df, 0xe4e0, 0xe4e1, 0xe4e2, 0xe4e3, 0xe4e4, 0xe4e5, 0xe4e6,
+    0xe4e7, 0xe4e8, 0xe4e9, 0xe4ea, 0xe4eb, 0xe4ec, 0xe4ed, 0xe4ee,
+    0xe4ef, 0xe4f0, 0xe4f1, 0xe4f2, 0xe4f3, 0xe4f4, 0xe4f5, 0xe4f6,
+    0xe4f7, 0xe4f8, 0xe4f9, 0xe4fa, 0xe4fb, 0xe4fc, 0xe4fd, 0xe4fe,
+    0xe4ff, 0xe500, 0xe501, 0xe502, 0xe503, 0xe504, 0xe505, 0xe506,
+    0xe507, 0xe508, 0xe509, 0xe50a, 0xe50b, 0xe50c, 0xe50d, 0xe50e,
+    0xe50f, 0xe510, 0xe511, 0xe512, 0xe513, 0xe514, 0xe515, 0xe516,
+    0xe517, 0xe518, 0xe519, 0xe51a, 0xe51b, 0xe51c, 0xe51d, 0xe51e,
+    0xe51f, 0xe520, 0xe521, 0xe522, 0xe523, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f7 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe524, 0xe525, 0xe526, 0xe527, 0xe528, 0xe529, 0xe52a, 0xe52b,
+    0xe52c, 0xe52d, 0xe52e, 0xe52f, 0xe530, 0xe531, 0xe532, 0xe533,
+    0xe534, 0xe535, 0xe536, 0xe537, 0xe538, 0xe539, 0xe53a, 0xe53b,
+    0xe53c, 0xe53d, 0xe53e, 0xe53f, 0xe540, 0xe541, 0xe542, 0xe543,
+    0xe544, 0xe545, 0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b,
+    0xe54c, 0xe54d, 0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553,
+    0xe554, 0xe555, 0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b,
+    0xe55c, 0xe55d, 0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0x30fb,
+    0xe563, 0xe564, 0xe565, 0xe566, 0xe567, 0xe568, 0xe569, 0xe56a,
+    0xe56b, 0xe56c, 0xe56d, 0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572,
+    0xe573, 0xe574, 0xe575, 0xe576, 0xe577, 0xe578, 0xe579, 0xe57a,
+    0xe57b, 0xe57c, 0xe57d, 0xe57e, 0xe57f, 0xe580, 0xe581, 0xe582,
+    0xe583, 0xe584, 0xe585, 0xe586, 0xe587, 0xe588, 0xe589, 0xe58a,
+    0xe58b, 0xe58c, 0xe58d, 0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592,
+    0xe593, 0xe594, 0xe595, 0xe596, 0xe597, 0xe598, 0xe599, 0xe59a,
+    0xe59b, 0xe59c, 0xe59d, 0xe59e, 0xe59f, 0xe5a0, 0xe5a1, 0xe5a2,
+    0xe5a3, 0xe5a4, 0xe5a5, 0xe5a6, 0xe5a7, 0xe5a8, 0xe5a9, 0xe5aa,
+    0xe5ab, 0xe5ac, 0xe5ad, 0xe5ae, 0xe5af, 0xe5b0, 0xe5b1, 0xe5b2,
+    0xe5b3, 0xe5b4, 0xe5b5, 0xe5b6, 0xe5b7, 0xe5b8, 0xe5b9, 0xe5ba,
+    0xe5bb, 0xe5bc, 0xe5bd, 0xe5be, 0xe5bf, 0xe5c0, 0xe5c1, 0xe5c2,
+    0xe5c3, 0xe5c4, 0xe5c5, 0xe5c6, 0xe5c7, 0xe5c8, 0xe5c9, 0xe5ca,
+    0xe5cb, 0xe5cc, 0xe5cd, 0xe5ce, 0xe5cf, 0xe5d0, 0xe5d1, 0xe5d2,
+    0xe5d3, 0xe5d4, 0xe5d5, 0xe5d6, 0xe5d7, 0xe5d8, 0xe5d9, 0xe5da,
+    0xe5db, 0xe5dc, 0xe5dd, 0xe5de, 0xe5df, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f8 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe5e0, 0xe5e1, 0xe5e2, 0xe5e3, 0xe5e4, 0xe5e5, 0xe5e6, 0xe5e7,
+    0xe5e8, 0xe5e9, 0xe5ea, 0xe5eb, 0xe5ec, 0xe5ed, 0xe5ee, 0xe5ef,
+    0xe5f0, 0xe5f1, 0xe5f2, 0xe5f3, 0xe5f4, 0xe5f5, 0xe5f6, 0xe5f7,
+    0xe5f8, 0xe5f9, 0xe5fa, 0xe5fb, 0xe5fc, 0xe5fd, 0xe5fe, 0xe5ff,
+    0xe600, 0xe601, 0xe602, 0xe603, 0xe604, 0xe605, 0xe606, 0xe607,
+    0xe608, 0xe609, 0xe60a, 0xe60b, 0xe60c, 0xe60d, 0xe60e, 0xe60f,
+    0xe610, 0xe611, 0xe612, 0xe613, 0xe614, 0xe615, 0xe616, 0xe617,
+    0xe618, 0xe619, 0xe61a, 0xe61b, 0xe61c, 0xe61d, 0xe61e, 0x30fb,
+    0xe61f, 0xe620, 0xe621, 0xe622, 0xe623, 0xe624, 0xe625, 0xe626,
+    0xe627, 0xe628, 0xe629, 0xe62a, 0xe62b, 0xe62c, 0xe62d, 0xe62e,
+    0xe62f, 0xe630, 0xe631, 0xe632, 0xe633, 0xe634, 0xe635, 0xe636,
+    0xe637, 0xe638, 0xe639, 0xe63a, 0xe63b, 0xe63c, 0xe63d, 0xe63e,
+    0xe63f, 0xe640, 0xe641, 0xe642, 0xe643, 0xe644, 0xe645, 0xe646,
+    0xe647, 0xe648, 0xe649, 0xe64a, 0xe64b, 0xe64c, 0xe64d, 0xe64e,
+    0xe64f, 0xe650, 0xe651, 0xe652, 0xe653, 0xe654, 0xe655, 0xe656,
+    0xe657, 0xe658, 0xe659, 0xe65a, 0xe65b, 0xe65c, 0xe65d, 0xe65e,
+    0xe65f, 0xe660, 0xe661, 0xe662, 0xe663, 0xe664, 0xe665, 0xe666,
+    0xe667, 0xe668, 0xe669, 0xe66a, 0xe66b, 0xe66c, 0xe66d, 0xe66e,
+    0xe66f, 0xe670, 0xe671, 0xe672, 0xe673, 0xe674, 0xe675, 0xe676,
+    0xe677, 0xe678, 0xe679, 0xe67a, 0xe67b, 0xe67c, 0xe67d, 0xe67e,
+    0xe67f, 0xe680, 0xe681, 0xe682, 0xe683, 0xe684, 0xe685, 0xe686,
+    0xe687, 0xe688, 0xe689, 0xe68a, 0xe68b, 0xe68c, 0xe68d, 0xe68e,
+    0xe68f, 0xe690, 0xe691, 0xe692, 0xe693, 0xe694, 0xe695, 0xe696,
+    0xe697, 0xe698, 0xe699, 0xe69a, 0xe69b, 0x30fb, 0x30fb, 0x30fb,
+    /* lead byte f9 */
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0xe69c, 0xe69d, 0xe69e, 0xe69f, 0xe6a0, 0xe6a1, 0xe6a2, 0xe6a3,
+    0xe6a4, 0xe6a5, 0xe6a6, 0xe6a7, 0xe6a8, 0xe6a9, 0xe6aa, 0xe6ab,
+    0xe6ac, 0xe6ad, 0xe6ae, 0xe6af, 0xe6b0, 0xe6b1, 0xe6b2, 0xe6b3,
+    0xe6b4, 0xe6b5, 0xe6b6, 0xe6b7, 0xe6b8, 0xe6b9, 0xe6ba, 0xe6bb,
+    0xe6bc, 0xe6bd, 0xe6be, 0xe6bf, 0xe6c0, 0xe6c1, 0xe6c2, 0xe6c3,
+    0xe6c4, 0xe6c5, 0xe6c6, 0xe6c7, 0xe6c8, 0xe6c9, 0xe6ca, 0xe6cb,
+    0xe6cc, 0xe6cd, 0xe6ce, 0xe6cf, 0xe6d0, 0xe6d1, 0xe6d2, 0xe6d3,
+    0xe6d4, 0xe6d5, 0xe6d6, 0xe6d7, 0xe6d8, 0xe6d9, 0xe6da, 0x30fb,
+    0xe6db, 0xe6dc, 0xe6dd, 0xe6de, 0xe6df, 0xe6e0, 0xe6e1, 0xe6e2,
+    0xe6e3, 0xe6e4, 0xe6e5, 0xe6e6, 0xe6e7, 0xe6e8, 0xe6e9, 0xe6ea,
+    0xe6eb, 0xe6ec, 0xe6ed, 0xe6ee, 0xe6ef, 0xe6f0, 0xe6f1, 0xe6f2,
+    0xe6f3, 0xe6f4, 0xe6f5, 0xe6f6, 0xe6f7, 0xe6f8, 0xe6f9, 0xe6fa,
+    0xe6fb, 0xe6fc, 0xe6fd, 0xe6fe, 0xe6ff, 0xe700, 0xe701, 0xe702,
+    0xe703, 0xe704, 0xe705, 0xe706, 0xe707, 0xe708, 0xe709, 0xe70a,
+    0xe70b, 0xe70c, 0xe70d, 0xe70e, 0xe70f, 0xe710, 0xe711, 0xe712,
+    0xe713, 0xe714, 0xe715, 0xe716, 0xe717, 0xe718, 0xe719, 0xe71a,
+    0xe71b, 0xe71c, 0xe71d, 0xe71e, 0xe71f, 0xe720, 0xe721, 0xe722,
+    0xe723, 0xe724, 0xe725, 0xe726, 0xe727, 0xe728, 0xe729, 0xe72a,
+    0xe72b, 0xe72c, 0xe72d, 0xe72e, 0xe72f, 0xe730, 0xe731, 0xe732,
+    0xe733, 0xe734, 0xe735, 0xe736, 0xe737, 0xe738, 0xe739, 0xe73a,
+    0xe73b, 0xe73c, 0xe73d, 0xe73e, 0xe73f, 0xe740, 0xe741, 0xe742,
+    0xe743, 0xe744, 0xe745, 0xe746, 0xe747, 0xe748, 0xe749, 0xe74a,
+    0xe74b, 0xe74c, 0xe74d, 0xe74e, 0xe74f, 0xe750, 0xe751, 0xe752,
+    0xe753, 0xe754, 0xe755, 0xe756, 0xe757, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte fa */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
     0x2178, 0x2179, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165,
@@ -1474,5 +1936,5 @@
     0x4e28, 0x4ee1, 0x4efc, 0x4f00, 0x4f03, 0x4f39, 0x4f56, 0x4f92,
     0x4f8a, 0x4f9a, 0x4f94, 0x4fcd, 0x5040, 0x5022, 0x4fff, 0x501e,
-    0x5046, 0x5070, 0x5042, 0x5094, 0x50f4, 0x50d8, 0x514a, 0x003f,
+    0x5046, 0x5070, 0x5042, 0x5094, 0x50f4, 0x50d8, 0x514a, 0x30fb,
     0x5164, 0x519d, 0x51be, 0x51ec, 0x5215, 0x529c, 0x52a6, 0x52c0,
     0x52db, 0x5300, 0x5307, 0x5324, 0x5372, 0x5393, 0x53b2, 0x53dd,
@@ -1490,14 +1952,14 @@
     0xfa13, 0x6968, 0xfa14, 0x6998, 0x69e2, 0x6a30, 0x6a6b, 0x6a46,
     0x6a73, 0x6a7e, 0x6ae2, 0x6ae4, 0x6bd6, 0x6c3f, 0x6c5c, 0x6c86,
-    0x6c6f, 0x6cda, 0x6d04, 0x6d87, 0x6d6f, 0x003f, 0x003f, 0x003f,
+    0x6c6f, 0x6cda, 0x6d04, 0x6d87, 0x6d6f, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte fb */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x6d96, 0x6dac, 0x6dcf, 0x6df8, 0x6df2, 0x6dfc, 0x6e39, 0x6e5c,
     0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005, 0x7007,
@@ -1507,5 +1969,5 @@
     0x742a, 0x7429, 0x742e, 0x7462, 0x7489, 0x749f, 0x7501, 0x756f,
     0x7682, 0x769c, 0x769e, 0x769b, 0x76a6, 0xfa17, 0x7746, 0x52af,
-    0x7821, 0x784e, 0x7864, 0x787a, 0x7930, 0xfa18, 0xfa19, 0x003f,
+    0x7821, 0x784e, 0x7864, 0x787a, 0x7930, 0xfa18, 0xfa19, 0x30fb,
     0xfa1a, 0x7994, 0xfa1b, 0x799b, 0x7ad1, 0x7ae7, 0xfa1c, 0x7aeb,
     0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7, 0x7da0, 0x7dd6, 0x7e52,
@@ -1523,38 +1985,38 @@
     0x9592, 0xf9dc, 0xfa29, 0x969d, 0x96af, 0x9733, 0x973b, 0x9743,
     0x974d, 0x974f, 0x9751, 0x9755, 0x9857, 0x9865, 0xfa2a, 0xfa2b,
-    0x9927, 0xfa2c, 0x999e, 0x9a4e, 0x9ad9, 0x003f, 0x003f, 0x003f,
+    0x9927, 0xfa2c, 0x999e, 0x9a4e, 0x9ad9, 0x30fb, 0x30fb, 0x30fb,
     /* lead byte fc */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
     0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00, 0x9d70,
-    0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f
+    0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb,
+    0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb
 };
 
@@ -1577,8 +2039,8 @@
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x02, 0x03, 0x04, 0x05, 0x01, 0x01, 0x06,
-    0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
-    0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
-    0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e,
+    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1589,11 +2051,11 @@
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
-    0x27, 0x28, 0x29, 0x01, 0x01, 0x2a, 0x2b, 0x01,
-    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-    0x01, 0x01, 0x2c, 0x2d, 0x2e, 0x00, 0x00, 0x00
+    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+    0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x00, 0x00, 0x00
 };
 
-static const unsigned short uni2cp_low[27904] =
+static const unsigned short uni2cp_low[27648] =
 {
     /* 0x0000 .. 0x00ff */
@@ -1618,118 +2080,52 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0020, 0x0021, 0x0063, 0x004c, 0x003f, 0x005c, 0x007c, 0x8198,
-    0x814e, 0x0063, 0x0061, 0x8173, 0x003f, 0x002d, 0x0072, 0x815c,
-    0x818b, 0x817d, 0x0032, 0x0033, 0x814c, 0x83ca, 0x81f7, 0x003f,
-    0x002c, 0x0031, 0x006f, 0x8174, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x0021, 0x8191, 0x8192, 0x003f, 0x005c, 0x007c, 0x8198,
+    0x814e, 0x0063, 0x0061, 0x81e1, 0x81ca, 0x002d, 0x0052, 0x8150,
+    0x818b, 0x817d, 0x0032, 0x0033, 0x814c, 0x83ca, 0x81f7, 0x8145,
+    0x8143, 0x0031, 0x006f, 0x81e2, 0x003f, 0x003f, 0x003f, 0x003f,
     0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0043,
     0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049,
     0x0044, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0x817e,
-    0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x003f, 0x83c0,
+    0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x0054, 0x0073,
     0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0063,
     0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069,
     0x0064, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0x8180,
-    0x006f, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x00fe, 0x0079,
-    /* 0x0100 .. 0x01ff */
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063,
-    0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064,
-    0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x0049, 0x0069, 0x003f, 0x003f, 0x004a, 0x006a, 0x004b, 0x006b,
-    0x003f, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x003f,
-    0x003f, 0x004c, 0x006c, 0x004e, 0x006e, 0x004e, 0x006e, 0x004e,
-    0x006e, 0x003f, 0x003f, 0x003f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079,
-    0x0059, 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0073,
-    0x0062, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0044, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0045, 0x0046, 0x0066, 0x003f, 0x003f, 0x003f, 0x003f, 0x0049,
-    0x003f, 0x003f, 0x006c, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f,
-    0x004f, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, 0x0054, 0x0055,
-    0x0075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x007a, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x84a0, 0x003f, 0x003f, 0x0021, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061, 0x0049,
-    0x0069, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055,
-    0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x003f, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x004b, 0x006b, 0x004f, 0x006f, 0x004f, 0x006f, 0x003f, 0x003f,
-    0x006a, 0x003f, 0x003f, 0x003f, 0x0047, 0x0067, 0x003f, 0x003f,
-    0x004e, 0x006e, 0x0041, 0x0061, 0x0041, 0x0061, 0x004f, 0x006f,
-    /* 0x0200 .. 0x02ff */
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x003f, 0x003f, 0x0048, 0x0068,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0068, 0x003f, 0x006a, 0x0072, 0x003f, 0x003f, 0x003f, 0x0077,
-    0x0079, 0x814c, 0x818d, 0x8165, 0x8166, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x005e, 0x0076,
-    0x0027, 0x815c, 0x814c, 0x0060, 0x003f, 0x005f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x818b, 0x003f, 0x007e, 0x818d, 0x003f, 0x003f,
-    0x003f, 0x006c, 0x0073, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x006f, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x0074, 0x0079,
     /* 0x0300 .. 0x03ff */
-    0x0060, 0x814c, 0x005e, 0x007e, 0x815c, 0x815c, 0x003f, 0x003f,
-    0x814e, 0x003f, 0x818b, 0x818d, 0x0076, 0x003f, 0x0022, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002c,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x005f, 0x005f, 0x005f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0060, 0x814c, 0x003f, 0x003f, 0x814e, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x814c, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003b, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x814c, 0x814e, 0x839f, 0x003f,
-    0x83a3, 0x83a5, 0x83a7, 0x003f, 0x83ad, 0x003f, 0x83b2, 0x83b6,
-    0x83c7, 0x839f, 0x83a0, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x839f, 0x83a0, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5,
     0x83a6, 0x83a7, 0x83a8, 0x83a9, 0x83aa, 0x83ab, 0x83ac, 0x83ad,
     0x83ae, 0x83af, 0x003f, 0x83b0, 0x83b1, 0x83b2, 0x83b3, 0x83b4,
-    0x83b5, 0x83b6, 0x83a7, 0x83b2, 0x83bf, 0x83c3, 0x83c5, 0x83c7,
-    0x83d2, 0x83bf, 0x83c0, 0x83c1, 0x83c2, 0x83c3, 0x83c4, 0x83c5,
+    0x83b5, 0x83b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x83bf, 0x83c0, 0x83c1, 0x83c2, 0x83c3, 0x83c4, 0x83c5,
     0x83c6, 0x83c7, 0x83c8, 0x83c9, 0x83ca, 0x83cb, 0x83cc, 0x83cd,
     0x83ce, 0x83cf, 0x003f, 0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d4,
-    0x83d5, 0x83d6, 0x83c7, 0x83d2, 0x83cd, 0x83d2, 0x83d6, 0x003f,
-    0x83c0, 0x83c6, 0x83b2, 0x83b2, 0x83b2, 0x83d3, 0x83ce, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x83c8, 0x83cf, 0x003f, 0x003f, 0x83a6, 0x83c3, 0x003f, 0x003f,
-    0x003f, 0x83b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x83d5, 0x83d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0400 .. 0x04ff */
-    0x8445, 0x8446, 0x003f, 0x8443, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x844b, 0x8449, 0x8454, 0x003f,
+    0x003f, 0x8446, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x8440, 0x8441, 0x8442, 0x8443, 0x8444, 0x8445, 0x8447, 0x8448,
     0x8449, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450,
@@ -1740,147 +2136,48 @@
     0x8482, 0x8483, 0x8484, 0x8485, 0x8486, 0x8487, 0x8488, 0x8489,
     0x848a, 0x848b, 0x848c, 0x848d, 0x848e, 0x848f, 0x8490, 0x8491,
-    0x8475, 0x8476, 0x003f, 0x8473, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x847b, 0x8479, 0x8485, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x8447, 0x8477, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x8440, 0x8470, 0x8440, 0x8470, 0x003f, 0x003f, 0x8445, 0x8475,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x8447, 0x8477, 0x8448, 0x8478,
-    0x003f, 0x003f, 0x8449, 0x8479, 0x8449, 0x8479, 0x844f, 0x8480,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x845e, 0x848f, 0x8454, 0x8485,
-    0x8454, 0x8485, 0x8454, 0x8485, 0x8458, 0x8489, 0x003f, 0x003f,
-    0x845c, 0x848d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1d00 .. 0x1dff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0041, 0x0042, 0x003f,
-    0x0044, 0x0045, 0x003f, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b,
-    0x004c, 0x004d, 0x004e, 0x003f, 0x004f, 0x003f, 0x0050, 0x0052,
-    0x0054, 0x0055, 0x0057, 0x0061, 0x003f, 0x003f, 0x003f, 0x0062,
-    0x0064, 0x0065, 0x003f, 0x003f, 0x003f, 0x0067, 0x003f, 0x006b,
-    0x006d, 0x003f, 0x006f, 0x003f, 0x003f, 0x003f, 0x0070, 0x0074,
-    0x0075, 0x003f, 0x003f, 0x0076, 0x003f, 0x83c0, 0x83c1, 0x83c2,
-    0x83d3, 0x83d4, 0x0069, 0x0072, 0x0075, 0x0076, 0x83c0, 0x83c1,
-    0x83cf, 0x83d3, 0x83d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x847e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0063, 0x003f, 0x0064, 0x003f,
-    0x0066, 0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x007a, 0x003f, 0x003f, 0x003f, 0x83c6,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1e00 .. 0x1eff */
-    0x0041, 0x0061, 0x0042, 0x0062, 0x0042, 0x0062, 0x0042, 0x0062,
-    0x0043, 0x0063, 0x0044, 0x0064, 0x0044, 0x0064, 0x0044, 0x0064,
-    0x0044, 0x0064, 0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0046, 0x0066,
-    0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068, 0x0048, 0x0068,
-    0x0048, 0x0068, 0x0048, 0x0068, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x004b, 0x006b, 0x004b, 0x006b, 0x004b, 0x006b, 0x004c, 0x006c,
-    0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x004d, 0x006d,
-    0x004d, 0x006d, 0x004d, 0x006d, 0x004e, 0x006e, 0x004e, 0x006e,
-    0x004e, 0x006e, 0x004e, 0x006e, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0050, 0x0070, 0x0050, 0x0070,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074,
-    0x0054, 0x0074, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0056, 0x0076, 0x0056, 0x0076,
-    0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077,
-    0x0057, 0x0077, 0x0058, 0x0078, 0x0058, 0x0078, 0x0059, 0x0079,
-    0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0068, 0x0074,
-    0x0077, 0x0079, 0x003f, 0x0073, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0059, 0x0079, 0x0059, 0x0079, 0x0059, 0x0079,
-    0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1f00 .. 0x1fff */
-    0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf,
-    0x839f, 0x839f, 0x839f, 0x839f, 0x839f, 0x839f, 0x839f, 0x839f,
-    0x83c3, 0x83c3, 0x83c3, 0x83c3, 0x83c3, 0x83c3, 0x003f, 0x003f,
-    0x83a3, 0x83a3, 0x83a3, 0x83a3, 0x83a3, 0x83a3, 0x003f, 0x003f,
-    0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5,
-    0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5,
-    0x83c7, 0x83c7, 0x83c7, 0x83c7, 0x83c7, 0x83c7, 0x83c7, 0x83c7,
-    0x83a7, 0x83a7, 0x83a7, 0x83a7, 0x83a7, 0x83a7, 0x83a7, 0x83a7,
-    0x83cd, 0x83cd, 0x83cd, 0x83cd, 0x83cd, 0x83cd, 0x003f, 0x003f,
-    0x83ad, 0x83ad, 0x83ad, 0x83ad, 0x83ad, 0x83ad, 0x003f, 0x003f,
-    0x83d2, 0x83d2, 0x83d2, 0x83d2, 0x83d2, 0x83d2, 0x83d2, 0x83d2,
-    0x003f, 0x83b2, 0x003f, 0x83b2, 0x003f, 0x83b2, 0x003f, 0x83b2,
-    0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6,
-    0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6,
-    0x83bf, 0x83bf, 0x83c3, 0x83c3, 0x83c5, 0x83c5, 0x83c7, 0x83c7,
-    0x83cd, 0x83cd, 0x83d2, 0x83d2, 0x83d6, 0x83d6, 0x003f, 0x003f,
-    0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf,
-    0x839f, 0x839f, 0x839f, 0x839f, 0x839f, 0x839f, 0x839f, 0x839f,
-    0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5, 0x83c5,
-    0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5, 0x83a5,
-    0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6, 0x83d6,
-    0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6, 0x83b6,
-    0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x83bf, 0x003f, 0x83bf, 0x83bf,
-    0x839f, 0x839f, 0x839f, 0x839f, 0x839f, 0x003f, 0x83c7, 0x003f,
-    0x003f, 0x814e, 0x83c5, 0x83c5, 0x83c5, 0x003f, 0x83c5, 0x83c5,
-    0x83a3, 0x83a3, 0x83a5, 0x83a5, 0x83a5, 0x003f, 0x003f, 0x003f,
-    0x83c7, 0x83c7, 0x83c7, 0x83c7, 0x003f, 0x003f, 0x83c7, 0x83c7,
-    0x83a7, 0x83a7, 0x83a7, 0x83a7, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x83d2, 0x83d2, 0x83d2, 0x83d2, 0x83cf, 0x83cf, 0x83d2, 0x83d2,
-    0x83b2, 0x83b2, 0x83b2, 0x83b2, 0x83af, 0x814e, 0x814e, 0x0060,
-    0x003f, 0x003f, 0x83d6, 0x83d6, 0x83d6, 0x003f, 0x83d6, 0x83d6,
-    0x83ad, 0x83ad, 0x83b6, 0x83b6, 0x83b6, 0x814c, 0x003f, 0x003f,
+    0x003f, 0x8476, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2000 .. 0x20ff */
-    0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
-    0x0020, 0x0020, 0x0020, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x815d, 0x815d, 0x003f, 0x815c, 0x815c, 0x815c, 0x003f, 0x005f,
-    0x8165, 0x8166, 0x002c, 0x8165, 0x8167, 0x8168, 0x8781, 0x003f,
-    0x81f5, 0x81f6, 0x003f, 0x003f, 0x002e, 0x8164, 0x8163, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
-    0x81f1, 0x003f, 0x818c, 0x818d, 0x003f, 0x8165, 0x003f, 0x003f,
-    0x003f, 0x8171, 0x8172, 0x81a6, 0x0021, 0x003f, 0x815c, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x002f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x818b, 0x0069, 0x003f, 0x003f, 0x0034, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0x815d, 0x003d, 0x0028, 0x0029, 0x006e,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0x815d, 0x003d, 0x0028, 0x0029, 0x003f,
-    0x0061, 0x0065, 0x006f, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0063, 0x003f, 0x003f, 0x004c, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x815d, 0x003f, 0x003f, 0x003f, 0x003f, 0x815c, 0x003f, 0x003f,
+    0x8165, 0x8166, 0x003f, 0x003f, 0x8167, 0x8168, 0x003f, 0x003f,
+    0x81f5, 0x81f6, 0x003f, 0x003f, 0x003f, 0x8164, 0x8163, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x81f1, 0x003f, 0x818c, 0x818d, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x81a6, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1895,30 +2192,30 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2100 .. 0x21ff */
-    0x003f, 0x003f, 0x0043, 0x818e, 0x003f, 0x003f, 0x003f, 0x0045,
-    0x003f, 0x003f, 0x0067, 0x0048, 0x0048, 0x0048, 0x0068, 0x0068,
-    0x0049, 0x0049, 0x004c, 0x006c, 0x003f, 0x004e, 0x8782, 0x003f,
-    0x0050, 0x0050, 0x0051, 0x0052, 0x0052, 0x0052, 0x003f, 0x003f,
-    0x003f, 0x8784, 0x003f, 0x003f, 0x005a, 0x003f, 0x83b6, 0x003f,
-    0x005a, 0x003f, 0x004b, 0x81f0, 0x0042, 0x0043, 0x0065, 0x0065,
-    0x0045, 0x0046, 0x003f, 0x004d, 0x006f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0069, 0x003f, 0x003f, 0x83ce, 0x83c1, 0x83a1, 0x83ae,
-    0x8794, 0x003f, 0x003f, 0x003f, 0x003f, 0x0044, 0x0064, 0x0065,
-    0x0069, 0x006a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x818e, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8782, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x8784, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x81f0, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x8754, 0x8755, 0x8756, 0x8757, 0x8758, 0x8759, 0x875a, 0x875b,
-    0x875c, 0x875d, 0x003f, 0x003f, 0x004c, 0x0043, 0x0044, 0x004d,
-    0xeeef, 0xeef0, 0xeef1, 0xeef2, 0xeef3, 0xeef4, 0xeef5, 0xeef6,
-    0xeef7, 0xeef8, 0x003f, 0x003f, 0x006c, 0x0063, 0x0064, 0x006d,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x81a9, 0x81aa, 0x81a8, 0x81ab, 0x002d, 0x007c, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x81a9, 0x81a8, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002d, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x81cc, 0x81cb,
+    0x875c, 0x875d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfa40, 0xfa41, 0xfa42, 0xfa43, 0xfa44, 0xfa45, 0xfa46, 0xfa47,
+    0xfa48, 0xfa49, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x81a9, 0x81aa, 0x81a8, 0x81ab, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x81cb, 0x003f, 0x81cc, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1928,22 +2225,22 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2200 .. 0x22ff */
-    0x81cd, 0x003f, 0x81dd, 0x81ce, 0x81ce, 0x004f, 0x003f, 0x81de,
-    0x81b8, 0x81b8, 0x003f, 0x81b9, 0x81b9, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x8794, 0x815d, 0x817d, 0x003f, 0x002f, 0x005c, 0x002a,
-    0x818b, 0x003f, 0x81e3, 0x003f, 0x003f, 0x81e5, 0x8187, 0x8798,
-    0x81da, 0x003f, 0x003f, 0x007c, 0x007c, 0x8161, 0x8161, 0x81c8,
+    0x81cd, 0x003f, 0x81dd, 0x81ce, 0x003f, 0x003f, 0x003f, 0x81de,
+    0x81b8, 0x003f, 0x003f, 0x81b9, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x8794, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x81e3, 0x003f, 0x003f, 0x81e5, 0x8187, 0x8798,
+    0x81da, 0x003f, 0x003f, 0x003f, 0x003f, 0x8161, 0x003f, 0x81c8,
     0x81c9, 0x81bf, 0x81be, 0x81e7, 0x81e8, 0x003f, 0x8793, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x8188, 0x81e6, 0x003a, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x007e, 0x81e4, 0x003f, 0x003f,
-    0x003f, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x007e, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x8188, 0x81e6, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x81e4, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x81e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x8182, 0x81df, 0x81df, 0x81df, 0x003f, 0x003f, 0x8185, 0x8186,
-    0x003f, 0x003f, 0x81e1, 0x81e2, 0x003f, 0x003f, 0x003c, 0x003e,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x81bc, 0x81bd, 0x81bc, 0x81bd, 0x81ba, 0x81bb,
-    0x81ba, 0x81bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x8182, 0x81df, 0x003f, 0x003f, 0x003f, 0x003f, 0x8185, 0x8186,
+    0x003f, 0x003f, 0x81e1, 0x81e2, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x81bc, 0x81bd, 0x003f, 0x003f, 0x81ba, 0x81bb,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1961,10 +2258,10 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2300 .. 0x23ff */
-    0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x81dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x8171, 0x8172, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2016,31 +2313,31 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0042,
-    0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a,
-    0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052,
-    0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a,
-    0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068,
-    0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070,
-    0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078,
-    0x0079, 0x007a, 0x0030, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2500 .. 0x25ff */
-    0x849f, 0x84aa, 0x84a0, 0x84ab, 0x002d, 0x002d, 0x007c, 0x007c,
-    0x002d, 0x002d, 0x007c, 0x007c, 0x84a1, 0x84a1, 0x84a1, 0x84ac,
-    0x84a2, 0x84a2, 0x84a2, 0x84ad, 0x84a4, 0x84a4, 0x84a4, 0x84af,
-    0x84a3, 0x84a3, 0x84a3, 0x84ae, 0x84a5, 0x84ba, 0x84a5, 0x84a5,
-    0x84b5, 0x84a5, 0x84a5, 0x84b0, 0x84a7, 0x84bc, 0x84a7, 0x84a7,
-    0x84b7, 0x84a7, 0x84a7, 0x84b2, 0x84a6, 0x84a6, 0x84a6, 0x84b6,
-    0x84bb, 0x84a6, 0x84a6, 0x84b1, 0x84a8, 0x84a8, 0x84a8, 0x84b8,
-    0x84bd, 0x84a8, 0x84a8, 0x84b3, 0x84a9, 0x84a9, 0x84a9, 0x84b9,
-    0x84a9, 0x84a9, 0x84be, 0x84a9, 0x84a9, 0x84a9, 0x84a9, 0x84a9,
-    0x84a9, 0x84a9, 0x84a9, 0x84b4, 0x002d, 0x002d, 0x007c, 0x007c,
-    0x003d, 0x007c, 0x002b, 0x002b, 0x002b, 0x003f, 0x003f, 0x003f,
-    0x004c, 0x004c, 0x004c, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b,
-    0x002b, 0x002b, 0x002b, 0x002b, 0x0054, 0x0054, 0x0054, 0x002b,
-    0x002b, 0x002b, 0x002b, 0x002b, 0x002b, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x002f, 0x005c, 0x0058, 0x002d, 0x007c, 0x002d, 0x007c,
-    0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c,
+    0x849f, 0x84aa, 0x84a0, 0x84ab, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x84a1, 0x003f, 0x003f, 0x84ac,
+    0x84a2, 0x003f, 0x003f, 0x84ad, 0x84a4, 0x003f, 0x003f, 0x84af,
+    0x84a3, 0x003f, 0x003f, 0x84ae, 0x84a5, 0x84ba, 0x003f, 0x003f,
+    0x84b5, 0x003f, 0x003f, 0x84b0, 0x84a7, 0x84bc, 0x003f, 0x003f,
+    0x84b7, 0x003f, 0x003f, 0x84b2, 0x84a6, 0x003f, 0x003f, 0x84b6,
+    0x84bb, 0x003f, 0x003f, 0x84b1, 0x84a8, 0x003f, 0x003f, 0x84b8,
+    0x84bd, 0x003f, 0x003f, 0x84b3, 0x84a9, 0x003f, 0x003f, 0x84b9,
+    0x003f, 0x003f, 0x84be, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x84b4, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2092,79 +2389,13 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2e00 .. 0x2eff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95ea,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2f00 .. 0x2fff */
-    0x88ea, 0xed4c, 0x98a4, 0x98a6, 0x89b3, 0x98ab, 0x93f1, 0x98b3,
-    0x906c, 0x9958, 0x93fc, 0x94aa, 0x9963, 0x996b, 0x9971, 0x997b,
-    0x9981, 0x9381, 0x97cd, 0x99af, 0x99b6, 0x99b7, 0x99bc, 0x8f5c,
-    0x966d, 0x99c5, 0x99ca, 0x99d1, 0x9694, 0x8cfb, 0x9a98, 0x9379,
-    0x8e6d, 0x9ae7, 0x9ae8, 0x975b, 0x91e5, 0x8f97, 0x8e71, 0x9b7e,
-    0x90a1, 0x8fac, 0x9b97, 0x9b99, 0x9ba3, 0x8e52, 0x9bdd, 0x8d48,
-    0x8cc8, 0x8bd0, 0x8ab1, 0x9bf4, 0x9bf6, 0x9c4d, 0x9c4f, 0x9c54,
-    0x8b7c, 0x003f, 0x9c63, 0x9c65, 0x9053, 0x9cf7, 0x003f, 0x8ee8,
-    0x8e78, 0x9dbb, 0x95b6, 0x936c, 0x8bd2, 0x95fb, 0x9dd9, 0x93fa,
-    0x9e48, 0x8c8e, 0x96d8, 0x8c87, 0x8e7e, 0x9f65, 0x9f74, 0x9f78,
-    0x94e4, 0x96d1, 0x8e81, 0x9f83, 0x9085, 0x89ce, 0x92dc, 0x9583,
-    0xe0a9, 0xe0ab, 0x95d0, 0x89e5, 0x8b8d, 0x8ca2, 0x8cba, 0x8bca,
-    0x895a, 0x8aa2, 0x8ac3, 0x90b6, 0x9770, 0x9363, 0x9544, 0x003f,
-    0xe1a0, 0x9492, 0x94e7, 0x8e4d, 0x96da, 0x96b5, 0x96ee, 0x90ce,
-    0x8ea6, 0x003f, 0x89d1, 0x8c8a, 0x97a7, 0x927c, 0x95c4, 0x8e85,
-    0x8aca, 0xe3a4, 0x9772, 0x8948, 0x9856, 0x8ea7, 0xe3ce, 0x8ea8,
-    0xe3e4, 0x93f7, 0x9062, 0x8ea9, 0x8e8a, 0x8950, 0x90e3, 0x9143,
-    0x8f4d, 0x8daf, 0x9046, 0xe487, 0xe567, 0x928e, 0x8c8c, 0x8d73,
-    0x88df, 0xe647, 0x8ca9, 0x8a70, 0x8cbe, 0x924a, 0x93a4, 0xe6b3,
-    0xe6b6, 0x8a4c, 0x90d4, 0x9196, 0x91ab, 0x9067, 0x8ed4, 0x9068,
-    0x9243, 0x003f, 0x9757, 0x93d1, 0x94ce, 0x97a2, 0x8be0, 0x92b7,
-    0x96e5, 0x958c, 0xe8ae, 0xe8b0, 0x894a, 0xeed6, 0x94f1, 0x96ca,
-    0x8a76, 0xe8e8, 0xe8ea, 0x89b9, 0x95c5, 0x9597, 0x94f2, 0x9048,
-    0x8ef1, 0x8d81, 0x946e, 0x8d9c, 0x8d82, 0xe995, 0xe9a6, 0xe9ac,
-    0xe9ad, 0x8b53, 0x8b9b, 0x92b9, 0xea62, 0x8ead, 0xea6d, 0x9683,
-    0x003f, 0x8b6f, 0xeeec, 0xea83, 0xea86, 0x9343, 0x8cdb, 0x916c,
-    0x9540, 0xea8e, 0xea8f, 0x97b4, 0xea9d, 0xea9e, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x3000 .. 0x30ff */
     0x8140, 0x8141, 0x8142, 0x8156, 0x003f, 0x8158, 0x8159, 0x815a,
     0x8171, 0x8172, 0x8173, 0x8174, 0x8175, 0x8176, 0x8177, 0x8178,
     0x8179, 0x817a, 0x81a7, 0x81ac, 0x816b, 0x816c, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x005b, 0x005d, 0x003f, 0x8780, 0x8168, 0x8781,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x81a7, 0x003f,
-    0x8f5c, 0x003f, 0x99bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8780, 0x003f, 0x8781,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x829f, 0x82a0, 0x82a1, 0x82a2, 0x82a3, 0x82a4, 0x82a5,
     0x82a6, 0x82a7, 0x82a8, 0x82a9, 0x82aa, 0x82ab, 0x82ac, 0x82ad,
@@ -2177,5 +2408,5 @@
     0x82de, 0x82df, 0x82e0, 0x82e1, 0x82e2, 0x82e3, 0x82e4, 0x82e5,
     0x82e6, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82eb, 0x82ec, 0x82ed,
-    0x82ee, 0x82ef, 0x82f0, 0x82f1, 0x82a4, 0x003f, 0x003f, 0x003f,
+    0x82ee, 0x82ef, 0x82f0, 0x82f1, 0x8394, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x814a, 0x814b, 0x8154, 0x8155, 0x003f,
     0x003f, 0x8340, 0x8341, 0x8342, 0x8343, 0x8344, 0x8345, 0x8346,
@@ -2189,39 +2420,6 @@
     0x8380, 0x8381, 0x8382, 0x8383, 0x8384, 0x8385, 0x8386, 0x8387,
     0x8388, 0x8389, 0x838a, 0x838b, 0x838c, 0x838d, 0x838e, 0x838f,
-    0x8390, 0x8391, 0x8392, 0x8393, 0x8394, 0x8395, 0x8396, 0x838f,
-    0x8390, 0x8391, 0x8392, 0x8145, 0x815b, 0x8152, 0x8153, 0x003f,
-    /* 0x3100 .. 0x31ff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x88ea, 0x93f1, 0x8e4f, 0x8e6c, 0x8fe3, 0x9286,
-    0x89ba, 0x8d62, 0x89b3, 0x95b8, 0x929a, 0x9356, 0x926e, 0x906c,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x8390, 0x8391, 0x8392, 0x8393, 0x8394, 0x8395, 0x8396, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x8145, 0x815b, 0x8152, 0x8153, 0x003f,
     /* 0x3200 .. 0x32ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2241,20 +2439,20 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x88ea, 0x93f1, 0x8e4f, 0x8e6c, 0x8cdc, 0x985a, 0x8eb5, 0x94aa,
-    0x8be3, 0x8f5c, 0x8c8e, 0x89ce, 0x9085, 0x96d8, 0x8be0, 0x9379,
-    0x93fa, 0x8a94, 0x974c, 0x8ed0, 0x96bc, 0x93c1, 0x8de0, 0x8f6a,
-    0x984a, 0x94e9, 0x926a, 0x8f97, 0x934b, 0x9744, 0x88f3, 0x928d,
-    0x8d80, 0x8b78, 0x8eca, 0x90b3, 0x8785, 0x8786, 0x8787, 0x8788,
-    0x8789, 0x88e3, 0x8f40, 0x8a77, 0x8ac4, 0x8ae9, 0x8e91, 0x8ba6,
-    0x96e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x8341, 0x8343, 0x8345, 0x8347, 0x8349, 0x834a, 0x834c, 0x834e,
-    0x8350, 0x8352, 0x8354, 0x8356, 0x8358, 0x835a, 0x835c, 0x835e,
-    0x8360, 0x8363, 0x8365, 0x8367, 0x8369, 0x836a, 0x836b, 0x836c,
-    0x836d, 0x836e, 0x8371, 0x8374, 0x8377, 0x837a, 0x837d, 0x837e,
-    0x8380, 0x8381, 0x8382, 0x8384, 0x8386, 0x8388, 0x8389, 0x838a,
-    0x838b, 0x838c, 0x838d, 0x838f, 0x8390, 0x8391, 0x8392, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x8785, 0x8786, 0x8787, 0x8788,
+    0x8789, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x3300 .. 0x33ff */
     0x003f, 0x003f, 0x003f, 0x8765, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2296,5 +2494,5 @@
     0x8b75, 0x95b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fe5, 0x003f,
     0x003f, 0x97bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x95c0, 0x003f,
-    0xed4c, 0x003f, 0x98a2, 0x003f, 0x003f, 0x9286, 0x003f, 0x003f,
+    0xfa68, 0x003f, 0x98a2, 0x003f, 0x003f, 0x9286, 0x003f, 0x003f,
     0x003f, 0x98a3, 0x8bf8, 0x003f, 0x003f, 0x003f, 0x98a4, 0x003f,
     0x8adb, 0x924f, 0x003f, 0x8ee5, 0x98a5, 0x003f, 0x003f, 0x98a6,
@@ -2319,10 +2517,10 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x8e65, 0x8e64, 0x91bc, 0x98bd,
     0x9574, 0x90e5, 0x003f, 0x003f, 0x003f, 0x8157, 0x98be, 0x98c0,
-    0x003f, 0xed4d, 0x003f, 0x91e3, 0x97df, 0x88c8, 0x003f, 0x003f,
+    0x003f, 0xfa69, 0x003f, 0x91e3, 0x97df, 0x88c8, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x98bf, 0x89bc, 0x003f,
     0x8bc2, 0x003f, 0x9287, 0x003f, 0x003f, 0x003f, 0x8c8f, 0x98c1,
-    0x003f, 0x003f, 0x003f, 0x9443, 0xed4e, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x9443, 0xfa6a, 0x003f, 0x003f, 0x003f,
     /* 0x4f00 .. 0x4fff */
-    0xed4f, 0x8ae9, 0x003f, 0xed50, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfa6b, 0x8ae9, 0x003f, 0xfa6c, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x98c2, 0x88c9, 0x003f, 0x003f, 0x8cde, 0x8aea, 0x959a,
     0x94b0, 0x8b78, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2331,8 +2529,8 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x948c,
     0x98c4, 0x003f, 0x003f, 0x003f, 0x94ba, 0x003f, 0x97e0, 0x003f,
-    0x904c, 0xed51, 0x8e66, 0x003f, 0x8e97, 0x89be, 0x003f, 0x003f,
+    0x904c, 0xfa6d, 0x8e66, 0x003f, 0x8e97, 0x89be, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x92cf, 0x003f, 0x003f, 0x9241, 0x98c8,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x88ca, 0x92e1, 0x8f5a,
-    0x8db2, 0x9743, 0x003f, 0x91cc, 0x003f, 0x89bd, 0xed52, 0x98c7,
+    0x8db2, 0x9743, 0x003f, 0x91cc, 0x003f, 0x89bd, 0xfa6e, 0x98c7,
     0x003f, 0x975d, 0x98c3, 0x98c5, 0x8dec, 0x98c6, 0x9b43, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2341,7 +2539,7 @@
     0x003f, 0x003f, 0x003f, 0x98cd, 0x8cf1, 0x003f, 0x003f, 0x8e67,
     0x003f, 0x003f, 0x003f, 0x8aa4, 0x003f, 0x003f, 0x98d2, 0x003f,
-    0x98ca, 0x003f, 0xed54, 0x97e1, 0x003f, 0x8e98, 0x003f, 0x98cb,
-    0x003f, 0x98d0, 0xed53, 0x003f, 0xed56, 0x003f, 0x98d3, 0x003f,
-    0x98cc, 0x003f, 0xed55, 0x8b9f, 0x003f, 0x88cb, 0x003f, 0x003f,
+    0x98ca, 0x003f, 0xfa70, 0x97e1, 0x003f, 0x8e98, 0x003f, 0x98cb,
+    0x003f, 0x98d0, 0xfa6f, 0x003f, 0xfa72, 0x003f, 0x98d3, 0x003f,
+    0x98cc, 0x003f, 0xfa71, 0x8b9f, 0x003f, 0x88cb, 0x003f, 0x003f,
     0x8ba0, 0x89bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9b44, 0x003f, 0x9699, 0x958e, 0x8cf2,
@@ -2349,5 +2547,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95d6,
     0x003f, 0x003f, 0x8c57, 0x91a3, 0x89e2, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xed45, 0x8f72, 0x003f, 0x003f, 0xed57, 0x98d7, 0x003f,
+    0x003f, 0xfa61, 0x8f72, 0x003f, 0x003f, 0xfa73, 0x98d7, 0x003f,
     0x98dc, 0x98da, 0x003f, 0x003f, 0x98d5, 0x003f, 0x003f, 0x91ad,
     0x98d8, 0x003f, 0x98db, 0x98d9, 0x003f, 0x95db, 0x003f, 0x98d6,
@@ -2355,15 +2553,15 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f43, 0x98eb,
     0x003f, 0x003f, 0x003f, 0x946f, 0x003f, 0x9555, 0x98e6, 0x003f,
-    0x95ee, 0x003f, 0x89b4, 0x003f, 0x003f, 0x003f, 0x98ea, 0xed5a,
+    0x95ee, 0x003f, 0x89b4, 0x003f, 0x003f, 0x003f, 0x98ea, 0xfa76,
     /* 0x5000 .. 0x50ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x98e4, 0x98ed, 0x003f,
     0x003f, 0x9171, 0x003f, 0x8cc2, 0x003f, 0x947b, 0x003f, 0xe0c5,
     0x003f, 0x98ec, 0x937c, 0x003f, 0x98e1, 0x003f, 0x8cf4, 0x003f,
-    0x003f, 0x8cf3, 0x98df, 0x003f, 0x003f, 0x003f, 0xed5b, 0x8ed8,
-    0x003f, 0x98e7, 0xed59, 0x95ed, 0x926c, 0x98e3, 0x8c91, 0x003f,
+    0x003f, 0x8cf3, 0x98df, 0x003f, 0x003f, 0x003f, 0xfa77, 0x8ed8,
+    0x003f, 0x98e7, 0xfa75, 0x95ed, 0x926c, 0x98e3, 0x8c91, 0x003f,
     0x98e0, 0x98e8, 0x98e2, 0x97cf, 0x98e9, 0x9860, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8be4, 0x003f,
     0x003f, 0x8c90, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xed58, 0x003f, 0xed5e, 0x98ee, 0x003f, 0x003f, 0xed5c, 0x98ef,
+    0xfa74, 0x003f, 0xfa7a, 0x98ee, 0x003f, 0x003f, 0xfa78, 0x98ef,
     0x98f3, 0x88cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95ce,
     0x98f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x98f1, 0x98f5, 0x003f,
@@ -2371,9 +2569,9 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c92, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x98f6, 0x003f, 0x003f, 0x003f,
-    0xed5d, 0x003f, 0x8ec3, 0x003f, 0x91a4, 0x92e3, 0x8bf4, 0x003f,
+    0xfa79, 0x003f, 0x8ec3, 0x003f, 0x91a4, 0x92e3, 0x8bf4, 0x003f,
     0x98f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b55, 0x003f, 0x003f,
     0x98f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x98fa, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9654, 0x003f, 0x003f,
-    0x003f, 0x8c86, 0x003f, 0x003f, 0xed5f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x8c86, 0x003f, 0x003f, 0xfa7b, 0x003f, 0x003f, 0x003f,
     0x8e50, 0x94f5, 0x98f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2384,8 +2582,8 @@
     0x003f, 0x9940, 0x9941, 0x003f, 0x003f, 0x93ad, 0x003f, 0x919c,
     0x003f, 0x8ba1, 0x003f, 0x003f, 0x003f, 0x966c, 0x9944, 0x003f,
-    0xed61, 0x003f, 0x97bb, 0x003f, 0x003f, 0x003f, 0x9945, 0x003f,
+    0xfa7d, 0x003f, 0x97bb, 0x003f, 0x003f, 0x003f, 0x9945, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9948, 0x003f, 0x9946, 0x003f, 0x916d,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9947, 0x9949, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xed60, 0x994b, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfa7c, 0x994b, 0x003f, 0x003f,
     0x003f, 0x994a, 0x003f, 0x95c6, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x5100 .. 0x51ff */
@@ -2399,8 +2597,8 @@
     0x003f, 0x003f, 0x9954, 0x9957, 0x9956, 0x003f, 0x003f, 0x9958,
     0x9959, 0x88f2, 0x003f, 0x8cb3, 0x8c5a, 0x8f5b, 0x929b, 0x8ba2,
-    0x90e6, 0x8cf5, 0xed62, 0x8d8e, 0x995b, 0x96c6, 0x9365, 0x003f,
+    0x90e6, 0x8cf5, 0xfa7e, 0x8d8e, 0x995b, 0x96c6, 0x9365, 0x003f,
     0x8e99, 0x003f, 0x995a, 0x003f, 0x995c, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x937d, 0x003f, 0x8a95, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x995d, 0x003f, 0xed63, 0x93fc, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x995d, 0x003f, 0xfa80, 0x93fc, 0x003f, 0x003f,
     0x9153, 0x995f, 0x9960, 0x94aa, 0x8cf6, 0x985a, 0x9961, 0x003f,
     0x003f, 0x8ba4, 0x003f, 0x003f, 0x003f, 0x95ba, 0x91b4, 0x8bef,
@@ -2409,9 +2607,9 @@
     0x003f, 0x9966, 0x8dfb, 0x003f, 0x9965, 0x8dc4, 0x003f, 0x9967,
     0xe3ec, 0x9968, 0x9660, 0x9969, 0x003f, 0x996a, 0x996b, 0x8fe7,
-    0x003f, 0x8eca, 0x003f, 0x003f, 0x003f, 0xed64, 0x003f, 0x003f,
+    0x003f, 0x8eca, 0x003f, 0x003f, 0x003f, 0xfa81, 0x003f, 0x003f,
     0x8aa5, 0x003f, 0x996e, 0x003f, 0x996c, 0x96bb, 0x996d, 0x003f,
     0x9579, 0x996f, 0x9970, 0x9971, 0x937e, 0x003f, 0x003f, 0x003f,
     0x9975, 0x9973, 0x9974, 0x9972, 0x8de1, 0x9976, 0x96e8, 0x97e2,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9977, 0xed65, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9977, 0xfa82, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x90a6, 0x9978, 0x8f79, 0x003f,
     0x003f, 0x9979, 0x003f, 0x929c, 0x97bd, 0x9380, 0x003f, 0x003f,
@@ -2419,5 +2617,5 @@
     0x003f, 0x003f, 0x003f, 0x997a, 0xeaa3, 0x8bc3, 0x003f, 0x003f,
     0x997b, 0x967d, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f88, 0x91fa,
-    0x003f, 0x997d, 0x93e2, 0x003f, 0xed66, 0x997e, 0x003f, 0x003f,
+    0x003f, 0x997d, 0x93e2, 0x003f, 0xfa83, 0x997e, 0x003f, 0x003f,
     0x9980, 0x8a4d, 0x003f, 0x003f, 0x003f, 0x9981, 0x8ba5, 0x003f,
     0x93ca, 0x899a, 0x8f6f, 0x003f, 0x003f, 0x949f, 0x9982, 0x003f,
@@ -2425,5 +2623,5 @@
     0x9381, 0x003f, 0x003f, 0x906e, 0x9983, 0x003f, 0x95aa, 0x90d8,
     0x8aa0, 0x003f, 0x8aa7, 0x9984, 0x003f, 0x003f, 0x9986, 0x003f,
-    0x003f, 0x8c59, 0x003f, 0x003f, 0x9985, 0xed67, 0x003f, 0x97f1,
+    0x003f, 0x8c59, 0x003f, 0x003f, 0x9985, 0xfa84, 0x003f, 0x97f1,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f89, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x94bb, 0x95ca, 0x003f, 0x9987,
@@ -2442,13 +2640,13 @@
     0x999c, 0x97ab, 0x003f, 0x003f, 0x003f, 0x9998, 0x003f, 0x003f,
     0x003f, 0x999d, 0x999a, 0x003f, 0x9999, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x97cd, 0xed68, 0x003f, 0x003f, 0x8cf7,
-    0x89c1, 0x003f, 0x003f, 0x97f2, 0x003f, 0x003f, 0xed69, 0x003f,
-    0x003f, 0x8f95, 0x9377, 0x8d85, 0x99a0, 0x99a1, 0x003f, 0xee5b,
+    0x003f, 0x003f, 0x003f, 0x97cd, 0xfa85, 0x003f, 0x003f, 0x8cf7,
+    0x89c1, 0x003f, 0x003f, 0x97f2, 0x003f, 0x003f, 0xfa86, 0x003f,
+    0x003f, 0x8f95, 0x9377, 0x8d85, 0x99a0, 0x99a1, 0x003f, 0xfb77,
     0x003f, 0x97e3, 0x003f, 0x003f, 0x984a, 0x99a3, 0x003f, 0x003f,
     0x003f, 0x8cf8, 0x003f, 0x003f, 0x99a2, 0x003f, 0x8a4e, 0x003f,
-    0xed6a, 0x99a4, 0x003f, 0x9675, 0x003f, 0x92ba, 0x003f, 0x9745,
+    0xfa87, 0x99a4, 0x003f, 0x9675, 0x003f, 0x92ba, 0x003f, 0x9745,
     0x003f, 0x95d7, 0x003f, 0x003f, 0x003f, 0x99a5, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe8d3, 0x003f, 0x003f, 0x93ae, 0x003f, 0x99a6,
-    0x8aa8, 0x96b1, 0x003f, 0xed6b, 0x003f, 0x8f9f, 0x99a7, 0x95e5,
+    0x8aa8, 0x96b1, 0x003f, 0xfa88, 0x003f, 0x8f9f, 0x99a7, 0x95e5,
     0x99ab, 0x003f, 0x90a8, 0x99a8, 0x8bce, 0x003f, 0x99a9, 0x8aa9,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2456,9 +2654,9 @@
     0x99ae, 0x99af, 0x8ed9, 0x003f, 0x003f, 0x003f, 0x8cf9, 0x96dc,
     /* 0x5300 .. 0x53ff */
-    0xed6c, 0x96e6, 0x93f5, 0x003f, 0x003f, 0x95ef, 0x99b0, 0xed6d,
+    0xfa89, 0x96e6, 0x93f5, 0x003f, 0x003f, 0x95ef, 0x99b0, 0xfa8a,
     0x99b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x99b3, 0x003f, 0x99b5,
     0x99b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x99b6, 0x89bb, 0x966b,
     0x003f, 0x8dfa, 0x99b7, 0x003f, 0x003f, 0x9178, 0x003f, 0x003f,
-    0x8fa0, 0x8ba7, 0x003f, 0x99b8, 0xed6e, 0x003f, 0x003f, 0x003f,
+    0x8fa0, 0x8ba7, 0x003f, 0x99b8, 0xfa8b, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x94d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x99b9,
     0x003f, 0x99ba, 0x003f, 0x99bb, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2470,18 +2668,18 @@
     0x90e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c54, 0x003f,
     0x003f, 0x99c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x99c6, 0x894b,
-    0x88f3, 0x8aeb, 0xed6f, 0x91a6, 0x8b70, 0x9791, 0x003f, 0x99c9,
+    0x88f3, 0x8aeb, 0xfa8c, 0x91a6, 0x8b70, 0x9791, 0x003f, 0x99c9,
     0x89b5, 0x003f, 0x003f, 0x99c8, 0x003f, 0x003f, 0x003f, 0x8ba8,
     0x003f, 0x003f, 0x99ca, 0x003f, 0x96ef, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xed70, 0x003f, 0x003f, 0x99cb, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xfa8d, 0x003f, 0x003f, 0x99cb, 0x003f,
     0x97d0, 0x003f, 0x8cfa, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cb4,
     0x99cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x99ce, 0x99cd, 0x003f,
     0x907e, 0x8958, 0x003f, 0x003f, 0x003f, 0x897d, 0x99cf, 0x003f,
-    0x99d0, 0x003f, 0xed71, 0x8cb5, 0x003f, 0x003f, 0x99d1, 0x003f,
+    0x99d0, 0x003f, 0xfa8e, 0x8cb5, 0x003f, 0x003f, 0x99d1, 0x003f,
     0x003f, 0x003f, 0x003f, 0x8b8e, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x8e51, 0x99d2, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9694, 0x8db3, 0x8b79, 0x9746, 0x916f, 0x94bd, 0x8efb, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8f66, 0x003f, 0x8ee6, 0x8ef3,
-    0x003f, 0x8f96, 0x003f, 0x94be, 0x003f, 0xed72, 0x003f, 0x99d5,
+    0x003f, 0x8f96, 0x003f, 0x94be, 0x003f, 0xfa8f, 0x003f, 0x99d5,
     0x003f, 0x8962, 0x9170, 0x8cfb, 0x8cc3, 0x8be5, 0x003f, 0x003f,
     0x99d9, 0x9240, 0x91fc, 0x8ba9, 0x8fa2, 0x99da, 0x99d8, 0x89c2,
@@ -2506,9 +2704,9 @@
     0x003f, 0x003f, 0x003f, 0x99ef, 0x8cc4, 0x96bd, 0x003f, 0x003f,
     0x99f0, 0x003f, 0x003f, 0x003f, 0x99f2, 0x003f, 0x99f4, 0x003f,
-    0x003f, 0x003f, 0xed75, 0x8dee, 0x9861, 0x003f, 0x99e9, 0x99e7,
+    0x003f, 0x003f, 0xfa92, 0x8dee, 0x9861, 0x003f, 0x99e9, 0x99e7,
     0x99f3, 0x003f, 0x99ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xed74, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfa91, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x99f6, 0x003f, 0x9a42, 0x99f8, 0x003f, 0x003f,
-    0x99fc, 0xed76, 0x003f, 0x9a40, 0x99f9, 0x003f, 0x003f, 0x9a5d,
+    0x99fc, 0xfa93, 0x003f, 0x9a40, 0x99f9, 0x003f, 0x003f, 0x9a5d,
     0x003f, 0x003f, 0x8de7, 0x8a50, 0x003f, 0x003f, 0x003f, 0x003f,
     0x99f7, 0x003f, 0x003f, 0x003f, 0x9a44, 0x88f4, 0x9a43, 0x003f,
@@ -2520,5 +2718,5 @@
     0x8fa3, 0x9689, 0x003f, 0x003f, 0x003f, 0x9a4c, 0x9a4b, 0x003f,
     0x003f, 0x003f, 0x934e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x9a4d, 0x003f, 0x003f, 0x9a4a, 0x003f, 0xed77,
+    0x003f, 0x003f, 0x9a4d, 0x003f, 0x003f, 0x9a4a, 0x003f, 0xfa94,
     /* 0x5500 .. 0x55ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x8953, 0x003f, 0x8db4, 0x904f,
@@ -2538,5 +2736,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9a60, 0x9a65, 0x003f, 0x9a61, 0x003f,
-    0x9a5c, 0x003f, 0x003f, 0x9a66, 0x9150, 0x003f, 0xed78, 0x9a68,
+    0x9a5c, 0x003f, 0x003f, 0x9a66, 0x9150, 0x003f, 0xfa95, 0x9a68,
     0x003f, 0x8d41, 0x9a5e, 0x929d, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2599,6 +2797,6 @@
     0x003f, 0x003f, 0x9656, 0x003f, 0x003f, 0x003f, 0x9aaa, 0x9aad,
     0x8dbf, 0x8d42, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xed79, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x9ab1, 0x003f, 0x003f, 0x8da3, 0xed7a, 0x9252, 0x003f,
+    0x003f, 0xfa96, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x9ab1, 0x003f, 0x003f, 0x8da3, 0xfa97, 0x9252, 0x003f,
     0x003f, 0x9aae, 0x92d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2609,9 +2807,9 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9ab5, 0x003f, 0x8d43, 0x8a5f, 0x9ab7, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x9ab8, 0x003f, 0xed7b, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x9ab8, 0x003f, 0xfa98, 0x003f, 0x003f, 0x003f,
     0x9ab9, 0x003f, 0x003f, 0x9ab6, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x9aaf, 0x003f, 0x003f, 0x9aba, 0x003f, 0x003f, 0x9abb, 0xed7d,
-    0xed7c, 0x003f, 0x003f, 0x9684, 0x003f, 0x003f, 0x8fe9, 0x003f,
+    0x9aaf, 0x003f, 0x003f, 0x9aba, 0x003f, 0x003f, 0x9abb, 0xfa9a,
+    0xfa99, 0x003f, 0x003f, 0x9684, 0x003f, 0x003f, 0x8fe9, 0x003f,
     0x003f, 0x003f, 0x9abd, 0x9abe, 0x9abc, 0x003f, 0x9ac0, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x9457, 0x003f, 0x003f, 0x88e6,
@@ -2640,8 +2838,8 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x95e6, 0x003f, 0x003f, 0x003f, 0x919d,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x92c4, 0x003f, 0xed81, 0x9ad0,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x92c4, 0x003f, 0xfa9d, 0x9ad0,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x966e, 0x003f, 0x003f, 0x9ad1, 0x003f, 0x003f, 0x9ad6, 0x003f,
-    0x003f, 0x003f, 0xed82, 0x95ad, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xfa9e, 0x95ad, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9ad5, 0x9acf, 0x9ad2, 0x9ad4, 0x003f, 0x003f, 0x8da4, 0x003f,
     0x003f, 0x95c7, 0x003f, 0x003f, 0x003f, 0x9ad7, 0x003f, 0x9264,
@@ -2655,5 +2853,5 @@
     /* 0x5900 .. 0x59ff */
     0x003f, 0x003f, 0x9ae7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x95cf, 0x9ae8, 0xed83, 0x003f, 0x003f, 0x003f, 0x89c4,
+    0x003f, 0x95cf, 0x9ae8, 0xfa9f, 0x003f, 0x003f, 0x003f, 0x89c4,
     0x9ae9, 0x003f, 0x003f, 0x003f, 0x003f, 0x975b, 0x8a4f, 0x003f,
     0x99c7, 0x8f67, 0x91bd, 0x9aea, 0x96e9, 0x003f, 0x003f, 0x003f,
@@ -2664,7 +2862,7 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x8982, 0x003f, 0x003f, 0x8aef,
     0x93de, 0x95f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x9af5, 0x9174,
-    0x9af4, 0x8c5f, 0x003f, 0xed84, 0x967a, 0x9af3, 0x003f, 0x9385,
-    0x9af7, 0x003f, 0x9af6, 0xed85, 0x003f, 0xed86, 0x003f, 0x003f,
-    0x9af9, 0x003f, 0x9af8, 0xed87, 0x003f, 0x899c, 0x003f, 0x9afa,
+    0x9af4, 0x8c5f, 0x003f, 0xfaa0, 0x967a, 0x9af3, 0x003f, 0x9385,
+    0x9af7, 0x003f, 0x9af6, 0xfaa1, 0x003f, 0xfaa2, 0x003f, 0x003f,
+    0x9af9, 0x003f, 0x9af8, 0xfaa3, 0x003f, 0x899c, 0x003f, 0x9afa,
     0x8fa7, 0x9afc, 0x9244, 0x003f, 0x9afb, 0x003f, 0x95b1, 0x003f,
     0x003f, 0x003f, 0x003f, 0x8f97, 0x937a, 0x003f, 0x003f, 0x003f,
@@ -2674,8 +2872,8 @@
     0x003f, 0x003f, 0x003f, 0x8b57, 0x003f, 0x003f, 0x9764, 0x003f,
     0x003f, 0x96ad, 0x003f, 0x9baa, 0x003f, 0x9b42, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x9b45, 0xed88, 0x91c3, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x9b45, 0xfaa4, 0x91c3, 0x003f, 0x003f,
     0x9657, 0x003f, 0x003f, 0x003f, 0x9369, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9b46, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x9685, 0xed89, 0x8dc8, 0x003f, 0x003f, 0x8fa8, 0x003f,
+    0x003f, 0x9685, 0xfaa5, 0x8dc8, 0x003f, 0x003f, 0x8fa8, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9b47, 0x003f,
     0x003f, 0x8e6f, 0x003f, 0x8e6e, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2730,5 +2928,5 @@
     0x9b71, 0x003f, 0x003f, 0x9b6f, 0x003f, 0x9b70, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x8e71, 0x9b72, 0x003f, 0x003f, 0x8d45, 0x9b73, 0xed8a, 0x8e9a,
+    0x8e71, 0x9b72, 0x003f, 0x003f, 0x8d45, 0x9b73, 0xfaa6, 0x8e9a,
     0x91b6, 0x003f, 0x9b74, 0x9b75, 0x8e79, 0x8d46, 0x003f, 0x96d0,
     0x003f, 0x003f, 0x003f, 0x8b47, 0x8cc7, 0x9b76, 0x8a77, 0x003f,
@@ -2744,10 +2942,10 @@
     0x8dc9, 0x003f, 0x003f, 0x8a51, 0x8983, 0x8faa, 0x89c6, 0x003f,
     0x9b82, 0x9765, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f68,
-    0xed8b, 0x003f, 0x8ee2, 0x9b83, 0x8af1, 0x93d0, 0x96a7, 0x9b84,
+    0xfaa7, 0x003f, 0x8ee2, 0x9b83, 0x8af1, 0x93d0, 0x96a7, 0x9b84,
     0x003f, 0x9b85, 0x003f, 0x003f, 0x9578, 0x003f, 0x003f, 0x003f,
     0x9b87, 0x003f, 0x8aa6, 0x8bf5, 0x9b86, 0x003f, 0x003f, 0x003f,
-    0xed8d, 0x003f, 0x003f, 0x8ab0, 0x003f, 0x9051, 0x9b8b, 0x8e40,
+    0xfaa9, 0x003f, 0x003f, 0x8ab0, 0x003f, 0x9051, 0x9b8b, 0x8e40,
     0x003f, 0x89c7, 0x9b8a, 0x003f, 0x9b88, 0x9b8c, 0x9b89, 0x944a,
-    0x9ecb, 0x9052, 0x003f, 0x9b8d, 0xed8e, 0x003f, 0x97be, 0x003f,
+    0x9ecb, 0x9052, 0x003f, 0x9b8d, 0xfaaa, 0x003f, 0x97be, 0x003f,
     0x9b8e, 0x003f, 0x003f, 0x9b90, 0x003f, 0x929e, 0x9b8f, 0x003f,
     0x90a1, 0x003f, 0x8e9b, 0x003f, 0x003f, 0x003f, 0x91ce, 0x8ef5,
@@ -2756,5 +2954,5 @@
     0x9b93, 0x88d1, 0x91b8, 0x9071, 0x003f, 0x9b94, 0x93b1, 0x8fac,
     0x003f, 0x8fad, 0x003f, 0x9b95, 0x003f, 0x003f, 0x90eb, 0x003f,
-    0x003f, 0x003f, 0x8fae, 0x003f, 0x003f, 0x003f, 0xed8f, 0x003f,
+    0x003f, 0x003f, 0x8fae, 0x003f, 0x003f, 0x003f, 0xfaab, 0x003f,
     0x9b96, 0x003f, 0x9b97, 0x003f, 0x96de, 0x003f, 0x003f, 0x003f,
     0x9b98, 0x003f, 0x003f, 0x003f, 0x003f, 0x8bc4, 0x003f, 0x003f,
@@ -2773,8 +2971,8 @@
     0x8af2, 0x9ba8, 0x003f, 0x003f, 0x9ba9, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x89aa, 0x003f, 0x003f, 0x003f, 0x003f, 0xed90, 0x003f,
+    0x003f, 0x89aa, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaac, 0x003f,
     0x915a, 0x8ae2, 0x003f, 0x9bab, 0x96a6, 0x003f, 0x003f, 0x003f,
     0x003f, 0x91d0, 0x003f, 0x8a78, 0x003f, 0x003f, 0x9bad, 0x9baf,
-    0x8add, 0x003f, 0xed91, 0x9bac, 0x9bae, 0x003f, 0x9bb1, 0x003f,
+    0x8add, 0x003f, 0xfaad, 0x9bac, 0x9bae, 0x003f, 0x9bb1, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9bb0, 0x003f, 0x9bb2,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2783,5 +2981,5 @@
     0x93bb, 0x8bac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x89e3, 0x9bb4, 0x9bb9, 0x003f, 0x003f, 0x9bb7, 0x003f, 0x95f5,
-    0x95f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xed92, 0x9387, 0x003f,
+    0x95f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaae, 0x9387, 0x003f,
     0x003f, 0x003f, 0x9bb6, 0x8f73, 0x003f, 0x9bb5, 0x003f, 0x003f,
     /* 0x5d00 .. 0x5dff */
@@ -2790,14 +2988,14 @@
     0x003f, 0x9bc0, 0x003f, 0x003f, 0x9bc1, 0x9bbb, 0x8a52, 0x9bbc,
     0x9bc5, 0x9bc4, 0x9bc3, 0x9bbf, 0x003f, 0x003f, 0x003f, 0x9bbe,
-    0x003f, 0x003f, 0x9bc2, 0x003f, 0x003f, 0x003f, 0x003f, 0xed93,
+    0x003f, 0x003f, 0x9bc2, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaaf,
     0x003f, 0x95f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xed96, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xfab2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9bc9, 0x9bc6, 0x003f, 0x9bc8, 0x003f,
-    0x9792, 0x003f, 0x9bc7, 0xed94, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9792, 0x003f, 0x9bc7, 0xfab0, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x9bbd, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x9093, 0x003f, 0x003f, 0x9bca, 0xed97, 0x003f, 0x8db5,
+    0x003f, 0x9093, 0x003f, 0x003f, 0x9bca, 0xfab3, 0x003f, 0x8db5,
     0x003f, 0x003f, 0x003f, 0x9bcb, 0x003f, 0x003f, 0x9bcc, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2809,8 +3007,8 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x9bd2, 0x003f, 0x9bd3, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9bd6,
-    0xed98, 0xed99, 0x97e4, 0x003f, 0x9bd7, 0x9bd4, 0x003f, 0x003f,
+    0xfab4, 0xfab5, 0x97e4, 0x003f, 0x9bd7, 0x9bd4, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x9bd8, 0x003f, 0x003f, 0x8ade, 0x9bd9, 0x003f, 0x003f,
-    0xed9a, 0x003f, 0x9bdb, 0x9bda, 0x003f, 0x003f, 0x9bdc, 0x003f,
+    0xfab6, 0x003f, 0x9bdb, 0x9bda, 0x003f, 0x003f, 0x9bdc, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9bdd, 0x003f, 0x90ec, 0x8f42, 0x003f,
     0x003f, 0x8f84, 0x003f, 0x9183, 0x003f, 0x8d48, 0x8db6, 0x8d49,
@@ -2856,13 +3054,13 @@
     0x93f3, 0x9c55, 0x003f, 0x8b7c, 0x92a2, 0x88f8, 0x9c56, 0x95a4,
     0x8d4f, 0x003f, 0x003f, 0x926f, 0x003f, 0x003f, 0x003f, 0x92ed,
-    0x003f, 0xed9b, 0x003f, 0x003f, 0x003f, 0x96ed, 0x8cb7, 0x8cca,
+    0x003f, 0xfab7, 0x003f, 0x003f, 0x003f, 0x96ed, 0x8cb7, 0x8cca,
     0x003f, 0x9c57, 0x003f, 0x003f, 0x003f, 0x9c58, 0x003f, 0x9c5e,
-    0x003f, 0x8ee3, 0x003f, 0x003f, 0xed9c, 0x92a3, 0x003f, 0x8bad,
+    0x003f, 0x8ee3, 0x003f, 0x003f, 0xfab8, 0x92a3, 0x003f, 0x8bad,
     0x9c59, 0x003f, 0x003f, 0x003f, 0x954a, 0x003f, 0x9265, 0x003f,
-    0x003f, 0x9c5a, 0x003f, 0x003f, 0x003f, 0xed4b, 0x003f, 0x003f,
+    0x003f, 0x9c5a, 0x003f, 0x003f, 0x003f, 0xfa67, 0x003f, 0x003f,
     0x9c5b, 0x003f, 0x8bae, 0x003f, 0x9c5c, 0x003f, 0x9c5d, 0x003f,
     0x003f, 0x9c5f, 0x003f, 0x9396, 0x003f, 0x003f, 0x9c60, 0x9c61,
     0x003f, 0x9c62, 0x003f, 0x003f, 0x9c53, 0x9c52, 0x003f, 0x003f,
-    0x003f, 0x9c63, 0x8c60, 0x003f, 0x003f, 0x003f, 0x9546, 0xed9d,
+    0x003f, 0x9c63, 0x8c60, 0x003f, 0x003f, 0x003f, 0x9546, 0xfab9,
     0x003f, 0x8dca, 0x9556, 0x92a4, 0x956a, 0x9c64, 0x003f, 0x003f,
     0x8fb2, 0x8965, 0x003f, 0x9c65, 0x003f, 0x003f, 0x003f, 0x9c66,
@@ -2874,10 +3072,10 @@
     0x9c71, 0x8ce4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9c72, 0x959c, 0x8f7a, 0x003f, 0x003f, 0x9c73, 0x94f7, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x93bf, 0x92a5, 0x003f, 0x003f, 0xed9e,
+    0x003f, 0x003f, 0x003f, 0x93bf, 0x92a5, 0x003f, 0x003f, 0xfaba,
     0x003f, 0x934f, 0x003f, 0x003f, 0x9c74, 0x8b4a, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9053, 0x003f, 0x954b, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8af5, 0x9445, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9c75, 0x8e75,
-    0x9659, 0x965a, 0x003f, 0x003f, 0x899e, 0x9c7a, 0xed9f, 0x003f,
+    0x9659, 0x965a, 0x003f, 0x003f, 0x899e, 0x9c7a, 0xfabb, 0x003f,
     0x9289, 0x003f, 0x003f, 0x003f, 0x9c77, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x89f5, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2896,11 +3094,11 @@
     0x003f, 0x003f, 0x9c90, 0x97f6, 0x003f, 0x9c92, 0x003f, 0x003f,
     0x8bb0, 0x003f, 0x8d50, 0x003f, 0x003f, 0x8f9a, 0x003f, 0x003f,
-    0x003f, 0x9c99, 0x9c8b, 0x003f, 0x003f, 0xeda0, 0x003f, 0x9c8f,
+    0x003f, 0x9c99, 0x9c8b, 0x003f, 0x003f, 0xfabc, 0x003f, 0x9c8f,
     0x9c7e, 0x003f, 0x89f8, 0x9c93, 0x9c95, 0x9270, 0x003f, 0x003f,
     0x8da6, 0x89b6, 0x9c8d, 0x9c98, 0x9c97, 0x8bb1, 0x003f, 0x91a7,
     0x8a86, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c62, 0x003f, 0x9c8e,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x9c9a, 0x003f, 0x9c9d, 0x9c9f, 0xeda1, 0x003f, 0x003f,
-    0x003f, 0x8ebb, 0xeda2, 0x9ca5, 0x92ee, 0x9c9b, 0x003f, 0x003f,
+    0x003f, 0x9c9a, 0x003f, 0x9c9d, 0x9c9f, 0xfabd, 0x003f, 0x003f,
+    0x003f, 0x8ebb, 0xfabe, 0x9ca5, 0x92ee, 0x9c9b, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9ca3, 0x003f, 0x89f7, 0x003f, 0x9ca1, 0x9ca2,
     0x003f, 0x003f, 0x9c9e, 0x9ca0, 0x003f, 0x003f, 0x003f, 0x8ce5,
@@ -2911,18 +3109,18 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fee, 0x9cad, 0x93d5,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x9866, 0x003f, 0x9ca9, 0x003f, 0xeda4, 0x003f, 0x003f,
-    0x9caf, 0x003f, 0x8d9b, 0x003f, 0x90c9, 0x003f, 0xeda3, 0x88d2,
+    0x003f, 0x9866, 0x003f, 0x9ca9, 0x003f, 0xfac0, 0x003f, 0x003f,
+    0x9caf, 0x003f, 0x8d9b, 0x003f, 0x90c9, 0x003f, 0xfabf, 0x88d2,
     0x9ca8, 0x9ca6, 0x003f, 0x9179, 0x003f, 0x003f, 0x003f, 0x9c9c,
     0x8e53, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x91c4, 0x9cbb, 0xeda6, 0x917a, 0x9cb6, 0x003f, 0x9cb3, 0x9cb4,
+    0x91c4, 0x9cbb, 0xfac2, 0x917a, 0x9cb6, 0x003f, 0x9cb3, 0x9cb4,
     0x003f, 0x8ee4, 0x9cb7, 0x9cba, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x6100 .. 0x61ff */
     0x9cb5, 0x8f44, 0x003f, 0x9cb8, 0x003f, 0x003f, 0x9cb2, 0x003f,
     0x96fa, 0x96f9, 0x003f, 0x003f, 0x003f, 0x9cbc, 0x9cbd, 0x88d3,
-    0x003f, 0xeda7, 0x003f, 0x003f, 0x003f, 0x9cb1, 0x003f, 0x003f,
+    0x003f, 0xfac3, 0x003f, 0x003f, 0x003f, 0x9cb1, 0x003f, 0x003f,
     0x003f, 0x003f, 0x8bf0, 0x88a4, 0x003f, 0x003f, 0x003f, 0x8ab4,
-    0xeda5, 0x9cb9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9cc1,
+    0xfac1, 0x9cb9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9cc1,
     0x9cc0, 0x003f, 0x003f, 0x003f, 0x9cc5, 0x003f, 0x003f, 0x003f,
-    0xeda9, 0x003f, 0x003f, 0x003f, 0x9cc6, 0x003f, 0x003f, 0xeda8,
+    0xfac5, 0x003f, 0x003f, 0x003f, 0x9cc6, 0x003f, 0x003f, 0xfac4,
     0x003f, 0x003f, 0x003f, 0x003f, 0x9cc4, 0x9cc7, 0x9cbf, 0x9cc3,
     0x003f, 0x003f, 0x9cc8, 0x003f, 0x9cc9, 0x003f, 0x003f, 0x9cbe,
@@ -2937,5 +3135,5 @@
     0x003f, 0x003f, 0x9cde, 0x003f, 0x003f, 0x003f, 0x919e, 0x003f,
     0x97f7, 0x9cdf, 0x003f, 0x003f, 0x9cdc, 0x003f, 0x9cd9, 0x003f,
-    0xedaa, 0x9cd8, 0x9cdd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfac6, 0x9cd8, 0x9cdd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x95ae, 0x003f, 0x003f, 0x93b2,
     0x003f, 0x8c65, 0x003f, 0x9ce0, 0x9cdb, 0x003f, 0x9ce1, 0x003f,
@@ -2953,5 +3151,5 @@
     0x9cf6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9cf7, 0x9cf8, 0x95e8, 0x003f, 0x9cfa, 0x9cf9, 0x8f5e, 0x003f,
-    0x90ac, 0x89e4, 0x89fa, 0xedab, 0x9cfb, 0x003f, 0x88bd, 0x003f,
+    0x90ac, 0x89e4, 0x89fa, 0xfac7, 0x9cfb, 0x003f, 0x88bd, 0x003f,
     0x003f, 0x003f, 0x90ca, 0x9cfc, 0x003f, 0xe6c1, 0x9d40, 0x8c81,
     0x003f, 0x9d41, 0x003f, 0x003f, 0x003f, 0x003f, 0x90ed, 0x003f,
@@ -2971,5 +3169,5 @@
     0x003f, 0x977d, 0x9d52, 0x9d53, 0x9d57, 0x938a, 0x9d54, 0x8d52,
     0x90dc, 0x003f, 0x003f, 0x9d65, 0x94b2, 0x003f, 0x91f0, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedac, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfac8, 0x003f,
     0x003f, 0x003f, 0x003f, 0x94e2, 0x9dab, 0x003f, 0x003f, 0x003f,
     0x003f, 0x95f8, 0x003f, 0x003f, 0x003f, 0x92ef, 0x003f, 0x003f,
@@ -3014,5 +3212,5 @@
     0x003f, 0x88ac, 0x003f, 0x9d85, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x9d82, 0x003f, 0x003f, 0x003f, 0x003f, 0x8af6, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x8987, 0xedad, 0x9d88, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x8987, 0xfac9, 0x9d88, 0x003f,
     0x003f, 0x003f, 0x9768, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x6400 .. 0x64ff */
@@ -3029,5 +3227,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9345, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xedae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d94,
+    0xfaca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d94,
     0x003f, 0x9680, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d95,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d96, 0x003f,
@@ -3036,5 +3234,5 @@
     0x9d9d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x8e54, 0x9d9a, 0x003f, 0x9d99, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x9451, 0x003f, 0x003f, 0xedaf, 0x93b3, 0x003f,
+    0x003f, 0x003f, 0x9451, 0x003f, 0x003f, 0xfacb, 0x93b3, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x9350, 0x9d9b, 0x003f, 0x003f,
     0x003f, 0x9d9c, 0x003f, 0x958f, 0x003f, 0x9464, 0x8e42, 0x003f,
@@ -3042,5 +3240,5 @@
     0x003f, 0x8a68, 0x003f, 0x9da3, 0x9d9e, 0x003f, 0x003f, 0x003f,
     0x003f, 0x9769, 0x9da5, 0x003f, 0x003f, 0x9da1, 0x003f, 0x9da2,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9180, 0xedb0, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9180, 0xfacc, 0x003f,
     0x003f, 0x003f, 0x9da0, 0x003f, 0x9d5e, 0x003f, 0x003f, 0x003f,
     0x9da4, 0x003f, 0x9d9f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3059,5 +3257,5 @@
     0x9dbf, 0x89fc, 0x003f, 0x8d55, 0x003f, 0x003f, 0x95fa, 0x90ad,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ccc, 0x003f, 0x003f,
-    0x9dc1, 0x003f, 0x003f, 0x003f, 0x003f, 0x9dc4, 0xedb1, 0x9571,
+    0x9dc1, 0x003f, 0x003f, 0x003f, 0x003f, 0x9dc4, 0xfacd, 0x9571,
     0x003f, 0x8b7e, 0x003f, 0x003f, 0x003f, 0x9dc3, 0x9dc2, 0x9473,
     0x9dc5, 0x8bb3, 0x003f, 0x003f, 0x003f, 0x9dc7, 0x9dc6, 0x003f,
@@ -3083,28 +3281,28 @@
     0x003f, 0x003f, 0x89a0, 0x9ddf, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x6600 .. 0x66ff */
-    0xedb2, 0x003f, 0x8d56, 0x9dde, 0x003f, 0x003f, 0x8da9, 0x8fb8,
-    0x003f, 0xedb5, 0x9ddd, 0x003f, 0x8fb9, 0x003f, 0x96be, 0x8da8,
-    0x003f, 0x003f, 0x003f, 0x88d5, 0x90cc, 0xedb3, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x9de4, 0x003f, 0xedb7, 0x90af,
-    0x8966, 0x003f, 0x003f, 0x003f, 0xedb8, 0x8f74, 0x003f, 0x9686,
-    0x8df0, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fba, 0xedb6, 0x90a5,
-    0x003f, 0xed47, 0x003f, 0x003f, 0x9de3, 0x9de1, 0x9de2, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xedb4, 0x928b, 0x003f, 0x003f, 0x9e45,
+    0xface, 0x003f, 0x8d56, 0x9dde, 0x003f, 0x003f, 0x8da9, 0x8fb8,
+    0x003f, 0xfad1, 0x9ddd, 0x003f, 0x8fb9, 0x003f, 0x96be, 0x8da8,
+    0x003f, 0x003f, 0x003f, 0x88d5, 0x90cc, 0xfacf, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x9de4, 0x003f, 0xfad3, 0x90af,
+    0x8966, 0x003f, 0x003f, 0x003f, 0xfad4, 0x8f74, 0x003f, 0x9686,
+    0x8df0, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fba, 0xfad2, 0x90a5,
+    0x003f, 0xfa63, 0x003f, 0x003f, 0x9de3, 0x9de1, 0x9de2, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xfad0, 0x928b, 0x003f, 0x003f, 0x9e45,
     0x003f, 0x9de8, 0x8e9e, 0x8d57, 0x9de6, 0x003f, 0x003f, 0x003f,
     0x003f, 0x9de7, 0x003f, 0x9057, 0x003f, 0x003f, 0x003f, 0x9de5,
-    0x003f, 0x003f, 0x8e4e, 0x003f, 0x003f, 0x003f, 0x003f, 0xedba,
-    0x003f, 0xedbb, 0x003f, 0x003f, 0x003f, 0x9dea, 0x9de9, 0x9dee,
-    0x003f, 0x003f, 0x9def, 0x003f, 0x9deb, 0xedb9, 0x8a41, 0x9dec,
+    0x003f, 0x003f, 0x8e4e, 0x003f, 0x003f, 0x003f, 0x003f, 0xfad6,
+    0x003f, 0xfad7, 0x003f, 0x003f, 0x003f, 0x9dea, 0x9de9, 0x9dee,
+    0x003f, 0x003f, 0x9def, 0x003f, 0x9deb, 0xfad5, 0x8a41, 0x9dec,
     0x9ded, 0x94d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x9581, 0x8c69,
-    0x9df0, 0x003f, 0x003f, 0xedbd, 0x90b0, 0x003f, 0x8fbb, 0x003f,
+    0x9df0, 0x003f, 0x003f, 0xfad9, 0x90b0, 0x003f, 0x8fbb, 0x003f,
     0x003f, 0x003f, 0x9271, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x8bc5, 0x003f, 0x9df1, 0x9df5, 0x003f, 0x003f, 0x89c9,
     0x9df2, 0x9df4, 0x003f, 0x003f, 0x003f, 0x003f, 0x9df3, 0x003f,
     0x003f, 0x8f8b, 0x003f, 0x003f, 0x003f, 0x003f, 0x9267, 0x88c3,
-    0x9df6, 0xedbe, 0x003f, 0x003f, 0x003f, 0x9df7, 0x003f, 0x003f,
-    0xedbf, 0x003f, 0x92a8, 0x003f, 0x003f, 0x003f, 0x97ef, 0x003f,
+    0x9df6, 0xfada, 0x003f, 0x003f, 0x003f, 0x9df7, 0x003f, 0x003f,
+    0xfadb, 0x003f, 0x92a8, 0x003f, 0x003f, 0x003f, 0x97ef, 0x003f,
     0x003f, 0x003f, 0x003f, 0x8e62, 0x003f, 0x003f, 0x95e9, 0x003f,
-    0x003f, 0x003f, 0xedc0, 0x003f, 0x965c, 0x003f, 0x003f, 0x003f,
-    0x9e41, 0x9df9, 0x003f, 0x003f, 0x9dfc, 0x003f, 0x9dfb, 0xedc1,
+    0x003f, 0x003f, 0xfadc, 0x003f, 0x965c, 0x003f, 0x003f, 0x003f,
+    0x9e41, 0x9df9, 0x003f, 0x003f, 0x9dfc, 0x003f, 0x9dfb, 0xfadd,
     0x003f, 0x9df8, 0x003f, 0x003f, 0x9e40, 0x003f, 0x003f, 0x93dc,
     0x003f, 0x9dfa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3114,8 +3312,8 @@
     0x003f, 0x9e47, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9e48, 0x003f, 0x8bc8, 0x8967, 0x8d58, 0x9e49, 0x003f, 0x9e4a,
-    0x8f91, 0x9182, 0xedc2, 0xed4a, 0x99d6, 0x915d, 0x915c, 0x91d6,
+    0x8f91, 0x9182, 0xfade, 0xfa66, 0x99d6, 0x915d, 0x915c, 0x91d6,
     /* 0x6700 .. 0x67ff */
     0x8dc5, 0x003f, 0x003f, 0x98f0, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x8c8e, 0x974c, 0x003f, 0x95fc, 0x003f, 0x959e, 0xedc3, 0x9e4b,
+    0x8c8e, 0x974c, 0x003f, 0x95fc, 0x003f, 0x959e, 0xfadf, 0x9e4b,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8df1, 0x92bd, 0x9e4c, 0x984e,
     0x003f, 0x003f, 0x003f, 0x965d, 0x003f, 0x92a9, 0x9e4d, 0x8afa,
@@ -3128,5 +3326,5 @@
     0x8dde, 0x91ba, 0x003f, 0x8edb, 0x003f, 0x003f, 0x8ff1, 0x003f,
     0x003f, 0x9e5a, 0x003f, 0x003f, 0x936d, 0x003f, 0x9e58, 0x91a9,
-    0x9e59, 0x8ff0, 0x96db, 0x9e5b, 0x9e5c, 0x9788, 0xedc5, 0x003f,
+    0x9e59, 0x8ff0, 0x96db, 0x9e5b, 0x9e5c, 0x9788, 0xfae1, 0x003f,
     0x003f, 0x003f, 0x9e61, 0x003f, 0x003f, 0x8d59, 0x003f, 0x9474,
     0x9e5e, 0x938c, 0x9ddc, 0x9de0, 0x003f, 0x8b6e, 0x003f, 0x9466,
@@ -3139,6 +3337,6 @@
     0x003f, 0x9e5f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ccd,
     0x003f, 0x003f, 0x003f, 0x9e6b, 0x9e69, 0x003f, 0x89cb, 0x9e67,
-    0x9e6d, 0x9e73, 0x003f, 0xedc6, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xedc8, 0x91c6, 0x003f, 0x003f, 0x95bf, 0x003f, 0x9e75, 0x003f,
+    0x9e6d, 0x9e73, 0x003f, 0xfae2, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfae4, 0x91c6, 0x003f, 0x003f, 0x95bf, 0x003f, 0x9e75, 0x003f,
     0x003f, 0x003f, 0x9541, 0x003f, 0x003f, 0x003f, 0x9e74, 0x9490,
     0x965e, 0x8ab9, 0x003f, 0x90f5, 0x8f5f, 0x003f, 0x003f, 0x003f,
@@ -3149,5 +3347,5 @@
     0x003f, 0x003f, 0x003f, 0x8db8, 0x003f, 0x003f, 0x968f, 0x8a60,
     /* 0x6800 .. 0x68ff */
-    0x003f, 0xedc9, 0x92cc, 0x93c8, 0x8968, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xfae5, 0x92cc, 0x93c8, 0x8968, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x90f0, 0x003f, 0x003f, 0x90b2, 0x8c49,
@@ -3157,7 +3355,7 @@
     0x003f, 0x003f, 0x9e7d, 0x003f, 0x90f1, 0x003f, 0x003f, 0x003f,
     0x8a6a, 0x8daa, 0x003f, 0x003f, 0x8a69, 0x8dcd, 0x003f, 0x003f,
-    0x9e7b, 0x8c85, 0x8c6a, 0x938d, 0xedca, 0x003f, 0x9e79, 0x003f,
+    0x9e7b, 0x8c85, 0x8c6a, 0x938d, 0xfae6, 0x003f, 0x9e79, 0x003f,
     0x88c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e7c, 0x9e7e, 0x003f,
-    0x8bcb, 0x8c4b, 0xedc7, 0x8aba, 0x8b6a, 0x003f, 0x003f, 0x003f,
+    0x8bcb, 0x8c4b, 0xfae3, 0x8aba, 0x8b6a, 0x003f, 0x003f, 0x003f,
     0x003f, 0x9e82, 0x003f, 0x003f, 0x8df7, 0x9691, 0x003f, 0x8e56,
     0x003f, 0x003f, 0x003f, 0x9e83, 0x003f, 0x003f, 0x003f, 0x954f,
@@ -3174,5 +3372,5 @@
     0x003f, 0x9e8e, 0x9e92, 0x003f, 0x938e, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8afc, 0x003f, 0x9eb0, 0x003f,
-    0xed48, 0x96c7, 0x9e97, 0x8afb, 0x003f, 0x9e9e, 0x003f, 0xedcb,
+    0xfa64, 0x96c7, 0x9e97, 0x8afb, 0x003f, 0x9e9e, 0x003f, 0xfae7,
     0x003f, 0x003f, 0x965f, 0x003f, 0x9e9f, 0x9ea1, 0x003f, 0x9ea5,
     0x9e99, 0x003f, 0x9249, 0x003f, 0x003f, 0x003f, 0x003f, 0x938f,
@@ -3195,5 +3393,5 @@
     0x003f, 0x9ebc, 0x915e, 0x003f, 0x9eb3, 0x9ec0, 0x9ebf, 0x003f,
     0x93ed, 0x9ebe, 0x93e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xedcd, 0x003f, 0x9ec2, 0x9eb5, 0x003f, 0x8bc6, 0x9eb8, 0x8f7c,
+    0xfae9, 0x003f, 0x9ec2, 0x9eb5, 0x003f, 0x8bc6, 0x9eb8, 0x8f7c,
     0x003f, 0x003f, 0x003f, 0x9480, 0x9eba, 0x8bc9, 0x003f, 0x9eb2,
     0x9eb4, 0x9eb1, 0x003f, 0x003f, 0x984f, 0x8a79, 0x9eb7, 0x003f,
@@ -3201,5 +3399,5 @@
     0x003f, 0x003f, 0x8de5, 0x003f, 0x003f, 0x003f, 0x897c, 0x003f,
     0x003f, 0x9ed2, 0x003f, 0x003f, 0x9850, 0x9ed5, 0x003f, 0x003f,
-    0xedcf, 0x003f, 0x003f, 0x9059, 0x9ed4, 0x003f, 0x003f, 0x003f,
+    0xfaeb, 0x003f, 0x003f, 0x9059, 0x9ed4, 0x003f, 0x003f, 0x003f,
     0x9ed3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ed0,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ec4, 0x003f,
@@ -3210,5 +3408,5 @@
     0x9ec5, 0x003f, 0x003f, 0x9ec8, 0x003f, 0x003f, 0x003f, 0x003f,
     0x976c, 0x968a, 0x003f, 0x003f, 0x003f, 0x9ecd, 0x9ed7, 0x003f,
-    0x003f, 0x003f, 0xedd0, 0x003f, 0x003f, 0x003f, 0x003f, 0x9edf,
+    0x003f, 0x003f, 0xfaec, 0x003f, 0x003f, 0x003f, 0x003f, 0x9edf,
     0x9ed8, 0x003f, 0x003f, 0x9ee5, 0x003f, 0x9ee3, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9ede, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3221,14 +3419,14 @@
     0x003f, 0x96cd, 0x9ef6, 0x9ee9, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x8ca0, 0x89a1, 0x8a7e, 0x003f, 0x003f, 0x9ed1, 0x003f,
-    0xedd1, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fbf, 0x9eee, 0x003f,
+    0xfaed, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fbf, 0x9eee, 0x003f,
     0x9ef5, 0x8ef7, 0x8a92, 0x003f, 0x003f, 0x924d, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x9eeb, 0x003f, 0xedd3, 0x9ef0,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x9eeb, 0x003f, 0xfaef, 0x9ef0,
     0x9ef4, 0x003f, 0x003f, 0x8bb4, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x8b6b, 0x9ef2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b40,
     0x003f, 0x93c9, 0x9ef1, 0x003f, 0x003f, 0x003f, 0x9ef3, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xedd2, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x9eed, 0xedd4, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x9eef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedd5, 0x8a80,
+    0x003f, 0x003f, 0x003f, 0xfaee, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x9eed, 0xfaf0, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9eef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaf1, 0x8a80,
     0x9268, 0x003f, 0x003f, 0x003f, 0x9efa, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ef8, 0x8ce7, 0x003f,
@@ -3243,5 +3441,5 @@
     0x003f, 0x9f49, 0x003f, 0x9845, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9f4c, 0x8bf9, 0x003f, 0x003f, 0x9f48, 0x9f4a,
-    0x003f, 0x003f, 0xedd6, 0x003f, 0xedd7, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xfaf2, 0x003f, 0xfaf3, 0x003f, 0x003f, 0x003f,
     0x94a5, 0x003f, 0x9f4d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3274,5 +3472,5 @@
     0x9aca, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b42, 0x9f77, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9f78, 0x003f, 0x95ea, 0x9688, 0x003f,
-    0x003f, 0x003f, 0x93c5, 0x9f79, 0x94e4, 0x003f, 0xedd8, 0x003f,
+    0x003f, 0x003f, 0x93c5, 0x9f79, 0x94e4, 0x003f, 0xfaf4, 0x003f,
     0x94f9, 0x003f, 0x003f, 0x96d1, 0x003f, 0x003f, 0x003f, 0x9f7a,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3288,14 +3486,14 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x9085, 0x003f, 0x003f, 0x9558,
-    0x8969, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94c3, 0xedd9,
+    0x8969, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94c3, 0xfaf5,
     0x92f3, 0x8f60, 0x8b81, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94c4, 0x003f,
     0x8eac, 0x003f, 0x003f, 0x003f, 0x003f, 0x9f88, 0x003f, 0x8abe,
-    0x003f, 0x003f, 0x8998, 0x003f, 0xedda, 0x93f0, 0x9f87, 0x8d5d,
+    0x003f, 0x003f, 0x8998, 0x003f, 0xfaf6, 0x93f0, 0x9f87, 0x8d5d,
     0x9272, 0x003f, 0x9f89, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x9f91, 0x003f, 0x9f8a, 0x003f, 0x003f, 0x003f, 0x003f, 0xeddc,
+    0x9f91, 0x003f, 0x9f8a, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaf8,
     0x91bf, 0x003f, 0x8b82, 0x9f92, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x8c88, 0x003f, 0x003f, 0x8b44, 0x9f90, 0x003f,
-    0x003f, 0x9f8e, 0x9f8b, 0x9780, 0x003f, 0x003f, 0xeddb, 0x003f,
+    0x003f, 0x9f8e, 0x9f8b, 0x9780, 0x003f, 0x003f, 0xfaf7, 0x003f,
     0x92be, 0x003f, 0x003f, 0x003f, 0x93d7, 0x9f8c, 0x003f, 0x003f,
     0x9f94, 0x003f, 0x9f93, 0x8c42, 0x003f, 0x003f, 0x89ab, 0x003f,
@@ -3308,5 +3506,5 @@
     0x003f, 0x90f2, 0x9491, 0x003f, 0x94e5, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9f97, 0x003f, 0x9640, 0x003f, 0x9f99,
-    0x003f, 0x9fa2, 0xeddd, 0x9fa0, 0x003f, 0x9f9b, 0x003f, 0x003f,
+    0x003f, 0x9fa2, 0xfaf9, 0x9fa0, 0x003f, 0x9f9b, 0x003f, 0x003f,
     0x003f, 0x9641, 0x9467, 0x8b83, 0x003f, 0x9344, 0x003f, 0x003f,
     0x928d, 0x003f, 0x9fa3, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fa1,
@@ -3314,5 +3512,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x6d00 .. 0x6dff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0xedde, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfafa, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x976d, 0x9fae, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9fad, 0x003f, 0x003f, 0x003f, 0x003f, 0x90f4,
@@ -3327,23 +3525,23 @@
     0x003f, 0x9fb4, 0x9fb2, 0x003f, 0x956c, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9faf, 0x9fb1, 0x003f, 0x8959, 0x003f,
-    0x003f, 0x8d5f, 0x9851, 0x003f, 0x8a5c, 0x003f, 0x9582, 0xede0,
+    0x003f, 0x8d5f, 0x9851, 0x003f, 0x8a5c, 0x003f, 0x9582, 0xfafc,
     0x003f, 0x003f, 0x003f, 0x003f, 0x9781, 0x003f, 0x003f, 0x8a43,
     0x905a, 0x9fb3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fb8, 0x003f, 0xeddf,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fb8, 0x003f, 0xfafb,
     0x8fc1, 0x003f, 0x003f, 0x003f, 0x974f, 0x003f, 0x9fb5, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x9fb0, 0x003f, 0x9fb6, 0xede1, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x9fb0, 0x003f, 0x9fb6, 0xfb40, 0x003f,
     0x003f, 0x97dc, 0x003f, 0x9393, 0x93c0, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xede2, 0x003f, 0x003f, 0x8a55,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfb41, 0x003f, 0x003f, 0x8a55,
     0x003f, 0x003f, 0x8974, 0x003f, 0x003f, 0x9fbc, 0x003f, 0x003f,
     0x9fbf, 0x003f, 0x003f, 0x003f, 0x97c1, 0x003f, 0x003f, 0x003f,
     0x9784, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fc6, 0x9fc0, 0x9fbd,
-    0x003f, 0x003f, 0x003f, 0x97d2, 0x9fc3, 0x003f, 0x003f, 0xede3,
+    0x003f, 0x003f, 0x003f, 0x97d2, 0x9fc3, 0x003f, 0x003f, 0xfb42,
     0x003f, 0x8f69, 0x9fc5, 0x003f, 0x003f, 0x9fca, 0x003f, 0x003f,
     0x9391, 0x9fc8, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fc2, 0x003f,
     0x003f, 0x9257, 0x003f, 0x003f, 0x9fc9, 0x003f, 0x9fbe, 0x003f,
     0x9fc4, 0x003f, 0x9fcb, 0x88fa, 0x9fc1, 0x003f, 0x9fcc, 0x003f,
-    0x003f, 0x905b, 0xede5, 0x8f7e, 0x003f, 0x95a3, 0x003f, 0x8dac,
-    0xede4, 0x9fb9, 0x9fc7, 0x9359, 0xede6, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x905b, 0xfb44, 0x8f7e, 0x003f, 0x95a3, 0x003f, 0x8dac,
+    0xfb43, 0x9fb9, 0x9fc7, 0x9359, 0xfb45, 0x003f, 0x003f, 0x003f,
     /* 0x6e00 .. 0x6eff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x90b4, 0x003f, 0x8a89,
@@ -3351,12 +3549,12 @@
     0x003f, 0x003f, 0x003f, 0x8c6b, 0x003f, 0x9fba, 0x003f, 0x003f,
     0x003f, 0x9fd0, 0x8f8d, 0x8cb8, 0x003f, 0x9fdf, 0x003f, 0x9fd9,
-    0x8b94, 0x936e, 0x003f, 0x9fd4, 0x9fdd, 0x88ad, 0x8951, 0xede9,
+    0x8b94, 0x936e, 0x003f, 0x9fd4, 0x9fdd, 0x88ad, 0x8951, 0xfb48,
     0x003f, 0x89b7, 0x003f, 0x9fd6, 0x91aa, 0x9fcd, 0x9fcf, 0x8d60,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x9fe0, 0xede7, 0x9fdb, 0x003f, 0xedea, 0x003f, 0x9fd3, 0x003f,
+    0x9fe0, 0xfb46, 0x9fdb, 0x003f, 0xfb49, 0x003f, 0x9fd3, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9fda, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x96a9, 0x003f, 0x003f, 0x9fd8, 0x9fdc, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cce, 0x003f,
-    0x8fc3, 0x003f, 0x003f, 0x9258, 0xede8, 0x003f, 0x003f, 0x9fd2,
+    0x8fc3, 0x003f, 0x003f, 0x9258, 0xfb47, 0x003f, 0x003f, 0x9fd2,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x974e,
     0x003f, 0x003f, 0x003f, 0x9fd5, 0x003f, 0x003f, 0x9fce, 0x9392,
@@ -3370,5 +3568,5 @@
     0x003f, 0x003f, 0x9fe2, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fe8,
     0x003f, 0x003f, 0x9fea, 0x003f, 0x003f, 0x003f, 0x976e, 0x9fe5,
-    0x003f, 0x003f, 0x934d, 0x003f, 0x003f, 0x9fe7, 0x003f, 0xedeb,
+    0x003f, 0x003f, 0x934d, 0x003f, 0x003f, 0x9fe7, 0x003f, 0xfb4a,
     0x003f, 0x003f, 0x9fef, 0x003f, 0x9fe9, 0x96c5, 0x003f, 0x003f,
     0x003f, 0x9fe4, 0x003f, 0x8ea0, 0x9ffc, 0x003f, 0x003f, 0x003f,
@@ -3397,10 +3595,10 @@
     0xe045, 0x003f, 0xe044, 0x003f, 0xe04d, 0x003f, 0x003f, 0x003f,
     0xe047, 0xe046, 0xe04c, 0x003f, 0x909f, 0x003f, 0xe043, 0x003f,
-    0xedec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe04f, 0x003f,
+    0xfb4b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe04f, 0x003f,
     0x003f, 0xe050, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ac0,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe055, 0x003f, 0xe054, 0xe056, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe059, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x9362, 0x003f, 0xe053, 0x003f, 0xeded, 0x003f, 0x003f,
+    0x003f, 0x9362, 0x003f, 0xe053, 0x003f, 0xfb4c, 0x003f, 0x003f,
     0x003f, 0xe057, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x8c83, 0x91f7, 0xe051, 0x945a, 0x003f, 0x003f, 0xe058, 0x003f,
@@ -3410,13 +3608,13 @@
     0x8d8a, 0x9447, 0x003f, 0x003f, 0x9fb7, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x9794, 0xe05c, 0x003f, 0xe060, 0x91f3,
-    0x003f, 0xe05f, 0x003f, 0xe04a, 0x003f, 0xedee, 0xe889, 0x003f,
+    0x003f, 0xe05f, 0x003f, 0xe04a, 0x003f, 0xfb4d, 0xe889, 0x003f,
     0x003f, 0x003f, 0xe064, 0x003f, 0x003f, 0x003f, 0xe068, 0x003f,
     /* 0x7000 .. 0x70ff */
-    0x003f, 0xe066, 0x003f, 0x003f, 0x003f, 0xedef, 0x003f, 0xedf0,
+    0x003f, 0xe066, 0x003f, 0x003f, 0x003f, 0xfb4e, 0x003f, 0xfb4f,
     0x003f, 0xe062, 0x003f, 0xe063, 0x003f, 0x003f, 0x003f, 0xe067,
     0x003f, 0xe065, 0x003f, 0x003f, 0x003f, 0x956d, 0x003f, 0x003f,
     0xe06d, 0x003f, 0xe06a, 0xe069, 0x003f, 0xe06c, 0x93d2, 0xe06e,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9295, 0x91eb,
-    0xedf1, 0x003f, 0x003f, 0x003f, 0x90a3, 0x003f, 0x003f, 0x003f,
+    0xfb50, 0x003f, 0x003f, 0x003f, 0x90a3, 0x003f, 0x003f, 0x003f,
     0xe06f, 0x003f, 0xe071, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe070, 0x003f,
@@ -3429,12 +3627,12 @@
     0x8a44, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x8b84, 0x003f, 0x003f, 0x003f, 0x8edc, 0x8dd0, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedf2, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb51, 0x003f, 0x003f,
     0x003f, 0x9846, 0x9086, 0x003f, 0x003f, 0x003f, 0x898a, 0x003f,
     0x003f, 0x003f, 0xe075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe074, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xedf3, 0xe078, 0x9259, 0xe07b, 0xe076,
+    0x003f, 0x003f, 0x003f, 0xfb52, 0xe078, 0x9259, 0xe07b, 0xe076,
     0x003f, 0x003f, 0x003f, 0xe07a, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xe079, 0x935f, 0x88d7, 0xed46, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe079, 0x935f, 0x88d7, 0xfa62, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x97f3, 0x003f, 0x003f, 0xe07d, 0x003f, 0x003f, 0x003f, 0x8947,
@@ -3446,6 +3644,6 @@
     0x003f, 0x9642, 0x003f, 0x003f, 0x003f, 0xe082, 0x003f, 0x003f,
     /* 0x7100 .. 0x71ff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0xedf5, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xe081, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedf4,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfb54, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe081, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb53,
     0x003f, 0x003f, 0x003f, 0x003f, 0x898b, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe084, 0x95b0, 0x003f, 0xe083, 0x003f, 0x003f, 0x003f,
@@ -3454,8 +3652,8 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9152, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8fc4, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedf7, 0xedf8,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb56, 0xfb57,
     0x003f, 0x97f9, 0x003f, 0x003f, 0xe08a, 0x003f, 0x90f7, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe086, 0xe08b, 0x003f,
-    0x003f, 0x898c, 0x003f, 0x003f, 0xedf6, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x898c, 0x003f, 0x003f, 0xfb55, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe089, 0x003f, 0x9481, 0xe085, 0xe088, 0x8fc6,
     0x003f, 0x94cf, 0x003f, 0x003f, 0xe08c, 0x003f, 0x8ecf, 0x003f,
@@ -3470,5 +3668,5 @@
     0x003f, 0x944d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe094, 0x003f, 0x003f, 0x003f, 0x003f, 0xe095, 0x003f,
-    0x003f, 0xedfa, 0x003f, 0x9452, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xfb59, 0x003f, 0x9452, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9395, 0xe097, 0x003f, 0x003f, 0x003f, 0x003f, 0xe099, 0x003f,
     0x97d3, 0x003f, 0xe096, 0x003f, 0xe098, 0x898d, 0x003f, 0xe093,
@@ -3477,5 +3675,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0xe09b, 0x9043, 0x99d7, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe09d, 0x003f, 0x003f,
-    0x003f, 0xe09f, 0x003f, 0xe08e, 0xe09e, 0x003f, 0xedfb, 0xe0a0,
+    0x003f, 0xe09f, 0x003f, 0xe08e, 0xe09e, 0x003f, 0xfb5a, 0xe0a0,
     /* 0x7200 .. 0x72ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x949a, 0x003f,
@@ -3501,6 +3699,6 @@
     0x8b5d, 0x003f, 0xe0b7, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0b8,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8ca2, 0x003f, 0x003f, 0x94c6,
-    0x003f, 0xedfc, 0xe0ba, 0x003f, 0x003f, 0x003f, 0x8ff3, 0x003f,
-    0x003f, 0xe0b9, 0x003f, 0x003f, 0x003f, 0x003f, 0xee40, 0x003f,
+    0x003f, 0xfb5b, 0xe0ba, 0x003f, 0x003f, 0x003f, 0x8ff3, 0x003f,
+    0x003f, 0xe0b9, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb5c, 0x003f,
     0x003f, 0x003f, 0x8bb6, 0xe0bb, 0xe0bd, 0x003f, 0xe0bc, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0be, 0x003f,
@@ -3516,5 +3714,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0c9, 0xe0c6,
     0x003f, 0x003f, 0x003f, 0x96d2, 0xe0c8, 0xe0ca, 0x003f, 0x97c2,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xee41, 0xe0ce, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfb5d, 0xe0ce, 0x003f, 0x003f,
     0x003f, 0xe0cd, 0x9296, 0x944c, 0x003f, 0x003f, 0x8ca3, 0xe0cc,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe0cb, 0x003f, 0x9750, 0x9751,
@@ -3526,5 +3724,5 @@
     0x003f, 0x003f, 0x003f, 0x8f62, 0x003f, 0x003f, 0x003f, 0x003f,
     0xe0d5, 0x003f, 0xe0d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xe0d6, 0x003f, 0x8a6c, 0x003f, 0x003f, 0xe0d8, 0x003f, 0xee43,
+    0xe0d6, 0x003f, 0x8a6c, 0x003f, 0x003f, 0xe0d8, 0x003f, 0xfb5f,
     0xe0d7, 0x003f, 0xe0da, 0xe0d9, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8cba, 0x003f, 0x003f, 0x97a6,
@@ -3535,20 +3733,20 @@
     0x003f, 0x8adf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x97e6, 0xe0dc, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xe0de, 0x003f, 0xee44, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xe0de, 0x003f, 0xfb60, 0x003f, 0x003f,
     0xe0df, 0x003f, 0x89cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xe0db, 0xee45, 0x8e58, 0x003f, 0x003f, 0x92bf, 0xe0dd, 0x003f,
-    0x003f, 0x003f, 0xee48, 0x003f, 0x003f, 0x003f, 0xee46, 0x003f,
+    0xe0db, 0xfb61, 0x8e58, 0x003f, 0x003f, 0x92bf, 0xe0dd, 0x003f,
+    0x003f, 0x003f, 0xfb64, 0x003f, 0x003f, 0x003f, 0xfb62, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e2, 0x003f,
-    0x8eec, 0x003f, 0x003f, 0xee47, 0x003f, 0xe0e0, 0x003f, 0x003f,
+    0x8eec, 0x003f, 0x003f, 0xfb63, 0x003f, 0xe0e0, 0x003f, 0x003f,
     0x003f, 0x003f, 0x8c5d, 0x003f, 0x003f, 0x94c7, 0xe0e1, 0x003f,
-    0x003f, 0xe0fc, 0x003f, 0x003f, 0x003f, 0xee4a, 0x003f, 0x003f,
+    0x003f, 0xe0fc, 0x003f, 0x003f, 0x003f, 0xfb66, 0x003f, 0x003f,
     0xe0e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cbb, 0x003f,
     /* 0x7400 .. 0x74ff */
-    0x003f, 0x003f, 0x003f, 0x8b85, 0x003f, 0xe0e4, 0x979d, 0xee49,
+    0x003f, 0x003f, 0x003f, 0x8b85, 0x003f, 0xe0e4, 0x979d, 0xfb65,
     0x003f, 0x97ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x91f4, 0x003f, 0x003f, 0xe0e6, 0xee4b, 0x003f,
-    0x003f, 0xee4d, 0xee4c, 0x003f, 0x003f, 0x003f, 0xee4e, 0x003f,
+    0x003f, 0x003f, 0x91f4, 0x003f, 0x003f, 0xe0e6, 0xfb67, 0x003f,
+    0x003f, 0xfb69, 0xfb68, 0x003f, 0x003f, 0x003f, 0xfb6a, 0x003f,
     0x003f, 0x003f, 0xe0e8, 0x97d4, 0x8bd5, 0x94fa, 0x9469, 0x003f,
     0x003f, 0x003f, 0xe0e9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0eb,
@@ -3557,12 +3755,12 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ea, 0x003f, 0x003f,
     0x003f, 0xe0ed, 0x8ce8, 0x896c, 0xe0ef, 0x003f, 0x9090, 0xe0ec,
-    0x97da, 0x003f, 0xee4f, 0xe0f2, 0xeaa2, 0x003f, 0x003f, 0x003f,
+    0x97da, 0x003f, 0xfb6b, 0xe0f2, 0xeaa2, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe0f0, 0xe0f3, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e5,
     0xe0f1, 0x003f, 0x003f, 0x8dba, 0x003f, 0x003f, 0xe0f4, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f5, 0x003f,
     0x003f, 0x003f, 0x003f, 0x979e, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xee50, 0x003f, 0xe0f6, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f7, 0xee51,
+    0x003f, 0xfb6c, 0x003f, 0xe0f6, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f7, 0xfb6d,
     0x003f, 0x003f, 0xe0e3, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f8,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3578,10 +3776,10 @@
     0xe148, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x7500 .. 0x75ff */
-    0x003f, 0xee52, 0x003f, 0xe14b, 0xe14a, 0xe14c, 0x003f, 0x003f,
+    0x003f, 0xfb6e, 0x003f, 0xe14b, 0xe14a, 0xe14c, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe14d, 0xe14f, 0xe14e, 0x003f,
     0x003f, 0x8d99, 0x003f, 0xe151, 0x003f, 0xe150, 0x003f, 0x003f,
     0x8ac3, 0x003f, 0x9072, 0x003f, 0x935b, 0x003f, 0xe152, 0x90b6,
     0x003f, 0x003f, 0x003f, 0x8e59, 0x003f, 0x8999, 0xe153, 0x003f,
-    0x9770, 0x003f, 0x003f, 0x95e1, 0xe154, 0x003f, 0x003f, 0xed8c,
+    0x9770, 0x003f, 0x003f, 0x95e1, 0xe154, 0x003f, 0x003f, 0xfaa8,
     0x9363, 0x9752, 0x8d62, 0x905c, 0x003f, 0x003f, 0x003f, 0x926a,
     0x99b2, 0x003f, 0x92ac, 0x89e6, 0xe155, 0x003f, 0x003f, 0x003f,
@@ -3591,5 +3789,5 @@
     0x003f, 0x97af, 0xe15c, 0xe15a, 0x927b, 0x90a4, 0x003f, 0x003f,
     0x94a9, 0x003f, 0x954c, 0x003f, 0xe15e, 0x97aa, 0x8c6c, 0xe15f,
-    0x003f, 0xe15d, 0x94d4, 0xe160, 0x003f, 0xe161, 0x003f, 0xee53,
+    0x003f, 0xe15d, 0x94d4, 0xe160, 0x003f, 0xe161, 0x003f, 0xfb6f,
     0x88d9, 0x003f, 0x003f, 0x8ff4, 0xe166, 0x003f, 0xe163, 0x93eb,
     0xe162, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b45,
@@ -3627,9 +3825,9 @@
     0xe19e, 0x003f, 0xe19f, 0x003f, 0x003f, 0x003f, 0xe1a0, 0x003f,
     0xe1a1, 0x003f, 0x94ad, 0x936f, 0xe1a2, 0x9492, 0x9553, 0x003f,
-    0xe1a3, 0x003f, 0xee54, 0xe1a4, 0x9349, 0x003f, 0x8a46, 0x8d63,
+    0xe1a3, 0x003f, 0xfb70, 0xe1a4, 0x9349, 0x003f, 0x8a46, 0x8d63,
     0xe1a5, 0x003f, 0x003f, 0xe1a6, 0x003f, 0x003f, 0xe1a7, 0x003f,
     0x8e48, 0x003f, 0x003f, 0xe1a9, 0x003f, 0x003f, 0xe1a8, 0x003f,
-    0x003f, 0xe1aa, 0xe1ab, 0xee57, 0xee55, 0x003f, 0xee56, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee58, 0x003f,
+    0x003f, 0xe1aa, 0xe1ab, 0xfb73, 0xfb71, 0x003f, 0xfb72, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb74, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94e7, 0x003f,
     0xe1ac, 0x003f, 0x003f, 0x003f, 0xe1ad, 0x003f, 0x003f, 0xea89,
@@ -3652,5 +3850,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1c5,
     0xe1c6, 0x003f, 0x92ad, 0x003f, 0x8ae1, 0x003f, 0x003f, 0x003f,
-    0x9285, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee5a, 0xe1c7,
+    0x9285, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb76, 0xe1c7,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3681,16 +3879,16 @@
     0x003f, 0x003f, 0xe1e5, 0x003f, 0x8ca4, 0x8dd3, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xe1e7, 0xee5c, 0x003f, 0x003f, 0x003f, 0x9375, 0x8dd4, 0x8b6d,
+    0xe1e7, 0xfb78, 0x003f, 0x003f, 0x003f, 0x9375, 0x8dd4, 0x8b6d,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9643, 0x003f, 0x946a, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9376, 0x003f, 0x003f, 0x003f, 0x003f, 0x8d7b,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e9, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee5d, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb79, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fc9, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xee5e, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfb7a, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x97b0, 0x8d64, 0x003f, 0x003f, 0x8ca5,
     0x003f, 0x003f, 0x94a1, 0x003f, 0xe1eb, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xee5f, 0x003f, 0xe1ed, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xfb7b, 0x003f, 0xe1ed, 0x003f, 0x003f, 0x003f,
     0x003f, 0x8ce9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ec, 0x92f4,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe1ef, 0x8a56, 0xe1ea, 0x003f,
@@ -3716,5 +3914,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e6, 0x003f,
     0x003f, 0x003f, 0xe1e8, 0xe249, 0xe248, 0x003f, 0x003f, 0x003f,
-    0xee60, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfb7c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x8ea6, 0x003f, 0x97e7, 0x003f, 0x8ed0, 0x003f,
     0xe24a, 0x8c56, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b5f,
@@ -3728,6 +3926,6 @@
     0xe268, 0x8bd6, 0x003f, 0x003f, 0x985c, 0x9154, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe253, 0x003f, 0x003f, 0x89d0, 0x92f5, 0x959f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xee64, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xee66, 0x003f, 0xe254, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfb81, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xfb83, 0x003f, 0xe254, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b9a, 0xe255,
     0x003f, 0x003f, 0xe257, 0x003f, 0x003f, 0x003f, 0xe258, 0x003f,
@@ -3769,8 +3967,8 @@
     0x003f, 0x003f, 0x003f, 0x8a96, 0xe282, 0xe281, 0x003f, 0xe285,
     0xe27d, 0x003f, 0xe286, 0x97a7, 0x003f, 0xe287, 0x003f, 0xe288,
-    0x003f, 0xee67, 0x9af2, 0xe28a, 0x003f, 0xe289, 0x003f, 0x003f,
+    0x003f, 0xfb84, 0x9af2, 0xe28a, 0x003f, 0xe289, 0x003f, 0x003f,
     0x003f, 0xe28b, 0xe28c, 0x003f, 0x97b3, 0xe28d, 0x003f, 0xe8ed,
-    0x8fcd, 0xe28e, 0xe28f, 0x8f76, 0x003f, 0x93b6, 0xe290, 0xee68,
-    0x003f, 0x003f, 0x9247, 0xee6a, 0x003f, 0xe291, 0x003f, 0x925b,
+    0x8fcd, 0xe28e, 0xe28f, 0x8f76, 0x003f, 0x93b6, 0xe290, 0xfb85,
+    0x003f, 0x003f, 0x9247, 0xfb87, 0x003f, 0xe291, 0x003f, 0x925b,
     0xe292, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ba3, 0x003f,
     0x995e, 0x927c, 0x8eb1, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ac6,
@@ -3795,5 +3993,5 @@
     0x003f, 0x003f, 0x003f, 0xe2b3, 0x003f, 0xe2b0, 0x003f, 0xe2b5,
     0x003f, 0x003f, 0xe2b4, 0x003f, 0x9493, 0x96a5, 0x003f, 0x8e5a,
-    0xe2ae, 0xe2b7, 0xe2b2, 0x003f, 0xe2b1, 0xe2ad, 0xee6b, 0xe2af,
+    0xe2ae, 0xe2b7, 0xe2b2, 0x003f, 0xe2b1, 0xe2ad, 0xfb88, 0xe2af,
     0x003f, 0x8ac7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x925c, 0x003f, 0x003f, 0x90fb, 0x003f, 0x003f,
@@ -3851,7 +4049,7 @@
     0x003f, 0x8fd0, 0x8dae, 0x003f, 0x003f, 0x003f, 0x003f, 0xe348,
     0x003f, 0x003f, 0x8f49, 0x8cbc, 0x9167, 0xe344, 0xe34a, 0x003f,
-    0xee6d, 0x003f, 0x003f, 0xe345, 0x8c6f, 0x003f, 0xe34d, 0xe351,
+    0xfb8a, 0x003f, 0x003f, 0xe345, 0x8c6f, 0x003f, 0xe34d, 0xe351,
     0x8c8b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe34c, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xe355, 0xee6e, 0x003f, 0x8d69, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xe355, 0xfb8b, 0x003f, 0x8d69, 0x003f,
     0x003f, 0x978d, 0x88ba, 0xe352, 0x003f, 0x003f, 0x8b8b, 0x003f,
     0xe34f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe350, 0x003f,
@@ -3862,11 +4060,11 @@
     0x003f, 0x003f, 0x003f, 0xe353, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x8c70, 0x91b1, 0xe358, 0x918e, 0x003f, 0x003f, 0xe365,
-    0xee70, 0x003f, 0xe361, 0xe35b, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfb8d, 0x003f, 0xe361, 0xe35b, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe35f, 0x8ef8, 0x88db, 0xe35a, 0xe362,
-    0xe366, 0x8d6a, 0x96d4, 0x003f, 0x92d4, 0xe35c, 0x003f, 0xee6f,
+    0xe366, 0x8d6a, 0x96d4, 0x003f, 0x92d4, 0xe35c, 0x003f, 0xfb8c,
     0xe364, 0x003f, 0xe359, 0x925d, 0x003f, 0xe35e, 0x88bb, 0x96c8,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe35d,
     0x003f, 0x003f, 0x8bd9, 0x94ea, 0x003f, 0x003f, 0x003f, 0x918d,
-    0x003f, 0x97ce, 0x8f8f, 0x003f, 0x003f, 0xe38e, 0xee71, 0x003f,
+    0x003f, 0x97ce, 0x8f8f, 0x003f, 0x003f, 0xe38e, 0xfb8e, 0x003f,
     0xe367, 0x003f, 0x90fc, 0x003f, 0xe363, 0xe368, 0xe36a, 0x003f,
     0x92f7, 0xe36d, 0x003f, 0x003f, 0xe369, 0x003f, 0x003f, 0x003f,
@@ -3885,5 +4083,5 @@
     0x003f, 0x94c9, 0x003f, 0xe37d, 0x003f, 0x003f, 0xe378, 0x003f,
     0x003f, 0x003f, 0x9140, 0x8c71, 0x003f, 0x8f4a, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xee72, 0x003f, 0x9044, 0x9155, 0xe384, 0x003f,
+    0x003f, 0x003f, 0xfb8f, 0x003f, 0x9044, 0x9155, 0xe384, 0x003f,
     0x003f, 0xe386, 0xe387, 0x003f, 0x003f, 0xe383, 0xe385, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe379, 0xe382,
@@ -3892,5 +4090,5 @@
     0x003f, 0xe388, 0x003f, 0xe38c, 0xe38b, 0xe38f, 0x003f, 0xe391,
     0x003f, 0x003f, 0x8e5b, 0xe38d, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xe392, 0xe393, 0xed40, 0x003f, 0xe394, 0x003f, 0xe39a, 0x935a,
+    0xe392, 0xe393, 0xfa5c, 0x003f, 0xe394, 0x003f, 0xe39a, 0x935a,
     0xe396, 0x003f, 0xe395, 0xe397, 0xe398, 0x003f, 0xe399, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe39b, 0xe39c, 0x003f, 0x003f, 0x003f,
@@ -3916,5 +4114,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8aca, 0x003f,
     0xe39d, 0x003f, 0xe39e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe39f, 0x003f, 0xee73,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe39f, 0x003f, 0xfb90,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe3a0, 0xe3a1, 0xe3a2, 0x003f,
     0xe3a3, 0xe3a4, 0x003f, 0x003f, 0xe3a6, 0xe3a5, 0x003f, 0x003f,
@@ -3928,5 +4126,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0xe3b4, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe3b7, 0x003f, 0x003f, 0xe3b6, 0xe3b5, 0x003f,
-    0x003f, 0xee74, 0x003f, 0xe3b8, 0x8c51, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xfb91, 0x003f, 0xe3b8, 0x8c51, 0x003f, 0x003f, 0x003f,
     0x9141, 0x8b60, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3bc, 0xe3b9,
     0x003f, 0x003f, 0xe3ba, 0x003f, 0x003f, 0x003f, 0xe3bd, 0x003f,
@@ -4040,5 +4238,5 @@
     0x003f, 0xe499, 0xe495, 0xe498, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x8300 .. 0x83ff */
-    0x003f, 0xee76, 0x96ce, 0xe497, 0x89d6, 0x8a9d, 0xe49b, 0x003f,
+    0x003f, 0xfb93, 0x96ce, 0xe497, 0x89d6, 0x8a9d, 0xe49b, 0x003f,
     0x003f, 0xe49d, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c73, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a1, 0xe4aa,
@@ -4052,8 +4250,8 @@
     0xe4a6, 0x003f, 0x8d72, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x9191, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xee77, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xfb94, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe4b8, 0x003f, 0xe4b9, 0x003f, 0x89d7,
-    0x003f, 0x003f, 0x003f, 0x89ac, 0xe4b6, 0x003f, 0x003f, 0xee78,
+    0x003f, 0x003f, 0x003f, 0x89ac, 0xe4b6, 0x003f, 0x003f, 0xfb95,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ac, 0x003f, 0xe4b4,
     0x003f, 0xe4bb, 0xe4b5, 0x003f, 0x003f, 0x003f, 0xe4b3, 0x003f,
@@ -4064,5 +4262,5 @@
     0x003f, 0x9789, 0x003f, 0x003f, 0x003f, 0xe4b7, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4cd, 0x003f, 0x003f,
-    0x003f, 0xe4c5, 0x003f, 0x003f, 0x003f, 0x909b, 0x003f, 0xee79,
+    0x003f, 0xe4c5, 0x003f, 0x003f, 0x003f, 0x909b, 0x003f, 0xfb96,
     0x003f, 0x003f, 0x8b65, 0x003f, 0x8bdb, 0x003f, 0xe4c0, 0x003f,
     0x003f, 0x003f, 0x003f, 0x89d9, 0x003f, 0x003f, 0x8fd2, 0x003f,
@@ -4070,5 +4268,5 @@
     0xe4c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x95ec, 0x003f, 0xe4bf, 0x003f, 0x003f, 0x003f, 0x89d8,
-    0x8cd4, 0x9548, 0xe4c9, 0x003f, 0xe4bd, 0x003f, 0xee7a, 0xe4c6,
+    0x8cd4, 0x9548, 0xe4c9, 0x003f, 0xe4bd, 0x003f, 0xfb97, 0xe4c6,
     0x003f, 0x003f, 0x003f, 0xe4d0, 0x003f, 0xe4c1, 0x003f, 0x003f,
     /* 0x8400 .. 0x84ff */
@@ -4082,5 +4280,5 @@
     0xe4ce, 0x003f, 0x003f, 0x003f, 0xe4d3, 0x978e, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4dc, 0x003f,
-    0xee7b, 0x9774, 0x003f, 0x003f, 0x003f, 0x003f, 0x97a8, 0x003f,
+    0xfb98, 0x9774, 0x003f, 0x003f, 0x003f, 0x003f, 0x97a8, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9298,
     0x003f, 0x003f, 0x003f, 0x8a8b, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4095,10 +4293,10 @@
     0x003f, 0xe4ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d8, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x8a97, 0x003f, 0xee7c, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x8a97, 0x003f, 0xfb99, 0x003f, 0x003f, 0x003f,
     0x8ff6, 0xe4e3, 0x003f, 0xe4e8, 0x9193, 0x003f, 0x003f, 0xe4e4,
     0x003f, 0xe4eb, 0x003f, 0x003f, 0x927e, 0x003f, 0xe4ec, 0x003f,
     0x003f, 0x9775, 0xe4e1, 0x8a57, 0x003f, 0xe4e7, 0x003f, 0x003f,
     0xe4ea, 0x96aa, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ed, 0x003f,
-    0x003f, 0xe4e6, 0xe4e9, 0x003f, 0xed44, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe4e6, 0xe4e9, 0x003f, 0xfa60, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x9648, 0x003f, 0x9840, 0x003f,
@@ -4116,8 +4314,8 @@
     0xe4f9, 0xe540, 0x003f, 0x94d7, 0x003f, 0x003f, 0x003f, 0x003f,
     0xe4fc, 0x8fd4, 0x8ec7, 0xe542, 0x003f, 0x003f, 0x8bbc, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xee7d, 0x003f, 0xe543, 0x003f, 0x9599,
-    0xe4fb, 0xee7e, 0xe4d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xfb9a, 0x003f, 0xe543, 0x003f, 0x9599,
+    0xe4fb, 0xfb9b, 0xe4d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe4fa, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x986e, 0x93a0, 0x9593, 0xee80, 0x003f, 0xe54a, 0x003f, 0x003f,
+    0x986e, 0x93a0, 0x9593, 0xfb9c, 0x003f, 0xe54a, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe550,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe551, 0x003f,
@@ -4128,5 +4326,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0xe545, 0x003f, 0x9145, 0x003f,
     0xe549, 0x8e46, 0x9064, 0x8c4f, 0x96f2, 0x003f, 0x96f7, 0x8f92,
-    0xee82, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfb9e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe556, 0xe554, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x986d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4205,5 +4403,5 @@
     0x003f, 0x8a49, 0x003f, 0x8b61, 0x003f, 0x003f, 0xe5b7, 0x003f,
     /* 0x8800 .. 0x88ff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a2, 0x003f, 0xee85,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a2, 0x003f, 0xfba1,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b6, 0xe5ba, 0xe5b5,
     0x003f, 0xe5bc, 0x003f, 0x003f, 0x003f, 0xe5be, 0xe5bd, 0x003f,
@@ -4235,5 +4433,5 @@
     0x003f, 0x97a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xe5e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xe5ea, 0x8fd6, 0xe5e8, 0xee86, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xe5ea, 0x8fd6, 0xe5e8, 0xfba2, 0x003f, 0x003f,
     0x9787, 0xe5e5, 0x003f, 0x003f, 0xe5e7, 0x90bb, 0x909e, 0x003f,
     /* 0x8900 .. 0x89ff */
@@ -4241,5 +4439,5 @@
     0x003f, 0x003f, 0xe5ed, 0x003f, 0xe5ec, 0x003f, 0x003f, 0x003f,
     0x8a8c, 0x003f, 0x964a, 0xe5ee, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xed41, 0xe5fa, 0xe5f0, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfa5d, 0xe5fa, 0xe5f0, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f1, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe5f2, 0xe5f3, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4273,9 +4471,9 @@
     0x8cbe, 0x003f, 0x92f9, 0xe65d, 0x003f, 0x003f, 0x003f, 0x003f,
     0x8c76, 0x003f, 0x9075, 0x003f, 0xe660, 0x003f, 0x93a2, 0x003f,
-    0xe65f, 0x003f, 0xee87, 0x8c50, 0x003f, 0x003f, 0xe65e, 0x91f5,
+    0xe65f, 0x003f, 0xfba3, 0x8c50, 0x003f, 0x003f, 0xe65e, 0x91f5,
     0x8b4c, 0x003f, 0x003f, 0xe661, 0x003f, 0xe662, 0x003f, 0x8fd7,
     0x003f, 0x003f, 0x003f, 0x8c8d, 0x003f, 0xe663, 0x003f, 0x003f,
     0x003f, 0x003f, 0x964b, 0x003f, 0x003f, 0x90dd, 0x003f, 0x003f,
-    0x003f, 0x8b96, 0x003f, 0x96f3, 0x9169, 0x003f, 0xe664, 0xee88,
+    0x003f, 0x8b96, 0x003f, 0x96f3, 0x9169, 0x003f, 0xe664, 0xfba4,
     0x003f, 0x003f, 0x9066, 0x9290, 0x8fd8, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe665, 0x003f, 0x003f, 0x003f, 0x003f, 0xe668, 0x003f,
@@ -4286,20 +4484,20 @@
     0x003f, 0x8e8d, 0x003f, 0x986c, 0xe66c, 0xe66b, 0x9146, 0x003f,
     0x8b6c, 0x9862, 0x8a59, 0x8fda, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xee89, 0x003f, 0x003f, 0xe66a, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xfba5, 0x003f, 0x003f, 0xe66a, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe66f, 0x003f, 0xe670, 0xe66e, 0x003f, 0x8cd6,
     0x003f, 0x975f, 0x003f, 0x003f, 0x8e8f, 0x9446, 0x003f, 0x003f,
     0x003f, 0xe673, 0x003f, 0x90be, 0x003f, 0x9261, 0x003f, 0x003f,
     0x9755, 0x003f, 0xe676, 0x003f, 0x003f, 0x003f, 0x8cea, 0x003f,
-    0x90bd, 0xe672, 0x003f, 0xe677, 0x8ceb, 0xe674, 0xe675, 0xee8a,
+    0x90bd, 0xe672, 0x003f, 0xe677, 0x8ceb, 0xe674, 0xe675, 0xfba6,
     0xe671, 0x003f, 0x003f, 0x003f, 0x90e0, 0x93c7, 0x003f, 0x003f,
     0x924e, 0x003f, 0x89db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x94ee, 0x003f, 0x003f, 0x8b62, 0x003f, 0xee8b, 0x92b2,
+    0x003f, 0x94ee, 0x003f, 0x003f, 0x8b62, 0x003f, 0xfba7, 0x92b2,
     0x003f, 0x003f, 0xe67a, 0x003f, 0xe678, 0x003f, 0x003f, 0x926b,
     0x003f, 0x003f, 0x003f, 0x90bf, 0x8ad0, 0xe679, 0x003f, 0x907a,
     0x003f, 0x003f, 0x97c8, 0x003f, 0x003f, 0x003f, 0x985f, 0x003f,
-    0x003f, 0x003f, 0xe67b, 0xe687, 0x92b3, 0x003f, 0xe686, 0xee8c,
+    0x003f, 0x003f, 0xe67b, 0xe687, 0x92b3, 0x003f, 0xe686, 0xfba8,
     0xe683, 0xe68b, 0xe684, 0x003f, 0xe680, 0x003f, 0x92fa, 0xe67e,
     0x003f, 0x003f, 0x003f, 0xe67c, 0x003f, 0x9740, 0x8e90, 0x003f,
-    0x003f, 0xe681, 0x003f, 0xe67d, 0x003f, 0x003f, 0xee8e, 0xe685,
+    0x003f, 0xe681, 0x003f, 0xe67d, 0x003f, 0x003f, 0xfbaa, 0xe685,
     0x8f94, 0x003f, 0x8cbf, 0x003f, 0x003f, 0x003f, 0x91f8, 0x003f,
     /* 0x8b00 .. 0x8bff */
@@ -4314,10 +4512,10 @@
     0x003f, 0xe696, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe69a, 0x003f, 0x003f, 0xe697, 0x003f, 0xe699, 0xe698,
-    0x003f, 0x003f, 0x003f, 0xee8f, 0x003f, 0x003f, 0xe69b, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xfbab, 0x003f, 0x003f, 0xe69b, 0x003f,
     0x8eaf, 0x003f, 0xe69d, 0xe69c, 0x9588, 0x003f, 0x003f, 0xe69f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c78, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe69e, 0xe6a0, 0x003f, 0x003f, 0xe6a1,
     0x8b63, 0xe3bf, 0x8ff7, 0x003f, 0xe6a2, 0x003f, 0x003f, 0x8cec,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a3, 0x003f, 0xee90,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a3, 0x003f, 0xfbac,
     0xe6a4, 0x003f, 0x003f, 0x8e5d, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9dcc, 0x003f, 0xe6a5, 0x003f, 0xe6a6, 0x003f,
@@ -4367,10 +4565,10 @@
     0x9485, 0x003f, 0x8cab, 0xe6cc, 0xe6cb, 0x003f, 0x958a, 0x003f,
     0x003f, 0x003f, 0x8ebf, 0x003f, 0x003f, 0x9371, 0x003f, 0x003f,
-    0xee91, 0x003f, 0x003f, 0x003f, 0xee92, 0x003f, 0x003f, 0x003f,
+    0xfbad, 0x003f, 0x003f, 0x003f, 0xfbae, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe6cf, 0xe6d0, 0x8d77, 0xe6ce, 0x003f, 0x003f,
     /* 0x8d00 .. 0x8dff */
     0x003f, 0x003f, 0x003f, 0x003f, 0xe6d1, 0xe6d2, 0x003f, 0xe6d4,
     0x91a1, 0x003f, 0xe6d3, 0x8ae4, 0x003f, 0xe6d6, 0x003f, 0xe6d5,
-    0xe6d7, 0x003f, 0xee93, 0xe6d9, 0xe6db, 0x003f, 0xe6dc, 0x003f,
+    0xe6d7, 0x003f, 0xfbaf, 0xe6d9, 0xe6db, 0x003f, 0xe6dc, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4384,5 +4582,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x90d4, 0x003f, 0x8ecd, 0xe6dd,
     0x003f, 0x003f, 0x003f, 0x8a71, 0x003f, 0xe6de, 0x003f, 0x003f,
-    0x9196, 0xe6df, 0x003f, 0xe6e0, 0x958b, 0x003f, 0xee94, 0x8b4e,
+    0x9196, 0xe6df, 0x003f, 0xe6e0, 0x958b, 0x003f, 0xfbb0, 0x8b4e,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe6e1, 0x003f, 0x003f, 0x003f, 0x92b4, 0x003f, 0x003f,
@@ -4428,5 +4626,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe75e, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe75f, 0xe75c, 0x003f,
-    0xe760, 0x003f, 0x8ed4, 0xe761, 0x8b4f, 0x8c52, 0x003f, 0xee96,
+    0xe760, 0x003f, 0x8ed4, 0xe761, 0x8b4f, 0x8c52, 0x003f, 0xfbb2,
     0x003f, 0x003f, 0x8cac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe762, 0x003f, 0x003f, 0x003f, 0x93ee,
@@ -4481,5 +4679,5 @@
     0xe7a0, 0xe7a1, 0xe7a2, 0x93b9, 0x9242, 0x88e1, 0xe7a6, 0x003f,
     0xe7a7, 0xeaa1, 0x003f, 0x003f, 0x91bb, 0x003f, 0xe7a8, 0x003f,
-    0x8993, 0x916b, 0x003f, 0x8cad, 0x003f, 0x9779, 0x003f, 0xee99,
+    0x8993, 0x916b, 0x003f, 0x8cad, 0x003f, 0x9779, 0x003f, 0xfbb5,
     0xe7a9, 0x934b, 0x003f, 0x003f, 0x003f, 0x9198, 0x8ed5, 0xe7aa,
     0x003f, 0x003f, 0xe7ad, 0x003f, 0x003f, 0x8f85, 0xe7ab, 0x914a,
@@ -4496,5 +4694,5 @@
     0x003f, 0x003f, 0x8d78, 0x003f, 0x003f, 0x003f, 0x9859, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xe7bc, 0x003f, 0x003f, 0xee9a, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xe7bc, 0x003f, 0x003f, 0xfbb6, 0x003f,
     0x003f, 0x8c53, 0xe7b9, 0x003f, 0xe7ba, 0x003f, 0x003f, 0x003f,
     0x9594, 0x003f, 0x003f, 0x003f, 0x003f, 0x8a73, 0x003f, 0x003f,
@@ -4504,7 +4702,7 @@
     0x003f, 0x003f, 0xe7bd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xe7be, 0x003f, 0x003f, 0xee9c, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xe7be, 0x003f, 0x003f, 0xfbb8, 0x003f, 0x003f,
     0x003f, 0xe7bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee9d,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbb9,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9341, 0x003f, 0x003f,
     0xe7c1, 0x003f, 0xe7c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4528,32 +4726,32 @@
     0xe7d4, 0xe7d5, 0x003f, 0x003f, 0x003f, 0x003f, 0x94ce, 0x8dd1,
     0x8edf, 0xe7d6, 0x003f, 0xe7d7, 0x97a2, 0x8f64, 0x96ec, 0x97ca,
-    0xe7d8, 0x8be0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7d9, 0xee9f,
-    0x9342, 0x003f, 0xee9e, 0xe7dc, 0x8a98, 0x906a, 0xeea0, 0xe7da,
-    0x003f, 0xe7db, 0x003f, 0x92de, 0xeea3, 0xeea4, 0x9674, 0x8bfa,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeea1, 0xeea2, 0x003f,
+    0xe7d8, 0x8be0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7d9, 0xfbbb,
+    0x9342, 0x003f, 0xfbba, 0xe7dc, 0x8a98, 0x906a, 0xfbbc, 0xe7da,
+    0x003f, 0xe7db, 0x003f, 0x92de, 0xfbbf, 0xfbc0, 0x9674, 0x8bfa,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbbd, 0xfbbe, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7de, 0xe7df, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe7dd, 0x003f, 0x003f, 0xe7e1,
     /* 0x9200 .. 0x92ff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeea5, 0x003f,
-    0x003f, 0x003f, 0xeea7, 0x003f, 0x003f, 0x93dd, 0x8a62, 0x003f,
-    0xeea6, 0xe7e5, 0x003f, 0x003f, 0xe7e2, 0xe7e4, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbc1, 0x003f,
+    0x003f, 0x003f, 0xfbc3, 0x003f, 0x003f, 0x93dd, 0x8a62, 0x003f,
+    0xfbc2, 0xe7e5, 0x003f, 0x003f, 0xe7e2, 0xe7e4, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e0, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe86e, 0x003f, 0x003f, 0xe7e3, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x97e9, 0x003f, 0x003f, 0x8cd8,
-    0x003f, 0xeeae, 0xeea8, 0x003f, 0xeeaa, 0x003f, 0x003f, 0xe7ed,
-    0xeea9, 0x003f, 0x003f, 0x003f, 0x9353, 0xe7e8, 0x003f, 0x003f,
-    0xe7eb, 0xe7e9, 0x003f, 0xe7ee, 0x003f, 0x003f, 0xeeab, 0x003f,
-    0xe7ef, 0xeead, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e7,
-    0x003f, 0xeeac, 0xe7f4, 0x8994, 0x003f, 0x003f, 0xe7e6, 0x003f,
-    0x003f, 0x003f, 0x94ab, 0x003f, 0xe7ea, 0x003f, 0x8fde, 0xeeaf,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x8d7a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeb1,
-    0xeeb2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9667, 0x003f,
+    0x003f, 0xfbca, 0xfbc4, 0x003f, 0xfbc6, 0x003f, 0x003f, 0xe7ed,
+    0xfbc5, 0x003f, 0x003f, 0x003f, 0x9353, 0xe7e8, 0x003f, 0x003f,
+    0xe7eb, 0xe7e9, 0x003f, 0xe7ee, 0x003f, 0x003f, 0xfbc7, 0x003f,
+    0xe7ef, 0xfbc9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e7,
+    0x003f, 0xfbc8, 0xe7f4, 0x8994, 0x003f, 0x003f, 0xe7e6, 0x003f,
+    0x003f, 0x003f, 0x94ab, 0x003f, 0xe7ea, 0x003f, 0x8fde, 0xfbcb,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x8d7a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbcd,
+    0xfbce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9667, 0x003f,
     0x8be2, 0x003f, 0x003f, 0x8f65, 0x003f, 0x93ba, 0x003f, 0x003f,
-    0xed43, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfa5f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x914c, 0x003f, 0xe7f2, 0x003f, 0xe7ec, 0xe7f1, 0x003f,
     0x96c1, 0x003f, 0x92b6, 0xe7f3, 0xe7f0, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeb0,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbcc,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x914b, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f7,
@@ -4561,26 +4759,26 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f5,
-    0xeeb6, 0x003f, 0x964e, 0xeeba, 0x003f, 0xeeb8, 0x003f, 0xeeb4,
-    0x003f, 0xeeb5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xeeb9, 0x003f, 0x003f, 0x003f, 0x8f9b, 0x003f, 0x003f, 0xeeb3,
+    0xfbd2, 0x003f, 0x964e, 0xfbd6, 0x003f, 0xfbd4, 0x003f, 0xfbd0,
+    0x003f, 0xfbd1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfbd5, 0x003f, 0x003f, 0x003f, 0x8f9b, 0x003f, 0x003f, 0xfbcf,
     0x003f, 0xe7f8, 0x95dd, 0x003f, 0x003f, 0x8973, 0x003f, 0x003f,
     0x003f, 0x003f, 0x9565, 0x9292, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x8b98, 0xed49, 0xe7fa, 0xeebd, 0x8d7c, 0x003f, 0x003f, 0xeec0,
+    0x8b98, 0xfa65, 0xe7fa, 0xfbd9, 0x8d7c, 0x003f, 0x003f, 0xfbdc,
     /* 0x9300 .. 0x93ff */
-    0x003f, 0x003f, 0xeec2, 0x003f, 0x003f, 0x003f, 0x8e4b, 0x003f,
+    0x003f, 0x003f, 0xfbde, 0x003f, 0x003f, 0x003f, 0x8e4b, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f9,
     0x908d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x908e, 0xe840, 0xe842, 0x003f, 0x003f, 0xeec1, 0xeebf, 0x003f,
-    0x8ff9, 0xeebc, 0xe841, 0xe843, 0x003f, 0xeebb, 0x8bd1, 0x003f,
+    0x908e, 0xe840, 0xe842, 0x003f, 0x003f, 0xfbdd, 0xfbdb, 0x003f,
+    0x8ff9, 0xfbd8, 0xe841, 0xe843, 0x003f, 0xfbd7, 0x8bd1, 0x003f,
     0x9564, 0x003f, 0x003f, 0x8ee0, 0x9842, 0x003f, 0xe7fc, 0x8df6,
     0x003f, 0x003f, 0x985e, 0x003f, 0x003f, 0xe845, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe844, 0xe846, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe7fb, 0x003f, 0x003f, 0x003f,
-    0xed42, 0x003f, 0x003f, 0x93e7, 0x003f, 0x9374, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x92d5, 0x003f, 0xe84b, 0xeec4,
+    0xfa5e, 0x003f, 0x003f, 0x93e7, 0x003f, 0x9374, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x92d5, 0x003f, 0xe84b, 0xfbe0,
     0x003f, 0x003f, 0x003f, 0x9262, 0xe847, 0x003f, 0x003f, 0x003f,
     0xe848, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8c4c, 0x003f, 0xe84a, 0x003f,
-    0xeec3, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cae, 0x003f, 0x003f,
+    0xfbdf, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cae, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe849, 0x003f, 0x8fdf, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4588,16 +4786,16 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0xe84f, 0x003f, 0x8dbd, 0x9199,
     0x003f, 0x003f, 0x92c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xeec5, 0x003f, 0x003f, 0x8a5a,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfbe1, 0x003f, 0x003f, 0x8a5a,
     0x003f, 0x003f, 0x003f, 0x003f, 0xe84d, 0xe84e, 0x92c1, 0x003f,
     0xe84c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xe850, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xe856, 0x003f, 0x003f, 0xeec6, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xe856, 0x003f, 0x003f, 0xfbe2, 0x003f,
     0xe859, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xe858, 0x934c, 0x003f, 0x003f, 0x003f, 0x003f, 0xe851, 0xe852,
-    0xe855, 0x003f, 0x003f, 0x003f, 0x003f, 0xe857, 0xeec7, 0x003f,
+    0xe855, 0x003f, 0x003f, 0x003f, 0x003f, 0xe857, 0xfbe3, 0x003f,
     0x003f, 0x8bbe, 0x003f, 0x003f, 0xe85a, 0xe854, 0x003f, 0x003f,
     0xe853, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xeec8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfbe4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x9400 .. 0x94ff */
     0x003f, 0x003f, 0x003f, 0xe85e, 0x003f, 0x003f, 0x003f, 0xe85f,
@@ -4607,8 +4805,8 @@
     0x003f, 0xe864, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe862, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xeec9, 0x003f, 0x003f, 0x003f, 0xe863, 0xe861, 0x003f,
+    0x003f, 0xfbe5, 0x003f, 0x003f, 0x003f, 0xe863, 0xe861, 0x003f,
     0x91f6, 0x003f, 0xe865, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xe866, 0x003f, 0x003f, 0xe868, 0xeeca, 0x003f, 0x003f,
-    0xeecb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe866, 0x003f, 0x003f, 0xe868, 0xfbe6, 0x003f, 0x003f,
+    0xfbe7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x8ad3, 0xe867, 0x96f8, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xe873, 0xe869, 0x003f, 0x003f, 0xe86c, 0x003f,
@@ -4652,5 +4850,5 @@
     0x96e5, 0x003f, 0xe878, 0x914d, 0x003f, 0x003f, 0x003f, 0xe879,
     0x003f, 0x95c2, 0xe87a, 0x8a4a, 0x003f, 0x003f, 0x003f, 0x895b,
-    0x003f, 0x8ad5, 0xeecc, 0x8ad4, 0xe87b, 0x003f, 0xe87c, 0x003f,
+    0x003f, 0x8ad5, 0xfbe8, 0x8ad4, 0xe87b, 0x003f, 0xe87c, 0x003f,
     0xe87d, 0xe87e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xe880, 0x003f, 0x8ad6, 0x8a74, 0x8d7d, 0x94b4, 0x003f, 0xe882,
@@ -4686,7 +4884,7 @@
     0x8c47, 0x003f, 0x91e0, 0xe440, 0x003f, 0xe8a4, 0x8a4b, 0x908f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x8a75, 0xe8a6, 0x003f, 0xe8a7,
-    0xe8a5, 0x8c84, 0x003f, 0x8ddb, 0x8fe1, 0xeecf, 0x003f, 0x003f,
+    0xe8a5, 0x8c84, 0x003f, 0x8ddb, 0x8fe1, 0xfbeb, 0x003f, 0x003f,
     0x8942, 0x003f, 0x003f, 0x97d7, 0x003f, 0x003f, 0x003f, 0xe8a9,
-    0xe7ac, 0x003f, 0xe8a8, 0x003f, 0x003f, 0x003f, 0x003f, 0xeed0,
+    0xe7ac, 0x003f, 0xe8a8, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbec,
     0xe8ac, 0xe8aa, 0xe8ab, 0x003f, 0xe8ad, 0x003f, 0xe8ae, 0x97ea,
     0xe8af, 0xe8b0, 0x003f, 0x90c7, 0x94b9, 0x003f, 0x003f, 0x003f,
@@ -4706,9 +4904,9 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0xe8c3, 0x003f, 0x003f, 0x96b6,
     0x003f, 0x003f, 0xe8c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xe8c5, 0x003f, 0x9849, 0xeed1, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x9e50, 0xe8c6, 0x003f, 0xeed2, 0x003f, 0xe8c7, 0xe8c8, 0x003f,
-    0x003f, 0x003f, 0xe8cc, 0xeed3, 0xe8c9, 0x003f, 0xe8ca, 0x003f,
-    0xe8cb, 0xe8cd, 0x003f, 0x003f, 0x003f, 0xeed4, 0x003f, 0xeed5,
-    0x003f, 0xeed6, 0x90c2, 0x003f, 0x003f, 0xeed7, 0x96f5, 0x003f,
+    0xe8c5, 0x003f, 0x9849, 0xfbed, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9e50, 0xe8c6, 0x003f, 0xfbee, 0x003f, 0xe8c7, 0xe8c8, 0x003f,
+    0x003f, 0x003f, 0xe8cc, 0xfbef, 0xe8c9, 0x003f, 0xe8ca, 0x003f,
+    0xe8cb, 0xe8cd, 0x003f, 0x003f, 0x003f, 0xfbf0, 0x003f, 0xfbf1,
+    0x003f, 0xfbf2, 0x90c2, 0x003f, 0x003f, 0xfbf3, 0x96f5, 0x003f,
     0x003f, 0x90c3, 0x003f, 0x003f, 0xe8ce, 0x003f, 0x94f1, 0x003f,
     0xe8cf, 0xea72, 0x96ca, 0x003f, 0xe8d0, 0x003f, 0xe8d1, 0x003f,
@@ -4743,7 +4941,7 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8f7, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe8f9, 0x91e8, 0x8a7a, 0x8a7b, 0xe8f8,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x8ae7, 0x8cb0, 0x003f, 0xeed8,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x8ae7, 0x8cb0, 0x003f, 0xfbf4,
     0x8ae8, 0x003f, 0x003f, 0x935e, 0x003f, 0x003f, 0x97de, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeed9, 0x003f, 0x8cda,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbf5, 0x003f, 0x8cda,
     0x003f, 0x003f, 0x003f, 0xe8fa, 0x003f, 0x003f, 0x003f, 0xe8fb,
     0xe8fc, 0xe940, 0x003f, 0xe942, 0xe941, 0x003f, 0x003f, 0x003f,
@@ -4770,5 +4968,5 @@
     0x8e60, 0x003f, 0xe94e, 0x89ec, 0xe94f, 0x003f, 0x003f, 0x003f,
     0xe950, 0x003f, 0x003f, 0x003f, 0x003f, 0xe952, 0xe953, 0x003f,
-    0xe955, 0xe951, 0x003f, 0x003f, 0xe954, 0x003f, 0x003f, 0xeedc,
+    0xe955, 0xe951, 0x003f, 0x003f, 0xe954, 0x003f, 0x003f, 0xfbf8,
     0x8ad9, 0x003f, 0x003f, 0x003f, 0xe956, 0x003f, 0xe957, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4785,5 +4983,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ef1, 0xe963,
-    0xe964, 0x8d81, 0x003f, 0x003f, 0x003f, 0x003f, 0xeede, 0x003f,
+    0xe964, 0x8d81, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbfa, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe965, 0x003f, 0x003f,
     0x8a5d, 0x003f, 0x003f, 0x003f, 0x946e, 0xe966, 0xe967, 0x003f,
@@ -4808,5 +5006,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe980, 0x003f,
     0xe97d, 0x003f, 0xe97c, 0xe97e, 0x003f, 0xe97b, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe982, 0xeedf, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe982, 0xfbfb, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe981, 0x003f, 0xe984,
     0x003f, 0x003f, 0x8bc1, 0xe983, 0x003f, 0x003f, 0x003f, 0xe985,
@@ -4826,5 +5024,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe990,
     0x003f, 0xe991, 0x003f, 0xe992, 0xe993, 0x003f, 0x003f, 0x003f,
-    0x8d82, 0xeee0, 0x003f, 0x003f, 0xeee1, 0x003f, 0xe994, 0xe995,
+    0x8d82, 0xfbfc, 0x003f, 0x003f, 0xfc40, 0x003f, 0xe994, 0xe995,
     0x003f, 0x003f, 0xe996, 0xe997, 0x003f, 0x003f, 0xe998, 0x003f,
     0x003f, 0x003f, 0x94af, 0xe99a, 0x003f, 0x9545, 0xe99b, 0xe999,
@@ -4846,14 +5044,14 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9844,
-    0x003f, 0x003f, 0xeee3, 0x003f, 0xe9b5, 0xeee2, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xfc42, 0x003f, 0xe9b5, 0xfc41, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xe9b7, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x88bc, 0xeee4,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x88bc, 0xfc43,
     0x003f, 0xe9b8, 0x95a9, 0xe9b6, 0x003f, 0x003f, 0xe9b9, 0xe9ba,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9bb,
     0xe9bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xe9bd, 0x003f, 0x968e, 0x8e4c, 0x003f, 0x8df8, 0x914e, 0x003f,
-    0x003f, 0xeee5, 0x003f, 0x003f, 0xe9be, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xe9c1, 0x003f, 0xeee6, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xfc44, 0x003f, 0x003f, 0xe9be, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe9c1, 0x003f, 0xfc45, 0x003f, 0x003f, 0x003f, 0x003f,
     0xe9bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c2, 0x003f,
     0x003f, 0x8cef, 0xe9c0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c3,
@@ -4865,5 +5063,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x9c00 .. 0x9cff */
-    0xeee7, 0x003f, 0x003f, 0x003f, 0xe9d8, 0x003f, 0xe9d4, 0x003f,
+    0xfc46, 0x003f, 0x003f, 0x003f, 0xe9d8, 0x003f, 0xe9d4, 0x003f,
     0xe9d5, 0xe9d1, 0xe9d7, 0x003f, 0xe9d3, 0x8a82, 0x003f, 0x003f,
     0x986b, 0x003f, 0xe9d6, 0xe9d2, 0xe9d0, 0xe9cf, 0x003f, 0x003f,
@@ -4911,6 +5109,6 @@
     0x003f, 0xea45, 0x003f, 0x003f, 0x894c, 0xea40, 0xea41, 0x003f,
     0x8d94, 0x96b7, 0x003f, 0x003f, 0xea42, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xeee9, 0x9651, 0x003f, 0x003f, 0xea4a,
-    0xeee8, 0x003f, 0xea46, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xfc48, 0x9651, 0x003f, 0x003f, 0xea4a,
+    0xfc47, 0x003f, 0xea46, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xea4b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea48,
@@ -4934,5 +5132,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xeeeb, 0xea5f, 0xea60, 0x003f, 0x003f, 0xea61, 0x003f,
+    0x003f, 0xfc4a, 0xea5f, 0xea60, 0x003f, 0x003f, 0xea61, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4957,5 +5155,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x89a9, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xea73, 0x8b6f, 0xea74, 0xea75,
-    0xea76, 0xeeec, 0x8d95, 0x003f, 0xea77, 0x003f, 0x003f, 0x003f,
+    0xea76, 0xfc4b, 0x8d95, 0x003f, 0xea77, 0x003f, 0x003f, 0x003f,
     0xe0d2, 0x96d9, 0x003f, 0x91e1, 0xea78, 0xea7a, 0xea79, 0x003f,
     0xea7b, 0x003f, 0x003f, 0x003f, 0x003f, 0xea7c, 0x003f, 0x003f,
@@ -4996,118 +5194,349 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0xe000 .. 0xe0ff */
+    0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047,
+    0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f,
+    0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057,
+    0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, 0xf05e, 0xf05f,
+    0xf060, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067,
+    0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f,
+    0xf070, 0xf071, 0xf072, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077,
+    0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, 0xf07d, 0xf07e, 0xf080,
+    0xf081, 0xf082, 0xf083, 0xf084, 0xf085, 0xf086, 0xf087, 0xf088,
+    0xf089, 0xf08a, 0xf08b, 0xf08c, 0xf08d, 0xf08e, 0xf08f, 0xf090,
+    0xf091, 0xf092, 0xf093, 0xf094, 0xf095, 0xf096, 0xf097, 0xf098,
+    0xf099, 0xf09a, 0xf09b, 0xf09c, 0xf09d, 0xf09e, 0xf09f, 0xf0a0,
+    0xf0a1, 0xf0a2, 0xf0a3, 0xf0a4, 0xf0a5, 0xf0a6, 0xf0a7, 0xf0a8,
+    0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac, 0xf0ad, 0xf0ae, 0xf0af, 0xf0b0,
+    0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0b6, 0xf0b7, 0xf0b8,
+    0xf0b9, 0xf0ba, 0xf0bb, 0xf0bc, 0xf0bd, 0xf0be, 0xf0bf, 0xf0c0,
+    0xf0c1, 0xf0c2, 0xf0c3, 0xf0c4, 0xf0c5, 0xf0c6, 0xf0c7, 0xf0c8,
+    0xf0c9, 0xf0ca, 0xf0cb, 0xf0cc, 0xf0cd, 0xf0ce, 0xf0cf, 0xf0d0,
+    0xf0d1, 0xf0d2, 0xf0d3, 0xf0d4, 0xf0d5, 0xf0d6, 0xf0d7, 0xf0d8,
+    0xf0d9, 0xf0da, 0xf0db, 0xf0dc, 0xf0dd, 0xf0de, 0xf0df, 0xf0e0,
+    0xf0e1, 0xf0e2, 0xf0e3, 0xf0e4, 0xf0e5, 0xf0e6, 0xf0e7, 0xf0e8,
+    0xf0e9, 0xf0ea, 0xf0eb, 0xf0ec, 0xf0ed, 0xf0ee, 0xf0ef, 0xf0f0,
+    0xf0f1, 0xf0f2, 0xf0f3, 0xf0f4, 0xf0f5, 0xf0f6, 0xf0f7, 0xf0f8,
+    0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc, 0xf140, 0xf141, 0xf142, 0xf143,
+    0xf144, 0xf145, 0xf146, 0xf147, 0xf148, 0xf149, 0xf14a, 0xf14b,
+    0xf14c, 0xf14d, 0xf14e, 0xf14f, 0xf150, 0xf151, 0xf152, 0xf153,
+    0xf154, 0xf155, 0xf156, 0xf157, 0xf158, 0xf159, 0xf15a, 0xf15b,
+    0xf15c, 0xf15d, 0xf15e, 0xf15f, 0xf160, 0xf161, 0xf162, 0xf163,
+    0xf164, 0xf165, 0xf166, 0xf167, 0xf168, 0xf169, 0xf16a, 0xf16b,
+    0xf16c, 0xf16d, 0xf16e, 0xf16f, 0xf170, 0xf171, 0xf172, 0xf173,
+    0xf174, 0xf175, 0xf176, 0xf177, 0xf178, 0xf179, 0xf17a, 0xf17b,
+    0xf17c, 0xf17d, 0xf17e, 0xf180, 0xf181, 0xf182, 0xf183, 0xf184,
+    /* 0xe100 .. 0xe1ff */
+    0xf185, 0xf186, 0xf187, 0xf188, 0xf189, 0xf18a, 0xf18b, 0xf18c,
+    0xf18d, 0xf18e, 0xf18f, 0xf190, 0xf191, 0xf192, 0xf193, 0xf194,
+    0xf195, 0xf196, 0xf197, 0xf198, 0xf199, 0xf19a, 0xf19b, 0xf19c,
+    0xf19d, 0xf19e, 0xf19f, 0xf1a0, 0xf1a1, 0xf1a2, 0xf1a3, 0xf1a4,
+    0xf1a5, 0xf1a6, 0xf1a7, 0xf1a8, 0xf1a9, 0xf1aa, 0xf1ab, 0xf1ac,
+    0xf1ad, 0xf1ae, 0xf1af, 0xf1b0, 0xf1b1, 0xf1b2, 0xf1b3, 0xf1b4,
+    0xf1b5, 0xf1b6, 0xf1b7, 0xf1b8, 0xf1b9, 0xf1ba, 0xf1bb, 0xf1bc,
+    0xf1bd, 0xf1be, 0xf1bf, 0xf1c0, 0xf1c1, 0xf1c2, 0xf1c3, 0xf1c4,
+    0xf1c5, 0xf1c6, 0xf1c7, 0xf1c8, 0xf1c9, 0xf1ca, 0xf1cb, 0xf1cc,
+    0xf1cd, 0xf1ce, 0xf1cf, 0xf1d0, 0xf1d1, 0xf1d2, 0xf1d3, 0xf1d4,
+    0xf1d5, 0xf1d6, 0xf1d7, 0xf1d8, 0xf1d9, 0xf1da, 0xf1db, 0xf1dc,
+    0xf1dd, 0xf1de, 0xf1df, 0xf1e0, 0xf1e1, 0xf1e2, 0xf1e3, 0xf1e4,
+    0xf1e5, 0xf1e6, 0xf1e7, 0xf1e8, 0xf1e9, 0xf1ea, 0xf1eb, 0xf1ec,
+    0xf1ed, 0xf1ee, 0xf1ef, 0xf1f0, 0xf1f1, 0xf1f2, 0xf1f3, 0xf1f4,
+    0xf1f5, 0xf1f6, 0xf1f7, 0xf1f8, 0xf1f9, 0xf1fa, 0xf1fb, 0xf1fc,
+    0xf240, 0xf241, 0xf242, 0xf243, 0xf244, 0xf245, 0xf246, 0xf247,
+    0xf248, 0xf249, 0xf24a, 0xf24b, 0xf24c, 0xf24d, 0xf24e, 0xf24f,
+    0xf250, 0xf251, 0xf252, 0xf253, 0xf254, 0xf255, 0xf256, 0xf257,
+    0xf258, 0xf259, 0xf25a, 0xf25b, 0xf25c, 0xf25d, 0xf25e, 0xf25f,
+    0xf260, 0xf261, 0xf262, 0xf263, 0xf264, 0xf265, 0xf266, 0xf267,
+    0xf268, 0xf269, 0xf26a, 0xf26b, 0xf26c, 0xf26d, 0xf26e, 0xf26f,
+    0xf270, 0xf271, 0xf272, 0xf273, 0xf274, 0xf275, 0xf276, 0xf277,
+    0xf278, 0xf279, 0xf27a, 0xf27b, 0xf27c, 0xf27d, 0xf27e, 0xf280,
+    0xf281, 0xf282, 0xf283, 0xf284, 0xf285, 0xf286, 0xf287, 0xf288,
+    0xf289, 0xf28a, 0xf28b, 0xf28c, 0xf28d, 0xf28e, 0xf28f, 0xf290,
+    0xf291, 0xf292, 0xf293, 0xf294, 0xf295, 0xf296, 0xf297, 0xf298,
+    0xf299, 0xf29a, 0xf29b, 0xf29c, 0xf29d, 0xf29e, 0xf29f, 0xf2a0,
+    0xf2a1, 0xf2a2, 0xf2a3, 0xf2a4, 0xf2a5, 0xf2a6, 0xf2a7, 0xf2a8,
+    0xf2a9, 0xf2aa, 0xf2ab, 0xf2ac, 0xf2ad, 0xf2ae, 0xf2af, 0xf2b0,
+    0xf2b1, 0xf2b2, 0xf2b3, 0xf2b4, 0xf2b5, 0xf2b6, 0xf2b7, 0xf2b8,
+    0xf2b9, 0xf2ba, 0xf2bb, 0xf2bc, 0xf2bd, 0xf2be, 0xf2bf, 0xf2c0,
+    0xf2c1, 0xf2c2, 0xf2c3, 0xf2c4, 0xf2c5, 0xf2c6, 0xf2c7, 0xf2c8,
+    /* 0xe200 .. 0xe2ff */
+    0xf2c9, 0xf2ca, 0xf2cb, 0xf2cc, 0xf2cd, 0xf2ce, 0xf2cf, 0xf2d0,
+    0xf2d1, 0xf2d2, 0xf2d3, 0xf2d4, 0xf2d5, 0xf2d6, 0xf2d7, 0xf2d8,
+    0xf2d9, 0xf2da, 0xf2db, 0xf2dc, 0xf2dd, 0xf2de, 0xf2df, 0xf2e0,
+    0xf2e1, 0xf2e2, 0xf2e3, 0xf2e4, 0xf2e5, 0xf2e6, 0xf2e7, 0xf2e8,
+    0xf2e9, 0xf2ea, 0xf2eb, 0xf2ec, 0xf2ed, 0xf2ee, 0xf2ef, 0xf2f0,
+    0xf2f1, 0xf2f2, 0xf2f3, 0xf2f4, 0xf2f5, 0xf2f6, 0xf2f7, 0xf2f8,
+    0xf2f9, 0xf2fa, 0xf2fb, 0xf2fc, 0xf340, 0xf341, 0xf342, 0xf343,
+    0xf344, 0xf345, 0xf346, 0xf347, 0xf348, 0xf349, 0xf34a, 0xf34b,
+    0xf34c, 0xf34d, 0xf34e, 0xf34f, 0xf350, 0xf351, 0xf352, 0xf353,
+    0xf354, 0xf355, 0xf356, 0xf357, 0xf358, 0xf359, 0xf35a, 0xf35b,
+    0xf35c, 0xf35d, 0xf35e, 0xf35f, 0xf360, 0xf361, 0xf362, 0xf363,
+    0xf364, 0xf365, 0xf366, 0xf367, 0xf368, 0xf369, 0xf36a, 0xf36b,
+    0xf36c, 0xf36d, 0xf36e, 0xf36f, 0xf370, 0xf371, 0xf372, 0xf373,
+    0xf374, 0xf375, 0xf376, 0xf377, 0xf378, 0xf379, 0xf37a, 0xf37b,
+    0xf37c, 0xf37d, 0xf37e, 0xf380, 0xf381, 0xf382, 0xf383, 0xf384,
+    0xf385, 0xf386, 0xf387, 0xf388, 0xf389, 0xf38a, 0xf38b, 0xf38c,
+    0xf38d, 0xf38e, 0xf38f, 0xf390, 0xf391, 0xf392, 0xf393, 0xf394,
+    0xf395, 0xf396, 0xf397, 0xf398, 0xf399, 0xf39a, 0xf39b, 0xf39c,
+    0xf39d, 0xf39e, 0xf39f, 0xf3a0, 0xf3a1, 0xf3a2, 0xf3a3, 0xf3a4,
+    0xf3a5, 0xf3a6, 0xf3a7, 0xf3a8, 0xf3a9, 0xf3aa, 0xf3ab, 0xf3ac,
+    0xf3ad, 0xf3ae, 0xf3af, 0xf3b0, 0xf3b1, 0xf3b2, 0xf3b3, 0xf3b4,
+    0xf3b5, 0xf3b6, 0xf3b7, 0xf3b8, 0xf3b9, 0xf3ba, 0xf3bb, 0xf3bc,
+    0xf3bd, 0xf3be, 0xf3bf, 0xf3c0, 0xf3c1, 0xf3c2, 0xf3c3, 0xf3c4,
+    0xf3c5, 0xf3c6, 0xf3c7, 0xf3c8, 0xf3c9, 0xf3ca, 0xf3cb, 0xf3cc,
+    0xf3cd, 0xf3ce, 0xf3cf, 0xf3d0, 0xf3d1, 0xf3d2, 0xf3d3, 0xf3d4,
+    0xf3d5, 0xf3d6, 0xf3d7, 0xf3d8, 0xf3d9, 0xf3da, 0xf3db, 0xf3dc,
+    0xf3dd, 0xf3de, 0xf3df, 0xf3e0, 0xf3e1, 0xf3e2, 0xf3e3, 0xf3e4,
+    0xf3e5, 0xf3e6, 0xf3e7, 0xf3e8, 0xf3e9, 0xf3ea, 0xf3eb, 0xf3ec,
+    0xf3ed, 0xf3ee, 0xf3ef, 0xf3f0, 0xf3f1, 0xf3f2, 0xf3f3, 0xf3f4,
+    0xf3f5, 0xf3f6, 0xf3f7, 0xf3f8, 0xf3f9, 0xf3fa, 0xf3fb, 0xf3fc,
+    0xf440, 0xf441, 0xf442, 0xf443, 0xf444, 0xf445, 0xf446, 0xf447,
+    0xf448, 0xf449, 0xf44a, 0xf44b, 0xf44c, 0xf44d, 0xf44e, 0xf44f,
+    /* 0xe300 .. 0xe3ff */
+    0xf450, 0xf451, 0xf452, 0xf453, 0xf454, 0xf455, 0xf456, 0xf457,
+    0xf458, 0xf459, 0xf45a, 0xf45b, 0xf45c, 0xf45d, 0xf45e, 0xf45f,
+    0xf460, 0xf461, 0xf462, 0xf463, 0xf464, 0xf465, 0xf466, 0xf467,
+    0xf468, 0xf469, 0xf46a, 0xf46b, 0xf46c, 0xf46d, 0xf46e, 0xf46f,
+    0xf470, 0xf471, 0xf472, 0xf473, 0xf474, 0xf475, 0xf476, 0xf477,
+    0xf478, 0xf479, 0xf47a, 0xf47b, 0xf47c, 0xf47d, 0xf47e, 0xf480,
+    0xf481, 0xf482, 0xf483, 0xf484, 0xf485, 0xf486, 0xf487, 0xf488,
+    0xf489, 0xf48a, 0xf48b, 0xf48c, 0xf48d, 0xf48e, 0xf48f, 0xf490,
+    0xf491, 0xf492, 0xf493, 0xf494, 0xf495, 0xf496, 0xf497, 0xf498,
+    0xf499, 0xf49a, 0xf49b, 0xf49c, 0xf49d, 0xf49e, 0xf49f, 0xf4a0,
+    0xf4a1, 0xf4a2, 0xf4a3, 0xf4a4, 0xf4a5, 0xf4a6, 0xf4a7, 0xf4a8,
+    0xf4a9, 0xf4aa, 0xf4ab, 0xf4ac, 0xf4ad, 0xf4ae, 0xf4af, 0xf4b0,
+    0xf4b1, 0xf4b2, 0xf4b3, 0xf4b4, 0xf4b5, 0xf4b6, 0xf4b7, 0xf4b8,
+    0xf4b9, 0xf4ba, 0xf4bb, 0xf4bc, 0xf4bd, 0xf4be, 0xf4bf, 0xf4c0,
+    0xf4c1, 0xf4c2, 0xf4c3, 0xf4c4, 0xf4c5, 0xf4c6, 0xf4c7, 0xf4c8,
+    0xf4c9, 0xf4ca, 0xf4cb, 0xf4cc, 0xf4cd, 0xf4ce, 0xf4cf, 0xf4d0,
+    0xf4d1, 0xf4d2, 0xf4d3, 0xf4d4, 0xf4d5, 0xf4d6, 0xf4d7, 0xf4d8,
+    0xf4d9, 0xf4da, 0xf4db, 0xf4dc, 0xf4dd, 0xf4de, 0xf4df, 0xf4e0,
+    0xf4e1, 0xf4e2, 0xf4e3, 0xf4e4, 0xf4e5, 0xf4e6, 0xf4e7, 0xf4e8,
+    0xf4e9, 0xf4ea, 0xf4eb, 0xf4ec, 0xf4ed, 0xf4ee, 0xf4ef, 0xf4f0,
+    0xf4f1, 0xf4f2, 0xf4f3, 0xf4f4, 0xf4f5, 0xf4f6, 0xf4f7, 0xf4f8,
+    0xf4f9, 0xf4fa, 0xf4fb, 0xf4fc, 0xf540, 0xf541, 0xf542, 0xf543,
+    0xf544, 0xf545, 0xf546, 0xf547, 0xf548, 0xf549, 0xf54a, 0xf54b,
+    0xf54c, 0xf54d, 0xf54e, 0xf54f, 0xf550, 0xf551, 0xf552, 0xf553,
+    0xf554, 0xf555, 0xf556, 0xf557, 0xf558, 0xf559, 0xf55a, 0xf55b,
+    0xf55c, 0xf55d, 0xf55e, 0xf55f, 0xf560, 0xf561, 0xf562, 0xf563,
+    0xf564, 0xf565, 0xf566, 0xf567, 0xf568, 0xf569, 0xf56a, 0xf56b,
+    0xf56c, 0xf56d, 0xf56e, 0xf56f, 0xf570, 0xf571, 0xf572, 0xf573,
+    0xf574, 0xf575, 0xf576, 0xf577, 0xf578, 0xf579, 0xf57a, 0xf57b,
+    0xf57c, 0xf57d, 0xf57e, 0xf580, 0xf581, 0xf582, 0xf583, 0xf584,
+    0xf585, 0xf586, 0xf587, 0xf588, 0xf589, 0xf58a, 0xf58b, 0xf58c,
+    0xf58d, 0xf58e, 0xf58f, 0xf590, 0xf591, 0xf592, 0xf593, 0xf594,
+    /* 0xe400 .. 0xe4ff */
+    0xf595, 0xf596, 0xf597, 0xf598, 0xf599, 0xf59a, 0xf59b, 0xf59c,
+    0xf59d, 0xf59e, 0xf59f, 0xf5a0, 0xf5a1, 0xf5a2, 0xf5a3, 0xf5a4,
+    0xf5a5, 0xf5a6, 0xf5a7, 0xf5a8, 0xf5a9, 0xf5aa, 0xf5ab, 0xf5ac,
+    0xf5ad, 0xf5ae, 0xf5af, 0xf5b0, 0xf5b1, 0xf5b2, 0xf5b3, 0xf5b4,
+    0xf5b5, 0xf5b6, 0xf5b7, 0xf5b8, 0xf5b9, 0xf5ba, 0xf5bb, 0xf5bc,
+    0xf5bd, 0xf5be, 0xf5bf, 0xf5c0, 0xf5c1, 0xf5c2, 0xf5c3, 0xf5c4,
+    0xf5c5, 0xf5c6, 0xf5c7, 0xf5c8, 0xf5c9, 0xf5ca, 0xf5cb, 0xf5cc,
+    0xf5cd, 0xf5ce, 0xf5cf, 0xf5d0, 0xf5d1, 0xf5d2, 0xf5d3, 0xf5d4,
+    0xf5d5, 0xf5d6, 0xf5d7, 0xf5d8, 0xf5d9, 0xf5da, 0xf5db, 0xf5dc,
+    0xf5dd, 0xf5de, 0xf5df, 0xf5e0, 0xf5e1, 0xf5e2, 0xf5e3, 0xf5e4,
+    0xf5e5, 0xf5e6, 0xf5e7, 0xf5e8, 0xf5e9, 0xf5ea, 0xf5eb, 0xf5ec,
+    0xf5ed, 0xf5ee, 0xf5ef, 0xf5f0, 0xf5f1, 0xf5f2, 0xf5f3, 0xf5f4,
+    0xf5f5, 0xf5f6, 0xf5f7, 0xf5f8, 0xf5f9, 0xf5fa, 0xf5fb, 0xf5fc,
+    0xf640, 0xf641, 0xf642, 0xf643, 0xf644, 0xf645, 0xf646, 0xf647,
+    0xf648, 0xf649, 0xf64a, 0xf64b, 0xf64c, 0xf64d, 0xf64e, 0xf64f,
+    0xf650, 0xf651, 0xf652, 0xf653, 0xf654, 0xf655, 0xf656, 0xf657,
+    0xf658, 0xf659, 0xf65a, 0xf65b, 0xf65c, 0xf65d, 0xf65e, 0xf65f,
+    0xf660, 0xf661, 0xf662, 0xf663, 0xf664, 0xf665, 0xf666, 0xf667,
+    0xf668, 0xf669, 0xf66a, 0xf66b, 0xf66c, 0xf66d, 0xf66e, 0xf66f,
+    0xf670, 0xf671, 0xf672, 0xf673, 0xf674, 0xf675, 0xf676, 0xf677,
+    0xf678, 0xf679, 0xf67a, 0xf67b, 0xf67c, 0xf67d, 0xf67e, 0xf680,
+    0xf681, 0xf682, 0xf683, 0xf684, 0xf685, 0xf686, 0xf687, 0xf688,
+    0xf689, 0xf68a, 0xf68b, 0xf68c, 0xf68d, 0xf68e, 0xf68f, 0xf690,
+    0xf691, 0xf692, 0xf693, 0xf694, 0xf695, 0xf696, 0xf697, 0xf698,
+    0xf699, 0xf69a, 0xf69b, 0xf69c, 0xf69d, 0xf69e, 0xf69f, 0xf6a0,
+    0xf6a1, 0xf6a2, 0xf6a3, 0xf6a4, 0xf6a5, 0xf6a6, 0xf6a7, 0xf6a8,
+    0xf6a9, 0xf6aa, 0xf6ab, 0xf6ac, 0xf6ad, 0xf6ae, 0xf6af, 0xf6b0,
+    0xf6b1, 0xf6b2, 0xf6b3, 0xf6b4, 0xf6b5, 0xf6b6, 0xf6b7, 0xf6b8,
+    0xf6b9, 0xf6ba, 0xf6bb, 0xf6bc, 0xf6bd, 0xf6be, 0xf6bf, 0xf6c0,
+    0xf6c1, 0xf6c2, 0xf6c3, 0xf6c4, 0xf6c5, 0xf6c6, 0xf6c7, 0xf6c8,
+    0xf6c9, 0xf6ca, 0xf6cb, 0xf6cc, 0xf6cd, 0xf6ce, 0xf6cf, 0xf6d0,
+    0xf6d1, 0xf6d2, 0xf6d3, 0xf6d4, 0xf6d5, 0xf6d6, 0xf6d7, 0xf6d8,
+    /* 0xe500 .. 0xe5ff */
+    0xf6d9, 0xf6da, 0xf6db, 0xf6dc, 0xf6dd, 0xf6de, 0xf6df, 0xf6e0,
+    0xf6e1, 0xf6e2, 0xf6e3, 0xf6e4, 0xf6e5, 0xf6e6, 0xf6e7, 0xf6e8,
+    0xf6e9, 0xf6ea, 0xf6eb, 0xf6ec, 0xf6ed, 0xf6ee, 0xf6ef, 0xf6f0,
+    0xf6f1, 0xf6f2, 0xf6f3, 0xf6f4, 0xf6f5, 0xf6f6, 0xf6f7, 0xf6f8,
+    0xf6f9, 0xf6fa, 0xf6fb, 0xf6fc, 0xf740, 0xf741, 0xf742, 0xf743,
+    0xf744, 0xf745, 0xf746, 0xf747, 0xf748, 0xf749, 0xf74a, 0xf74b,
+    0xf74c, 0xf74d, 0xf74e, 0xf74f, 0xf750, 0xf751, 0xf752, 0xf753,
+    0xf754, 0xf755, 0xf756, 0xf757, 0xf758, 0xf759, 0xf75a, 0xf75b,
+    0xf75c, 0xf75d, 0xf75e, 0xf75f, 0xf760, 0xf761, 0xf762, 0xf763,
+    0xf764, 0xf765, 0xf766, 0xf767, 0xf768, 0xf769, 0xf76a, 0xf76b,
+    0xf76c, 0xf76d, 0xf76e, 0xf76f, 0xf770, 0xf771, 0xf772, 0xf773,
+    0xf774, 0xf775, 0xf776, 0xf777, 0xf778, 0xf779, 0xf77a, 0xf77b,
+    0xf77c, 0xf77d, 0xf77e, 0xf780, 0xf781, 0xf782, 0xf783, 0xf784,
+    0xf785, 0xf786, 0xf787, 0xf788, 0xf789, 0xf78a, 0xf78b, 0xf78c,
+    0xf78d, 0xf78e, 0xf78f, 0xf790, 0xf791, 0xf792, 0xf793, 0xf794,
+    0xf795, 0xf796, 0xf797, 0xf798, 0xf799, 0xf79a, 0xf79b, 0xf79c,
+    0xf79d, 0xf79e, 0xf79f, 0xf7a0, 0xf7a1, 0xf7a2, 0xf7a3, 0xf7a4,
+    0xf7a5, 0xf7a6, 0xf7a7, 0xf7a8, 0xf7a9, 0xf7aa, 0xf7ab, 0xf7ac,
+    0xf7ad, 0xf7ae, 0xf7af, 0xf7b0, 0xf7b1, 0xf7b2, 0xf7b3, 0xf7b4,
+    0xf7b5, 0xf7b6, 0xf7b7, 0xf7b8, 0xf7b9, 0xf7ba, 0xf7bb, 0xf7bc,
+    0xf7bd, 0xf7be, 0xf7bf, 0xf7c0, 0xf7c1, 0xf7c2, 0xf7c3, 0xf7c4,
+    0xf7c5, 0xf7c6, 0xf7c7, 0xf7c8, 0xf7c9, 0xf7ca, 0xf7cb, 0xf7cc,
+    0xf7cd, 0xf7ce, 0xf7cf, 0xf7d0, 0xf7d1, 0xf7d2, 0xf7d3, 0xf7d4,
+    0xf7d5, 0xf7d6, 0xf7d7, 0xf7d8, 0xf7d9, 0xf7da, 0xf7db, 0xf7dc,
+    0xf7dd, 0xf7de, 0xf7df, 0xf7e0, 0xf7e1, 0xf7e2, 0xf7e3, 0xf7e4,
+    0xf7e5, 0xf7e6, 0xf7e7, 0xf7e8, 0xf7e9, 0xf7ea, 0xf7eb, 0xf7ec,
+    0xf7ed, 0xf7ee, 0xf7ef, 0xf7f0, 0xf7f1, 0xf7f2, 0xf7f3, 0xf7f4,
+    0xf7f5, 0xf7f6, 0xf7f7, 0xf7f8, 0xf7f9, 0xf7fa, 0xf7fb, 0xf7fc,
+    0xf840, 0xf841, 0xf842, 0xf843, 0xf844, 0xf845, 0xf846, 0xf847,
+    0xf848, 0xf849, 0xf84a, 0xf84b, 0xf84c, 0xf84d, 0xf84e, 0xf84f,
+    0xf850, 0xf851, 0xf852, 0xf853, 0xf854, 0xf855, 0xf856, 0xf857,
+    0xf858, 0xf859, 0xf85a, 0xf85b, 0xf85c, 0xf85d, 0xf85e, 0xf85f,
+    /* 0xe600 .. 0xe6ff */
+    0xf860, 0xf861, 0xf862, 0xf863, 0xf864, 0xf865, 0xf866, 0xf867,
+    0xf868, 0xf869, 0xf86a, 0xf86b, 0xf86c, 0xf86d, 0xf86e, 0xf86f,
+    0xf870, 0xf871, 0xf872, 0xf873, 0xf874, 0xf875, 0xf876, 0xf877,
+    0xf878, 0xf879, 0xf87a, 0xf87b, 0xf87c, 0xf87d, 0xf87e, 0xf880,
+    0xf881, 0xf882, 0xf883, 0xf884, 0xf885, 0xf886, 0xf887, 0xf888,
+    0xf889, 0xf88a, 0xf88b, 0xf88c, 0xf88d, 0xf88e, 0xf88f, 0xf890,
+    0xf891, 0xf892, 0xf893, 0xf894, 0xf895, 0xf896, 0xf897, 0xf898,
+    0xf899, 0xf89a, 0xf89b, 0xf89c, 0xf89d, 0xf89e, 0xf89f, 0xf8a0,
+    0xf8a1, 0xf8a2, 0xf8a3, 0xf8a4, 0xf8a5, 0xf8a6, 0xf8a7, 0xf8a8,
+    0xf8a9, 0xf8aa, 0xf8ab, 0xf8ac, 0xf8ad, 0xf8ae, 0xf8af, 0xf8b0,
+    0xf8b1, 0xf8b2, 0xf8b3, 0xf8b4, 0xf8b5, 0xf8b6, 0xf8b7, 0xf8b8,
+    0xf8b9, 0xf8ba, 0xf8bb, 0xf8bc, 0xf8bd, 0xf8be, 0xf8bf, 0xf8c0,
+    0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, 0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8,
+    0xf8c9, 0xf8ca, 0xf8cb, 0xf8cc, 0xf8cd, 0xf8ce, 0xf8cf, 0xf8d0,
+    0xf8d1, 0xf8d2, 0xf8d3, 0xf8d4, 0xf8d5, 0xf8d6, 0xf8d7, 0xf8d8,
+    0xf8d9, 0xf8da, 0xf8db, 0xf8dc, 0xf8dd, 0xf8de, 0xf8df, 0xf8e0,
+    0xf8e1, 0xf8e2, 0xf8e3, 0xf8e4, 0xf8e5, 0xf8e6, 0xf8e7, 0xf8e8,
+    0xf8e9, 0xf8ea, 0xf8eb, 0xf8ec, 0xf8ed, 0xf8ee, 0xf8ef, 0xf8f0,
+    0xf8f1, 0xf8f2, 0xf8f3, 0xf8f4, 0xf8f5, 0xf8f6, 0xf8f7, 0xf8f8,
+    0xf8f9, 0xf8fa, 0xf8fb, 0xf8fc, 0xf940, 0xf941, 0xf942, 0xf943,
+    0xf944, 0xf945, 0xf946, 0xf947, 0xf948, 0xf949, 0xf94a, 0xf94b,
+    0xf94c, 0xf94d, 0xf94e, 0xf94f, 0xf950, 0xf951, 0xf952, 0xf953,
+    0xf954, 0xf955, 0xf956, 0xf957, 0xf958, 0xf959, 0xf95a, 0xf95b,
+    0xf95c, 0xf95d, 0xf95e, 0xf95f, 0xf960, 0xf961, 0xf962, 0xf963,
+    0xf964, 0xf965, 0xf966, 0xf967, 0xf968, 0xf969, 0xf96a, 0xf96b,
+    0xf96c, 0xf96d, 0xf96e, 0xf96f, 0xf970, 0xf971, 0xf972, 0xf973,
+    0xf974, 0xf975, 0xf976, 0xf977, 0xf978, 0xf979, 0xf97a, 0xf97b,
+    0xf97c, 0xf97d, 0xf97e, 0xf980, 0xf981, 0xf982, 0xf983, 0xf984,
+    0xf985, 0xf986, 0xf987, 0xf988, 0xf989, 0xf98a, 0xf98b, 0xf98c,
+    0xf98d, 0xf98e, 0xf98f, 0xf990, 0xf991, 0xf992, 0xf993, 0xf994,
+    0xf995, 0xf996, 0xf997, 0xf998, 0xf999, 0xf99a, 0xf99b, 0xf99c,
+    0xf99d, 0xf99e, 0xf99f, 0xf9a0, 0xf9a1, 0xf9a2, 0xf9a3, 0xf9a4,
+    /* 0xe700 .. 0xe7ff */
+    0xf9a5, 0xf9a6, 0xf9a7, 0xf9a8, 0xf9a9, 0xf9aa, 0xf9ab, 0xf9ac,
+    0xf9ad, 0xf9ae, 0xf9af, 0xf9b0, 0xf9b1, 0xf9b2, 0xf9b3, 0xf9b4,
+    0xf9b5, 0xf9b6, 0xf9b7, 0xf9b8, 0xf9b9, 0xf9ba, 0xf9bb, 0xf9bc,
+    0xf9bd, 0xf9be, 0xf9bf, 0xf9c0, 0xf9c1, 0xf9c2, 0xf9c3, 0xf9c4,
+    0xf9c5, 0xf9c6, 0xf9c7, 0xf9c8, 0xf9c9, 0xf9ca, 0xf9cb, 0xf9cc,
+    0xf9cd, 0xf9ce, 0xf9cf, 0xf9d0, 0xf9d1, 0xf9d2, 0xf9d3, 0xf9d4,
+    0xf9d5, 0xf9d6, 0xf9d7, 0xf9d8, 0xf9d9, 0xf9da, 0xf9db, 0xf9dc,
+    0xf9dd, 0xf9de, 0xf9df, 0xf9e0, 0xf9e1, 0xf9e2, 0xf9e3, 0xf9e4,
+    0xf9e5, 0xf9e6, 0xf9e7, 0xf9e8, 0xf9e9, 0xf9ea, 0xf9eb, 0xf9ec,
+    0xf9ed, 0xf9ee, 0xf9ef, 0xf9f0, 0xf9f1, 0xf9f2, 0xf9f3, 0xf9f4,
+    0xf9f5, 0xf9f6, 0xf9f7, 0xf9f8, 0xf9f9, 0xf9fa, 0xf9fb, 0xf9fc,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0xf800 .. 0xf8ff */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x00a0, 0x00fd, 0x00fe, 0x00ff, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0xf900 .. 0xf9ff */
-    0xe6af, 0x8d58, 0x8ed4, 0xe6c9, 0x8a8a, 0x8bf8, 0x8be5, 0xea9d,
-    0xea9d, 0x8c5f, 0x8be0, 0x9a68, 0x93de, 0x9cef, 0xe19a, 0x9785,
-    0xe566, 0x9786, 0x9787, 0xe7b4, 0x9ed9, 0x978c, 0xe080, 0xe0e2,
-    0x978e, 0x978f, 0xe970, 0x98aa, 0x9791, 0x9793, 0xe0a3, 0x9796,
-    0xea61, 0x9792, 0x9794, 0x9795, 0xe641, 0x9d66, 0xe463, 0x003f,
-    0x984c, 0xedc4, 0x9851, 0x9854, 0x9859, 0x98d2, 0x97e2, 0x99a7,
-    0x003f, 0x9845, 0xe0a2, 0xe1b8, 0x9856, 0xe562, 0x97b8, 0x9848,
-    0x9849, 0x9844, 0x8deb, 0xe1ef, 0xe252, 0xee70, 0x003f, 0x003f,
-    0x8ead, 0x985f, 0x9ae0, 0x984d, 0xe2c4, 0x9857, 0x9853, 0xe1fb,
-    0x9847, 0x978b, 0x9adc, 0x003f, 0x9eea, 0x003f, 0x9852, 0x97dd,
-    0xe37e, 0xe89b, 0xe8d3, 0x985d, 0xeaa3, 0x97bd, 0x97c5, 0x88bb,
-    0x9548, 0x97cb, 0xe6a4, 0x9d5b, 0x9ed9, 0x91f8, 0x924f, 0x944a,
-    0x937b, 0x97a6, 0x88d9, 0x966b, 0x003f, 0x95d6, 0x959c, 0x9573,
-    0x94e5, 0x9dc9, 0x8df5, 0x99d2, 0x8dc7, 0x8fc8, 0x9774, 0x003f,
-    0x8e45, 0x9243, 0x92be, 0x8f45, 0x8ee1, 0x97a9, 0x97aa, 0x97ba,
-    0x995f, 0x9979, 0x97c0, 0x97c6, 0x97c7, 0x97c8, 0x97ca, 0x99ad,
-    0x9843, 0x8f97, 0x9c49, 0x97b7, 0xe068, 0xe1e8, 0xe883, 0xe98b,
-    0x97ed, 0xea74, 0x97cd, 0x003f, 0x003f, 0xe780, 0x944e, 0x97f7,
-    0x9cf6, 0x9451, 0x97f8, 0x97f9, 0xee50, 0x003f, 0x97fb, 0x97fc,
-    0xe772, 0x9840, 0x9841, 0x003f, 0x97f1, 0x97f2, 0x88f4, 0x97f3,
-    0x97f4, 0x003f, 0x97f5, 0x944f, 0x9450, 0x003f, 0x97fa, 0xe0d8,
-    0x97df, 0x9a9a, 0x944a, 0x97e4, 0x97e5, 0x97e6, 0xe0f0, 0xe3b7,
-    0xe3d7, 0x97e9, 0x97eb, 0xe8cb, 0x97cc, 0x97e1, 0xe258, 0xe7d2,
-    0xe8af, 0x9ca6, 0x97b9, 0x97bb, 0x97be, 0x9441, 0x97bf, 0x9ed9,
-    0xe099, 0x97c3, 0xe4f8, 0x97c9, 0x97b4, 0x9df2, 0xe896, 0x97ab,
-    0x003f, 0x96f6, 0x97ac, 0x97ad, 0x97ae, 0x97af, 0x97b0, 0x9552,
-    0x97de, 0x985a, 0x9d43, 0x97a4, 0x97cf, 0x9bc4, 0x9fcb, 0x97d6,
-    0x97a5, 0x9cc9, 0x8c49, 0x97a6, 0xeecd, 0x9798, 0x9799, 0x979a,
-    0x88d5, 0x979b, 0x979c, 0x9344, 0x979d, 0x979f, 0x9ceb, 0x97a0,
-    0x97a1, 0x97a2, 0x97a3, 0x93bd, 0x934d, 0x99e5, 0x97d3, 0x003f,
-    0xe561, 0x97d7, 0x97d8, 0x97d9, 0x97d1, 0x97d2, 0x97d5, 0x97a7,
-    0x8a7d, 0x97b1, 0x003f, 0xe074, 0x8eaf, 0x8f59, 0x9283, 0x8e68,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xfae0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xfbe9, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0xfa00 .. 0xfaff */
-    0x90d8, 0x9378, 0x91f1, 0x939c, 0x91ee, 0x93b4, 0x965c, 0xe774,
-    0x8d73, 0x8d7e, 0x8ca9, 0x8a66, 0x9959, 0x003f, 0xed73, 0xed7e,
-    0xed80, 0xed95, 0xedbc, 0xedcc, 0xedce, 0xedf9, 0xee42, 0xee59,
-    0xee61, 0xee62, 0xee63, 0xee65, 0xee69, 0xee6c, 0xee75, 0xee81,
-    0xee83, 0xee84, 0xee8d, 0xee95, 0xee97, 0xee98, 0xee9b, 0xeeb7,
-    0xeebe, 0xeece, 0xeeda, 0xeedb, 0xeedd, 0xeeea, 0x003f, 0x003f,
-    0x958e, 0x916d, 0x96c6, 0x95d7, 0x8bce, 0x94da, 0x8a85, 0x9251,
-    0x8aed, 0x95bb, 0x966e, 0x9177, 0x9ba3, 0x89f7, 0x8a53, 0x919e,
-    0x92a6, 0x9571, 0x8af9, 0x8f8b, 0x947e, 0x8a43, 0x8f8d, 0x8abf,
-    0x8ecf, 0x003f, 0x91f4, 0x94e8, 0x8ed0, 0x8e83, 0x8b46, 0x9753,
-    0x9163, 0x8f6a, 0x89d0, 0x92f5, 0x8d92, 0x93cb, 0x90df, 0x97fb,
-    0xe375, 0x94c9, 0x8f90, 0x8ed2, 0x8f4c, 0x003f, 0x003f, 0x9298,
-    0x8a8c, 0x8e8b, 0x8979, 0x8bde, 0x956f, 0x91a1, 0x003f, 0x88ed,
-    0x93ef, 0x8bbf, 0x9570, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x95c0, 0x9976, 0x9153, 0x003f, 0x8f5b, 0x9962, 0x9745, 0x8ed9,
-    0x8a85, 0x003f, 0x9a5b, 0x003f, 0x92cb, 0x95ad, 0x8982, 0x967a,
-    0x9b58, 0x003f, 0x003f, 0x003f, 0x8dca, 0x9c73, 0x9caf, 0x9054,
-    0x96fa, 0x919e, 0x003f, 0x92a6, 0x91d5, 0x9d89, 0x9d72, 0x003f,
-    0x9dc2, 0x90b0, 0x984e, 0x965d, 0x8ff1, 0x9f65, 0x8e45, 0x97ac,
-    0x003f, 0x8ea0, 0x8abf, 0x93d2, 0x8ecf, 0x003f, 0x8edd, 0x94c6,
-    0x9296, 0x003f, 0x003f, 0x89e6, 0x003f, 0xe189, 0x8976, 0x90b7,
-    0x92bc, 0x003f, 0x9285, 0x003f, 0x003f, 0x90df, 0x003f, 0xe355,
-    0x97fb, 0x003f, 0x8ed2, 0x8d72, 0x89d8, 0x003f, 0xe5f4, 0x95a2,
-    0x8e8b, 0x92b2, 0x8f94, 0x90bf, 0x8979, 0x91f8, 0x9740, 0x8bde,
-    0x9dcc, 0x91a1, 0x9741, 0xe7ad, 0x003f, 0x003f, 0x003f, 0x93ef,
-    0x96f5, 0x003f, 0x8bbf, 0x003f, 0x9570, 0x003f, 0xea9d, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0xfb00 .. 0xfbff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x002b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0xfe00 .. 0xfeff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x815c, 0x815c, 0x815c, 0x815c, 0x005f, 0x005f, 0x005f,
-    0x002c, 0x8141, 0x002e, 0x003f, 0x003b, 0x003a, 0x003f, 0x0021,
-    0x815c, 0x0028, 0x0029, 0x007b, 0x007d, 0x816b, 0x816c, 0x0023,
-    0x0026, 0x002a, 0x002b, 0x002d, 0x003c, 0x003e, 0x003d, 0x003f,
-    0x005c, 0x0024, 0x0025, 0x0040, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfa90, 0xfa9b,
+    0xfa9c, 0xfab1, 0xfad8, 0xfae8, 0xfaea, 0xfb58, 0xfb5e, 0xfb75,
+    0xfb7d, 0xfb7e, 0xfb80, 0xfb82, 0xfb86, 0xfb89, 0xfb92, 0xfb9d,
+    0xfb9f, 0xfba0, 0xfba9, 0xfbb1, 0xfbb3, 0xfbb4, 0xfbb7, 0xfbd3,
+    0xfbda, 0xfbea, 0xfbf6, 0xfbf7, 0xfbf9, 0xfc49, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -5129,5 +5558,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0xff00 .. 0xffff */
-    0x003f, 0x8149, 0xeefc, 0x8194, 0x8190, 0x8193, 0x8195, 0xeefb,
+    0x003f, 0x8149, 0xfa57, 0x8194, 0x8190, 0x8193, 0x8195, 0xfa56,
     0x8169, 0x816a, 0x8196, 0x817b, 0x8143, 0x817c, 0x8144, 0x815e,
     0x824f, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256,
@@ -5157,6 +5586,6 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x8191, 0x8192, 0x81ca, 0x8150, 0xeefa, 0x818f, 0x003f, 0x003f,
-    0x84a0, 0x81a9, 0x81aa, 0x81a8, 0x81ab, 0x81a1, 0x819b, 0x003f,
+    0x8191, 0x8192, 0x81ca, 0x8150, 0xfa55, 0x818f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -5198,14 +5627,15 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x0500, 0x0600, 0x0700,
-    0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x0e00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x0f00, 0x1000,
-    0x1100, 0x1200, 0x1300, 0x1400, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x1500, 0x1600,
+    0x0000, 0x6b00, 0x6b00, 0x0100, 0x0200, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x0300, 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x0a00, 0x6b00, 0x0b00, 0x0c00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x0d00, 0x0e00,
+    0x0f00, 0x1000, 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1600,
     0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00,
     0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600,
@@ -5217,26 +5647,27 @@
     0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600,
     0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
     0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6700, 0x6800, 0x6900, 0x6c00, 0x6c00, 0x6a00, 0x6b00
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
+    0x6700, 0x6800, 0x6900, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6a00
 };
 
 const struct dbcs_table cptable_932 =
 {
-    { 932, 2, 0x003f, 0x003f, "ANSI/OEM Japanese Shift-JIS" },
+    { 932, 2, 0x003f, 0x30fb, "ANSI/OEM Japanese Shift-JIS" },
     cp2uni,
     cp2uni_leadbytes,
     uni2cp_low,
     uni2cp_high,
-    { 0x81, 0x9f, 0xe0, 0xfc, 0x00, 0x00 }
+    {
+        0x81, 0x9f, 0xe0, 0xfc, 0x00, 0x00
+    }
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_936.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_936.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_936.c	(revision 19678)
@@ -1,4 +1,4 @@
 /* code page 936 (ANSI/OEM Simplified Chinese GBK) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP936.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit936.txt */
 /* DO NOT EDIT!! */
 
@@ -38,5 +38,5 @@
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x003f,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf8f5,
     /* lead byte 81 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1104,17 +1104,17 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x3000, 0x3001, 0x3002, 0x00b7, 0x02c9, 0x02c7, 0x00a8,
+    0xe4c6, 0xe4c7, 0xe4c8, 0xe4c9, 0xe4ca, 0xe4cb, 0xe4cc, 0xe4cd,
+    0xe4ce, 0xe4cf, 0xe4d0, 0xe4d1, 0xe4d2, 0xe4d3, 0xe4d4, 0xe4d5,
+    0xe4d6, 0xe4d7, 0xe4d8, 0xe4d9, 0xe4da, 0xe4db, 0xe4dc, 0xe4dd,
+    0xe4de, 0xe4df, 0xe4e0, 0xe4e1, 0xe4e2, 0xe4e3, 0xe4e4, 0xe4e5,
+    0xe4e6, 0xe4e7, 0xe4e8, 0xe4e9, 0xe4ea, 0xe4eb, 0xe4ec, 0xe4ed,
+    0xe4ee, 0xe4ef, 0xe4f0, 0xe4f1, 0xe4f2, 0xe4f3, 0xe4f4, 0xe4f5,
+    0xe4f6, 0xe4f7, 0xe4f8, 0xe4f9, 0xe4fa, 0xe4fb, 0xe4fc, 0xe4fd,
+    0xe4fe, 0xe4ff, 0xe500, 0xe501, 0xe502, 0xe503, 0xe504, 0x003f,
+    0xe505, 0xe506, 0xe507, 0xe508, 0xe509, 0xe50a, 0xe50b, 0xe50c,
+    0xe50d, 0xe50e, 0xe50f, 0xe510, 0xe511, 0xe512, 0xe513, 0xe514,
+    0xe515, 0xe516, 0xe517, 0xe518, 0xe519, 0xe51a, 0xe51b, 0xe51c,
+    0xe51d, 0xe51e, 0xe51f, 0xe520, 0xe521, 0xe522, 0xe523, 0xe524,
+    0xe525, 0x3000, 0x3001, 0x3002, 0x00b7, 0x02c9, 0x02c7, 0x00a8,
     0x3003, 0x3005, 0x2014, 0xff5e, 0x2016, 0x2026, 0x2018, 0x2019,
     0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b,
@@ -1137,19 +1137,19 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176,
-    0x2177, 0x2178, 0x2179, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e,
+    0xe526, 0xe527, 0xe528, 0xe529, 0xe52a, 0xe52b, 0xe52c, 0xe52d,
+    0xe52e, 0xe52f, 0xe530, 0xe531, 0xe532, 0xe533, 0xe534, 0xe535,
+    0xe536, 0xe537, 0xe538, 0xe539, 0xe53a, 0xe53b, 0xe53c, 0xe53d,
+    0xe53e, 0xe53f, 0xe540, 0xe541, 0xe542, 0xe543, 0xe544, 0xe545,
+    0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b, 0xe54c, 0xe54d,
+    0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553, 0xe554, 0xe555,
+    0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b, 0xe55c, 0xe55d,
+    0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0xe563, 0xe564, 0x003f,
+    0xe565, 0xe566, 0xe567, 0xe568, 0xe569, 0xe56a, 0xe56b, 0xe56c,
+    0xe56d, 0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572, 0xe573, 0xe574,
+    0xe575, 0xe576, 0xe577, 0xe578, 0xe579, 0xe57a, 0xe57b, 0xe57c,
+    0xe57d, 0xe57e, 0xe57f, 0xe580, 0xe581, 0xe582, 0xe583, 0xe584,
+    0xe585, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176,
+    0x2177, 0x2178, 0x2179, 0xe766, 0xe767, 0xe768, 0xe769, 0xe76a,
+    0xe76b, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e,
     0x248f, 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496,
     0x2497, 0x2498, 0x2499, 0x249a, 0x249b, 0x2474, 0x2475, 0x2476,
@@ -1157,8 +1157,8 @@
     0x247f, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486,
     0x2487, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466,
-    0x2467, 0x2468, 0x2469, 0x003f, 0x003f, 0x3220, 0x3221, 0x3222,
-    0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0x003f,
-    0x003f, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166,
-    0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0x003f, 0x003f, 0x003f,
+    0x2467, 0x2468, 0x2469, 0xe76c, 0xe76d, 0x3220, 0x3221, 0x3222,
+    0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0xe76e,
+    0xe76f, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166,
+    0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0xe770, 0xe771, 0x003f,
     /* lead byte a3 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1170,17 +1170,17 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07,
+    0xe586, 0xe587, 0xe588, 0xe589, 0xe58a, 0xe58b, 0xe58c, 0xe58d,
+    0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592, 0xe593, 0xe594, 0xe595,
+    0xe596, 0xe597, 0xe598, 0xe599, 0xe59a, 0xe59b, 0xe59c, 0xe59d,
+    0xe59e, 0xe59f, 0xe5a0, 0xe5a1, 0xe5a2, 0xe5a3, 0xe5a4, 0xe5a5,
+    0xe5a6, 0xe5a7, 0xe5a8, 0xe5a9, 0xe5aa, 0xe5ab, 0xe5ac, 0xe5ad,
+    0xe5ae, 0xe5af, 0xe5b0, 0xe5b1, 0xe5b2, 0xe5b3, 0xe5b4, 0xe5b5,
+    0xe5b6, 0xe5b7, 0xe5b8, 0xe5b9, 0xe5ba, 0xe5bb, 0xe5bc, 0xe5bd,
+    0xe5be, 0xe5bf, 0xe5c0, 0xe5c1, 0xe5c2, 0xe5c3, 0xe5c4, 0x003f,
+    0xe5c5, 0xe5c6, 0xe5c7, 0xe5c8, 0xe5c9, 0xe5ca, 0xe5cb, 0xe5cc,
+    0xe5cd, 0xe5ce, 0xe5cf, 0xe5d0, 0xe5d1, 0xe5d2, 0xe5d3, 0xe5d4,
+    0xe5d5, 0xe5d6, 0xe5d7, 0xe5d8, 0xe5d9, 0xe5da, 0xe5db, 0xe5dc,
+    0xe5dd, 0xe5de, 0xe5df, 0xe5e0, 0xe5e1, 0xe5e2, 0xe5e3, 0xe5e4,
+    0xe5e5, 0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07,
     0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f,
     0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17,
@@ -1203,17 +1203,17 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047,
+    0xe5e6, 0xe5e7, 0xe5e8, 0xe5e9, 0xe5ea, 0xe5eb, 0xe5ec, 0xe5ed,
+    0xe5ee, 0xe5ef, 0xe5f0, 0xe5f1, 0xe5f2, 0xe5f3, 0xe5f4, 0xe5f5,
+    0xe5f6, 0xe5f7, 0xe5f8, 0xe5f9, 0xe5fa, 0xe5fb, 0xe5fc, 0xe5fd,
+    0xe5fe, 0xe5ff, 0xe600, 0xe601, 0xe602, 0xe603, 0xe604, 0xe605,
+    0xe606, 0xe607, 0xe608, 0xe609, 0xe60a, 0xe60b, 0xe60c, 0xe60d,
+    0xe60e, 0xe60f, 0xe610, 0xe611, 0xe612, 0xe613, 0xe614, 0xe615,
+    0xe616, 0xe617, 0xe618, 0xe619, 0xe61a, 0xe61b, 0xe61c, 0xe61d,
+    0xe61e, 0xe61f, 0xe620, 0xe621, 0xe622, 0xe623, 0xe624, 0x003f,
+    0xe625, 0xe626, 0xe627, 0xe628, 0xe629, 0xe62a, 0xe62b, 0xe62c,
+    0xe62d, 0xe62e, 0xe62f, 0xe630, 0xe631, 0xe632, 0xe633, 0xe634,
+    0xe635, 0xe636, 0xe637, 0xe638, 0xe639, 0xe63a, 0xe63b, 0xe63c,
+    0xe63d, 0xe63e, 0xe63f, 0xe640, 0xe641, 0xe642, 0xe643, 0xe644,
+    0xe645, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047,
     0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f,
     0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057,
@@ -1225,6 +1225,6 @@
     0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087,
     0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f,
-    0x3090, 0x3091, 0x3092, 0x3093, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x3090, 0x3091, 0x3092, 0x3093, 0xe772, 0xe773, 0xe774, 0xe775,
+    0xe776, 0xe777, 0xe778, 0xe779, 0xe77a, 0xe77b, 0xe77c, 0x003f,
     /* lead byte a5 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1236,17 +1236,17 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7,
+    0xe646, 0xe647, 0xe648, 0xe649, 0xe64a, 0xe64b, 0xe64c, 0xe64d,
+    0xe64e, 0xe64f, 0xe650, 0xe651, 0xe652, 0xe653, 0xe654, 0xe655,
+    0xe656, 0xe657, 0xe658, 0xe659, 0xe65a, 0xe65b, 0xe65c, 0xe65d,
+    0xe65e, 0xe65f, 0xe660, 0xe661, 0xe662, 0xe663, 0xe664, 0xe665,
+    0xe666, 0xe667, 0xe668, 0xe669, 0xe66a, 0xe66b, 0xe66c, 0xe66d,
+    0xe66e, 0xe66f, 0xe670, 0xe671, 0xe672, 0xe673, 0xe674, 0xe675,
+    0xe676, 0xe677, 0xe678, 0xe679, 0xe67a, 0xe67b, 0xe67c, 0xe67d,
+    0xe67e, 0xe67f, 0xe680, 0xe681, 0xe682, 0xe683, 0xe684, 0x003f,
+    0xe685, 0xe686, 0xe687, 0xe688, 0xe689, 0xe68a, 0xe68b, 0xe68c,
+    0xe68d, 0xe68e, 0xe68f, 0xe690, 0xe691, 0xe692, 0xe693, 0xe694,
+    0xe695, 0xe696, 0xe697, 0xe698, 0xe699, 0xe69a, 0xe69b, 0xe69c,
+    0xe69d, 0xe69e, 0xe69f, 0xe6a0, 0xe6a1, 0xe6a2, 0xe6a3, 0xe6a4,
+    0xe6a5, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7,
     0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af,
     0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7,
@@ -1258,6 +1258,6 @@
     0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7,
     0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef,
-    0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xe77d,
+    0xe77e, 0xe77f, 0xe780, 0xe781, 0xe782, 0xe783, 0xe784, 0x003f,
     /* lead byte a6 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1269,28 +1269,28 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+    0xe6a6, 0xe6a7, 0xe6a8, 0xe6a9, 0xe6aa, 0xe6ab, 0xe6ac, 0xe6ad,
+    0xe6ae, 0xe6af, 0xe6b0, 0xe6b1, 0xe6b2, 0xe6b3, 0xe6b4, 0xe6b5,
+    0xe6b6, 0xe6b7, 0xe6b8, 0xe6b9, 0xe6ba, 0xe6bb, 0xe6bc, 0xe6bd,
+    0xe6be, 0xe6bf, 0xe6c0, 0xe6c1, 0xe6c2, 0xe6c3, 0xe6c4, 0xe6c5,
+    0xe6c6, 0xe6c7, 0xe6c8, 0xe6c9, 0xe6ca, 0xe6cb, 0xe6cc, 0xe6cd,
+    0xe6ce, 0xe6cf, 0xe6d0, 0xe6d1, 0xe6d2, 0xe6d3, 0xe6d4, 0xe6d5,
+    0xe6d6, 0xe6d7, 0xe6d8, 0xe6d9, 0xe6da, 0xe6db, 0xe6dc, 0xe6dd,
+    0xe6de, 0xe6df, 0xe6e0, 0xe6e1, 0xe6e2, 0xe6e3, 0xe6e4, 0x003f,
+    0xe6e5, 0xe6e6, 0xe6e7, 0xe6e8, 0xe6e9, 0xe6ea, 0xe6eb, 0xe6ec,
+    0xe6ed, 0xe6ee, 0xe6ef, 0xe6f0, 0xe6f1, 0xe6f2, 0xe6f3, 0xe6f4,
+    0xe6f5, 0xe6f6, 0xe6f7, 0xe6f8, 0xe6f9, 0xe6fa, 0xe6fb, 0xe6fc,
+    0xe6fd, 0xe6fe, 0xe6ff, 0xe700, 0xe701, 0xe702, 0xe703, 0xe704,
+    0xe705, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
     0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
     0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8,
-    0x03a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
+    0x03a9, 0xe785, 0xe786, 0xe787, 0xe788, 0xe789, 0xe78a, 0xe78b,
+    0xe78c, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
     0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
     0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8,
-    0x03c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x03c9, 0xe78d, 0xe78e, 0xe78f, 0xe790, 0xe791, 0xe792, 0xe793,
     0xfe35, 0xfe36, 0xfe39, 0xfe3a, 0xfe3f, 0xfe40, 0xfe3d, 0xfe3e,
-    0xfe41, 0xfe42, 0xfe43, 0xfe44, 0x003f, 0x003f, 0xfe3b, 0xfe3c,
-    0xfe37, 0xfe38, 0xfe31, 0x003f, 0xfe33, 0xfe34, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xfe41, 0xfe42, 0xfe43, 0xfe44, 0xe794, 0xe795, 0xfe3b, 0xfe3c,
+    0xfe37, 0xfe38, 0xfe31, 0xe796, 0xfe33, 0xfe34, 0xe797, 0xe798,
+    0xe799, 0xe79a, 0xe79b, 0xe79c, 0xe79d, 0xe79e, 0xe79f, 0x003f,
     /* lead byte a7 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1302,28 +1302,28 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401,
+    0xe706, 0xe707, 0xe708, 0xe709, 0xe70a, 0xe70b, 0xe70c, 0xe70d,
+    0xe70e, 0xe70f, 0xe710, 0xe711, 0xe712, 0xe713, 0xe714, 0xe715,
+    0xe716, 0xe717, 0xe718, 0xe719, 0xe71a, 0xe71b, 0xe71c, 0xe71d,
+    0xe71e, 0xe71f, 0xe720, 0xe721, 0xe722, 0xe723, 0xe724, 0xe725,
+    0xe726, 0xe727, 0xe728, 0xe729, 0xe72a, 0xe72b, 0xe72c, 0xe72d,
+    0xe72e, 0xe72f, 0xe730, 0xe731, 0xe732, 0xe733, 0xe734, 0xe735,
+    0xe736, 0xe737, 0xe738, 0xe739, 0xe73a, 0xe73b, 0xe73c, 0xe73d,
+    0xe73e, 0xe73f, 0xe740, 0xe741, 0xe742, 0xe743, 0xe744, 0x003f,
+    0xe745, 0xe746, 0xe747, 0xe748, 0xe749, 0xe74a, 0xe74b, 0xe74c,
+    0xe74d, 0xe74e, 0xe74f, 0xe750, 0xe751, 0xe752, 0xe753, 0xe754,
+    0xe755, 0xe756, 0xe757, 0xe758, 0xe759, 0xe75a, 0xe75b, 0xe75c,
+    0xe75d, 0xe75e, 0xe75f, 0xe760, 0xe761, 0xe762, 0xe763, 0xe764,
+    0xe765, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401,
     0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d,
     0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425,
     0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d,
-    0x042e, 0x042f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451,
+    0x042e, 0x042f, 0xe7a0, 0xe7a1, 0xe7a2, 0xe7a3, 0xe7a4, 0xe7a5,
+    0xe7a6, 0xe7a7, 0xe7a8, 0xe7a9, 0xe7aa, 0xe7ab, 0xe7ac, 0xe7ad,
+    0xe7ae, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451,
     0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d,
     0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445,
     0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d,
-    0x044e, 0x044f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x044e, 0x044f, 0xe7af, 0xe7b0, 0xe7b1, 0xe7b2, 0xe7b3, 0xe7b4,
+    0xe7b5, 0xe7b6, 0xe7b7, 0xe7b8, 0xe7b9, 0xe7ba, 0xe7bb, 0x003f,
     /* lead byte a8 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1345,18 +1345,18 @@
     0x2588, 0x2589, 0x258a, 0x258b, 0x258c, 0x258d, 0x258e, 0x258f,
     0x2593, 0x2594, 0x2595, 0x25bc, 0x25bd, 0x25e2, 0x25e3, 0x25e4,
-    0x25e5, 0x2609, 0x2295, 0x3012, 0x301d, 0x301e, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b,
+    0x25e5, 0x2609, 0x2295, 0x3012, 0x301d, 0x301e, 0xe7bc, 0xe7bd,
+    0xe7be, 0xe7bf, 0xe7c0, 0xe7c1, 0xe7c2, 0xe7c3, 0xe7c4, 0xe7c5,
+    0xe7c6, 0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b,
     0x00e8, 0x012b, 0x00ed, 0x01d0, 0x00ec, 0x014d, 0x00f3, 0x01d2,
     0x00f2, 0x016b, 0x00fa, 0x01d4, 0x00f9, 0x01d6, 0x01d8, 0x01da,
-    0x01dc, 0x00fc, 0x00ea, 0x0251, 0x003f, 0x0144, 0x0148, 0x003f,
-    0x0261, 0x003f, 0x003f, 0x003f, 0x003f, 0x3105, 0x3106, 0x3107,
+    0x01dc, 0x00fc, 0x00ea, 0x0251, 0xe7c7, 0x0144, 0x0148, 0xe7c8,
+    0x0261, 0xe7c9, 0xe7ca, 0xe7cb, 0xe7cc, 0x3105, 0x3106, 0x3107,
     0x3108, 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f,
     0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117,
     0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f,
     0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127,
-    0x3128, 0x3129, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x3128, 0x3129, 0xe7cd, 0xe7ce, 0xe7cf, 0xe7d0, 0xe7d1, 0xe7d2,
+    0xe7d3, 0xe7d4, 0xe7d5, 0xe7d6, 0xe7d7, 0xe7d8, 0xe7d9, 0xe7da,
+    0xe7db, 0xe7dc, 0xe7dd, 0xe7de, 0xe7df, 0xe7e0, 0xe7e1, 0x003f,
     /* lead byte a9 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1371,5 +1371,5 @@
     0x3029, 0x32a3, 0x338e, 0x338f, 0x339c, 0x339d, 0x339e, 0x33a1,
     0x33c4, 0x33ce, 0x33d1, 0x33d2, 0x33d5, 0xfe30, 0xffe2, 0xffe4,
-    0x003f, 0x2121, 0x3231, 0x003f, 0x2010, 0x003f, 0x003f, 0x003f,
+    0xe7e2, 0x2121, 0x3231, 0xe7e3, 0x2010, 0xe7e4, 0xe7e5, 0xe7e6,
     0x30fc, 0x309b, 0x309c, 0x30fd, 0x30fe, 0x3006, 0x309d, 0x309e,
     0xfe49, 0xfe4a, 0xfe4b, 0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, 0xfe50,
@@ -1377,8 +1377,8 @@
     0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0x003f,
     0xfe62, 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe68, 0xfe69, 0xfe6a,
-    0xfe6b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x3007, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x2500, 0x2501, 0x2502, 0x2503,
+    0xfe6b, 0xe7e7, 0xe7e8, 0xe7e9, 0xe7ea, 0xe7eb, 0xe7ec, 0xe7ed,
+    0xe7ee, 0xe7ef, 0xe7f0, 0xe7f1, 0xe7f2, 0xe7f3, 0x3007, 0xe7f4,
+    0xe7f5, 0xe7f6, 0xe7f7, 0xe7f8, 0xe7f9, 0xe7fa, 0xe7fb, 0xe7fc,
+    0xe7fd, 0xe7fe, 0xe7ff, 0xe800, 0x2500, 0x2501, 0x2502, 0x2503,
     0x2504, 0x2505, 0x2506, 0x2507, 0x2508, 0x2509, 0x250a, 0x250b,
     0x250c, 0x250d, 0x250e, 0x250f, 0x2510, 0x2511, 0x2512, 0x2513,
@@ -1390,6 +1390,6 @@
     0x253c, 0x253d, 0x253e, 0x253f, 0x2540, 0x2541, 0x2542, 0x2543,
     0x2544, 0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x254b,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe801, 0xe802, 0xe803, 0xe804, 0xe805, 0xe806, 0xe807, 0xe808,
+    0xe809, 0xe80a, 0xe80b, 0xe80c, 0xe80d, 0xe80e, 0xe80f, 0x003f,
     /* lead byte aa */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1413,16 +1413,16 @@
     0x735d, 0x735e, 0x735f, 0x7361, 0x7362, 0x7363, 0x7364, 0x7365,
     0x7366, 0x7367, 0x7368, 0x7369, 0x736a, 0x736b, 0x736e, 0x7370,
-    0x7371, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x7371, 0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006,
+    0xe007, 0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e,
+    0xe00f, 0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016,
+    0xe017, 0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e,
+    0xe01f, 0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026,
+    0xe027, 0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e,
+    0xe02f, 0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036,
+    0xe037, 0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e,
+    0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, 0xe046,
+    0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, 0xe04e,
+    0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, 0xe056,
+    0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, 0x003f,
     /* lead byte ab */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1446,16 +1446,16 @@
     0x73e2, 0x73e3, 0x73e4, 0x73e6, 0x73e8, 0x73ea, 0x73eb, 0x73ec,
     0x73ee, 0x73ef, 0x73f0, 0x73f1, 0x73f3, 0x73f4, 0x73f5, 0x73f6,
-    0x73f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x73f7, 0xe05e, 0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064,
+    0xe065, 0xe066, 0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c,
+    0xe06d, 0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074,
+    0xe075, 0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c,
+    0xe07d, 0xe07e, 0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084,
+    0xe085, 0xe086, 0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c,
+    0xe08d, 0xe08e, 0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094,
+    0xe095, 0xe096, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c,
+    0xe09d, 0xe09e, 0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4,
+    0xe0a5, 0xe0a6, 0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac,
+    0xe0ad, 0xe0ae, 0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4,
+    0xe0b5, 0xe0b6, 0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0x003f,
     /* lead byte ac */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1479,16 +1479,16 @@
     0x7466, 0x7467, 0x7468, 0x7469, 0x746a, 0x746b, 0x746c, 0x746e,
     0x746f, 0x7471, 0x7472, 0x7473, 0x7474, 0x7475, 0x7478, 0x7479,
-    0x747a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x747a, 0xe0bc, 0xe0bd, 0xe0be, 0xe0bf, 0xe0c0, 0xe0c1, 0xe0c2,
+    0xe0c3, 0xe0c4, 0xe0c5, 0xe0c6, 0xe0c7, 0xe0c8, 0xe0c9, 0xe0ca,
+    0xe0cb, 0xe0cc, 0xe0cd, 0xe0ce, 0xe0cf, 0xe0d0, 0xe0d1, 0xe0d2,
+    0xe0d3, 0xe0d4, 0xe0d5, 0xe0d6, 0xe0d7, 0xe0d8, 0xe0d9, 0xe0da,
+    0xe0db, 0xe0dc, 0xe0dd, 0xe0de, 0xe0df, 0xe0e0, 0xe0e1, 0xe0e2,
+    0xe0e3, 0xe0e4, 0xe0e5, 0xe0e6, 0xe0e7, 0xe0e8, 0xe0e9, 0xe0ea,
+    0xe0eb, 0xe0ec, 0xe0ed, 0xe0ee, 0xe0ef, 0xe0f0, 0xe0f1, 0xe0f2,
+    0xe0f3, 0xe0f4, 0xe0f5, 0xe0f6, 0xe0f7, 0xe0f8, 0xe0f9, 0xe0fa,
+    0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, 0xe100, 0xe101, 0xe102,
+    0xe103, 0xe104, 0xe105, 0xe106, 0xe107, 0xe108, 0xe109, 0xe10a,
+    0xe10b, 0xe10c, 0xe10d, 0xe10e, 0xe10f, 0xe110, 0xe111, 0xe112,
+    0xe113, 0xe114, 0xe115, 0xe116, 0xe117, 0xe118, 0xe119, 0x003f,
     /* lead byte ad */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1512,16 +1512,16 @@
     0x74d9, 0x74da, 0x74db, 0x74dd, 0x74df, 0x74e1, 0x74e5, 0x74e7,
     0x74e8, 0x74e9, 0x74ea, 0x74eb, 0x74ec, 0x74ed, 0x74f0, 0x74f1,
-    0x74f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x74f2, 0xe11a, 0xe11b, 0xe11c, 0xe11d, 0xe11e, 0xe11f, 0xe120,
+    0xe121, 0xe122, 0xe123, 0xe124, 0xe125, 0xe126, 0xe127, 0xe128,
+    0xe129, 0xe12a, 0xe12b, 0xe12c, 0xe12d, 0xe12e, 0xe12f, 0xe130,
+    0xe131, 0xe132, 0xe133, 0xe134, 0xe135, 0xe136, 0xe137, 0xe138,
+    0xe139, 0xe13a, 0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, 0xe140,
+    0xe141, 0xe142, 0xe143, 0xe144, 0xe145, 0xe146, 0xe147, 0xe148,
+    0xe149, 0xe14a, 0xe14b, 0xe14c, 0xe14d, 0xe14e, 0xe14f, 0xe150,
+    0xe151, 0xe152, 0xe153, 0xe154, 0xe155, 0xe156, 0xe157, 0xe158,
+    0xe159, 0xe15a, 0xe15b, 0xe15c, 0xe15d, 0xe15e, 0xe15f, 0xe160,
+    0xe161, 0xe162, 0xe163, 0xe164, 0xe165, 0xe166, 0xe167, 0xe168,
+    0xe169, 0xe16a, 0xe16b, 0xe16c, 0xe16d, 0xe16e, 0xe16f, 0xe170,
+    0xe171, 0xe172, 0xe173, 0xe174, 0xe175, 0xe176, 0xe177, 0x003f,
     /* lead byte ae */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1545,16 +1545,16 @@
     0x7570, 0x7571, 0x7573, 0x7575, 0x7576, 0x7577, 0x757a, 0x757b,
     0x757c, 0x757d, 0x757e, 0x7580, 0x7581, 0x7582, 0x7584, 0x7585,
-    0x7587, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x7587, 0xe178, 0xe179, 0xe17a, 0xe17b, 0xe17c, 0xe17d, 0xe17e,
+    0xe17f, 0xe180, 0xe181, 0xe182, 0xe183, 0xe184, 0xe185, 0xe186,
+    0xe187, 0xe188, 0xe189, 0xe18a, 0xe18b, 0xe18c, 0xe18d, 0xe18e,
+    0xe18f, 0xe190, 0xe191, 0xe192, 0xe193, 0xe194, 0xe195, 0xe196,
+    0xe197, 0xe198, 0xe199, 0xe19a, 0xe19b, 0xe19c, 0xe19d, 0xe19e,
+    0xe19f, 0xe1a0, 0xe1a1, 0xe1a2, 0xe1a3, 0xe1a4, 0xe1a5, 0xe1a6,
+    0xe1a7, 0xe1a8, 0xe1a9, 0xe1aa, 0xe1ab, 0xe1ac, 0xe1ad, 0xe1ae,
+    0xe1af, 0xe1b0, 0xe1b1, 0xe1b2, 0xe1b3, 0xe1b4, 0xe1b5, 0xe1b6,
+    0xe1b7, 0xe1b8, 0xe1b9, 0xe1ba, 0xe1bb, 0xe1bc, 0xe1bd, 0xe1be,
+    0xe1bf, 0xe1c0, 0xe1c1, 0xe1c2, 0xe1c3, 0xe1c4, 0xe1c5, 0xe1c6,
+    0xe1c7, 0xe1c8, 0xe1c9, 0xe1ca, 0xe1cb, 0xe1cc, 0xe1cd, 0xe1ce,
+    0xe1cf, 0xe1d0, 0xe1d1, 0xe1d2, 0xe1d3, 0xe1d4, 0xe1d5, 0x003f,
     /* lead byte af */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1578,16 +1578,16 @@
     0x7623, 0x7627, 0x7628, 0x762c, 0x762e, 0x762f, 0x7631, 0x7632,
     0x7636, 0x7637, 0x7639, 0x763a, 0x763b, 0x763d, 0x7641, 0x7642,
-    0x7644, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x7644, 0xe1d6, 0xe1d7, 0xe1d8, 0xe1d9, 0xe1da, 0xe1db, 0xe1dc,
+    0xe1dd, 0xe1de, 0xe1df, 0xe1e0, 0xe1e1, 0xe1e2, 0xe1e3, 0xe1e4,
+    0xe1e5, 0xe1e6, 0xe1e7, 0xe1e8, 0xe1e9, 0xe1ea, 0xe1eb, 0xe1ec,
+    0xe1ed, 0xe1ee, 0xe1ef, 0xe1f0, 0xe1f1, 0xe1f2, 0xe1f3, 0xe1f4,
+    0xe1f5, 0xe1f6, 0xe1f7, 0xe1f8, 0xe1f9, 0xe1fa, 0xe1fb, 0xe1fc,
+    0xe1fd, 0xe1fe, 0xe1ff, 0xe200, 0xe201, 0xe202, 0xe203, 0xe204,
+    0xe205, 0xe206, 0xe207, 0xe208, 0xe209, 0xe20a, 0xe20b, 0xe20c,
+    0xe20d, 0xe20e, 0xe20f, 0xe210, 0xe211, 0xe212, 0xe213, 0xe214,
+    0xe215, 0xe216, 0xe217, 0xe218, 0xe219, 0xe21a, 0xe21b, 0xe21c,
+    0xe21d, 0xe21e, 0xe21f, 0xe220, 0xe221, 0xe222, 0xe223, 0xe224,
+    0xe225, 0xe226, 0xe227, 0xe228, 0xe229, 0xe22a, 0xe22b, 0xe22c,
+    0xe22d, 0xe22e, 0xe22f, 0xe230, 0xe231, 0xe232, 0xe233, 0x003f,
     /* lead byte b0 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2909,5 +2909,5 @@
     0x963b, 0x7ec4, 0x94bb, 0x7e82, 0x5634, 0x9189, 0x6700, 0x7f6a,
     0x5c0a, 0x9075, 0x6628, 0x5de6, 0x4f50, 0x67de, 0x505a, 0x4f5c,
-    0x5750, 0x5ea7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x5750, 0x5ea7, 0xe810, 0xe811, 0xe812, 0xe813, 0xe814, 0x003f,
     /* lead byte d8 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3987,16 +3987,16 @@
     0x9d32, 0x9d33, 0x9d34, 0x9d35, 0x9d36, 0x9d37, 0x9d38, 0x9d39,
     0x9d3a, 0x9d3b, 0x9d3c, 0x9d3d, 0x9d3e, 0x9d3f, 0x9d40, 0x9d41,
-    0x9d42, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9d42, 0xe234, 0xe235, 0xe236, 0xe237, 0xe238, 0xe239, 0xe23a,
+    0xe23b, 0xe23c, 0xe23d, 0xe23e, 0xe23f, 0xe240, 0xe241, 0xe242,
+    0xe243, 0xe244, 0xe245, 0xe246, 0xe247, 0xe248, 0xe249, 0xe24a,
+    0xe24b, 0xe24c, 0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, 0xe252,
+    0xe253, 0xe254, 0xe255, 0xe256, 0xe257, 0xe258, 0xe259, 0xe25a,
+    0xe25b, 0xe25c, 0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, 0xe262,
+    0xe263, 0xe264, 0xe265, 0xe266, 0xe267, 0xe268, 0xe269, 0xe26a,
+    0xe26b, 0xe26c, 0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, 0xe272,
+    0xe273, 0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, 0xe27a,
+    0xe27b, 0xe27c, 0xe27d, 0xe27e, 0xe27f, 0xe280, 0xe281, 0xe282,
+    0xe283, 0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a,
+    0xe28b, 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0x003f,
     /* lead byte f9 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4020,16 +4020,16 @@
     0x9d92, 0x9d93, 0x9d94, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9d99,
     0x9d9a, 0x9d9b, 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, 0x9da0, 0x9da1,
-    0x9da2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9da2, 0xe292, 0xe293, 0xe294, 0xe295, 0xe296, 0xe297, 0xe298,
+    0xe299, 0xe29a, 0xe29b, 0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0,
+    0xe2a1, 0xe2a2, 0xe2a3, 0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, 0xe2a8,
+    0xe2a9, 0xe2aa, 0xe2ab, 0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, 0xe2b0,
+    0xe2b1, 0xe2b2, 0xe2b3, 0xe2b4, 0xe2b5, 0xe2b6, 0xe2b7, 0xe2b8,
+    0xe2b9, 0xe2ba, 0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, 0xe2bf, 0xe2c0,
+    0xe2c1, 0xe2c2, 0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, 0xe2c8,
+    0xe2c9, 0xe2ca, 0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, 0xe2d0,
+    0xe2d1, 0xe2d2, 0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, 0xe2d8,
+    0xe2d9, 0xe2da, 0xe2db, 0xe2dc, 0xe2dd, 0xe2de, 0xe2df, 0xe2e0,
+    0xe2e1, 0xe2e2, 0xe2e3, 0xe2e4, 0xe2e5, 0xe2e6, 0xe2e7, 0xe2e8,
+    0xe2e9, 0xe2ea, 0xe2eb, 0xe2ec, 0xe2ed, 0xe2ee, 0xe2ef, 0x003f,
     /* lead byte fa */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4053,16 +4053,16 @@
     0x9df2, 0x9df3, 0x9df4, 0x9df5, 0x9df6, 0x9df7, 0x9df8, 0x9df9,
     0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9dff, 0x9e00, 0x9e01,
-    0x9e02, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9e02, 0xe2f0, 0xe2f1, 0xe2f2, 0xe2f3, 0xe2f4, 0xe2f5, 0xe2f6,
+    0xe2f7, 0xe2f8, 0xe2f9, 0xe2fa, 0xe2fb, 0xe2fc, 0xe2fd, 0xe2fe,
+    0xe2ff, 0xe300, 0xe301, 0xe302, 0xe303, 0xe304, 0xe305, 0xe306,
+    0xe307, 0xe308, 0xe309, 0xe30a, 0xe30b, 0xe30c, 0xe30d, 0xe30e,
+    0xe30f, 0xe310, 0xe311, 0xe312, 0xe313, 0xe314, 0xe315, 0xe316,
+    0xe317, 0xe318, 0xe319, 0xe31a, 0xe31b, 0xe31c, 0xe31d, 0xe31e,
+    0xe31f, 0xe320, 0xe321, 0xe322, 0xe323, 0xe324, 0xe325, 0xe326,
+    0xe327, 0xe328, 0xe329, 0xe32a, 0xe32b, 0xe32c, 0xe32d, 0xe32e,
+    0xe32f, 0xe330, 0xe331, 0xe332, 0xe333, 0xe334, 0xe335, 0xe336,
+    0xe337, 0xe338, 0xe339, 0xe33a, 0xe33b, 0xe33c, 0xe33d, 0xe33e,
+    0xe33f, 0xe340, 0xe341, 0xe342, 0xe343, 0xe344, 0xe345, 0xe346,
+    0xe347, 0xe348, 0xe349, 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0x003f,
     /* lead byte fb */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4086,16 +4086,16 @@
     0x9e97, 0x9e98, 0x9e99, 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9e, 0x9ea0,
     0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea7, 0x9ea8, 0x9ea9,
-    0x9eaa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9eaa, 0xe34e, 0xe34f, 0xe350, 0xe351, 0xe352, 0xe353, 0xe354,
+    0xe355, 0xe356, 0xe357, 0xe358, 0xe359, 0xe35a, 0xe35b, 0xe35c,
+    0xe35d, 0xe35e, 0xe35f, 0xe360, 0xe361, 0xe362, 0xe363, 0xe364,
+    0xe365, 0xe366, 0xe367, 0xe368, 0xe369, 0xe36a, 0xe36b, 0xe36c,
+    0xe36d, 0xe36e, 0xe36f, 0xe370, 0xe371, 0xe372, 0xe373, 0xe374,
+    0xe375, 0xe376, 0xe377, 0xe378, 0xe379, 0xe37a, 0xe37b, 0xe37c,
+    0xe37d, 0xe37e, 0xe37f, 0xe380, 0xe381, 0xe382, 0xe383, 0xe384,
+    0xe385, 0xe386, 0xe387, 0xe388, 0xe389, 0xe38a, 0xe38b, 0xe38c,
+    0xe38d, 0xe38e, 0xe38f, 0xe390, 0xe391, 0xe392, 0xe393, 0xe394,
+    0xe395, 0xe396, 0xe397, 0xe398, 0xe399, 0xe39a, 0xe39b, 0xe39c,
+    0xe39d, 0xe39e, 0xe39f, 0xe3a0, 0xe3a1, 0xe3a2, 0xe3a3, 0xe3a4,
+    0xe3a5, 0xe3a6, 0xe3a7, 0xe3a8, 0xe3a9, 0xe3aa, 0xe3ab, 0x003f,
     /* lead byte fc */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4119,16 +4119,16 @@
     0x9f1d, 0x9f1e, 0x9f1f, 0x9f21, 0x9f23, 0x9f24, 0x9f25, 0x9f26,
     0x9f27, 0x9f28, 0x9f29, 0x9f2a, 0x9f2b, 0x9f2d, 0x9f2e, 0x9f30,
-    0x9f31, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x9f31, 0xe3ac, 0xe3ad, 0xe3ae, 0xe3af, 0xe3b0, 0xe3b1, 0xe3b2,
+    0xe3b3, 0xe3b4, 0xe3b5, 0xe3b6, 0xe3b7, 0xe3b8, 0xe3b9, 0xe3ba,
+    0xe3bb, 0xe3bc, 0xe3bd, 0xe3be, 0xe3bf, 0xe3c0, 0xe3c1, 0xe3c2,
+    0xe3c3, 0xe3c4, 0xe3c5, 0xe3c6, 0xe3c7, 0xe3c8, 0xe3c9, 0xe3ca,
+    0xe3cb, 0xe3cc, 0xe3cd, 0xe3ce, 0xe3cf, 0xe3d0, 0xe3d1, 0xe3d2,
+    0xe3d3, 0xe3d4, 0xe3d5, 0xe3d6, 0xe3d7, 0xe3d8, 0xe3d9, 0xe3da,
+    0xe3db, 0xe3dc, 0xe3dd, 0xe3de, 0xe3df, 0xe3e0, 0xe3e1, 0xe3e2,
+    0xe3e3, 0xe3e4, 0xe3e5, 0xe3e6, 0xe3e7, 0xe3e8, 0xe3e9, 0xe3ea,
+    0xe3eb, 0xe3ec, 0xe3ed, 0xe3ee, 0xe3ef, 0xe3f0, 0xe3f1, 0xe3f2,
+    0xe3f3, 0xe3f4, 0xe3f5, 0xe3f6, 0xe3f7, 0xe3f8, 0xe3f9, 0xe3fa,
+    0xe3fb, 0xe3fc, 0xe3fd, 0xe3fe, 0xe3ff, 0xe400, 0xe401, 0xe402,
+    0xe403, 0xe404, 0xe405, 0xe406, 0xe407, 0xe408, 0xe409, 0x003f,
     /* lead byte fd */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4152,16 +4152,16 @@
     0x9f95, 0x9f96, 0x9f97, 0x9f98, 0x9f9c, 0x9f9d, 0x9f9e, 0x9fa1,
     0x9fa2, 0x9fa3, 0x9fa4, 0x9fa5, 0xf92c, 0xf979, 0xf995, 0xf9e7,
-    0xf9f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf9f1, 0xe40a, 0xe40b, 0xe40c, 0xe40d, 0xe40e, 0xe40f, 0xe410,
+    0xe411, 0xe412, 0xe413, 0xe414, 0xe415, 0xe416, 0xe417, 0xe418,
+    0xe419, 0xe41a, 0xe41b, 0xe41c, 0xe41d, 0xe41e, 0xe41f, 0xe420,
+    0xe421, 0xe422, 0xe423, 0xe424, 0xe425, 0xe426, 0xe427, 0xe428,
+    0xe429, 0xe42a, 0xe42b, 0xe42c, 0xe42d, 0xe42e, 0xe42f, 0xe430,
+    0xe431, 0xe432, 0xe433, 0xe434, 0xe435, 0xe436, 0xe437, 0xe438,
+    0xe439, 0xe43a, 0xe43b, 0xe43c, 0xe43d, 0xe43e, 0xe43f, 0xe440,
+    0xe441, 0xe442, 0xe443, 0xe444, 0xe445, 0xe446, 0xe447, 0xe448,
+    0xe449, 0xe44a, 0xe44b, 0xe44c, 0xe44d, 0xe44e, 0xe44f, 0xe450,
+    0xe451, 0xe452, 0xe453, 0xe454, 0xe455, 0xe456, 0xe457, 0xe458,
+    0xe459, 0xe45a, 0xe45b, 0xe45c, 0xe45d, 0xe45e, 0xe45f, 0xe460,
+    0xe461, 0xe462, 0xe463, 0xe464, 0xe465, 0xe466, 0xe467, 0x003f,
     /* lead byte fe */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4175,26 +4175,26 @@
     0xfa0c, 0xfa0d, 0xfa0e, 0xfa0f, 0xfa11, 0xfa13, 0xfa14, 0xfa18,
     0xfa1f, 0xfa20, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa28, 0xfa29,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f
+    0xe815, 0xe816, 0xe817, 0xe818, 0xe819, 0xe81a, 0xe81b, 0xe81c,
+    0xe81d, 0xe81e, 0xe81f, 0xe820, 0xe821, 0xe822, 0xe823, 0xe824,
+    0xe825, 0xe826, 0xe827, 0xe828, 0xe829, 0xe82a, 0xe82b, 0xe82c,
+    0xe82d, 0xe82e, 0xe82f, 0xe830, 0xe831, 0xe832, 0xe833, 0xe834,
+    0xe835, 0xe836, 0xe837, 0xe838, 0xe839, 0xe83a, 0xe83b, 0xe83c,
+    0xe83d, 0xe83e, 0xe83f, 0xe840, 0xe841, 0xe842, 0xe843, 0x003f,
+    0xe844, 0xe845, 0xe846, 0xe847, 0xe848, 0xe849, 0xe84a, 0xe84b,
+    0xe84c, 0xe84d, 0xe84e, 0xe84f, 0xe850, 0xe851, 0xe852, 0xe853,
+    0xe854, 0xe855, 0xe856, 0xe857, 0xe858, 0xe859, 0xe85a, 0xe85b,
+    0xe85c, 0xe85d, 0xe85e, 0xe85f, 0xe860, 0xe861, 0xe862, 0xe863,
+    0xe864, 0xe468, 0xe469, 0xe46a, 0xe46b, 0xe46c, 0xe46d, 0xe46e,
+    0xe46f, 0xe470, 0xe471, 0xe472, 0xe473, 0xe474, 0xe475, 0xe476,
+    0xe477, 0xe478, 0xe479, 0xe47a, 0xe47b, 0xe47c, 0xe47d, 0xe47e,
+    0xe47f, 0xe480, 0xe481, 0xe482, 0xe483, 0xe484, 0xe485, 0xe486,
+    0xe487, 0xe488, 0xe489, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e,
+    0xe48f, 0xe490, 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496,
+    0xe497, 0xe498, 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e,
+    0xe49f, 0xe4a0, 0xe4a1, 0xe4a2, 0xe4a3, 0xe4a4, 0xe4a5, 0xe4a6,
+    0xe4a7, 0xe4a8, 0xe4a9, 0xe4aa, 0xe4ab, 0xe4ac, 0xe4ad, 0xe4ae,
+    0xe4af, 0xe4b0, 0xe4b1, 0xe4b2, 0xe4b3, 0xe4b4, 0xe4b5, 0xe4b6,
+    0xe4b7, 0xe4b8, 0xe4b9, 0xe4ba, 0xe4bb, 0xe4bc, 0xe4bd, 0xe4be,
+    0xe4bf, 0xe4c0, 0xe4c1, 0xe4c2, 0xe4c3, 0xe4c4, 0xe4c5, 0x003f
 };
 
@@ -4235,5 +4235,5 @@
 };
 
-static const unsigned short uni2cp_low[27904] =
+static const unsigned short uni2cp_low[28928] =
 {
     /* 0x0000 .. 0x00ff */
@@ -4258,57 +4258,57 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0020, 0x0021, 0x0063, 0x004c, 0xa1e8, 0x0059, 0x007c, 0xa1ec,
-    0xa1a7, 0x0063, 0x0061, 0xa1b6, 0x003f, 0x002d, 0x0072, 0xa1a5,
-    0xa1e3, 0xa1c0, 0x0032, 0x0033, 0xa840, 0xa6cc, 0x003f, 0xa1a4,
-    0x002c, 0x0031, 0x006f, 0xa1b7, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0043,
-    0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049,
-    0x0044, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0xa1c1,
-    0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x003f, 0xa6c2,
-    0xa8a4, 0xa8a2, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0063,
-    0xa8a8, 0xa8a6, 0xa8ba, 0x0065, 0xa8ac, 0xa8aa, 0x0069, 0x0069,
-    0x0064, 0x006e, 0xa8b0, 0xa8ae, 0x006f, 0x006f, 0x006f, 0xa1c2,
-    0x006f, 0xa8b4, 0xa8b2, 0x0075, 0xa8b9, 0x0079, 0x003f, 0x0079,
+    0x003f, 0x003f, 0xa1e9, 0xa1ea, 0xa1e8, 0xa3a4, 0x007c, 0xa1ec,
+    0xa1a7, 0x003f, 0x0061, 0x003f, 0x003f, 0x002d, 0x003f, 0xa1a5,
+    0xa1e3, 0xa1c0, 0x0032, 0x0033, 0xa1e4, 0xa6cc, 0x003f, 0xa1a4,
+    0x003f, 0x0031, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa8a4, 0xa8a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa8a8, 0xa8a6, 0xa8ba, 0x003f, 0xa8ac, 0xa8aa, 0x003f, 0x003f,
+    0x0044, 0x003f, 0xa8b0, 0xa8ae, 0x003f, 0x003f, 0x003f, 0xa1c1,
+    0x003f, 0xa8b4, 0xa8b2, 0x003f, 0xa8b9, 0x0059, 0x0054, 0x003f,
+    0xa8a4, 0xa8a2, 0x0061, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa8a8, 0xa8a6, 0xa8ba, 0x003f, 0xa8ac, 0xa8aa, 0x003f, 0x003f,
+    0x0065, 0x003f, 0xa8b0, 0xa8ae, 0x003f, 0x003f, 0x003f, 0xa1c2,
+    0x003f, 0xa8b4, 0xa8b2, 0x003f, 0xa8b9, 0x0079, 0x0074, 0x003f,
     /* 0x0100 .. 0x01ff */
-    0x0041, 0xa8a1, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063,
-    0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064,
-    0x0044, 0x0064, 0x0045, 0xa8a5, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0xa8a7, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068,
-    0x0049, 0x0069, 0x0049, 0xa8a9, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x0049, 0x0069, 0x003f, 0x003f, 0x004a, 0x006a, 0x004b, 0x006b,
-    0x003f, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x003f,
-    0x003f, 0x004c, 0x006c, 0x004e, 0xa8bd, 0x004e, 0x006e, 0x004e,
-    0xa8be, 0x003f, 0x003f, 0x003f, 0x004f, 0xa8ad, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074,
-    0x0055, 0x0075, 0x0055, 0xa8b1, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079,
-    0x0059, 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0073,
-    0x0062, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0044, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0045, 0x0046, 0x0066, 0x003f, 0x003f, 0x003f, 0x003f, 0x0049,
-    0x003f, 0x003f, 0x006c, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f,
-    0x004f, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, 0x0054, 0x0055,
-    0x0075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x007a, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa9a6, 0x003f, 0x003f, 0x0021, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0xa8a3, 0x0049,
-    0xa8ab, 0x004f, 0xa8af, 0x0055, 0xa8b3, 0x0055, 0xa8b5, 0x0055,
-    0xa8b6, 0x0055, 0xa8b7, 0x0055, 0xa8b8, 0x003f, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x004b, 0x006b, 0x004f, 0x006f, 0x004f, 0x006f, 0x003f, 0x003f,
-    0x006a, 0x003f, 0x003f, 0x003f, 0x0047, 0x0067, 0x003f, 0x003f,
-    0x004e, 0x006e, 0x0041, 0x0061, 0x0041, 0x0061, 0x004f, 0x006f,
+    0xa8a1, 0xa8a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa8a5, 0xa8a5, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa8a7, 0xa8a7, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa8a9, 0xa8a9, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa8bd, 0x003f, 0x003f, 0x003f,
+    0xa8be, 0x003f, 0x003f, 0x003f, 0xa8ad, 0xa8ad, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa8b1, 0xa8b1, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa1ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8a3, 0xa8a3, 0xa8ab,
+    0xa8ab, 0xa8af, 0xa8af, 0xa8b3, 0xa8b3, 0xa8b5, 0xa8b5, 0xa8b6,
+    0xa8b6, 0xa8b7, 0xa8b7, 0xa8b8, 0xa8b8, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0200 .. 0x02ff */
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x003f, 0x003f, 0x0048, 0x0068,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4326,50 +4326,50 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0068, 0x003f, 0x006a, 0x0072, 0x003f, 0x003f, 0x003f, 0x0077,
-    0x0079, 0xa840, 0xa1e5, 0xa1ae, 0xa1af, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x005e, 0xa1a6,
-    0x0027, 0xa1a5, 0xa840, 0xa841, 0x003f, 0x005f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa842, 0xa1e3, 0x003f, 0x007e, 0xa1e5, 0x003f, 0x003f,
-    0x003f, 0x006c, 0x0073, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1a6,
+    0x003f, 0xa1a5, 0xa840, 0xa841, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa842, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0300 .. 0x03ff */
-    0xa841, 0xa840, 0x005e, 0x007e, 0xa1a5, 0xa1a5, 0x003f, 0xa842,
-    0xa1a7, 0x003f, 0xa1e3, 0xa1e5, 0xa1a6, 0x003f, 0x0022, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002c,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x005f, 0x005f, 0x005f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa841, 0xa840, 0x003f, 0x003f, 0xa1a7, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa840, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003b, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa840, 0xa1a7, 0xa6a1, 0xa1a4,
-    0xa6a5, 0xa6a7, 0xa6a9, 0x003f, 0xa6af, 0x003f, 0xa6b4, 0xa6b8,
-    0xa6c9, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a4, 0xa6a5, 0xa6a6, 0xa6a7,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a4, 0xa6a5, 0xa6a6, 0xa6a7,
     0xa6a8, 0xa6a9, 0xa6aa, 0xa6ab, 0xa6ac, 0xa6ad, 0xa6ae, 0xa6af,
     0xa6b0, 0xa6b1, 0x003f, 0xa6b2, 0xa6b3, 0xa6b4, 0xa6b5, 0xa6b6,
-    0xa6b7, 0xa6b8, 0xa6a9, 0xa6b4, 0xa6c1, 0xa6c5, 0xa6c7, 0xa6c9,
-    0xa6d4, 0xa6c1, 0xa6c2, 0xa6c3, 0xa6c4, 0xa6c5, 0xa6c6, 0xa6c7,
+    0xa6b7, 0xa6b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa6c1, 0xa6c2, 0xa6c3, 0xa6c4, 0xa6c5, 0xa6c6, 0xa6c7,
     0xa6c8, 0xa6c9, 0xa6ca, 0xa6cb, 0xa6cc, 0xa6cd, 0xa6ce, 0xa6cf,
     0xa6d0, 0xa6d1, 0x003f, 0xa6d2, 0xa6d3, 0xa6d4, 0xa6d5, 0xa6d6,
-    0xa6d7, 0xa6d8, 0xa6c9, 0xa6d4, 0xa6cf, 0xa6d4, 0xa6d8, 0x003f,
-    0xa6c2, 0xa6c8, 0xa6b4, 0xa6b4, 0xa6b4, 0xa6d5, 0xa6d0, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa6ca, 0xa6d1, 0x003f, 0x003f, 0xa6a8, 0xa6c5, 0x003f, 0x003f,
-    0x003f, 0xa6b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa6d7, 0xa6d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0400 .. 0x04ff */
-    0xa7a6, 0xa7a7, 0x003f, 0xa7a4, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa7ac, 0xa7aa, 0xa7b5, 0x003f,
+    0x003f, 0xa7a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa7a1, 0xa7a2, 0xa7a3, 0xa7a4, 0xa7a5, 0xa7a6, 0xa7a8, 0xa7a9,
     0xa7aa, 0xa7ab, 0xa7ac, 0xa7ad, 0xa7ae, 0xa7af, 0xa7b0, 0xa7b1,
@@ -4380,147 +4380,48 @@
     0xa7e2, 0xa7e3, 0xa7e4, 0xa7e5, 0xa7e6, 0xa7e7, 0xa7e8, 0xa7e9,
     0xa7ea, 0xa7eb, 0xa7ec, 0xa7ed, 0xa7ee, 0xa7ef, 0xa7f0, 0xa7f1,
-    0xa7d6, 0xa7d7, 0x003f, 0xa7d4, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa7dc, 0xa7da, 0xa7e5, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa7a8, 0xa7d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa7a1, 0xa7d1, 0xa7a1, 0xa7d1, 0x003f, 0x003f, 0xa7a6, 0xa7d6,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa7a8, 0xa7d8, 0xa7a9, 0xa7d9,
-    0x003f, 0x003f, 0xa7aa, 0xa7da, 0xa7aa, 0xa7da, 0xa7b0, 0xa7e0,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa7bf, 0xa7ef, 0xa7b5, 0xa7e5,
-    0xa7b5, 0xa7e5, 0xa7b5, 0xa7e5, 0xa7b9, 0xa7e9, 0x003f, 0x003f,
-    0xa7bd, 0xa7ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1d00 .. 0x1dff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0041, 0x0042, 0x003f,
-    0x0044, 0x0045, 0x003f, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b,
-    0x004c, 0x004d, 0x004e, 0x003f, 0x004f, 0x003f, 0x0050, 0x0052,
-    0x0054, 0x0055, 0x0057, 0x0061, 0x003f, 0xa8bb, 0x003f, 0x0062,
-    0x0064, 0x0065, 0x003f, 0x003f, 0x003f, 0x0067, 0x003f, 0x006b,
-    0x006d, 0x003f, 0x006f, 0x003f, 0x003f, 0x003f, 0x0070, 0x0074,
-    0x0075, 0x003f, 0x003f, 0x0076, 0x003f, 0xa6c2, 0xa6c3, 0xa6c4,
-    0xa6d5, 0xa6d6, 0x0069, 0x0072, 0x0075, 0x0076, 0xa6c2, 0xa6c3,
-    0xa6d1, 0xa6d5, 0xa6d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa7df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0063, 0x003f, 0x0064, 0x003f,
-    0x0066, 0x003f, 0xa8c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x007a, 0x003f, 0x003f, 0x003f, 0xa6c8,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1e00 .. 0x1eff */
-    0x0041, 0x0061, 0x0042, 0x0062, 0x0042, 0x0062, 0x0042, 0x0062,
-    0x0043, 0x0063, 0x0044, 0x0064, 0x0044, 0x0064, 0x0044, 0x0064,
-    0x0044, 0x0064, 0x0044, 0x0064, 0x0045, 0xa8a5, 0x0045, 0xa8a5,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0046, 0x0066,
-    0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068, 0x0048, 0x0068,
-    0x0048, 0x0068, 0x0048, 0x0068, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x004b, 0x006b, 0x004b, 0x006b, 0x004b, 0x006b, 0x004c, 0x006c,
-    0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x004d, 0x006d,
-    0x004d, 0x006d, 0x004d, 0x006d, 0x004e, 0x006e, 0x004e, 0x006e,
-    0x004e, 0x006e, 0x004e, 0x006e, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0xa8ad, 0x004f, 0xa8ad, 0x0050, 0x0070, 0x0050, 0x0070,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074,
-    0x0054, 0x0074, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0xa8b1, 0x0056, 0x0076, 0x0056, 0x0076,
-    0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077,
-    0x0057, 0x0077, 0x0058, 0x0078, 0x0058, 0x0078, 0x0059, 0x0079,
-    0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0068, 0x0074,
-    0x0077, 0x0079, 0x003f, 0x0073, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0xa8ba,
-    0x0045, 0xa8ba, 0x0045, 0xa8ba, 0x0045, 0xa8ba, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0059, 0x0079, 0x0059, 0x0079, 0x0059, 0x0079,
-    0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1f00 .. 0x1fff */
-    0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1,
-    0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1,
-    0xa6c5, 0xa6c5, 0xa6c5, 0xa6c5, 0xa6c5, 0xa6c5, 0x003f, 0x003f,
-    0xa6a5, 0xa6a5, 0xa6a5, 0xa6a5, 0xa6a5, 0xa6a5, 0x003f, 0x003f,
-    0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7,
-    0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7,
-    0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9,
-    0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9,
-    0xa6cf, 0xa6cf, 0xa6cf, 0xa6cf, 0xa6cf, 0xa6cf, 0x003f, 0x003f,
-    0xa6af, 0xa6af, 0xa6af, 0xa6af, 0xa6af, 0xa6af, 0x003f, 0x003f,
-    0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4,
-    0x003f, 0xa6b4, 0x003f, 0xa6b4, 0x003f, 0xa6b4, 0x003f, 0xa6b4,
-    0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8,
-    0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8,
-    0xa6c1, 0xa6c1, 0xa6c5, 0xa6c5, 0xa6c7, 0xa6c7, 0xa6c9, 0xa6c9,
-    0xa6cf, 0xa6cf, 0xa6d4, 0xa6d4, 0xa6d8, 0xa6d8, 0x003f, 0x003f,
-    0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1,
-    0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1,
-    0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7,
-    0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7,
-    0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8,
-    0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8,
-    0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0x003f, 0xa6c1, 0xa6c1,
-    0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0x003f, 0xa6c9, 0x003f,
-    0x003f, 0xa1a7, 0xa6c7, 0xa6c7, 0xa6c7, 0x003f, 0xa6c7, 0xa6c7,
-    0xa6a5, 0xa6a5, 0xa6a7, 0xa6a7, 0xa6a7, 0x003f, 0x003f, 0x003f,
-    0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0x003f, 0x003f, 0xa6c9, 0xa6c9,
-    0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d1, 0xa6d1, 0xa6d4, 0xa6d4,
-    0xa6b4, 0xa6b4, 0xa6b4, 0xa6b4, 0xa6b1, 0xa1a7, 0xa1a7, 0x0060,
-    0x003f, 0x003f, 0xa6d8, 0xa6d8, 0xa6d8, 0x003f, 0xa6d8, 0xa6d8,
-    0xa6af, 0xa6af, 0xa6b8, 0xa6b8, 0xa6b8, 0xa840, 0x003f, 0x003f,
+    0x003f, 0xa7d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2000 .. 0x20ff */
-    0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
-    0x0020, 0x0020, 0x0020, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa95c, 0xa95c, 0x003f, 0xa843, 0xa1aa, 0xa844, 0xa1ac, 0x005f,
-    0xa1ae, 0xa1af, 0x002c, 0xa1ae, 0xa1b0, 0xa1b1, 0x002c, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x002e, 0xa845, 0xa1ad, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa95c, 0x003f, 0x003f, 0xa843, 0xa1aa, 0xa844, 0xa1ac, 0x003f,
+    0xa1ae, 0xa1af, 0x003f, 0x003f, 0xa1b0, 0xa1b1, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa845, 0xa1ad, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa1eb, 0x003f, 0xa1e4, 0xa1e5, 0x003f, 0xa846, 0x003f, 0x003f,
-    0x003f, 0xa1b4, 0xa1b5, 0xa1f9, 0x0021, 0x003f, 0xa1a5, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa84d, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1e3, 0x0069, 0x003f, 0x003f, 0x0034, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0xa95c, 0x003d, 0x0028, 0x0029, 0x006e,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0xa95c, 0x003d, 0x0028, 0x0029, 0x003f,
-    0x0061, 0x0065, 0x006f, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0063, 0x003f, 0x003f, 0x004c, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa1f9, 0x003f, 0x003f, 0xa3fe, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x0080, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4535,26 +4436,26 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2100 .. 0x21ff */
-    0x003f, 0x003f, 0x0043, 0xa1e6, 0x003f, 0xa847, 0x003f, 0x0045,
-    0x003f, 0xa848, 0x0067, 0x0048, 0x0048, 0x0048, 0x0068, 0x0068,
-    0x0049, 0x0049, 0x004c, 0x006c, 0x003f, 0x004e, 0xa1ed, 0x003f,
-    0x0050, 0x0050, 0x0051, 0x0052, 0x0052, 0x0052, 0x003f, 0x003f,
-    0x003f, 0xa959, 0x003f, 0x003f, 0x005a, 0x003f, 0xa6b8, 0x003f,
-    0x005a, 0x003f, 0x004b, 0x0041, 0x0042, 0x0043, 0x0065, 0x0065,
-    0x0045, 0x0046, 0x003f, 0x004d, 0x006f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0069, 0x003f, 0x003f, 0xa6d0, 0xa6c3, 0xa6a3, 0xa6b0,
-    0xa1c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x0044, 0x0064, 0x0065,
-    0x0069, 0x006a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa1e6, 0x003f, 0xa847, 0x003f, 0x003f,
+    0x003f, 0xa848, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ed, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa959, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa2f1, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7, 0xa2f8,
-    0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0x004c, 0x0043, 0x0044, 0x004d,
+    0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa2a1, 0xa2a2, 0xa2a3, 0xa2a4, 0xa2a5, 0xa2a6, 0xa2a7, 0xa2a8,
-    0xa2a9, 0xa2aa, 0x003f, 0x003f, 0x006c, 0x0063, 0x0064, 0x006d,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1fb, 0xa1fc, 0xa1fa, 0xa1fd, 0x002d, 0x007c, 0xa849, 0xa84a,
-    0xa84b, 0xa84c, 0xa1fb, 0xa1fa, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002d, 0x003f,
+    0xa2a9, 0xa2aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1fb, 0xa1fc, 0xa1fa, 0xa1fd, 0x003f, 0x003f, 0xa849, 0xa84a,
+    0xa84b, 0xa84c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4568,19 +4469,19 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2200 .. 0x22ff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f, 0x003f, 0x003f,
-    0xa1ca, 0xa1ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1c7,
-    0x003f, 0xa1c6, 0xa95c, 0xa1c0, 0x003f, 0xa84d, 0x005c, 0x002a,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1c7,
+    0x003f, 0xa1c6, 0x003f, 0x003f, 0x003f, 0xa84d, 0x003f, 0x003f,
     0xa1e3, 0x003f, 0xa1cc, 0x003f, 0x003f, 0xa1d8, 0xa1de, 0xa84e,
-    0xa1cf, 0x003f, 0x003f, 0xa84f, 0xa84f, 0xa1ce, 0xa1ce, 0xa1c4,
+    0xa1cf, 0x003f, 0x003f, 0xa84f, 0x003f, 0xa1ce, 0x003f, 0xa1c4,
     0xa1c5, 0xa1c9, 0xa1c8, 0xa1d2, 0x003f, 0x003f, 0xa1d3, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xa1e0, 0xa1df, 0xa1c3, 0xa1cb,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x007e, 0xa1d7, 0x003f, 0x003f,
-    0x003f, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1d6, 0xa1d6, 0x003f, 0x003f, 0xa1d5, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa1ab, 0xa1d7, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1d6, 0x003f, 0x003f, 0x003f, 0xa1d5, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa850, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1d9, 0xa1d4, 0xa1d4, 0xa1d4, 0xa1dc, 0xa1dd, 0xa851, 0xa852,
-    0x003f, 0x003f, 0xa1b6, 0xa1b7, 0x003f, 0x003f, 0xa1da, 0xa1db,
-    0xa1dc, 0xa1dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1d9, 0xa1d4, 0x003f, 0x003f, 0xa1dc, 0xa1dd, 0xa851, 0xa852,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1da, 0xa1db,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4592,5 +4493,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa853,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1a4, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4601,10 +4502,10 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2300 .. 0x23ff */
-    0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa1d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa1b4, 0xa1b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4656,12 +4557,12 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0042,
-    0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a,
-    0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052,
-    0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a,
-    0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068,
-    0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070,
-    0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078,
-    0x0079, 0x007a, 0x0030, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4676,11 +4577,11 @@
     0xa9dc, 0xa9dd, 0xa9de, 0xa9df, 0xa9e0, 0xa9e1, 0xa9e2, 0xa9e3,
     0xa9e4, 0xa9e5, 0xa9e6, 0xa9e7, 0xa9e8, 0xa9e9, 0xa9ea, 0xa9eb,
-    0xa9ec, 0xa9ed, 0xa9ee, 0xa9ef, 0x002d, 0x002d, 0x007c, 0x007c,
+    0xa9ec, 0xa9ed, 0xa9ee, 0xa9ef, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa854, 0xa855, 0xa856, 0xa857, 0xa858, 0xa859, 0xa85a, 0xa85b,
     0xa85c, 0xa85d, 0xa85e, 0xa85f, 0xa860, 0xa861, 0xa862, 0xa863,
     0xa864, 0xa865, 0xa866, 0xa867, 0xa868, 0xa869, 0xa86a, 0xa86b,
     0xa86c, 0xa86d, 0xa86e, 0xa86f, 0xa870, 0xa871, 0xa872, 0xa873,
-    0xa874, 0xa875, 0xa876, 0xa877, 0x002d, 0x007c, 0x002d, 0x007c,
-    0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c,
+    0xa874, 0xa875, 0xa876, 0xa877, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xa878, 0xa879, 0xa87a, 0xa87b, 0xa87c, 0xa87d, 0xa87e,
     0xa880, 0xa881, 0xa882, 0xa883, 0xa884, 0xa885, 0xa886, 0xa887,
@@ -4696,5 +4597,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa88d, 0xa88e, 0xa88f, 0xa890, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1f0,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4727,70 +4628,4 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2e00 .. 0x2eff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4b8,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0xb9ea, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2f00 .. 0x2fff */
-    0xd2bb, 0xd8ad, 0xd8bc, 0xd8af, 0xd2d2, 0x817c, 0xb6fe, 0xd9ef,
-    0xc8cb, 0xb6f9, 0xc8eb, 0xb0cb, 0xd8e7, 0xdaa2, 0xd9fb, 0xbcb8,
-    0xdbc9, 0xb5b6, 0xc1a6, 0xd9e8, 0xd8b0, 0xd8ce, 0x855b, 0xcaae,
-    0xb2b7, 0xdae0, 0xb3a7, 0xdbcc, 0xd3d6, 0xbfda, 0xe0ed, 0xcdc1,
-    0xcabf, 0xe2ba, 0x89e5, 0xcfa6, 0xb4f3, 0xc5ae, 0xd7d3, 0xe5b2,
-    0xb4e7, 0xd0a1, 0xdecc, 0xcaac, 0xe5f8, 0xc9bd, 0xe7dd, 0xb9a4,
-    0xbcba, 0xbded, 0xb8c9, 0xe7db, 0xb9e3, 0xdbc8, 0xdec3, 0xdfae,
-    0xb9ad, 0xe5e6, 0xe1ea, 0xe1dc, 0xd0c4, 0xb8ea, 0x91f4, 0xcad6,
-    0xd6a7, 0xeab7, 0xcec4, 0xb6b7, 0xbdef, 0xb7bd, 0xcede, 0xc8d5,
-    0xd4bb, 0xd4c2, 0xc4be, 0xc7b7, 0xd6b9, 0xb4f5, 0xecaf, 0xcee3,
-    0xb1c8, 0xc3ab, 0xcacf, 0xc6f8, 0xcbae, 0xbbf0, 0xd7a6, 0xb8b8,
-    0xd8b3, 0xe3dd, 0xc6ac, 0xd1c0, 0xc5a3, 0xc8ae, 0xd0fe, 0xd3f1,
-    0xb9cf, 0xcddf, 0xb8ca, 0xc9fa, 0xd3c3, 0xccef, 0xf1e2, 0xf0da,
-    0xb068, 0xb0d7, 0xc6a4, 0xc3f3, 0xc4bf, 0xc3ac, 0xcab8, 0xcaaf,
-    0xcabe, 0xb662, 0xbacc, 0xd1a8, 0xc1a2, 0xd6f1, 0xc3d7, 0xf4e9,
-    0xf3be, 0xcdf8, 0xd1f2, 0xd3f0, 0xc0cf, 0xb6f8, 0xf1e7, 0xb6fa,
-    0xedb2, 0xc8e2, 0xb3bc, 0xd7d4, 0xd6c1, 0xbeca, 0xc9e0, 0xe2b6,
-    0xd6db, 0xf4de, 0xc9ab, 0xc648, 0xf2ae, 0xb3e6, 0xd1aa, 0xd0d0,
-    0xd2c2, 0xd281, 0xd28a, 0xbdc7, 0xd1d4, 0xb9c8, 0xb6b9, 0xf5b9,
-    0xf5f4, 0xd890, 0xb3e0, 0xd7df, 0xd7e3, 0xc9ed, 0xdc87, 0xd0c1,
-    0xb3bd, 0xde75, 0xd2d8, 0xd3cf, 0xe18a, 0xc0ef, 0xbdf0, 0xe94c,
-    0xe954, 0xb8b7, 0xc1a5, 0xf6bf, 0xd3ea, 0xec69, 0xb7c7, 0xc3e6,
-    0xb8ef, 0xed66, 0xbec2, 0xd2f4, 0xed93, 0xef4c, 0xef77, 0xcab3,
-    0xcad7, 0xcfe3, 0xf152, 0xb9c7, 0xb8df, 0xf7d4, 0xf459, 0xdbcb,
-    0xd8aa, 0xb9ed, 0xf47e, 0xf842, 0xfb75, 0xc2b9, 0xfb9c, 0xc2e9,
-    0xfc53, 0xcaf2, 0xbada, 0xede9, 0xfc77, 0xb6a6, 0xb9c4, 0xcaf3,
-    0xb1c7, 0xfd52, 0xfd58, 0xfd88, 0xfd94, 0xd9df, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4802,9 +4637,9 @@
     0xa1b4, 0xa1b5, 0xa1b6, 0xa1b7, 0xa1b8, 0xa1b9, 0xa1ba, 0xa1bb,
     0xa1be, 0xa1bf, 0xa893, 0xa1fe, 0xa1b2, 0xa1b3, 0xa1bc, 0xa1bd,
-    0x003f, 0x003f, 0x005b, 0x005d, 0x003f, 0xa894, 0xa895, 0x002c,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa894, 0xa895, 0x003f,
     0x003f, 0xa940, 0xa941, 0xa942, 0xa943, 0xa944, 0xa945, 0xa946,
     0xa947, 0xa948, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa893, 0x003f,
-    0xcaae, 0x8560, 0xd8a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7,
     0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af,
@@ -4817,5 +4652,5 @@
     0xa4e0, 0xa4e1, 0xa4e2, 0xa4e3, 0xa4e4, 0xa4e5, 0xa4e6, 0xa4e7,
     0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ed, 0xa4ee, 0xa4ef,
-    0xa4f0, 0xa4f1, 0xa4f2, 0xa4f3, 0xa4a6, 0x003f, 0x003f, 0x003f,
+    0xa4f0, 0xa4f1, 0xa4f2, 0xa4f3, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xa961, 0xa962, 0xa966, 0xa967, 0x003f,
     0x003f, 0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a5, 0xa5a6, 0xa5a7,
@@ -4829,6 +4664,6 @@
     0xa5e0, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7,
     0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ef,
-    0xa5f0, 0xa5f1, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6, 0xa5ef,
-    0xa5f0, 0xa5f1, 0xa5f2, 0x003f, 0xa960, 0xa963, 0xa964, 0x003f,
+    0xa5f0, 0xa5f1, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa960, 0xa963, 0xa964, 0x003f,
     /* 0x3100 .. 0x31ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8c5, 0xa8c6, 0xa8c7,
@@ -4870,8 +4705,8 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa2e5, 0xa2e6, 0xa2e7, 0xa2e8, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec,
-    0xa2ed, 0xa2ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa95a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa2ed, 0xa2ee, 0xd4c2, 0xbbf0, 0xcbae, 0xc4be, 0xbdf0, 0xcdc1,
+    0xc8d5, 0xa95a, 0xd3d0, 0xc9e7, 0xc3fb, 0xccd8, 0xb2c6, 0xd7a3,
+    0xc0cd, 0xb4fa, 0xbaf4, 0xd1a7, 0xbce0, 0xc6f3, 0xd7ca, 0xd0ad,
+    0xbcc0, 0xd0dd, 0xd7d4, 0xd6c1, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4883,18 +4718,18 @@
     0xd2bb, 0xb6fe, 0xc8fd, 0xcbc4, 0xcee5, 0xc1f9, 0xc6df, 0xb0cb,
     0xbec5, 0xcaae, 0xd4c2, 0xbbf0, 0xcbae, 0xc4be, 0xbdf0, 0xcdc1,
-    0xc8d5, 0xd6ea, 0xd3d0, 0xc9e7, 0xc3fb, 0xccd8, 0xd894, 0xd7a3,
-    0x84ba, 0xc3d8, 0xc4d0, 0xc5ae, 0xdf6d, 0x839e, 0xd3a1, 0xd7a2,
-    0xed97, 0xd0dd, 0xd0b4, 0xa949, 0xc9cf, 0xd6d0, 0xcfc2, 0xd7f3,
-    0xd3d2, 0xd2bd, 0xd7da, 0xd1a7, 0xb14f, 0xc6f3, 0xd959, 0x8566,
+    0xc8d5, 0xd6ea, 0xd3d0, 0xc9e7, 0xc3fb, 0xccd8, 0xb2c6, 0xd7a3,
+    0xc0cd, 0xc3d8, 0xc4d0, 0xc5ae, 0xcaca, 0xd3c5, 0x003f, 0xd7a2,
+    0xcfee, 0xd0dd, 0xd0b4, 0xa949, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xd2bd, 0xd7da, 0xd1a7, 0xbce0, 0xc6f3, 0xd7ca, 0xd0ad,
     0xd2b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa5a2, 0xa5a4, 0xa5a6, 0xa5a8, 0xa5aa, 0xa5ab, 0xa5ad, 0xa5af,
-    0xa5b1, 0xa5b3, 0xa5b5, 0xa5b7, 0xa5b9, 0xa5bb, 0xa5bd, 0xa5bf,
-    0xa5c1, 0xa5c4, 0xa5c6, 0xa5c8, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd,
-    0xa5ce, 0xa5cf, 0xa5d2, 0xa5d5, 0xa5d8, 0xa5db, 0xa5de, 0xa5df,
-    0xa5e0, 0xa5e1, 0xa5e2, 0xa5e4, 0xa5e6, 0xa5e8, 0xa5e9, 0xa5ea,
-    0xa5eb, 0xa5ec, 0xa5ed, 0xa5ef, 0xa5f0, 0xa5f1, 0xa5f2, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x3300 .. 0x33ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -7636,4 +7471,334 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0xe000 .. 0xe0ff */
+    0xaaa1, 0xaaa2, 0xaaa3, 0xaaa4, 0xaaa5, 0xaaa6, 0xaaa7, 0xaaa8,
+    0xaaa9, 0xaaaa, 0xaaab, 0xaaac, 0xaaad, 0xaaae, 0xaaaf, 0xaab0,
+    0xaab1, 0xaab2, 0xaab3, 0xaab4, 0xaab5, 0xaab6, 0xaab7, 0xaab8,
+    0xaab9, 0xaaba, 0xaabb, 0xaabc, 0xaabd, 0xaabe, 0xaabf, 0xaac0,
+    0xaac1, 0xaac2, 0xaac3, 0xaac4, 0xaac5, 0xaac6, 0xaac7, 0xaac8,
+    0xaac9, 0xaaca, 0xaacb, 0xaacc, 0xaacd, 0xaace, 0xaacf, 0xaad0,
+    0xaad1, 0xaad2, 0xaad3, 0xaad4, 0xaad5, 0xaad6, 0xaad7, 0xaad8,
+    0xaad9, 0xaada, 0xaadb, 0xaadc, 0xaadd, 0xaade, 0xaadf, 0xaae0,
+    0xaae1, 0xaae2, 0xaae3, 0xaae4, 0xaae5, 0xaae6, 0xaae7, 0xaae8,
+    0xaae9, 0xaaea, 0xaaeb, 0xaaec, 0xaaed, 0xaaee, 0xaaef, 0xaaf0,
+    0xaaf1, 0xaaf2, 0xaaf3, 0xaaf4, 0xaaf5, 0xaaf6, 0xaaf7, 0xaaf8,
+    0xaaf9, 0xaafa, 0xaafb, 0xaafc, 0xaafd, 0xaafe, 0xaba1, 0xaba2,
+    0xaba3, 0xaba4, 0xaba5, 0xaba6, 0xaba7, 0xaba8, 0xaba9, 0xabaa,
+    0xabab, 0xabac, 0xabad, 0xabae, 0xabaf, 0xabb0, 0xabb1, 0xabb2,
+    0xabb3, 0xabb4, 0xabb5, 0xabb6, 0xabb7, 0xabb8, 0xabb9, 0xabba,
+    0xabbb, 0xabbc, 0xabbd, 0xabbe, 0xabbf, 0xabc0, 0xabc1, 0xabc2,
+    0xabc3, 0xabc4, 0xabc5, 0xabc6, 0xabc7, 0xabc8, 0xabc9, 0xabca,
+    0xabcb, 0xabcc, 0xabcd, 0xabce, 0xabcf, 0xabd0, 0xabd1, 0xabd2,
+    0xabd3, 0xabd4, 0xabd5, 0xabd6, 0xabd7, 0xabd8, 0xabd9, 0xabda,
+    0xabdb, 0xabdc, 0xabdd, 0xabde, 0xabdf, 0xabe0, 0xabe1, 0xabe2,
+    0xabe3, 0xabe4, 0xabe5, 0xabe6, 0xabe7, 0xabe8, 0xabe9, 0xabea,
+    0xabeb, 0xabec, 0xabed, 0xabee, 0xabef, 0xabf0, 0xabf1, 0xabf2,
+    0xabf3, 0xabf4, 0xabf5, 0xabf6, 0xabf7, 0xabf8, 0xabf9, 0xabfa,
+    0xabfb, 0xabfc, 0xabfd, 0xabfe, 0xaca1, 0xaca2, 0xaca3, 0xaca4,
+    0xaca5, 0xaca6, 0xaca7, 0xaca8, 0xaca9, 0xacaa, 0xacab, 0xacac,
+    0xacad, 0xacae, 0xacaf, 0xacb0, 0xacb1, 0xacb2, 0xacb3, 0xacb4,
+    0xacb5, 0xacb6, 0xacb7, 0xacb8, 0xacb9, 0xacba, 0xacbb, 0xacbc,
+    0xacbd, 0xacbe, 0xacbf, 0xacc0, 0xacc1, 0xacc2, 0xacc3, 0xacc4,
+    0xacc5, 0xacc6, 0xacc7, 0xacc8, 0xacc9, 0xacca, 0xaccb, 0xaccc,
+    0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacd1, 0xacd2, 0xacd3, 0xacd4,
+    0xacd5, 0xacd6, 0xacd7, 0xacd8, 0xacd9, 0xacda, 0xacdb, 0xacdc,
+    0xacdd, 0xacde, 0xacdf, 0xace0, 0xace1, 0xace2, 0xace3, 0xace4,
+    /* 0xe100 .. 0xe1ff */
+    0xace5, 0xace6, 0xace7, 0xace8, 0xace9, 0xacea, 0xaceb, 0xacec,
+    0xaced, 0xacee, 0xacef, 0xacf0, 0xacf1, 0xacf2, 0xacf3, 0xacf4,
+    0xacf5, 0xacf6, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb, 0xacfc,
+    0xacfd, 0xacfe, 0xada1, 0xada2, 0xada3, 0xada4, 0xada5, 0xada6,
+    0xada7, 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, 0xadad, 0xadae,
+    0xadaf, 0xadb0, 0xadb1, 0xadb2, 0xadb3, 0xadb4, 0xadb5, 0xadb6,
+    0xadb7, 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe,
+    0xadbf, 0xadc0, 0xadc1, 0xadc2, 0xadc3, 0xadc4, 0xadc5, 0xadc6,
+    0xadc7, 0xadc8, 0xadc9, 0xadca, 0xadcb, 0xadcc, 0xadcd, 0xadce,
+    0xadcf, 0xadd0, 0xadd1, 0xadd2, 0xadd3, 0xadd4, 0xadd5, 0xadd6,
+    0xadd7, 0xadd8, 0xadd9, 0xadda, 0xaddb, 0xaddc, 0xaddd, 0xadde,
+    0xaddf, 0xade0, 0xade1, 0xade2, 0xade3, 0xade4, 0xade5, 0xade6,
+    0xade7, 0xade8, 0xade9, 0xadea, 0xadeb, 0xadec, 0xaded, 0xadee,
+    0xadef, 0xadf0, 0xadf1, 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6,
+    0xadf7, 0xadf8, 0xadf9, 0xadfa, 0xadfb, 0xadfc, 0xadfd, 0xadfe,
+    0xaea1, 0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, 0xaea7, 0xaea8,
+    0xaea9, 0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, 0xaeaf, 0xaeb0,
+    0xaeb1, 0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, 0xaeb6, 0xaeb7, 0xaeb8,
+    0xaeb9, 0xaeba, 0xaebb, 0xaebc, 0xaebd, 0xaebe, 0xaebf, 0xaec0,
+    0xaec1, 0xaec2, 0xaec3, 0xaec4, 0xaec5, 0xaec6, 0xaec7, 0xaec8,
+    0xaec9, 0xaeca, 0xaecb, 0xaecc, 0xaecd, 0xaece, 0xaecf, 0xaed0,
+    0xaed1, 0xaed2, 0xaed3, 0xaed4, 0xaed5, 0xaed6, 0xaed7, 0xaed8,
+    0xaed9, 0xaeda, 0xaedb, 0xaedc, 0xaedd, 0xaede, 0xaedf, 0xaee0,
+    0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0xaee6, 0xaee7, 0xaee8,
+    0xaee9, 0xaeea, 0xaeeb, 0xaeec, 0xaeed, 0xaeee, 0xaeef, 0xaef0,
+    0xaef1, 0xaef2, 0xaef3, 0xaef4, 0xaef5, 0xaef6, 0xaef7, 0xaef8,
+    0xaef9, 0xaefa, 0xaefb, 0xaefc, 0xaefd, 0xaefe, 0xafa1, 0xafa2,
+    0xafa3, 0xafa4, 0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa,
+    0xafab, 0xafac, 0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, 0xafb2,
+    0xafb3, 0xafb4, 0xafb5, 0xafb6, 0xafb7, 0xafb8, 0xafb9, 0xafba,
+    0xafbb, 0xafbc, 0xafbd, 0xafbe, 0xafbf, 0xafc0, 0xafc1, 0xafc2,
+    0xafc3, 0xafc4, 0xafc5, 0xafc6, 0xafc7, 0xafc8, 0xafc9, 0xafca,
+    /* 0xe200 .. 0xe2ff */
+    0xafcb, 0xafcc, 0xafcd, 0xafce, 0xafcf, 0xafd0, 0xafd1, 0xafd2,
+    0xafd3, 0xafd4, 0xafd5, 0xafd6, 0xafd7, 0xafd8, 0xafd9, 0xafda,
+    0xafdb, 0xafdc, 0xafdd, 0xafde, 0xafdf, 0xafe0, 0xafe1, 0xafe2,
+    0xafe3, 0xafe4, 0xafe5, 0xafe6, 0xafe7, 0xafe8, 0xafe9, 0xafea,
+    0xafeb, 0xafec, 0xafed, 0xafee, 0xafef, 0xaff0, 0xaff1, 0xaff2,
+    0xaff3, 0xaff4, 0xaff5, 0xaff6, 0xaff7, 0xaff8, 0xaff9, 0xaffa,
+    0xaffb, 0xaffc, 0xaffd, 0xaffe, 0xf8a1, 0xf8a2, 0xf8a3, 0xf8a4,
+    0xf8a5, 0xf8a6, 0xf8a7, 0xf8a8, 0xf8a9, 0xf8aa, 0xf8ab, 0xf8ac,
+    0xf8ad, 0xf8ae, 0xf8af, 0xf8b0, 0xf8b1, 0xf8b2, 0xf8b3, 0xf8b4,
+    0xf8b5, 0xf8b6, 0xf8b7, 0xf8b8, 0xf8b9, 0xf8ba, 0xf8bb, 0xf8bc,
+    0xf8bd, 0xf8be, 0xf8bf, 0xf8c0, 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4,
+    0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8, 0xf8c9, 0xf8ca, 0xf8cb, 0xf8cc,
+    0xf8cd, 0xf8ce, 0xf8cf, 0xf8d0, 0xf8d1, 0xf8d2, 0xf8d3, 0xf8d4,
+    0xf8d5, 0xf8d6, 0xf8d7, 0xf8d8, 0xf8d9, 0xf8da, 0xf8db, 0xf8dc,
+    0xf8dd, 0xf8de, 0xf8df, 0xf8e0, 0xf8e1, 0xf8e2, 0xf8e3, 0xf8e4,
+    0xf8e5, 0xf8e6, 0xf8e7, 0xf8e8, 0xf8e9, 0xf8ea, 0xf8eb, 0xf8ec,
+    0xf8ed, 0xf8ee, 0xf8ef, 0xf8f0, 0xf8f1, 0xf8f2, 0xf8f3, 0xf8f4,
+    0xf8f5, 0xf8f6, 0xf8f7, 0xf8f8, 0xf8f9, 0xf8fa, 0xf8fb, 0xf8fc,
+    0xf8fd, 0xf8fe, 0xf9a1, 0xf9a2, 0xf9a3, 0xf9a4, 0xf9a5, 0xf9a6,
+    0xf9a7, 0xf9a8, 0xf9a9, 0xf9aa, 0xf9ab, 0xf9ac, 0xf9ad, 0xf9ae,
+    0xf9af, 0xf9b0, 0xf9b1, 0xf9b2, 0xf9b3, 0xf9b4, 0xf9b5, 0xf9b6,
+    0xf9b7, 0xf9b8, 0xf9b9, 0xf9ba, 0xf9bb, 0xf9bc, 0xf9bd, 0xf9be,
+    0xf9bf, 0xf9c0, 0xf9c1, 0xf9c2, 0xf9c3, 0xf9c4, 0xf9c5, 0xf9c6,
+    0xf9c7, 0xf9c8, 0xf9c9, 0xf9ca, 0xf9cb, 0xf9cc, 0xf9cd, 0xf9ce,
+    0xf9cf, 0xf9d0, 0xf9d1, 0xf9d2, 0xf9d3, 0xf9d4, 0xf9d5, 0xf9d6,
+    0xf9d7, 0xf9d8, 0xf9d9, 0xf9da, 0xf9db, 0xf9dc, 0xf9dd, 0xf9de,
+    0xf9df, 0xf9e0, 0xf9e1, 0xf9e2, 0xf9e3, 0xf9e4, 0xf9e5, 0xf9e6,
+    0xf9e7, 0xf9e8, 0xf9e9, 0xf9ea, 0xf9eb, 0xf9ec, 0xf9ed, 0xf9ee,
+    0xf9ef, 0xf9f0, 0xf9f1, 0xf9f2, 0xf9f3, 0xf9f4, 0xf9f5, 0xf9f6,
+    0xf9f7, 0xf9f8, 0xf9f9, 0xf9fa, 0xf9fb, 0xf9fc, 0xf9fd, 0xf9fe,
+    0xfaa1, 0xfaa2, 0xfaa3, 0xfaa4, 0xfaa5, 0xfaa6, 0xfaa7, 0xfaa8,
+    0xfaa9, 0xfaaa, 0xfaab, 0xfaac, 0xfaad, 0xfaae, 0xfaaf, 0xfab0,
+    /* 0xe300 .. 0xe3ff */
+    0xfab1, 0xfab2, 0xfab3, 0xfab4, 0xfab5, 0xfab6, 0xfab7, 0xfab8,
+    0xfab9, 0xfaba, 0xfabb, 0xfabc, 0xfabd, 0xfabe, 0xfabf, 0xfac0,
+    0xfac1, 0xfac2, 0xfac3, 0xfac4, 0xfac5, 0xfac6, 0xfac7, 0xfac8,
+    0xfac9, 0xfaca, 0xfacb, 0xfacc, 0xfacd, 0xface, 0xfacf, 0xfad0,
+    0xfad1, 0xfad2, 0xfad3, 0xfad4, 0xfad5, 0xfad6, 0xfad7, 0xfad8,
+    0xfad9, 0xfada, 0xfadb, 0xfadc, 0xfadd, 0xfade, 0xfadf, 0xfae0,
+    0xfae1, 0xfae2, 0xfae3, 0xfae4, 0xfae5, 0xfae6, 0xfae7, 0xfae8,
+    0xfae9, 0xfaea, 0xfaeb, 0xfaec, 0xfaed, 0xfaee, 0xfaef, 0xfaf0,
+    0xfaf1, 0xfaf2, 0xfaf3, 0xfaf4, 0xfaf5, 0xfaf6, 0xfaf7, 0xfaf8,
+    0xfaf9, 0xfafa, 0xfafb, 0xfafc, 0xfafd, 0xfafe, 0xfba1, 0xfba2,
+    0xfba3, 0xfba4, 0xfba5, 0xfba6, 0xfba7, 0xfba8, 0xfba9, 0xfbaa,
+    0xfbab, 0xfbac, 0xfbad, 0xfbae, 0xfbaf, 0xfbb0, 0xfbb1, 0xfbb2,
+    0xfbb3, 0xfbb4, 0xfbb5, 0xfbb6, 0xfbb7, 0xfbb8, 0xfbb9, 0xfbba,
+    0xfbbb, 0xfbbc, 0xfbbd, 0xfbbe, 0xfbbf, 0xfbc0, 0xfbc1, 0xfbc2,
+    0xfbc3, 0xfbc4, 0xfbc5, 0xfbc6, 0xfbc7, 0xfbc8, 0xfbc9, 0xfbca,
+    0xfbcb, 0xfbcc, 0xfbcd, 0xfbce, 0xfbcf, 0xfbd0, 0xfbd1, 0xfbd2,
+    0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6, 0xfbd7, 0xfbd8, 0xfbd9, 0xfbda,
+    0xfbdb, 0xfbdc, 0xfbdd, 0xfbde, 0xfbdf, 0xfbe0, 0xfbe1, 0xfbe2,
+    0xfbe3, 0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7, 0xfbe8, 0xfbe9, 0xfbea,
+    0xfbeb, 0xfbec, 0xfbed, 0xfbee, 0xfbef, 0xfbf0, 0xfbf1, 0xfbf2,
+    0xfbf3, 0xfbf4, 0xfbf5, 0xfbf6, 0xfbf7, 0xfbf8, 0xfbf9, 0xfbfa,
+    0xfbfb, 0xfbfc, 0xfbfd, 0xfbfe, 0xfca1, 0xfca2, 0xfca3, 0xfca4,
+    0xfca5, 0xfca6, 0xfca7, 0xfca8, 0xfca9, 0xfcaa, 0xfcab, 0xfcac,
+    0xfcad, 0xfcae, 0xfcaf, 0xfcb0, 0xfcb1, 0xfcb2, 0xfcb3, 0xfcb4,
+    0xfcb5, 0xfcb6, 0xfcb7, 0xfcb8, 0xfcb9, 0xfcba, 0xfcbb, 0xfcbc,
+    0xfcbd, 0xfcbe, 0xfcbf, 0xfcc0, 0xfcc1, 0xfcc2, 0xfcc3, 0xfcc4,
+    0xfcc5, 0xfcc6, 0xfcc7, 0xfcc8, 0xfcc9, 0xfcca, 0xfccb, 0xfccc,
+    0xfccd, 0xfcce, 0xfccf, 0xfcd0, 0xfcd1, 0xfcd2, 0xfcd3, 0xfcd4,
+    0xfcd5, 0xfcd6, 0xfcd7, 0xfcd8, 0xfcd9, 0xfcda, 0xfcdb, 0xfcdc,
+    0xfcdd, 0xfcde, 0xfcdf, 0xfce0, 0xfce1, 0xfce2, 0xfce3, 0xfce4,
+    0xfce5, 0xfce6, 0xfce7, 0xfce8, 0xfce9, 0xfcea, 0xfceb, 0xfcec,
+    0xfced, 0xfcee, 0xfcef, 0xfcf0, 0xfcf1, 0xfcf2, 0xfcf3, 0xfcf4,
+    /* 0xe400 .. 0xe4ff */
+    0xfcf5, 0xfcf6, 0xfcf7, 0xfcf8, 0xfcf9, 0xfcfa, 0xfcfb, 0xfcfc,
+    0xfcfd, 0xfcfe, 0xfda1, 0xfda2, 0xfda3, 0xfda4, 0xfda5, 0xfda6,
+    0xfda7, 0xfda8, 0xfda9, 0xfdaa, 0xfdab, 0xfdac, 0xfdad, 0xfdae,
+    0xfdaf, 0xfdb0, 0xfdb1, 0xfdb2, 0xfdb3, 0xfdb4, 0xfdb5, 0xfdb6,
+    0xfdb7, 0xfdb8, 0xfdb9, 0xfdba, 0xfdbb, 0xfdbc, 0xfdbd, 0xfdbe,
+    0xfdbf, 0xfdc0, 0xfdc1, 0xfdc2, 0xfdc3, 0xfdc4, 0xfdc5, 0xfdc6,
+    0xfdc7, 0xfdc8, 0xfdc9, 0xfdca, 0xfdcb, 0xfdcc, 0xfdcd, 0xfdce,
+    0xfdcf, 0xfdd0, 0xfdd1, 0xfdd2, 0xfdd3, 0xfdd4, 0xfdd5, 0xfdd6,
+    0xfdd7, 0xfdd8, 0xfdd9, 0xfdda, 0xfddb, 0xfddc, 0xfddd, 0xfdde,
+    0xfddf, 0xfde0, 0xfde1, 0xfde2, 0xfde3, 0xfde4, 0xfde5, 0xfde6,
+    0xfde7, 0xfde8, 0xfde9, 0xfdea, 0xfdeb, 0xfdec, 0xfded, 0xfdee,
+    0xfdef, 0xfdf0, 0xfdf1, 0xfdf2, 0xfdf3, 0xfdf4, 0xfdf5, 0xfdf6,
+    0xfdf7, 0xfdf8, 0xfdf9, 0xfdfa, 0xfdfb, 0xfdfc, 0xfdfd, 0xfdfe,
+    0xfea1, 0xfea2, 0xfea3, 0xfea4, 0xfea5, 0xfea6, 0xfea7, 0xfea8,
+    0xfea9, 0xfeaa, 0xfeab, 0xfeac, 0xfead, 0xfeae, 0xfeaf, 0xfeb0,
+    0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4, 0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8,
+    0xfeb9, 0xfeba, 0xfebb, 0xfebc, 0xfebd, 0xfebe, 0xfebf, 0xfec0,
+    0xfec1, 0xfec2, 0xfec3, 0xfec4, 0xfec5, 0xfec6, 0xfec7, 0xfec8,
+    0xfec9, 0xfeca, 0xfecb, 0xfecc, 0xfecd, 0xfece, 0xfecf, 0xfed0,
+    0xfed1, 0xfed2, 0xfed3, 0xfed4, 0xfed5, 0xfed6, 0xfed7, 0xfed8,
+    0xfed9, 0xfeda, 0xfedb, 0xfedc, 0xfedd, 0xfede, 0xfedf, 0xfee0,
+    0xfee1, 0xfee2, 0xfee3, 0xfee4, 0xfee5, 0xfee6, 0xfee7, 0xfee8,
+    0xfee9, 0xfeea, 0xfeeb, 0xfeec, 0xfeed, 0xfeee, 0xfeef, 0xfef0,
+    0xfef1, 0xfef2, 0xfef3, 0xfef4, 0xfef5, 0xfef6, 0xfef7, 0xfef8,
+    0xfef9, 0xfefa, 0xfefb, 0xfefc, 0xfefd, 0xfefe, 0xa140, 0xa141,
+    0xa142, 0xa143, 0xa144, 0xa145, 0xa146, 0xa147, 0xa148, 0xa149,
+    0xa14a, 0xa14b, 0xa14c, 0xa14d, 0xa14e, 0xa14f, 0xa150, 0xa151,
+    0xa152, 0xa153, 0xa154, 0xa155, 0xa156, 0xa157, 0xa158, 0xa159,
+    0xa15a, 0xa15b, 0xa15c, 0xa15d, 0xa15e, 0xa15f, 0xa160, 0xa161,
+    0xa162, 0xa163, 0xa164, 0xa165, 0xa166, 0xa167, 0xa168, 0xa169,
+    0xa16a, 0xa16b, 0xa16c, 0xa16d, 0xa16e, 0xa16f, 0xa170, 0xa171,
+    0xa172, 0xa173, 0xa174, 0xa175, 0xa176, 0xa177, 0xa178, 0xa179,
+    /* 0xe500 .. 0xe5ff */
+    0xa17a, 0xa17b, 0xa17c, 0xa17d, 0xa17e, 0xa180, 0xa181, 0xa182,
+    0xa183, 0xa184, 0xa185, 0xa186, 0xa187, 0xa188, 0xa189, 0xa18a,
+    0xa18b, 0xa18c, 0xa18d, 0xa18e, 0xa18f, 0xa190, 0xa191, 0xa192,
+    0xa193, 0xa194, 0xa195, 0xa196, 0xa197, 0xa198, 0xa199, 0xa19a,
+    0xa19b, 0xa19c, 0xa19d, 0xa19e, 0xa19f, 0xa1a0, 0xa240, 0xa241,
+    0xa242, 0xa243, 0xa244, 0xa245, 0xa246, 0xa247, 0xa248, 0xa249,
+    0xa24a, 0xa24b, 0xa24c, 0xa24d, 0xa24e, 0xa24f, 0xa250, 0xa251,
+    0xa252, 0xa253, 0xa254, 0xa255, 0xa256, 0xa257, 0xa258, 0xa259,
+    0xa25a, 0xa25b, 0xa25c, 0xa25d, 0xa25e, 0xa25f, 0xa260, 0xa261,
+    0xa262, 0xa263, 0xa264, 0xa265, 0xa266, 0xa267, 0xa268, 0xa269,
+    0xa26a, 0xa26b, 0xa26c, 0xa26d, 0xa26e, 0xa26f, 0xa270, 0xa271,
+    0xa272, 0xa273, 0xa274, 0xa275, 0xa276, 0xa277, 0xa278, 0xa279,
+    0xa27a, 0xa27b, 0xa27c, 0xa27d, 0xa27e, 0xa280, 0xa281, 0xa282,
+    0xa283, 0xa284, 0xa285, 0xa286, 0xa287, 0xa288, 0xa289, 0xa28a,
+    0xa28b, 0xa28c, 0xa28d, 0xa28e, 0xa28f, 0xa290, 0xa291, 0xa292,
+    0xa293, 0xa294, 0xa295, 0xa296, 0xa297, 0xa298, 0xa299, 0xa29a,
+    0xa29b, 0xa29c, 0xa29d, 0xa29e, 0xa29f, 0xa2a0, 0xa340, 0xa341,
+    0xa342, 0xa343, 0xa344, 0xa345, 0xa346, 0xa347, 0xa348, 0xa349,
+    0xa34a, 0xa34b, 0xa34c, 0xa34d, 0xa34e, 0xa34f, 0xa350, 0xa351,
+    0xa352, 0xa353, 0xa354, 0xa355, 0xa356, 0xa357, 0xa358, 0xa359,
+    0xa35a, 0xa35b, 0xa35c, 0xa35d, 0xa35e, 0xa35f, 0xa360, 0xa361,
+    0xa362, 0xa363, 0xa364, 0xa365, 0xa366, 0xa367, 0xa368, 0xa369,
+    0xa36a, 0xa36b, 0xa36c, 0xa36d, 0xa36e, 0xa36f, 0xa370, 0xa371,
+    0xa372, 0xa373, 0xa374, 0xa375, 0xa376, 0xa377, 0xa378, 0xa379,
+    0xa37a, 0xa37b, 0xa37c, 0xa37d, 0xa37e, 0xa380, 0xa381, 0xa382,
+    0xa383, 0xa384, 0xa385, 0xa386, 0xa387, 0xa388, 0xa389, 0xa38a,
+    0xa38b, 0xa38c, 0xa38d, 0xa38e, 0xa38f, 0xa390, 0xa391, 0xa392,
+    0xa393, 0xa394, 0xa395, 0xa396, 0xa397, 0xa398, 0xa399, 0xa39a,
+    0xa39b, 0xa39c, 0xa39d, 0xa39e, 0xa39f, 0xa3a0, 0xa440, 0xa441,
+    0xa442, 0xa443, 0xa444, 0xa445, 0xa446, 0xa447, 0xa448, 0xa449,
+    0xa44a, 0xa44b, 0xa44c, 0xa44d, 0xa44e, 0xa44f, 0xa450, 0xa451,
+    0xa452, 0xa453, 0xa454, 0xa455, 0xa456, 0xa457, 0xa458, 0xa459,
+    /* 0xe600 .. 0xe6ff */
+    0xa45a, 0xa45b, 0xa45c, 0xa45d, 0xa45e, 0xa45f, 0xa460, 0xa461,
+    0xa462, 0xa463, 0xa464, 0xa465, 0xa466, 0xa467, 0xa468, 0xa469,
+    0xa46a, 0xa46b, 0xa46c, 0xa46d, 0xa46e, 0xa46f, 0xa470, 0xa471,
+    0xa472, 0xa473, 0xa474, 0xa475, 0xa476, 0xa477, 0xa478, 0xa479,
+    0xa47a, 0xa47b, 0xa47c, 0xa47d, 0xa47e, 0xa480, 0xa481, 0xa482,
+    0xa483, 0xa484, 0xa485, 0xa486, 0xa487, 0xa488, 0xa489, 0xa48a,
+    0xa48b, 0xa48c, 0xa48d, 0xa48e, 0xa48f, 0xa490, 0xa491, 0xa492,
+    0xa493, 0xa494, 0xa495, 0xa496, 0xa497, 0xa498, 0xa499, 0xa49a,
+    0xa49b, 0xa49c, 0xa49d, 0xa49e, 0xa49f, 0xa4a0, 0xa540, 0xa541,
+    0xa542, 0xa543, 0xa544, 0xa545, 0xa546, 0xa547, 0xa548, 0xa549,
+    0xa54a, 0xa54b, 0xa54c, 0xa54d, 0xa54e, 0xa54f, 0xa550, 0xa551,
+    0xa552, 0xa553, 0xa554, 0xa555, 0xa556, 0xa557, 0xa558, 0xa559,
+    0xa55a, 0xa55b, 0xa55c, 0xa55d, 0xa55e, 0xa55f, 0xa560, 0xa561,
+    0xa562, 0xa563, 0xa564, 0xa565, 0xa566, 0xa567, 0xa568, 0xa569,
+    0xa56a, 0xa56b, 0xa56c, 0xa56d, 0xa56e, 0xa56f, 0xa570, 0xa571,
+    0xa572, 0xa573, 0xa574, 0xa575, 0xa576, 0xa577, 0xa578, 0xa579,
+    0xa57a, 0xa57b, 0xa57c, 0xa57d, 0xa57e, 0xa580, 0xa581, 0xa582,
+    0xa583, 0xa584, 0xa585, 0xa586, 0xa587, 0xa588, 0xa589, 0xa58a,
+    0xa58b, 0xa58c, 0xa58d, 0xa58e, 0xa58f, 0xa590, 0xa591, 0xa592,
+    0xa593, 0xa594, 0xa595, 0xa596, 0xa597, 0xa598, 0xa599, 0xa59a,
+    0xa59b, 0xa59c, 0xa59d, 0xa59e, 0xa59f, 0xa5a0, 0xa640, 0xa641,
+    0xa642, 0xa643, 0xa644, 0xa645, 0xa646, 0xa647, 0xa648, 0xa649,
+    0xa64a, 0xa64b, 0xa64c, 0xa64d, 0xa64e, 0xa64f, 0xa650, 0xa651,
+    0xa652, 0xa653, 0xa654, 0xa655, 0xa656, 0xa657, 0xa658, 0xa659,
+    0xa65a, 0xa65b, 0xa65c, 0xa65d, 0xa65e, 0xa65f, 0xa660, 0xa661,
+    0xa662, 0xa663, 0xa664, 0xa665, 0xa666, 0xa667, 0xa668, 0xa669,
+    0xa66a, 0xa66b, 0xa66c, 0xa66d, 0xa66e, 0xa66f, 0xa670, 0xa671,
+    0xa672, 0xa673, 0xa674, 0xa675, 0xa676, 0xa677, 0xa678, 0xa679,
+    0xa67a, 0xa67b, 0xa67c, 0xa67d, 0xa67e, 0xa680, 0xa681, 0xa682,
+    0xa683, 0xa684, 0xa685, 0xa686, 0xa687, 0xa688, 0xa689, 0xa68a,
+    0xa68b, 0xa68c, 0xa68d, 0xa68e, 0xa68f, 0xa690, 0xa691, 0xa692,
+    0xa693, 0xa694, 0xa695, 0xa696, 0xa697, 0xa698, 0xa699, 0xa69a,
+    /* 0xe700 .. 0xe7ff */
+    0xa69b, 0xa69c, 0xa69d, 0xa69e, 0xa69f, 0xa6a0, 0xa740, 0xa741,
+    0xa742, 0xa743, 0xa744, 0xa745, 0xa746, 0xa747, 0xa748, 0xa749,
+    0xa74a, 0xa74b, 0xa74c, 0xa74d, 0xa74e, 0xa74f, 0xa750, 0xa751,
+    0xa752, 0xa753, 0xa754, 0xa755, 0xa756, 0xa757, 0xa758, 0xa759,
+    0xa75a, 0xa75b, 0xa75c, 0xa75d, 0xa75e, 0xa75f, 0xa760, 0xa761,
+    0xa762, 0xa763, 0xa764, 0xa765, 0xa766, 0xa767, 0xa768, 0xa769,
+    0xa76a, 0xa76b, 0xa76c, 0xa76d, 0xa76e, 0xa76f, 0xa770, 0xa771,
+    0xa772, 0xa773, 0xa774, 0xa775, 0xa776, 0xa777, 0xa778, 0xa779,
+    0xa77a, 0xa77b, 0xa77c, 0xa77d, 0xa77e, 0xa780, 0xa781, 0xa782,
+    0xa783, 0xa784, 0xa785, 0xa786, 0xa787, 0xa788, 0xa789, 0xa78a,
+    0xa78b, 0xa78c, 0xa78d, 0xa78e, 0xa78f, 0xa790, 0xa791, 0xa792,
+    0xa793, 0xa794, 0xa795, 0xa796, 0xa797, 0xa798, 0xa799, 0xa79a,
+    0xa79b, 0xa79c, 0xa79d, 0xa79e, 0xa79f, 0xa7a0, 0xa2ab, 0xa2ac,
+    0xa2ad, 0xa2ae, 0xa2af, 0xa2b0, 0xa2e3, 0xa2e4, 0xa2ef, 0xa2f0,
+    0xa2fd, 0xa2fe, 0xa4f4, 0xa4f5, 0xa4f6, 0xa4f7, 0xa4f8, 0xa4f9,
+    0xa4fa, 0xa4fb, 0xa4fc, 0xa4fd, 0xa4fe, 0xa5f7, 0xa5f8, 0xa5f9,
+    0xa5fa, 0xa5fb, 0xa5fc, 0xa5fd, 0xa5fe, 0xa6b9, 0xa6ba, 0xa6bb,
+    0xa6bc, 0xa6bd, 0xa6be, 0xa6bf, 0xa6c0, 0xa6d9, 0xa6da, 0xa6db,
+    0xa6dc, 0xa6dd, 0xa6de, 0xa6df, 0xa6ec, 0xa6ed, 0xa6f3, 0xa6f6,
+    0xa6f7, 0xa6f8, 0xa6f9, 0xa6fa, 0xa6fb, 0xa6fc, 0xa6fd, 0xa6fe,
+    0xa7c2, 0xa7c3, 0xa7c4, 0xa7c5, 0xa7c6, 0xa7c7, 0xa7c8, 0xa7c9,
+    0xa7ca, 0xa7cb, 0xa7cc, 0xa7cd, 0xa7ce, 0xa7cf, 0xa7d0, 0xa7f2,
+    0xa7f3, 0xa7f4, 0xa7f5, 0xa7f6, 0xa7f7, 0xa7f8, 0xa7f9, 0xa7fa,
+    0xa7fb, 0xa7fc, 0xa7fd, 0xa7fe, 0xa896, 0xa897, 0xa898, 0xa899,
+    0xa89a, 0xa89b, 0xa89c, 0xa89d, 0xa89e, 0xa89f, 0xa8a0, 0xa8bc,
+    0xa8bf, 0xa8c1, 0xa8c2, 0xa8c3, 0xa8c4, 0xa8ea, 0xa8eb, 0xa8ec,
+    0xa8ed, 0xa8ee, 0xa8ef, 0xa8f0, 0xa8f1, 0xa8f2, 0xa8f3, 0xa8f4,
+    0xa8f5, 0xa8f6, 0xa8f7, 0xa8f8, 0xa8f9, 0xa8fa, 0xa8fb, 0xa8fc,
+    0xa8fd, 0xa8fe, 0xa958, 0xa95b, 0xa95d, 0xa95e, 0xa95f, 0xa989,
+    0xa98a, 0xa98b, 0xa98c, 0xa98d, 0xa98e, 0xa98f, 0xa990, 0xa991,
+    0xa992, 0xa993, 0xa994, 0xa995, 0xa997, 0xa998, 0xa999, 0xa99a,
+    0xa99b, 0xa99c, 0xa99d, 0xa99e, 0xa99f, 0xa9a0, 0xa9a1, 0xa9a2,
+    /* 0xe800 .. 0xe8ff */
+    0xa9a3, 0xa9f0, 0xa9f1, 0xa9f2, 0xa9f3, 0xa9f4, 0xa9f5, 0xa9f6,
+    0xa9f7, 0xa9f8, 0xa9f9, 0xa9fa, 0xa9fb, 0xa9fc, 0xa9fd, 0xa9fe,
+    0xd7fa, 0xd7fb, 0xd7fc, 0xd7fd, 0xd7fe, 0xfe50, 0xfe51, 0xfe52,
+    0xfe53, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe58, 0xfe59, 0xfe5a,
+    0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0xfe62,
+    0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe67, 0xfe68, 0xfe69, 0xfe6a,
+    0xfe6b, 0xfe6c, 0xfe6d, 0xfe6e, 0xfe6f, 0xfe70, 0xfe71, 0xfe72,
+    0xfe73, 0xfe74, 0xfe75, 0xfe76, 0xfe77, 0xfe78, 0xfe79, 0xfe7a,
+    0xfe7b, 0xfe7c, 0xfe7d, 0xfe7e, 0xfe80, 0xfe81, 0xfe82, 0xfe83,
+    0xfe84, 0xfe85, 0xfe86, 0xfe87, 0xfe88, 0xfe89, 0xfe8a, 0xfe8b,
+    0xfe8c, 0xfe8d, 0xfe8e, 0xfe8f, 0xfe90, 0xfe91, 0xfe92, 0xfe93,
+    0xfe94, 0xfe95, 0xfe96, 0xfe97, 0xfe98, 0xfe99, 0xfe9a, 0xfe9b,
+    0xfe9c, 0xfe9d, 0xfe9e, 0xfe9f, 0xfea0, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0xf800 .. 0xf8ff */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00ff, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0xf900 .. 0xf9ff */
     0xd84d, 0xb8fc, 0xdc87, 0xd95a, 0xbbac, 0xb4ae, 0xbee4, 0xfd94,
@@ -7672,41 +7837,8 @@
     0xc7d0, 0xb6c8, 0xcdd8, 0xccc7, 0xd5ac, 0xb6b4, 0xb1a9, 0xdd97,
     0xd0d0, 0xbdb5, 0xd28a, 0xc0aa, 0xfe40, 0xfe41, 0xfe42, 0xfe43,
-    0x8956, 0xfe44, 0xc7e7, 0xfe45, 0xfe46, 0x8444, 0xd6ed, 0xd2e6,
+    0x8956, 0xfe44, 0xc7e7, 0xfe45, 0xfe46, 0x8444, 0xd869, 0xd2e6,
     0xfe47, 0xc9f1, 0xcfe9, 0xb8a3, 0xbeb8, 0xbeab, 0xd3f0, 0xfe48,
     0xfe49, 0xfe4a, 0xd654, 0xfe4b, 0xfe4c, 0xd2dd, 0xb6bc, 0xfe4d,
     0xfe4e, 0xfe4f, 0xef88, 0xef95, 0xf05e, 0xfa51, 0x003f, 0x003f,
-    0xceea, 0xc9ae, 0xc3e2, 0xc3e3, 0xc7da, 0xb1b0, 0xbac8, 0x8740,
-    0xc6f7, 0x8942, 0xc4ab, 0x8cd3, 0xe5f8, 0xbbda, 0xbfae, 0xd4f7,
-    0x91cd, 0xc3f4, 0xbcc8, 0xcaee, 0xc3b7, 0xbaa3, 0xe4be, 0x9d68,
-    0xd6f3, 0xa08d, 0xd7c1, 0xb1ae, 0xc9e7, 0xeced, 0xc6ed, 0xb576,
-    0xd7e6, 0xd7a3, 0xb59c, 0xb59d, 0xb759, 0xcdbb, 0xb99d, 0xbe9a,
-    0xbf4e, 0xb7b1, 0xcaf0, 0xd5df, 0xb3f4, 0xdcb3, 0xdcb3, 0xd6f8,
-    0xbad6, 0xd295, 0xd65d, 0xd694, 0xd965, 0xd99b, 0xe5c1, 0xd2dd,
-    0xeb79, 0xed91, 0xee6c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x814b, 0xbff6, 0xc8ab, 0x81e9, 0xb3e4, 0xbcbd, 0xd3c2, 0xc9d7,
-    0xbac8, 0xdffb, 0xe0b9, 0x86ec, 0x8956, 0x899e, 0xd1d9, 0xb1bc,
-    0xe6be, 0x8be3, 0xe2da, 0x8f4d, 0xb2ca, 0xe1e6, 0xe3af, 0xc9f7,
-    0xd3fa, 0xd4f7, 0x9152, 0x91cd, 0xb4f7, 0xdeed, 0xcbd1, 0xdef0,
-    0xb0bd, 0xc7e7, 0xc0ca, 0xcdfb, 0xd5c8, 0xb4f5, 0x9aa2, 0xc1f7,
-    0x9cf4, 0xd7cc, 0x9d68, 0x9e73, 0xd6f3, 0xc7c6, 0xbef4, 0xb7b8,
-    0xd6ed, 0xac99, 0xae4e, 0xbbad, 0xaf8d, 0xcec1, 0xd2e6, 0xcaa2,
-    0xd6b1, 0xb192, 0xd7c5, 0xb46b, 0xb849, 0xb99d, 0xc0e0, 0xbd64,
-    0xbe9a, 0xc090, 0xd5df, 0xbbc4, 0xc841, 0xce82, 0xf1df, 0xb8b2,
-    0xd295, 0xd57b, 0xd654, 0xd588, 0xd65d, 0xd65a, 0xd649, 0xd694,
-    0xd783, 0xd99b, 0xdd94, 0xdf74, 0xe167, 0xe36f, 0xea95, 0xeb79,
-    0xbeb8, 0xed76, 0xed91, 0xed9d, 0xee6c, 0xf449, 0xfd94, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xfd4c, 0xfd89, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0xfb00 .. 0xfbff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x002b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -7747,5 +7879,5 @@
     0x003f, 0xa968, 0xa969, 0xa96a, 0xa96b, 0xa96c, 0xa96d, 0xa96e,
     0xa96f, 0xa970, 0xa971, 0x003f, 0xa972, 0xa973, 0xa974, 0xa975,
-    0xa1aa, 0xa976, 0xa977, 0xa978, 0xa979, 0xa97a, 0xa97b, 0xa97c,
+    0x003f, 0xa976, 0xa977, 0xa978, 0xa979, 0xa97a, 0xa97b, 0xa97c,
     0xa97d, 0xa97e, 0xa980, 0xa981, 0xa982, 0xa983, 0xa984, 0x003f,
     0xa985, 0xa986, 0xa987, 0xa988, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -7781,12 +7913,12 @@
     0xa3f0, 0xa3f1, 0xa3f2, 0xa3f3, 0xa3f4, 0xa3f5, 0xa3f6, 0xa3f7,
     0xa3f8, 0xa3f9, 0xa3fa, 0xa3fb, 0xa3fc, 0xa3fd, 0xa1ab, 0x003f,
-    0x003f, 0xa1a3, 0xa1b8, 0xa1b9, 0xa1a2, 0x003f, 0xa5f2, 0xa5a1,
-    0xa5a3, 0xa5a5, 0xa5a7, 0xa5a9, 0xa5e3, 0xa5e5, 0xa5e7, 0xa5c3,
-    0xa960, 0xa5a2, 0xa5a4, 0xa5a6, 0xa5a8, 0xa5aa, 0xa5ab, 0xa5ad,
-    0xa5af, 0xa5b1, 0xa5b3, 0xa5b5, 0xa5b7, 0xa5b9, 0xa5bb, 0xa5bd,
-    0xa5bf, 0xa5c1, 0xa5c4, 0xa5c6, 0xa5c8, 0xa5ca, 0xa5cb, 0xa5cc,
-    0xa5cd, 0xa5ce, 0xa5cf, 0xa5d2, 0xa5d5, 0xa5d8, 0xa5db, 0xa5de,
-    0xa5df, 0xa5e0, 0xa5e1, 0xa5e2, 0xa5e4, 0xa5e6, 0xa5e8, 0xa5e9,
-    0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ef, 0xa5f3, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -7798,5 +7930,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa1e9, 0xa1ea, 0xa956, 0xa3fe, 0xa957, 0xa3a4, 0x003f, 0x003f,
-    0xa9a6, 0xa1fb, 0xa1fc, 0xa1fa, 0xa1fd, 0xa1f6, 0xa1f0, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -7838,36 +7970,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x0500, 0x0600, 0x0700,
-    0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x0e00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x0f00, 0x1000,
-    0x1100, 0x1200, 0x1300, 0x1400, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x1500, 0x1600,
-    0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00,
-    0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600,
-    0x2700, 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00,
-    0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600,
-    0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00,
-    0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600,
-    0x4700, 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00,
-    0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600,
-    0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00,
-    0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00,
-    0x6c00, 0x6700, 0x6800, 0x6900, 0x6c00, 0x6c00, 0x6a00, 0x6b00
+    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x0c00, 0x0d00, 0x0e00, 0x0f00, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x1000, 0x1100,
+    0x1200, 0x1300, 0x1400, 0x1500, 0x1600, 0x1700, 0x1800, 0x1900,
+    0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, 0x2000, 0x2100,
+    0x2200, 0x2300, 0x2400, 0x2500, 0x2600, 0x2700, 0x2800, 0x2900,
+    0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, 0x2f00, 0x3000, 0x3100,
+    0x3200, 0x3300, 0x3400, 0x3500, 0x3600, 0x3700, 0x3800, 0x3900,
+    0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00, 0x3f00, 0x4000, 0x4100,
+    0x4200, 0x4300, 0x4400, 0x4500, 0x4600, 0x4700, 0x4800, 0x4900,
+    0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, 0x4f00, 0x5000, 0x5100,
+    0x5200, 0x5300, 0x5400, 0x5500, 0x5600, 0x5700, 0x5800, 0x5900,
+    0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00, 0x5f00, 0x6000, 0x6100,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x6200, 0x6300, 0x6400, 0x6500, 0x6600, 0x6700, 0x6800, 0x6900,
+    0x6a00, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000,
+    0x6b00, 0x6c00, 0x6d00, 0x7000, 0x7000, 0x7000, 0x6e00, 0x6f00
 };
 
@@ -7879,4 +8011,6 @@
     uni2cp_low,
     uni2cp_high,
-    { 0x81, 0xfe, 0x00, 0x00 }
+    {
+        0x81, 0xfe, 0x00, 0x00
+    }
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_949.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_949.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_949.c	(revision 19678)
@@ -1,9 +1,9 @@
 /* code page 949 (ANSI/OEM Korean Unified Hangul) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP949.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt */
 /* DO NOT EDIT!! */
 
 #include "wine/unicode.h"
 
-static const WCHAR cp2uni[32256] =
+static const WCHAR cp2uni[32512] =
 {
     0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -38,38 +38,5 @@
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x003f,
-    /* unused lead bytes */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf8f7,
     /* lead byte 81 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2448,4 +2415,37 @@
     0xd769, 0xd76c, 0xd770, 0xd774, 0xd77c, 0xd77d, 0xd781, 0xd788,
     0xd789, 0xd78c, 0xd790, 0xd798, 0xd799, 0xd79b, 0xd79d, 0x003f,
+    /* lead byte c9 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006,
+    0xe007, 0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e,
+    0xe00f, 0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016,
+    0xe017, 0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e,
+    0xe01f, 0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026,
+    0xe027, 0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e,
+    0xe02f, 0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036,
+    0xe037, 0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e,
+    0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, 0xe046,
+    0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, 0xe04e,
+    0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, 0xe056,
+    0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, 0x003f,
     /* lead byte ca */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4163,5 +4163,38 @@
     0x7fd5, 0x8208, 0x50d6, 0x51de, 0x559c, 0x566b, 0x56cd, 0x59ec,
     0x5b09, 0x5e0c, 0x6199, 0x6198, 0x6231, 0x665e, 0x66e6, 0x7199,
-    0x71b9, 0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70, 0x003f
+    0x71b9, 0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70, 0x003f,
+    /* lead byte fe */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe05e, 0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064,
+    0xe065, 0xe066, 0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c,
+    0xe06d, 0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074,
+    0xe075, 0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c,
+    0xe07d, 0xe07e, 0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084,
+    0xe085, 0xe086, 0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c,
+    0xe08d, 0xe08e, 0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094,
+    0xe095, 0xe096, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c,
+    0xe09d, 0xe09e, 0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4,
+    0xe0a5, 0xe0a6, 0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac,
+    0xe0ad, 0xe0ae, 0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4,
+    0xe0b5, 0xe0b6, 0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0x003f
 };
 
@@ -4184,14 +4217,14 @@
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-    0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
-    0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
-    0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
-    0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
-    0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
-    0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
-    0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
-    0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
-    0x49, 0x01, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
+    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+    0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+    0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+    0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
     0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
     0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
@@ -4199,8 +4232,8 @@
     0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
     0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
-    0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x01, 0x00
+    0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x00
 };
 
-static const unsigned short uni2cp_low[39168] =
+static const unsigned short uni2cp_low[38144] =
 {
     /* 0x0000 .. 0x00ff */
@@ -4225,8 +4258,8 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0020, 0xa2ae, 0x0063, 0x004c, 0xa2b4, 0x0059, 0x007c, 0xa1d7,
-    0xa1a7, 0x0063, 0xa8a3, 0xa1b6, 0x003f, 0xa1a9, 0xa2e7, 0xa1aa,
+    0x003f, 0xa2ae, 0xa1cb, 0xa1cc, 0xa2b4, 0xa1cd, 0x007c, 0xa1d7,
+    0xa1a7, 0xa8cf, 0xa8a3, 0xa1ec, 0xa1fe, 0xa1a9, 0xa2e7, 0x003f,
     0xa1c6, 0xa1be, 0xa9f7, 0xa9f8, 0xa2a5, 0xa5ec, 0xa2d2, 0xa1a4,
-    0xa2ac, 0xa9f6, 0xa8ac, 0xa1b7, 0xa8f9, 0xa8f6, 0xa8fa, 0xa2af,
+    0xa2ac, 0xa9f6, 0xa8ac, 0xa1ed, 0xa8f9, 0xa8f6, 0xa8fa, 0xa2af,
     0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0xa8a1, 0x0043,
     0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049,
@@ -4238,105 +4271,105 @@
     0xa9aa, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0xa9ad, 0x0079,
     /* 0x0100 .. 0x01ff */
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063,
-    0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064,
-    0xa8a2, 0xa9a2, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0xa8a4, 0xa9a4,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x0049, 0xa9a5, 0xa8a6, 0xa9a6, 0x004a, 0x006a, 0x004b, 0x006b,
-    0xa9a7, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0xa8a8,
-    0xa9a8, 0xa8a9, 0xa9a9, 0x004e, 0x006e, 0x004e, 0x006e, 0x004e,
-    0x006e, 0xa9b0, 0xa8af, 0xa9af, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0xa8ab, 0xa9ab, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0xa8ae, 0xa9ae,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079,
-    0x0059, 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0073,
-    0x0062, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa8a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0045, 0x0046, 0x0066, 0x003f, 0x003f, 0x003f, 0x003f, 0x0049,
-    0x003f, 0x003f, 0x006c, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f,
-    0x004f, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, 0x0054, 0x0055,
-    0x0075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x007a, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa6a2, 0x003f, 0x003f, 0x0021, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061, 0x0049,
-    0x0069, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055,
-    0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x003f, 0x0041, 0x0061,
-    0x0041, 0x0061, 0xa8a1, 0xa9a1, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x004b, 0x006b, 0x004f, 0x006f, 0x004f, 0x006f, 0x003f, 0x003f,
-    0x006a, 0x003f, 0x003f, 0x003f, 0x0047, 0x0067, 0x003f, 0x003f,
-    0x004e, 0x006e, 0x0041, 0x0061, 0xa8a1, 0xa9a1, 0xa8aa, 0xa9aa,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa9a2, 0xa9a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8a4, 0xa9a4,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa9a5, 0xa8a6, 0xa9a6, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa9a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8a8,
+    0xa9a8, 0xa8a9, 0xa9a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa9b0, 0xa8af, 0xa9af, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa8ab, 0xa9ab, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8ae, 0xa9ae,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0200 .. 0x02ff */
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x003f, 0x003f, 0x0048, 0x0068,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0068, 0x003f, 0x006a, 0x0072, 0x003f, 0x003f, 0x003f, 0x0077,
-    0x0079, 0xa2a5, 0xa2a9, 0xa1ae, 0xa1af, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x005e, 0xa2a7,
-    0x0027, 0xa1aa, 0xa2a5, 0x0060, 0x003f, 0x005f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2a7,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa2b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa2a8, 0xa2ab, 0xa2aa, 0xa2ad, 0x007e, 0xa2a9, 0x003f, 0x003f,
-    0x003f, 0x006c, 0x0073, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa2a8, 0xa2ab, 0xa2aa, 0xa2ad, 0x003f, 0xa2a9, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0300 .. 0x03ff */
-    0x0060, 0xa2a5, 0x005e, 0x007e, 0xa1aa, 0xa1aa, 0xa2a8, 0xa2ab,
-    0xa1a7, 0x003f, 0xa2aa, 0xa2a9, 0xa2a7, 0x003f, 0x0022, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2ac,
-    0xa2ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x005f, 0x005f, 0x005f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0060, 0xa2a5, 0x003f, 0x003f, 0xa1a7, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa2a5, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003b, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa2a5, 0xa1a7, 0xa5c1, 0xa1a4,
-    0xa5c5, 0xa5c7, 0xa5c9, 0x003f, 0xa5cf, 0x003f, 0xa5d4, 0xa5d8,
-    0xa5e9, 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7,
     0xa5c8, 0xa5c9, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5cf,
     0xa5d0, 0xa5d1, 0x003f, 0xa5d2, 0xa5d3, 0xa5d4, 0xa5d5, 0xa5d6,
-    0xa5d7, 0xa5d8, 0xa5c9, 0xa5d4, 0xa5e1, 0xa5e5, 0xa5e7, 0xa5e9,
-    0xa5f4, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7,
+    0xa5d7, 0xa5d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7,
     0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ef,
     0xa5f0, 0xa5f1, 0x003f, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6,
-    0xa5f7, 0xa5f8, 0xa5e9, 0xa5f4, 0xa5ef, 0xa5f4, 0xa5f8, 0x003f,
-    0xa5e2, 0xa5e8, 0xa5d4, 0xa5d4, 0xa5d4, 0xa5f5, 0xa5f0, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa5ea, 0xa5f1, 0x003f, 0x003f, 0xa5c8, 0xa5e5, 0x003f, 0x003f,
-    0x003f, 0xa5d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa5f7, 0xa5f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0400 .. 0x04ff */
-    0xaca6, 0xaca7, 0x003f, 0xaca4, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xacac, 0xacaa, 0xacb5, 0x003f,
+    0x003f, 0xaca7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xaca1, 0xaca2, 0xaca3, 0xaca4, 0xaca5, 0xaca6, 0xaca8, 0xaca9,
     0xacaa, 0xacab, 0xacac, 0xacad, 0xacae, 0xacaf, 0xacb0, 0xacb1,
@@ -4347,148 +4380,82 @@
     0xace2, 0xace3, 0xace4, 0xace5, 0xace6, 0xace7, 0xace8, 0xace9,
     0xacea, 0xaceb, 0xacec, 0xaced, 0xacee, 0xacef, 0xacf0, 0xacf1,
-    0xacd6, 0xacd7, 0x003f, 0xacd4, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xacdc, 0xacda, 0xace5, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xaca8, 0xacd8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xaca1, 0xacd1, 0xaca1, 0xacd1, 0x003f, 0x003f, 0xaca6, 0xacd6,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xaca8, 0xacd8, 0xaca9, 0xacd9,
-    0x003f, 0x003f, 0xacaa, 0xacda, 0xacaa, 0xacda, 0xacb0, 0xace0,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xacbf, 0xacef, 0xacb5, 0xace5,
-    0xacb5, 0xace5, 0xacb5, 0xace5, 0xacb9, 0xace9, 0x003f, 0x003f,
-    0xacbd, 0xaced, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1d00 .. 0x1dff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0xa8a1, 0x0042, 0x003f,
-    0x0044, 0x0045, 0x003f, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b,
-    0x004c, 0x004d, 0x004e, 0x003f, 0x004f, 0x003f, 0x0050, 0x0052,
-    0x0054, 0x0055, 0x0057, 0x0061, 0x003f, 0x003f, 0x003f, 0x0062,
-    0x0064, 0x0065, 0x003f, 0x003f, 0x003f, 0x0067, 0x003f, 0x006b,
-    0x006d, 0xa9af, 0x006f, 0x003f, 0x003f, 0x003f, 0x0070, 0x0074,
-    0x0075, 0x003f, 0x003f, 0x0076, 0x003f, 0xa5e2, 0xa5e3, 0xa5e4,
-    0xa5f5, 0xa5f6, 0x0069, 0x0072, 0x0075, 0x0076, 0xa5e2, 0xa5e3,
-    0xa5f1, 0xa5f5, 0xa5f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xacdf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0063, 0x003f, 0xa9a3, 0x003f,
-    0x0066, 0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x007a, 0x003f, 0x003f, 0x003f, 0xa5e8,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1e00 .. 0x1eff */
-    0x0041, 0x0061, 0x0042, 0x0062, 0x0042, 0x0062, 0x0042, 0x0062,
-    0x0043, 0x0063, 0x0044, 0x0064, 0x0044, 0x0064, 0x0044, 0x0064,
-    0x0044, 0x0064, 0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0046, 0x0066,
-    0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068, 0x0048, 0x0068,
-    0x0048, 0x0068, 0x0048, 0x0068, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x004b, 0x006b, 0x004b, 0x006b, 0x004b, 0x006b, 0x004c, 0x006c,
-    0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x004d, 0x006d,
-    0x004d, 0x006d, 0x004d, 0x006d, 0x004e, 0x006e, 0x004e, 0x006e,
-    0x004e, 0x006e, 0x004e, 0x006e, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0050, 0x0070, 0x0050, 0x0070,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074,
-    0x0054, 0x0074, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0056, 0x0076, 0x0056, 0x0076,
-    0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077,
-    0x0057, 0x0077, 0x0058, 0x0078, 0x0058, 0x0078, 0x0059, 0x0079,
-    0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0068, 0x0074,
-    0x0077, 0x0079, 0x003f, 0x0073, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0059, 0x0079, 0x0059, 0x0079, 0x0059, 0x0079,
-    0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1f00 .. 0x1fff */
-    0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1,
-    0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1,
-    0xa5e5, 0xa5e5, 0xa5e5, 0xa5e5, 0xa5e5, 0xa5e5, 0x003f, 0x003f,
-    0xa5c5, 0xa5c5, 0xa5c5, 0xa5c5, 0xa5c5, 0xa5c5, 0x003f, 0x003f,
-    0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7,
-    0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7,
-    0xa5e9, 0xa5e9, 0xa5e9, 0xa5e9, 0xa5e9, 0xa5e9, 0xa5e9, 0xa5e9,
-    0xa5c9, 0xa5c9, 0xa5c9, 0xa5c9, 0xa5c9, 0xa5c9, 0xa5c9, 0xa5c9,
-    0xa5ef, 0xa5ef, 0xa5ef, 0xa5ef, 0xa5ef, 0xa5ef, 0x003f, 0x003f,
-    0xa5cf, 0xa5cf, 0xa5cf, 0xa5cf, 0xa5cf, 0xa5cf, 0x003f, 0x003f,
-    0xa5f4, 0xa5f4, 0xa5f4, 0xa5f4, 0xa5f4, 0xa5f4, 0xa5f4, 0xa5f4,
-    0x003f, 0xa5d4, 0x003f, 0xa5d4, 0x003f, 0xa5d4, 0x003f, 0xa5d4,
-    0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8,
-    0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8,
-    0xa5e1, 0xa5e1, 0xa5e5, 0xa5e5, 0xa5e7, 0xa5e7, 0xa5e9, 0xa5e9,
-    0xa5ef, 0xa5ef, 0xa5f4, 0xa5f4, 0xa5f8, 0xa5f8, 0x003f, 0x003f,
-    0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1,
-    0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1,
-    0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7, 0xa5e7,
-    0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c7,
-    0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8, 0xa5f8,
-    0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8, 0xa5d8,
-    0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0xa5e1, 0x003f, 0xa5e1, 0xa5e1,
-    0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0xa5c1, 0x003f, 0xa5e9, 0x003f,
-    0x003f, 0xa1a7, 0xa5e7, 0xa5e7, 0xa5e7, 0x003f, 0xa5e7, 0xa5e7,
-    0xa5c5, 0xa5c5, 0xa5c7, 0xa5c7, 0xa5c7, 0x003f, 0x003f, 0x003f,
-    0xa5e9, 0xa5e9, 0xa5e9, 0xa5e9, 0x003f, 0x003f, 0xa5e9, 0xa5e9,
-    0xa5c9, 0xa5c9, 0xa5c9, 0xa5c9, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa5f4, 0xa5f4, 0xa5f4, 0xa5f4, 0xa5f1, 0xa5f1, 0xa5f4, 0xa5f4,
-    0xa5d4, 0xa5d4, 0xa5d4, 0xa5d4, 0xa5d1, 0xa1a7, 0xa1a7, 0x0060,
-    0x003f, 0x003f, 0xa5f8, 0xa5f8, 0xa5f8, 0x003f, 0xa5f8, 0xa5f8,
-    0xa5cf, 0xa5cf, 0xa5d8, 0xa5d8, 0xa5d8, 0xa2a5, 0x003f, 0x003f,
+    0x003f, 0xacd7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0x1100 .. 0x11ff */
+    0xa4a1, 0xa4a2, 0xa4a4, 0xa4a7, 0xa4a8, 0xa4a9, 0xa4b1, 0xa4b2,
+    0xa4b3, 0xa4b5, 0xa4b6, 0xa4b7, 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb,
+    0xa4bc, 0xa4bd, 0xa4be, 0x003f, 0xa4d5, 0xa4d6, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa4dd, 0x003f, 0xa4de, 0xa4e1, 0xa4e2, 0x003f,
+    0xa4e3, 0xa4b4, 0xa4e4, 0xa4e5, 0x003f, 0x003f, 0x003f, 0xa4e6,
+    0x003f, 0xa4e7, 0x003f, 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec,
+    0x003f, 0x003f, 0xa4ed, 0x003f, 0x003f, 0x003f, 0xa4ee, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa4b5, 0xa4b6, 0xa4b5, 0xa4b6,
+    0xa4ef, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4f2, 0xa4f3, 0xa4f0,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa4b7, 0x003f, 0xa4b8, 0xa4b9,
+    0xa4b8, 0xa4b9, 0x003f, 0x003f, 0xa4ba, 0xa4ba, 0x003f, 0xa4f4,
+    0xa4f5, 0xa4f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4d4,
+    0x003f, 0xa4bf, 0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5,
+    0xa4c6, 0xa4c7, 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd,
+    0xa4ce, 0xa4cf, 0xa4d0, 0xa4d1, 0xa4d2, 0xa4d3, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa4f7, 0xa4f8, 0x003f, 0x003f,
+    0xa4f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa4fa, 0xa4fb, 0x003f, 0xa4fc, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4fd, 0x003f,
+    0x003f, 0xa4fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, 0xa4a9,
+    0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, 0xa4b0, 0xa4b1,
+    0xa4b2, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, 0xa4b8, 0xa4ba, 0xa4bb,
+    0xa4bc, 0xa4bd, 0xa4be, 0x003f, 0x003f, 0x003f, 0xa4d6, 0xa4d7,
+    0xa4d8, 0x003f, 0x003f, 0x003f, 0xa4d9, 0x003f, 0xa4da, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa4db, 0x003f, 0x003f, 0x003f, 0xa4dc,
+    0x003f, 0xa4dd, 0x003f, 0x003f, 0xa4de, 0xa4df, 0x003f, 0xa4e0,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4e8, 0xa4ea,
+    0xa4ec, 0x003f, 0xa4ed, 0xa4ef, 0x003f, 0x003f, 0xa4f0, 0x003f,
+    0xa4b7, 0xa4f2, 0xa4f3, 0x003f, 0xa4f4, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa4f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2000 .. 0x20ff */
-    0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
-    0x0020, 0x0020, 0x0020, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x002d, 0x002d, 0x003f, 0xa1aa, 0xa1aa, 0xa1aa, 0x003f, 0x005f,
-    0xa1ae, 0xa1af, 0x002c, 0xa1ae, 0xa1b0, 0xa1b1, 0x002c, 0x003f,
-    0xa2d3, 0xa2d4, 0x003f, 0x003f, 0x002e, 0xa1a5, 0xa1a6, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
-    0xa2b6, 0x003f, 0xa1c7, 0xa1c8, 0x003f, 0xa1ae, 0x003f, 0x003f,
-    0x003f, 0xa1b4, 0xa1b5, 0xa1d8, 0x0021, 0x003f, 0xa1aa, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x002f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa2aa, 0x0069, 0x003f, 0x003f, 0xa9f9, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0x002d, 0x003d, 0x0028, 0x0029, 0xa9fa,
-    0x0030, 0xa9fb, 0xa9fc, 0xa9fd, 0xa9fe, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0x002d, 0x003d, 0x0028, 0x0029, 0x003f,
-    0x0061, 0x0065, 0x006f, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0063, 0x003f, 0x003f, 0x004c, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa2e6, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1aa, 0x003f, 0x003f,
+    0xa1ae, 0xa1af, 0x003f, 0x003f, 0xa1b0, 0xa1b1, 0x003f, 0x003f,
+    0xa2d3, 0xa2d4, 0x003f, 0x003f, 0x003f, 0xa1a5, 0xa1a6, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa2b6, 0x003f, 0xa1c7, 0xa1c8, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa1d8, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa9f9, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa9fa,
+    0x003f, 0xa9fb, 0xa9fc, 0xa9fd, 0xa9fe, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x005c, 0x003f, 0x003f, 0xa2e6, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4502,30 +4469,30 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2100 .. 0x21ff */
-    0x003f, 0x003f, 0x0043, 0xa1c9, 0x003f, 0x003f, 0x003f, 0x0045,
-    0x003f, 0xa2b5, 0x0067, 0x0048, 0x0048, 0x0048, 0x0068, 0xa9a4,
-    0x0049, 0x0049, 0x004c, 0xa7a4, 0x003f, 0x004e, 0xa2e0, 0x003f,
-    0x0050, 0x0050, 0x0051, 0x0052, 0x0052, 0x0052, 0x003f, 0x003f,
-    0x003f, 0xa2e5, 0xa2e2, 0x003f, 0x005a, 0x003f, 0xa7d9, 0x003f,
-    0x005a, 0x003f, 0x004b, 0xa1ca, 0x0042, 0x0043, 0x0065, 0x0065,
-    0x0045, 0x0046, 0x003f, 0x004d, 0x006f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0069, 0x003f, 0x003f, 0xa5f0, 0xa5e3, 0xa5c3, 0xa5d0,
-    0xa2b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x0044, 0x0064, 0x0065,
-    0x0069, 0x006a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa1c9, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa2b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa7a4, 0x003f, 0x003f, 0xa2e0, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa2e5, 0xa2e2, 0x003f, 0x003f, 0x003f, 0xa7d9, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa1ca, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xa8f7, 0xa8f8, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0xa8fb, 0xa8fc, 0xa8fd, 0xa8fe, 0x003f,
     0xa5b0, 0xa5b1, 0xa5b2, 0xa5b3, 0xa5b4, 0xa5b5, 0xa5b6, 0xa5b7,
-    0xa5b8, 0xa5b9, 0x003f, 0x003f, 0x004c, 0x0043, 0x0044, 0x004d,
+    0xa5b8, 0xa5b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a5, 0xa5a6, 0xa5a7, 0xa5a8,
-    0xa5a9, 0xa5aa, 0x003f, 0x003f, 0x006c, 0x0063, 0x0064, 0x006d,
+    0xa5a9, 0xa5aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa1e7, 0xa1e8, 0xa1e6, 0xa1e9, 0xa1ea, 0xa2d5, 0xa2d8, 0xa2d6,
-    0xa2d9, 0xa2d7, 0xa1e7, 0xa1e6, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ea, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2a2, 0xa2a1,
+    0xa2d9, 0xa2d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa2a1, 0x003f, 0xa2a2, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4535,22 +4502,22 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2200 .. 0x22ff */
-    0xa2a3, 0x003f, 0xa1d3, 0xa2a4, 0xa2a4, 0xa8aa, 0x003f, 0xa1d4,
-    0xa1f4, 0xa1f4, 0x003f, 0xa1f5, 0xa1f5, 0x003f, 0x003f, 0xa2b3,
-    0x003f, 0xa2b2, 0x002d, 0xa1be, 0x003f, 0x002f, 0x005c, 0x002a,
-    0xa2aa, 0x003f, 0xa1ee, 0x003f, 0x003f, 0xa1f0, 0xa1c4, 0x004c,
-    0xa1d0, 0x003f, 0x003f, 0x007c, 0x007c, 0xa1ab, 0xa1ab, 0xa1fc,
+    0xa2a3, 0x003f, 0xa1d3, 0xa2a4, 0x003f, 0x003f, 0x003f, 0xa1d4,
+    0xa1f4, 0x003f, 0x003f, 0xa1f5, 0x003f, 0x003f, 0x003f, 0xa2b3,
+    0x003f, 0xa2b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa1ee, 0x003f, 0x003f, 0xa1f0, 0xa1c4, 0x003f,
+    0xa1d0, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ab, 0x003f, 0xa1fc,
     0xa1fd, 0xa1fb, 0xa1fa, 0xa1f2, 0xa1f3, 0x003f, 0xa2b1, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa1c5, 0xa1f1, 0x003a, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa1c5, 0xa1f1, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xa1ad, 0xa1ef, 0x003f, 0x003f,
-    0x003f, 0xa1ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x007e, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa1d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1c1, 0xa1d5, 0xa1d5, 0xa1d5, 0xa1c2, 0xa1c3, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xa1ec, 0xa1ed, 0x003f, 0x003f, 0x003c, 0x003e,
-    0xa1c2, 0xa1c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xa1f8, 0xa1f9, 0xa1f8, 0xa1f9, 0xa1f6, 0xa1f7,
-    0xa1f6, 0xa1f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1c1, 0xa1d5, 0x003f, 0x003f, 0xa1c2, 0xa1c3, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa1ec, 0xa1ed, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa1f8, 0xa1f9, 0x003f, 0x003f, 0xa1f6, 0xa1f7,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xa2c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4559,5 +4526,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1a4, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4568,10 +4535,10 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2300 .. 0x23ff */
-    0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa1d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa1b4, 0xa1b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4623,17 +4590,17 @@
     0xa9d1, 0xa9d2, 0xa9d3, 0xa9d4, 0xa9d5, 0xa9d6, 0xa9d7, 0xa9d8,
     0xa9d9, 0xa9da, 0xa9db, 0xa9dc, 0xa9dd, 0xa9de, 0xa9df, 0xa9e0,
-    0xa9e1, 0xa9e2, 0xa9e3, 0xa9e4, 0xa9e5, 0xa9e6, 0x0041, 0x0042,
-    0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a,
-    0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052,
-    0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a,
+    0xa9e1, 0xa9e2, 0xa9e3, 0xa9e4, 0xa9e5, 0xa9e6, 0xa8cd, 0xa8ce,
+    0xa8cf, 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, 0xa8d5, 0xa8d6,
+    0xa8d7, 0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc, 0xa8dd, 0xa8de,
+    0xa8df, 0xa8e0, 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4, 0xa8e5, 0xa8e6,
     0xa8cd, 0xa8ce, 0xa8cf, 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4,
     0xa8d5, 0xa8d6, 0xa8d7, 0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc,
     0xa8dd, 0xa8de, 0xa8df, 0xa8e0, 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4,
-    0xa8e5, 0xa8e6, 0x0030, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa8e5, 0xa8e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2500 .. 0x25ff */
-    0xa6a1, 0xa6ac, 0xa6a2, 0xa6ad, 0x002d, 0x002d, 0x007c, 0x007c,
-    0x002d, 0x002d, 0x007c, 0x007c, 0xa6a3, 0xa6c8, 0xa6c7, 0xa6ae,
+    0xa6a1, 0xa6ac, 0xa6a2, 0xa6ad, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa6a3, 0xa6c8, 0xa6c7, 0xa6ae,
     0xa6a4, 0xa6c2, 0xa6c1, 0xa6af, 0xa6a6, 0xa6c6, 0xa6c5, 0xa6b1,
     0xa6a5, 0xa6c4, 0xa6c3, 0xa6b0, 0xa6a7, 0xa6bc, 0xa6c9, 0xa6ca,
@@ -4643,11 +4610,11 @@
     0xa6bf, 0xa6d7, 0xa6d8, 0xa6b5, 0xa6ab, 0xa6d9, 0xa6da, 0xa6bb,
     0xa6db, 0xa6dc, 0xa6c0, 0xa6dd, 0xa6de, 0xa6df, 0xa6e0, 0xa6e1,
-    0xa6e2, 0xa6e3, 0xa6e4, 0xa6b6, 0x002d, 0x002d, 0x007c, 0x007c,
-    0x003d, 0x007c, 0x002b, 0x002b, 0x002b, 0x003f, 0x003f, 0x003f,
-    0x004c, 0x004c, 0x004c, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b,
-    0x002b, 0x002b, 0x002b, 0x002b, 0x0054, 0x0054, 0x0054, 0x002b,
-    0x002b, 0x002b, 0x002b, 0x002b, 0x002b, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x002f, 0x005c, 0x0058, 0x002d, 0x007c, 0x002d, 0x007c,
-    0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c,
+    0xa6e2, 0xa6e3, 0xa6e4, 0xa6b6, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4663,5 +4630,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1db,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4694,70 +4661,4 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2e00 .. 0x2eff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9bd,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2f00 .. 0x2fff */
-    0xece9, 0x003f, 0x003f, 0x003f, 0xebe0, 0x003f, 0xeca3, 0x003f,
-    0xecd1, 0x003f, 0xecfd, 0xf8a2, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xd3ef, 0xd5f4, 0x003f, 0xdde2, 0x003f, 0x003f, 0xe4a8,
-    0xdcd4, 0x003f, 0x003f, 0x003f, 0xe9d1, 0xcfa2, 0x003f, 0xf7cf,
-    0xdecd, 0x003f, 0x003f, 0xe0aa, 0xd3de, 0xd2b3, 0xedad, 0x003f,
-    0xf5bb, 0xe1b3, 0x003f, 0xe3b9, 0x003f, 0xdfa3, 0x003f, 0xcdef,
-    0xd0f9, 0xcbee, 0xcace, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xcfe1, 0x003f, 0x003f, 0x003f, 0xe3fd, 0xcdfc, 0xfbc2, 0xe2a2,
-    0xf2a8, 0x003f, 0xd9fe, 0xd4e0, 0xd0c5, 0xdbb0, 0xd9e9, 0xeced,
-    0xe8d8, 0xeac5, 0xd9ca, 0xfde2, 0xf2ad, 0x003f, 0x003f, 0xd9ec,
-    0xddef, 0xd9be, 0xe4ab, 0x003f, 0xe2a9, 0xfbfd, 0xf0d0, 0xddab,
-    0xfda1, 0x003f, 0xf8b8, 0xe4b3, 0xe9da, 0xccb3, 0xfadc, 0xe8ac,
-    0xcdfe, 0xe8bf, 0xcaf6, 0xdfe6, 0xe9c4, 0xefa3, 0xf9b5, 0x003f,
-    0x003f, 0xdbdc, 0xf9ab, 0xd9a9, 0xd9cd, 0xd9c3, 0xe3c5, 0xe0b4,
-    0xe3c6, 0x003f, 0xfca2, 0xfaeb, 0xd8a1, 0xf1d3, 0xdab7, 0x003f,
-    0xddae, 0x003f, 0xe5cf, 0xe9e2, 0xd6d5, 0xecbb, 0x003f, 0xecbc,
-    0xebd3, 0xebbf, 0xe3ed, 0xedbb, 0xf2b8, 0xcfbf, 0xe0df, 0xf4bf,
-    0xf1c7, 0xcadd, 0xdfe4, 0xf5ac, 0x003f, 0x003f, 0xfaec, 0xfabc,
-    0xebfd, 0x003f, 0xccb8, 0xcac7, 0xe5eb, 0xcddb, 0xd4e7, 0xe3ce,
-    0x003f, 0xf8af, 0xeee5, 0xf1cb, 0xf0eb, 0xe3f3, 0xf3b3, 0xe3f4,
-    0xf2e3, 0x003f, 0xebe9, 0xebb7, 0x003f, 0xd7ec, 0xd1d1, 0xedfe,
-    0xdaa6, 0xddbd, 0x003f, 0x003f, 0xe9eb, 0xf4ec, 0xdeaa, 0xd8fc,
-    0xfad4, 0xeadf, 0x003f, 0xebe5, 0xfaed, 0xf9a6, 0xdeab, 0xe3dd,
-    0xe2cf, 0xfac5, 0xd8a9, 0xcde9, 0xcdd4, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xd0a1, 0xe5e0, 0xf0e8, 0xd6dd, 0xd6e3, 0xd8ea, 0xd8ab,
-    0xfcdc, 0xe0a8, 0xfdd9, 0x003f, 0x003f, 0xf0a3, 0xcdd5, 0xe0a9,
-    0xdeac, 0xf0ba, 0xf6cd, 0xd7a3, 0xcfcf, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4769,9 +4670,9 @@
     0xa1b4, 0xa1b5, 0xa1b6, 0xa1b7, 0xa1b8, 0xa1b9, 0xa1ba, 0xa1bb,
     0xa1bc, 0xa1bd, 0x003f, 0xa1eb, 0xa1b2, 0xa1b3, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x005b, 0x005d, 0x003f, 0xa1b0, 0xa1b1, 0x002c,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xe4a8, 0xecfe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xaaa1, 0xaaa2, 0xaaa3, 0xaaa4, 0xaaa5, 0xaaa6, 0xaaa7,
     0xaaa8, 0xaaa9, 0xaaaa, 0xaaab, 0xaaac, 0xaaad, 0xaaae, 0xaaaf,
@@ -4784,5 +4685,5 @@
     0xaae0, 0xaae1, 0xaae2, 0xaae3, 0xaae4, 0xaae5, 0xaae6, 0xaae7,
     0xaae8, 0xaae9, 0xaaea, 0xaaeb, 0xaaec, 0xaaed, 0xaaee, 0xaaef,
-    0xaaf0, 0xaaf1, 0xaaf2, 0xaaf3, 0xaaa6, 0x003f, 0x003f, 0x003f,
+    0xaaf0, 0xaaf1, 0xaaf2, 0xaaf3, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xaba1, 0xaba2, 0xaba3, 0xaba4, 0xaba5, 0xaba6, 0xaba7,
@@ -4796,6 +4697,6 @@
     0xabe0, 0xabe1, 0xabe2, 0xabe3, 0xabe4, 0xabe5, 0xabe6, 0xabe7,
     0xabe8, 0xabe9, 0xabea, 0xabeb, 0xabec, 0xabed, 0xabee, 0xabef,
-    0xabf0, 0xabf1, 0xabf2, 0xabf3, 0xabf4, 0xabf5, 0xabf6, 0xabef,
-    0xabf0, 0xabf1, 0xabf2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xabf0, 0xabf1, 0xabf2, 0xabf3, 0xabf4, 0xabf5, 0xabf6, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x3100 .. 0x31ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4836,9 +4737,9 @@
     0xa9c1, 0xa9c2, 0xa9c3, 0xa9c4, 0xa9c5, 0xa9c6, 0xa9c7, 0xa9c8,
     0xa9c9, 0xa9ca, 0xa9cb, 0xa9cc, 0xa2df, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xece9, 0xeca3, 0xdfb2, 0xdecc, 0xe7e9, 0xd7bf, 0xf6d2, 0xf8a2,
+    0xcefa, 0xe4a8, 0xeac5, 0xfbfd, 0xe2a9, 0xd9ca, 0xd1d1, 0xf7cf,
+    0xeced, 0xf1bb, 0xeaf3, 0xdee4, 0xd9a3, 0xf7e5, 0xeeaf, 0xf5e6,
+    0xd6cc, 0xd3db, 0xfbbc, 0xf9ca, 0xcaf8, 0xd0ea, 0xedc0, 0xfaf0,
+    0xf0ae, 0xfdcc, 0xedbb, 0xf2b8, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -4851,17 +4752,17 @@
     0xcefa, 0xe4a8, 0xeac5, 0xfbfd, 0xe2a9, 0xd9ca, 0xd1d1, 0xf7cf,
     0xeced, 0xf1bb, 0xeaf3, 0xdee4, 0xd9a3, 0xf7e5, 0xeeaf, 0xf5e6,
-    0x003f, 0xddfa, 0xd1fb, 0xd2b3, 0xeeea, 0xe9d0, 0xecd4, 0xf1bc,
-    0xfaa3, 0xfdcc, 0x003f, 0xefe1, 0xdfbe, 0xf1e9, 0xf9bb, 0xf1a7,
-    0xe9d3, 0x003f, 0xf0f3, 0x003f, 0xcaf8, 0xd0ea, 0xedc0, 0xfaf0,
+    0xd6cc, 0xddfa, 0xd1fb, 0xd2b3, 0xeeea, 0xe9d0, 0xecd4, 0xf1bc,
+    0xfaa3, 0xfdcc, 0xded0, 0xefe1, 0xdfbe, 0xf1e9, 0xf9bb, 0xf1a7,
+    0xe9d3, 0xeca2, 0xf0f3, 0xf9ca, 0xcaf8, 0xd0ea, 0xedc0, 0xfaf0,
     0xe5a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xaba2, 0xaba4, 0xaba6, 0xaba8, 0xabaa, 0xabab, 0xabad, 0xabaf,
-    0xabb1, 0xabb3, 0xabb5, 0xabb7, 0xabb9, 0xabbb, 0xabbd, 0xabbf,
-    0xabc1, 0xabc4, 0xabc6, 0xabc8, 0xabca, 0xabcb, 0xabcc, 0xabcd,
-    0xabce, 0xabcf, 0xabd2, 0xabd5, 0xabd8, 0xabdb, 0xabde, 0xabdf,
-    0xabe0, 0xabe1, 0xabe2, 0xabe4, 0xabe6, 0xabe8, 0xabe9, 0xabea,
-    0xabeb, 0xabec, 0xabed, 0xabef, 0xabf0, 0xabf1, 0xabf2, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x3300 .. 0x33ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -9055,4 +8956,70 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0xe000 .. 0xe0ff */
+    0xc9a1, 0xc9a2, 0xc9a3, 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, 0xc9a8,
+    0xc9a9, 0xc9aa, 0xc9ab, 0xc9ac, 0xc9ad, 0xc9ae, 0xc9af, 0xc9b0,
+    0xc9b1, 0xc9b2, 0xc9b3, 0xc9b4, 0xc9b5, 0xc9b6, 0xc9b7, 0xc9b8,
+    0xc9b9, 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, 0xc9be, 0xc9bf, 0xc9c0,
+    0xc9c1, 0xc9c2, 0xc9c3, 0xc9c4, 0xc9c5, 0xc9c6, 0xc9c7, 0xc9c8,
+    0xc9c9, 0xc9ca, 0xc9cb, 0xc9cc, 0xc9cd, 0xc9ce, 0xc9cf, 0xc9d0,
+    0xc9d1, 0xc9d2, 0xc9d3, 0xc9d4, 0xc9d5, 0xc9d6, 0xc9d7, 0xc9d8,
+    0xc9d9, 0xc9da, 0xc9db, 0xc9dc, 0xc9dd, 0xc9de, 0xc9df, 0xc9e0,
+    0xc9e1, 0xc9e2, 0xc9e3, 0xc9e4, 0xc9e5, 0xc9e6, 0xc9e7, 0xc9e8,
+    0xc9e9, 0xc9ea, 0xc9eb, 0xc9ec, 0xc9ed, 0xc9ee, 0xc9ef, 0xc9f0,
+    0xc9f1, 0xc9f2, 0xc9f3, 0xc9f4, 0xc9f5, 0xc9f6, 0xc9f7, 0xc9f8,
+    0xc9f9, 0xc9fa, 0xc9fb, 0xc9fc, 0xc9fd, 0xc9fe, 0xfea1, 0xfea2,
+    0xfea3, 0xfea4, 0xfea5, 0xfea6, 0xfea7, 0xfea8, 0xfea9, 0xfeaa,
+    0xfeab, 0xfeac, 0xfead, 0xfeae, 0xfeaf, 0xfeb0, 0xfeb1, 0xfeb2,
+    0xfeb3, 0xfeb4, 0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8, 0xfeb9, 0xfeba,
+    0xfebb, 0xfebc, 0xfebd, 0xfebe, 0xfebf, 0xfec0, 0xfec1, 0xfec2,
+    0xfec3, 0xfec4, 0xfec5, 0xfec6, 0xfec7, 0xfec8, 0xfec9, 0xfeca,
+    0xfecb, 0xfecc, 0xfecd, 0xfece, 0xfecf, 0xfed0, 0xfed1, 0xfed2,
+    0xfed3, 0xfed4, 0xfed5, 0xfed6, 0xfed7, 0xfed8, 0xfed9, 0xfeda,
+    0xfedb, 0xfedc, 0xfedd, 0xfede, 0xfedf, 0xfee0, 0xfee1, 0xfee2,
+    0xfee3, 0xfee4, 0xfee5, 0xfee6, 0xfee7, 0xfee8, 0xfee9, 0xfeea,
+    0xfeeb, 0xfeec, 0xfeed, 0xfeee, 0xfeef, 0xfef0, 0xfef1, 0xfef2,
+    0xfef3, 0xfef4, 0xfef5, 0xfef6, 0xfef7, 0xfef8, 0xfef9, 0xfefa,
+    0xfefb, 0xfefc, 0xfefd, 0xfefe, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0xf800 .. 0xf8ff */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00ff,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0xf900 .. 0xf9ff */
     0xcbd0, 0xcbd6, 0xcbe7, 0xcdcf, 0xcde8, 0xcead, 0xcffb, 0xd0a2,
@@ -9091,82 +9058,16 @@
     0xf4ee, 0xf6f4, 0xf6f6, 0xf7b8, 0xf7c8, 0xf7d3, 0xf8db, 0xf8f0,
     0xfaa1, 0xfaa2, 0xfae6, 0xfca9, 0xe8b4, 0x003f, 0x003f, 0x003f,
-    0xf5c0, 0x003f, 0xf4e7, 0x003f, 0x003f, 0xfdeb, 0xeec4, 0xeccc,
+    0xf5c0, 0x003f, 0xf4e7, 0x003f, 0x003f, 0xfdeb, 0x003f, 0xeccc,
     0x003f, 0xe3ea, 0xdfd4, 0xdcd8, 0xeffe, 0xeff1, 0xe9e2, 0x003f,
     0x003f, 0x003f, 0xf0b3, 0x003f, 0x003f, 0xecef, 0xd4b4, 0x003f,
     0x003f, 0x003f, 0xdaf9, 0xdef8, 0xcebd, 0xf9cd, 0x003f, 0x003f,
-    0xd9b2, 0xe3ac, 0xd8f3, 0xd8f5, 0xd0c3, 0xdde4, 0xcae2, 0xf7a3,
-    0xd0ef, 0x003f, 0xd9f8, 0xf6b5, 0x003f, 0xfce2, 0xcbc6, 0xf1f3,
-    0xf3a4, 0xdac2, 0x003f, 0xdff4, 0xd8de, 0xfaad, 0xeec2, 0xf9d3,
-    0xedb4, 0x003f, 0xf6fc, 0xddf8, 0xdee4, 0xf2b3, 0xd1b7, 0xe9de,
-    0xf0d3, 0xf5e6, 0xfca1, 0xefee, 0xcdda, 0xd4cd, 0xefbd, 0xd6a3,
-    0xf2db, 0xdbe5, 0xdffe, 0xedba, 0xf6ab, 0x003f, 0x003f, 0xeeca,
-    0xcae8, 0xe3ca, 0xe4d7, 0xd0cd, 0xdeb9, 0xf1fc, 0x003f, 0xecef,
-    0xd1f1, 0xfac2, 0xdeba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0xeeef, 0x003f, 0xf5f6, 0xd0ed, 0xe9b8, 0xedc3,
-    0xcae2, 0x003f, 0xfdc2, 0x003f, 0xf5c0, 0xddc5, 0xe5f2, 0xddc6,
-    0xdde6, 0x003f, 0x003f, 0x003f, 0xf3f4, 0x003f, 0x003f, 0x003f,
-    0xeaef, 0xf1f3, 0x003f, 0xf3a4, 0xd3e3, 0xeaf1, 0xe2a4, 0x003f,
-    0xe7f9, 0xf4e7, 0xd5c7, 0xd8d0, 0xede8, 0x003f, 0xdfaf, 0xd7b5,
-    0x003f, 0xedb2, 0xf9d3, 0xefe7, 0xedb4, 0x003f, 0xedc9, 0xdbf3,
-    0xeec4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8b0, 0xeccc, 0xe0fc,
-    0xf2c1, 0x003f, 0xf3b7, 0x003f, 0x003f, 0xefbd, 0x003f, 0x003f,
-    0xd6a3, 0x003f, 0xedba, 0xfcd8, 0xfca4, 0x003f, 0xcbba, 0xdcdd,
-    0xe3ca, 0xf0e0, 0xf0b3, 0xf4eb, 0xe4d7, 0xd1e7, 0xebb1, 0xd0cd,
-    0xdca8, 0xf1fc, 0xe2c3, 0xf2c0, 0x003f, 0x003f, 0x003f, 0xd1f1,
-    0xeffe, 0x003f, 0xfac2, 0x003f, 0xdeba, 0x003f, 0xcfcf, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0xfb00 .. 0xfbff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x002b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0xfe00 .. 0xfeff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa1aa, 0xa1aa, 0xa1aa, 0xa1aa, 0x005f, 0x005f, 0x005f,
-    0x002c, 0xa1a2, 0x002e, 0x003f, 0x003b, 0x003a, 0x003f, 0x0021,
-    0xa1aa, 0x0028, 0x0029, 0x007b, 0x007d, 0xa1b2, 0xa1b3, 0x0023,
-    0x0026, 0x002a, 0x002b, 0x002d, 0x003c, 0x003e, 0x003d, 0x003f,
-    0x005c, 0x0024, 0x0025, 0x0040, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -9200,12 +9101,12 @@
     0xa3f0, 0xa3f1, 0xa3f2, 0xa3f3, 0xa3f4, 0xa3f5, 0xa3f6, 0xa3f7,
     0xa3f8, 0xa3f9, 0xa3fa, 0xa3fb, 0xa3fc, 0xa3fd, 0xa2a6, 0x003f,
-    0x003f, 0xa1a3, 0xa1b8, 0xa1b9, 0xa1a2, 0x003f, 0xabf2, 0xaba1,
-    0xaba3, 0xaba5, 0xaba7, 0xaba9, 0xabe3, 0xabe5, 0xabe7, 0xabc3,
-    0x003f, 0xaba2, 0xaba4, 0xaba6, 0xaba8, 0xabaa, 0xabab, 0xabad,
-    0xabaf, 0xabb1, 0xabb3, 0xabb5, 0xabb7, 0xabb9, 0xabbb, 0xabbd,
-    0xabbf, 0xabc1, 0xabc4, 0xabc6, 0xabc8, 0xabca, 0xabcb, 0xabcc,
-    0xabcd, 0xabce, 0xabcf, 0xabd2, 0xabd5, 0xabd8, 0xabdb, 0xabde,
-    0xabdf, 0xabe0, 0xabe1, 0xabe2, 0xabe4, 0xabe6, 0xabe8, 0xabe9,
-    0xabea, 0xabeb, 0xabec, 0xabed, 0xabef, 0xabf3, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa4d4, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7,
     0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af,
@@ -9216,6 +9117,6 @@
     0x003f, 0x003f, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, 0xa4d0,
     0x003f, 0x003f, 0xa4d1, 0xa4d2, 0xa4d3, 0x003f, 0x003f, 0x003f,
-    0xa1cb, 0xa1cc, 0xa1fe, 0xa3fe, 0x007c, 0xa1cd, 0xa3dc, 0x003f,
-    0xa6a2, 0xa1e7, 0xa1e8, 0xa1e6, 0xa1e9, 0xa1e1, 0xa1db, 0x003f,
+    0xa1cb, 0xa1cc, 0xa1fe, 0xa3fe, 0x003f, 0xa1cd, 0xa3dc, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -9257,36 +9158,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x0500, 0x0600, 0x0700,
-    0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x0e00, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x0f00, 0x1000,
-    0x1100, 0x1200, 0x1300, 0x1400, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x1500, 0x1600,
-    0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00,
-    0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600,
-    0x2700, 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00,
-    0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600,
-    0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00,
-    0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600,
-    0x4700, 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00,
-    0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600,
-    0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00,
-    0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x6700, 0x6800, 0x6900, 0x6a00,
-    0x6b00, 0x6c00, 0x6d00, 0x6e00, 0x6f00, 0x7000, 0x7100, 0x7200,
-    0x7300, 0x7400, 0x7500, 0x7600, 0x7700, 0x7800, 0x7900, 0x7a00,
-    0x7b00, 0x7c00, 0x7d00, 0x7e00, 0x7f00, 0x8000, 0x8100, 0x8200,
-    0x8300, 0x8400, 0x8500, 0x8600, 0x8700, 0x8800, 0x8900, 0x8a00,
-    0x8b00, 0x8c00, 0x8d00, 0x8e00, 0x8f00, 0x9000, 0x9100, 0x9200,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800,
-    0x9800, 0x9300, 0x9400, 0x9500, 0x9800, 0x9800, 0x9600, 0x9700
+    0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x0500, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x0600, 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x0d00, 0x0e00, 0x0f00, 0x1000, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x1100, 0x1200,
+    0x1300, 0x1400, 0x1500, 0x1600, 0x1700, 0x1800, 0x1900, 0x1a00,
+    0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, 0x2000, 0x2100, 0x2200,
+    0x2300, 0x2400, 0x2500, 0x2600, 0x2700, 0x2800, 0x2900, 0x2a00,
+    0x2b00, 0x2c00, 0x2d00, 0x2e00, 0x2f00, 0x3000, 0x3100, 0x3200,
+    0x3300, 0x3400, 0x3500, 0x3600, 0x3700, 0x3800, 0x3900, 0x3a00,
+    0x3b00, 0x3c00, 0x3d00, 0x3e00, 0x3f00, 0x4000, 0x4100, 0x4200,
+    0x4300, 0x4400, 0x4500, 0x4600, 0x4700, 0x4800, 0x4900, 0x4a00,
+    0x4b00, 0x4c00, 0x4d00, 0x4e00, 0x4f00, 0x5000, 0x5100, 0x5200,
+    0x5300, 0x5400, 0x5500, 0x5600, 0x5700, 0x5800, 0x5900, 0x5a00,
+    0x5b00, 0x5c00, 0x5d00, 0x5e00, 0x5f00, 0x6000, 0x6100, 0x6200,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x6300, 0x6400, 0x6500, 0x6600,
+    0x6700, 0x6800, 0x6900, 0x6a00, 0x6b00, 0x6c00, 0x6d00, 0x6e00,
+    0x6f00, 0x7000, 0x7100, 0x7200, 0x7300, 0x7400, 0x7500, 0x7600,
+    0x7700, 0x7800, 0x7900, 0x7a00, 0x7b00, 0x7c00, 0x7d00, 0x7e00,
+    0x7f00, 0x8000, 0x8100, 0x8200, 0x8300, 0x8400, 0x8500, 0x8600,
+    0x8700, 0x8800, 0x8900, 0x8a00, 0x8b00, 0x8c00, 0x8d00, 0x8e00,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x8f00, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400,
+    0x9000, 0x9100, 0x9200, 0x9400, 0x9400, 0x9400, 0x9400, 0x9300
 };
 
@@ -9298,4 +9199,6 @@
     uni2cp_low,
     uni2cp_high,
-    { 0x81, 0xfe, 0x00, 0x00 }
+    {
+        0x81, 0xfe, 0x00, 0x00
+    }
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_950.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_950.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/c_950.c	(revision 19678)
@@ -1,9 +1,9 @@
 /* code page 950 (ANSI/OEM Traditional Chinese Big5) */
-/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT */
+/* generated from ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit950.txt */
 /* DO NOT EDIT!! */
 
 #include "wine/unicode.h"
 
-static const WCHAR cp2uni[22784] =
+static const WCHAR cp2uni[32512] =
 {
     0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -38,38 +38,1061 @@
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x003f,
-    /* unused lead bytes */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf8f8,
+    /* lead byte 81 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xeeb8, 0xeeb9, 0xeeba, 0xeebb, 0xeebc, 0xeebd, 0xeebe, 0xeebf,
+    0xeec0, 0xeec1, 0xeec2, 0xeec3, 0xeec4, 0xeec5, 0xeec6, 0xeec7,
+    0xeec8, 0xeec9, 0xeeca, 0xeecb, 0xeecc, 0xeecd, 0xeece, 0xeecf,
+    0xeed0, 0xeed1, 0xeed2, 0xeed3, 0xeed4, 0xeed5, 0xeed6, 0xeed7,
+    0xeed8, 0xeed9, 0xeeda, 0xeedb, 0xeedc, 0xeedd, 0xeede, 0xeedf,
+    0xeee0, 0xeee1, 0xeee2, 0xeee3, 0xeee4, 0xeee5, 0xeee6, 0xeee7,
+    0xeee8, 0xeee9, 0xeeea, 0xeeeb, 0xeeec, 0xeeed, 0xeeee, 0xeeef,
+    0xeef0, 0xeef1, 0xeef2, 0xeef3, 0xeef4, 0xeef5, 0xeef6, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xeef7, 0xeef8, 0xeef9, 0xeefa, 0xeefb, 0xeefc, 0xeefd,
+    0xeefe, 0xeeff, 0xef00, 0xef01, 0xef02, 0xef03, 0xef04, 0xef05,
+    0xef06, 0xef07, 0xef08, 0xef09, 0xef0a, 0xef0b, 0xef0c, 0xef0d,
+    0xef0e, 0xef0f, 0xef10, 0xef11, 0xef12, 0xef13, 0xef14, 0xef15,
+    0xef16, 0xef17, 0xef18, 0xef19, 0xef1a, 0xef1b, 0xef1c, 0xef1d,
+    0xef1e, 0xef1f, 0xef20, 0xef21, 0xef22, 0xef23, 0xef24, 0xef25,
+    0xef26, 0xef27, 0xef28, 0xef29, 0xef2a, 0xef2b, 0xef2c, 0xef2d,
+    0xef2e, 0xef2f, 0xef30, 0xef31, 0xef32, 0xef33, 0xef34, 0xef35,
+    0xef36, 0xef37, 0xef38, 0xef39, 0xef3a, 0xef3b, 0xef3c, 0xef3d,
+    0xef3e, 0xef3f, 0xef40, 0xef41, 0xef42, 0xef43, 0xef44, 0xef45,
+    0xef46, 0xef47, 0xef48, 0xef49, 0xef4a, 0xef4b, 0xef4c, 0xef4d,
+    0xef4e, 0xef4f, 0xef50, 0xef51, 0xef52, 0xef53, 0xef54, 0x003f,
+    /* lead byte 82 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xef55, 0xef56, 0xef57, 0xef58, 0xef59, 0xef5a, 0xef5b, 0xef5c,
+    0xef5d, 0xef5e, 0xef5f, 0xef60, 0xef61, 0xef62, 0xef63, 0xef64,
+    0xef65, 0xef66, 0xef67, 0xef68, 0xef69, 0xef6a, 0xef6b, 0xef6c,
+    0xef6d, 0xef6e, 0xef6f, 0xef70, 0xef71, 0xef72, 0xef73, 0xef74,
+    0xef75, 0xef76, 0xef77, 0xef78, 0xef79, 0xef7a, 0xef7b, 0xef7c,
+    0xef7d, 0xef7e, 0xef7f, 0xef80, 0xef81, 0xef82, 0xef83, 0xef84,
+    0xef85, 0xef86, 0xef87, 0xef88, 0xef89, 0xef8a, 0xef8b, 0xef8c,
+    0xef8d, 0xef8e, 0xef8f, 0xef90, 0xef91, 0xef92, 0xef93, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xef94, 0xef95, 0xef96, 0xef97, 0xef98, 0xef99, 0xef9a,
+    0xef9b, 0xef9c, 0xef9d, 0xef9e, 0xef9f, 0xefa0, 0xefa1, 0xefa2,
+    0xefa3, 0xefa4, 0xefa5, 0xefa6, 0xefa7, 0xefa8, 0xefa9, 0xefaa,
+    0xefab, 0xefac, 0xefad, 0xefae, 0xefaf, 0xefb0, 0xefb1, 0xefb2,
+    0xefb3, 0xefb4, 0xefb5, 0xefb6, 0xefb7, 0xefb8, 0xefb9, 0xefba,
+    0xefbb, 0xefbc, 0xefbd, 0xefbe, 0xefbf, 0xefc0, 0xefc1, 0xefc2,
+    0xefc3, 0xefc4, 0xefc5, 0xefc6, 0xefc7, 0xefc8, 0xefc9, 0xefca,
+    0xefcb, 0xefcc, 0xefcd, 0xefce, 0xefcf, 0xefd0, 0xefd1, 0xefd2,
+    0xefd3, 0xefd4, 0xefd5, 0xefd6, 0xefd7, 0xefd8, 0xefd9, 0xefda,
+    0xefdb, 0xefdc, 0xefdd, 0xefde, 0xefdf, 0xefe0, 0xefe1, 0xefe2,
+    0xefe3, 0xefe4, 0xefe5, 0xefe6, 0xefe7, 0xefe8, 0xefe9, 0xefea,
+    0xefeb, 0xefec, 0xefed, 0xefee, 0xefef, 0xeff0, 0xeff1, 0x003f,
+    /* lead byte 83 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xeff2, 0xeff3, 0xeff4, 0xeff5, 0xeff6, 0xeff7, 0xeff8, 0xeff9,
+    0xeffa, 0xeffb, 0xeffc, 0xeffd, 0xeffe, 0xefff, 0xf000, 0xf001,
+    0xf002, 0xf003, 0xf004, 0xf005, 0xf006, 0xf007, 0xf008, 0xf009,
+    0xf00a, 0xf00b, 0xf00c, 0xf00d, 0xf00e, 0xf00f, 0xf010, 0xf011,
+    0xf012, 0xf013, 0xf014, 0xf015, 0xf016, 0xf017, 0xf018, 0xf019,
+    0xf01a, 0xf01b, 0xf01c, 0xf01d, 0xf01e, 0xf01f, 0xf020, 0xf021,
+    0xf022, 0xf023, 0xf024, 0xf025, 0xf026, 0xf027, 0xf028, 0xf029,
+    0xf02a, 0xf02b, 0xf02c, 0xf02d, 0xf02e, 0xf02f, 0xf030, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037,
+    0xf038, 0xf039, 0xf03a, 0xf03b, 0xf03c, 0xf03d, 0xf03e, 0xf03f,
+    0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047,
+    0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f,
+    0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057,
+    0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, 0xf05e, 0xf05f,
+    0xf060, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067,
+    0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f,
+    0xf070, 0xf071, 0xf072, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077,
+    0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, 0xf07d, 0xf07e, 0xf07f,
+    0xf080, 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, 0xf086, 0xf087,
+    0xf088, 0xf089, 0xf08a, 0xf08b, 0xf08c, 0xf08d, 0xf08e, 0x003f,
+    /* lead byte 84 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf08f, 0xf090, 0xf091, 0xf092, 0xf093, 0xf094, 0xf095, 0xf096,
+    0xf097, 0xf098, 0xf099, 0xf09a, 0xf09b, 0xf09c, 0xf09d, 0xf09e,
+    0xf09f, 0xf0a0, 0xf0a1, 0xf0a2, 0xf0a3, 0xf0a4, 0xf0a5, 0xf0a6,
+    0xf0a7, 0xf0a8, 0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac, 0xf0ad, 0xf0ae,
+    0xf0af, 0xf0b0, 0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0b6,
+    0xf0b7, 0xf0b8, 0xf0b9, 0xf0ba, 0xf0bb, 0xf0bc, 0xf0bd, 0xf0be,
+    0xf0bf, 0xf0c0, 0xf0c1, 0xf0c2, 0xf0c3, 0xf0c4, 0xf0c5, 0xf0c6,
+    0xf0c7, 0xf0c8, 0xf0c9, 0xf0ca, 0xf0cb, 0xf0cc, 0xf0cd, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf0ce, 0xf0cf, 0xf0d0, 0xf0d1, 0xf0d2, 0xf0d3, 0xf0d4,
+    0xf0d5, 0xf0d6, 0xf0d7, 0xf0d8, 0xf0d9, 0xf0da, 0xf0db, 0xf0dc,
+    0xf0dd, 0xf0de, 0xf0df, 0xf0e0, 0xf0e1, 0xf0e2, 0xf0e3, 0xf0e4,
+    0xf0e5, 0xf0e6, 0xf0e7, 0xf0e8, 0xf0e9, 0xf0ea, 0xf0eb, 0xf0ec,
+    0xf0ed, 0xf0ee, 0xf0ef, 0xf0f0, 0xf0f1, 0xf0f2, 0xf0f3, 0xf0f4,
+    0xf0f5, 0xf0f6, 0xf0f7, 0xf0f8, 0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc,
+    0xf0fd, 0xf0fe, 0xf0ff, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
+    0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf10a, 0xf10b, 0xf10c,
+    0xf10d, 0xf10e, 0xf10f, 0xf110, 0xf111, 0xf112, 0xf113, 0xf114,
+    0xf115, 0xf116, 0xf117, 0xf118, 0xf119, 0xf11a, 0xf11b, 0xf11c,
+    0xf11d, 0xf11e, 0xf11f, 0xf120, 0xf121, 0xf122, 0xf123, 0xf124,
+    0xf125, 0xf126, 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0x003f,
+    /* lead byte 85 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf12c, 0xf12d, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132, 0xf133,
+    0xf134, 0xf135, 0xf136, 0xf137, 0xf138, 0xf139, 0xf13a, 0xf13b,
+    0xf13c, 0xf13d, 0xf13e, 0xf13f, 0xf140, 0xf141, 0xf142, 0xf143,
+    0xf144, 0xf145, 0xf146, 0xf147, 0xf148, 0xf149, 0xf14a, 0xf14b,
+    0xf14c, 0xf14d, 0xf14e, 0xf14f, 0xf150, 0xf151, 0xf152, 0xf153,
+    0xf154, 0xf155, 0xf156, 0xf157, 0xf158, 0xf159, 0xf15a, 0xf15b,
+    0xf15c, 0xf15d, 0xf15e, 0xf15f, 0xf160, 0xf161, 0xf162, 0xf163,
+    0xf164, 0xf165, 0xf166, 0xf167, 0xf168, 0xf169, 0xf16a, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf16b, 0xf16c, 0xf16d, 0xf16e, 0xf16f, 0xf170, 0xf171,
+    0xf172, 0xf173, 0xf174, 0xf175, 0xf176, 0xf177, 0xf178, 0xf179,
+    0xf17a, 0xf17b, 0xf17c, 0xf17d, 0xf17e, 0xf17f, 0xf180, 0xf181,
+    0xf182, 0xf183, 0xf184, 0xf185, 0xf186, 0xf187, 0xf188, 0xf189,
+    0xf18a, 0xf18b, 0xf18c, 0xf18d, 0xf18e, 0xf18f, 0xf190, 0xf191,
+    0xf192, 0xf193, 0xf194, 0xf195, 0xf196, 0xf197, 0xf198, 0xf199,
+    0xf19a, 0xf19b, 0xf19c, 0xf19d, 0xf19e, 0xf19f, 0xf1a0, 0xf1a1,
+    0xf1a2, 0xf1a3, 0xf1a4, 0xf1a5, 0xf1a6, 0xf1a7, 0xf1a8, 0xf1a9,
+    0xf1aa, 0xf1ab, 0xf1ac, 0xf1ad, 0xf1ae, 0xf1af, 0xf1b0, 0xf1b1,
+    0xf1b2, 0xf1b3, 0xf1b4, 0xf1b5, 0xf1b6, 0xf1b7, 0xf1b8, 0xf1b9,
+    0xf1ba, 0xf1bb, 0xf1bc, 0xf1bd, 0xf1be, 0xf1bf, 0xf1c0, 0xf1c1,
+    0xf1c2, 0xf1c3, 0xf1c4, 0xf1c5, 0xf1c6, 0xf1c7, 0xf1c8, 0x003f,
+    /* lead byte 86 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf1c9, 0xf1ca, 0xf1cb, 0xf1cc, 0xf1cd, 0xf1ce, 0xf1cf, 0xf1d0,
+    0xf1d1, 0xf1d2, 0xf1d3, 0xf1d4, 0xf1d5, 0xf1d6, 0xf1d7, 0xf1d8,
+    0xf1d9, 0xf1da, 0xf1db, 0xf1dc, 0xf1dd, 0xf1de, 0xf1df, 0xf1e0,
+    0xf1e1, 0xf1e2, 0xf1e3, 0xf1e4, 0xf1e5, 0xf1e6, 0xf1e7, 0xf1e8,
+    0xf1e9, 0xf1ea, 0xf1eb, 0xf1ec, 0xf1ed, 0xf1ee, 0xf1ef, 0xf1f0,
+    0xf1f1, 0xf1f2, 0xf1f3, 0xf1f4, 0xf1f5, 0xf1f6, 0xf1f7, 0xf1f8,
+    0xf1f9, 0xf1fa, 0xf1fb, 0xf1fc, 0xf1fd, 0xf1fe, 0xf1ff, 0xf200,
+    0xf201, 0xf202, 0xf203, 0xf204, 0xf205, 0xf206, 0xf207, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf208, 0xf209, 0xf20a, 0xf20b, 0xf20c, 0xf20d, 0xf20e,
+    0xf20f, 0xf210, 0xf211, 0xf212, 0xf213, 0xf214, 0xf215, 0xf216,
+    0xf217, 0xf218, 0xf219, 0xf21a, 0xf21b, 0xf21c, 0xf21d, 0xf21e,
+    0xf21f, 0xf220, 0xf221, 0xf222, 0xf223, 0xf224, 0xf225, 0xf226,
+    0xf227, 0xf228, 0xf229, 0xf22a, 0xf22b, 0xf22c, 0xf22d, 0xf22e,
+    0xf22f, 0xf230, 0xf231, 0xf232, 0xf233, 0xf234, 0xf235, 0xf236,
+    0xf237, 0xf238, 0xf239, 0xf23a, 0xf23b, 0xf23c, 0xf23d, 0xf23e,
+    0xf23f, 0xf240, 0xf241, 0xf242, 0xf243, 0xf244, 0xf245, 0xf246,
+    0xf247, 0xf248, 0xf249, 0xf24a, 0xf24b, 0xf24c, 0xf24d, 0xf24e,
+    0xf24f, 0xf250, 0xf251, 0xf252, 0xf253, 0xf254, 0xf255, 0xf256,
+    0xf257, 0xf258, 0xf259, 0xf25a, 0xf25b, 0xf25c, 0xf25d, 0xf25e,
+    0xf25f, 0xf260, 0xf261, 0xf262, 0xf263, 0xf264, 0xf265, 0x003f,
+    /* lead byte 87 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf266, 0xf267, 0xf268, 0xf269, 0xf26a, 0xf26b, 0xf26c, 0xf26d,
+    0xf26e, 0xf26f, 0xf270, 0xf271, 0xf272, 0xf273, 0xf274, 0xf275,
+    0xf276, 0xf277, 0xf278, 0xf279, 0xf27a, 0xf27b, 0xf27c, 0xf27d,
+    0xf27e, 0xf27f, 0xf280, 0xf281, 0xf282, 0xf283, 0xf284, 0xf285,
+    0xf286, 0xf287, 0xf288, 0xf289, 0xf28a, 0xf28b, 0xf28c, 0xf28d,
+    0xf28e, 0xf28f, 0xf290, 0xf291, 0xf292, 0xf293, 0xf294, 0xf295,
+    0xf296, 0xf297, 0xf298, 0xf299, 0xf29a, 0xf29b, 0xf29c, 0xf29d,
+    0xf29e, 0xf29f, 0xf2a0, 0xf2a1, 0xf2a2, 0xf2a3, 0xf2a4, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf2a5, 0xf2a6, 0xf2a7, 0xf2a8, 0xf2a9, 0xf2aa, 0xf2ab,
+    0xf2ac, 0xf2ad, 0xf2ae, 0xf2af, 0xf2b0, 0xf2b1, 0xf2b2, 0xf2b3,
+    0xf2b4, 0xf2b5, 0xf2b6, 0xf2b7, 0xf2b8, 0xf2b9, 0xf2ba, 0xf2bb,
+    0xf2bc, 0xf2bd, 0xf2be, 0xf2bf, 0xf2c0, 0xf2c1, 0xf2c2, 0xf2c3,
+    0xf2c4, 0xf2c5, 0xf2c6, 0xf2c7, 0xf2c8, 0xf2c9, 0xf2ca, 0xf2cb,
+    0xf2cc, 0xf2cd, 0xf2ce, 0xf2cf, 0xf2d0, 0xf2d1, 0xf2d2, 0xf2d3,
+    0xf2d4, 0xf2d5, 0xf2d6, 0xf2d7, 0xf2d8, 0xf2d9, 0xf2da, 0xf2db,
+    0xf2dc, 0xf2dd, 0xf2de, 0xf2df, 0xf2e0, 0xf2e1, 0xf2e2, 0xf2e3,
+    0xf2e4, 0xf2e5, 0xf2e6, 0xf2e7, 0xf2e8, 0xf2e9, 0xf2ea, 0xf2eb,
+    0xf2ec, 0xf2ed, 0xf2ee, 0xf2ef, 0xf2f0, 0xf2f1, 0xf2f2, 0xf2f3,
+    0xf2f4, 0xf2f5, 0xf2f6, 0xf2f7, 0xf2f8, 0xf2f9, 0xf2fa, 0xf2fb,
+    0xf2fc, 0xf2fd, 0xf2fe, 0xf2ff, 0xf300, 0xf301, 0xf302, 0x003f,
+    /* lead byte 88 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf303, 0xf304, 0xf305, 0xf306, 0xf307, 0xf308, 0xf309, 0xf30a,
+    0xf30b, 0xf30c, 0xf30d, 0xf30e, 0xf30f, 0xf310, 0xf311, 0xf312,
+    0xf313, 0xf314, 0xf315, 0xf316, 0xf317, 0xf318, 0xf319, 0xf31a,
+    0xf31b, 0xf31c, 0xf31d, 0xf31e, 0xf31f, 0xf320, 0xf321, 0xf322,
+    0xf323, 0xf324, 0xf325, 0xf326, 0xf327, 0xf328, 0xf329, 0xf32a,
+    0xf32b, 0xf32c, 0xf32d, 0xf32e, 0xf32f, 0xf330, 0xf331, 0xf332,
+    0xf333, 0xf334, 0xf335, 0xf336, 0xf337, 0xf338, 0xf339, 0xf33a,
+    0xf33b, 0xf33c, 0xf33d, 0xf33e, 0xf33f, 0xf340, 0xf341, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf342, 0xf343, 0xf344, 0xf345, 0xf346, 0xf347, 0xf348,
+    0xf349, 0xf34a, 0xf34b, 0xf34c, 0xf34d, 0xf34e, 0xf34f, 0xf350,
+    0xf351, 0xf352, 0xf353, 0xf354, 0xf355, 0xf356, 0xf357, 0xf358,
+    0xf359, 0xf35a, 0xf35b, 0xf35c, 0xf35d, 0xf35e, 0xf35f, 0xf360,
+    0xf361, 0xf362, 0xf363, 0xf364, 0xf365, 0xf366, 0xf367, 0xf368,
+    0xf369, 0xf36a, 0xf36b, 0xf36c, 0xf36d, 0xf36e, 0xf36f, 0xf370,
+    0xf371, 0xf372, 0xf373, 0xf374, 0xf375, 0xf376, 0xf377, 0xf378,
+    0xf379, 0xf37a, 0xf37b, 0xf37c, 0xf37d, 0xf37e, 0xf37f, 0xf380,
+    0xf381, 0xf382, 0xf383, 0xf384, 0xf385, 0xf386, 0xf387, 0xf388,
+    0xf389, 0xf38a, 0xf38b, 0xf38c, 0xf38d, 0xf38e, 0xf38f, 0xf390,
+    0xf391, 0xf392, 0xf393, 0xf394, 0xf395, 0xf396, 0xf397, 0xf398,
+    0xf399, 0xf39a, 0xf39b, 0xf39c, 0xf39d, 0xf39e, 0xf39f, 0x003f,
+    /* lead byte 89 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf3a0, 0xf3a1, 0xf3a2, 0xf3a3, 0xf3a4, 0xf3a5, 0xf3a6, 0xf3a7,
+    0xf3a8, 0xf3a9, 0xf3aa, 0xf3ab, 0xf3ac, 0xf3ad, 0xf3ae, 0xf3af,
+    0xf3b0, 0xf3b1, 0xf3b2, 0xf3b3, 0xf3b4, 0xf3b5, 0xf3b6, 0xf3b7,
+    0xf3b8, 0xf3b9, 0xf3ba, 0xf3bb, 0xf3bc, 0xf3bd, 0xf3be, 0xf3bf,
+    0xf3c0, 0xf3c1, 0xf3c2, 0xf3c3, 0xf3c4, 0xf3c5, 0xf3c6, 0xf3c7,
+    0xf3c8, 0xf3c9, 0xf3ca, 0xf3cb, 0xf3cc, 0xf3cd, 0xf3ce, 0xf3cf,
+    0xf3d0, 0xf3d1, 0xf3d2, 0xf3d3, 0xf3d4, 0xf3d5, 0xf3d6, 0xf3d7,
+    0xf3d8, 0xf3d9, 0xf3da, 0xf3db, 0xf3dc, 0xf3dd, 0xf3de, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf3df, 0xf3e0, 0xf3e1, 0xf3e2, 0xf3e3, 0xf3e4, 0xf3e5,
+    0xf3e6, 0xf3e7, 0xf3e8, 0xf3e9, 0xf3ea, 0xf3eb, 0xf3ec, 0xf3ed,
+    0xf3ee, 0xf3ef, 0xf3f0, 0xf3f1, 0xf3f2, 0xf3f3, 0xf3f4, 0xf3f5,
+    0xf3f6, 0xf3f7, 0xf3f8, 0xf3f9, 0xf3fa, 0xf3fb, 0xf3fc, 0xf3fd,
+    0xf3fe, 0xf3ff, 0xf400, 0xf401, 0xf402, 0xf403, 0xf404, 0xf405,
+    0xf406, 0xf407, 0xf408, 0xf409, 0xf40a, 0xf40b, 0xf40c, 0xf40d,
+    0xf40e, 0xf40f, 0xf410, 0xf411, 0xf412, 0xf413, 0xf414, 0xf415,
+    0xf416, 0xf417, 0xf418, 0xf419, 0xf41a, 0xf41b, 0xf41c, 0xf41d,
+    0xf41e, 0xf41f, 0xf420, 0xf421, 0xf422, 0xf423, 0xf424, 0xf425,
+    0xf426, 0xf427, 0xf428, 0xf429, 0xf42a, 0xf42b, 0xf42c, 0xf42d,
+    0xf42e, 0xf42f, 0xf430, 0xf431, 0xf432, 0xf433, 0xf434, 0xf435,
+    0xf436, 0xf437, 0xf438, 0xf439, 0xf43a, 0xf43b, 0xf43c, 0x003f,
+    /* lead byte 8a */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf43d, 0xf43e, 0xf43f, 0xf440, 0xf441, 0xf442, 0xf443, 0xf444,
+    0xf445, 0xf446, 0xf447, 0xf448, 0xf449, 0xf44a, 0xf44b, 0xf44c,
+    0xf44d, 0xf44e, 0xf44f, 0xf450, 0xf451, 0xf452, 0xf453, 0xf454,
+    0xf455, 0xf456, 0xf457, 0xf458, 0xf459, 0xf45a, 0xf45b, 0xf45c,
+    0xf45d, 0xf45e, 0xf45f, 0xf460, 0xf461, 0xf462, 0xf463, 0xf464,
+    0xf465, 0xf466, 0xf467, 0xf468, 0xf469, 0xf46a, 0xf46b, 0xf46c,
+    0xf46d, 0xf46e, 0xf46f, 0xf470, 0xf471, 0xf472, 0xf473, 0xf474,
+    0xf475, 0xf476, 0xf477, 0xf478, 0xf479, 0xf47a, 0xf47b, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf47c, 0xf47d, 0xf47e, 0xf47f, 0xf480, 0xf481, 0xf482,
+    0xf483, 0xf484, 0xf485, 0xf486, 0xf487, 0xf488, 0xf489, 0xf48a,
+    0xf48b, 0xf48c, 0xf48d, 0xf48e, 0xf48f, 0xf490, 0xf491, 0xf492,
+    0xf493, 0xf494, 0xf495, 0xf496, 0xf497, 0xf498, 0xf499, 0xf49a,
+    0xf49b, 0xf49c, 0xf49d, 0xf49e, 0xf49f, 0xf4a0, 0xf4a1, 0xf4a2,
+    0xf4a3, 0xf4a4, 0xf4a5, 0xf4a6, 0xf4a7, 0xf4a8, 0xf4a9, 0xf4aa,
+    0xf4ab, 0xf4ac, 0xf4ad, 0xf4ae, 0xf4af, 0xf4b0, 0xf4b1, 0xf4b2,
+    0xf4b3, 0xf4b4, 0xf4b5, 0xf4b6, 0xf4b7, 0xf4b8, 0xf4b9, 0xf4ba,
+    0xf4bb, 0xf4bc, 0xf4bd, 0xf4be, 0xf4bf, 0xf4c0, 0xf4c1, 0xf4c2,
+    0xf4c3, 0xf4c4, 0xf4c5, 0xf4c6, 0xf4c7, 0xf4c8, 0xf4c9, 0xf4ca,
+    0xf4cb, 0xf4cc, 0xf4cd, 0xf4ce, 0xf4cf, 0xf4d0, 0xf4d1, 0xf4d2,
+    0xf4d3, 0xf4d4, 0xf4d5, 0xf4d6, 0xf4d7, 0xf4d8, 0xf4d9, 0x003f,
+    /* lead byte 8b */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf4da, 0xf4db, 0xf4dc, 0xf4dd, 0xf4de, 0xf4df, 0xf4e0, 0xf4e1,
+    0xf4e2, 0xf4e3, 0xf4e4, 0xf4e5, 0xf4e6, 0xf4e7, 0xf4e8, 0xf4e9,
+    0xf4ea, 0xf4eb, 0xf4ec, 0xf4ed, 0xf4ee, 0xf4ef, 0xf4f0, 0xf4f1,
+    0xf4f2, 0xf4f3, 0xf4f4, 0xf4f5, 0xf4f6, 0xf4f7, 0xf4f8, 0xf4f9,
+    0xf4fa, 0xf4fb, 0xf4fc, 0xf4fd, 0xf4fe, 0xf4ff, 0xf500, 0xf501,
+    0xf502, 0xf503, 0xf504, 0xf505, 0xf506, 0xf507, 0xf508, 0xf509,
+    0xf50a, 0xf50b, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510, 0xf511,
+    0xf512, 0xf513, 0xf514, 0xf515, 0xf516, 0xf517, 0xf518, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf519, 0xf51a, 0xf51b, 0xf51c, 0xf51d, 0xf51e, 0xf51f,
+    0xf520, 0xf521, 0xf522, 0xf523, 0xf524, 0xf525, 0xf526, 0xf527,
+    0xf528, 0xf529, 0xf52a, 0xf52b, 0xf52c, 0xf52d, 0xf52e, 0xf52f,
+    0xf530, 0xf531, 0xf532, 0xf533, 0xf534, 0xf535, 0xf536, 0xf537,
+    0xf538, 0xf539, 0xf53a, 0xf53b, 0xf53c, 0xf53d, 0xf53e, 0xf53f,
+    0xf540, 0xf541, 0xf542, 0xf543, 0xf544, 0xf545, 0xf546, 0xf547,
+    0xf548, 0xf549, 0xf54a, 0xf54b, 0xf54c, 0xf54d, 0xf54e, 0xf54f,
+    0xf550, 0xf551, 0xf552, 0xf553, 0xf554, 0xf555, 0xf556, 0xf557,
+    0xf558, 0xf559, 0xf55a, 0xf55b, 0xf55c, 0xf55d, 0xf55e, 0xf55f,
+    0xf560, 0xf561, 0xf562, 0xf563, 0xf564, 0xf565, 0xf566, 0xf567,
+    0xf568, 0xf569, 0xf56a, 0xf56b, 0xf56c, 0xf56d, 0xf56e, 0xf56f,
+    0xf570, 0xf571, 0xf572, 0xf573, 0xf574, 0xf575, 0xf576, 0x003f,
+    /* lead byte 8c */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf577, 0xf578, 0xf579, 0xf57a, 0xf57b, 0xf57c, 0xf57d, 0xf57e,
+    0xf57f, 0xf580, 0xf581, 0xf582, 0xf583, 0xf584, 0xf585, 0xf586,
+    0xf587, 0xf588, 0xf589, 0xf58a, 0xf58b, 0xf58c, 0xf58d, 0xf58e,
+    0xf58f, 0xf590, 0xf591, 0xf592, 0xf593, 0xf594, 0xf595, 0xf596,
+    0xf597, 0xf598, 0xf599, 0xf59a, 0xf59b, 0xf59c, 0xf59d, 0xf59e,
+    0xf59f, 0xf5a0, 0xf5a1, 0xf5a2, 0xf5a3, 0xf5a4, 0xf5a5, 0xf5a6,
+    0xf5a7, 0xf5a8, 0xf5a9, 0xf5aa, 0xf5ab, 0xf5ac, 0xf5ad, 0xf5ae,
+    0xf5af, 0xf5b0, 0xf5b1, 0xf5b2, 0xf5b3, 0xf5b4, 0xf5b5, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf5b6, 0xf5b7, 0xf5b8, 0xf5b9, 0xf5ba, 0xf5bb, 0xf5bc,
+    0xf5bd, 0xf5be, 0xf5bf, 0xf5c0, 0xf5c1, 0xf5c2, 0xf5c3, 0xf5c4,
+    0xf5c5, 0xf5c6, 0xf5c7, 0xf5c8, 0xf5c9, 0xf5ca, 0xf5cb, 0xf5cc,
+    0xf5cd, 0xf5ce, 0xf5cf, 0xf5d0, 0xf5d1, 0xf5d2, 0xf5d3, 0xf5d4,
+    0xf5d5, 0xf5d6, 0xf5d7, 0xf5d8, 0xf5d9, 0xf5da, 0xf5db, 0xf5dc,
+    0xf5dd, 0xf5de, 0xf5df, 0xf5e0, 0xf5e1, 0xf5e2, 0xf5e3, 0xf5e4,
+    0xf5e5, 0xf5e6, 0xf5e7, 0xf5e8, 0xf5e9, 0xf5ea, 0xf5eb, 0xf5ec,
+    0xf5ed, 0xf5ee, 0xf5ef, 0xf5f0, 0xf5f1, 0xf5f2, 0xf5f3, 0xf5f4,
+    0xf5f5, 0xf5f6, 0xf5f7, 0xf5f8, 0xf5f9, 0xf5fa, 0xf5fb, 0xf5fc,
+    0xf5fd, 0xf5fe, 0xf5ff, 0xf600, 0xf601, 0xf602, 0xf603, 0xf604,
+    0xf605, 0xf606, 0xf607, 0xf608, 0xf609, 0xf60a, 0xf60b, 0xf60c,
+    0xf60d, 0xf60e, 0xf60f, 0xf610, 0xf611, 0xf612, 0xf613, 0x003f,
+    /* lead byte 8d */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf614, 0xf615, 0xf616, 0xf617, 0xf618, 0xf619, 0xf61a, 0xf61b,
+    0xf61c, 0xf61d, 0xf61e, 0xf61f, 0xf620, 0xf621, 0xf622, 0xf623,
+    0xf624, 0xf625, 0xf626, 0xf627, 0xf628, 0xf629, 0xf62a, 0xf62b,
+    0xf62c, 0xf62d, 0xf62e, 0xf62f, 0xf630, 0xf631, 0xf632, 0xf633,
+    0xf634, 0xf635, 0xf636, 0xf637, 0xf638, 0xf639, 0xf63a, 0xf63b,
+    0xf63c, 0xf63d, 0xf63e, 0xf63f, 0xf640, 0xf641, 0xf642, 0xf643,
+    0xf644, 0xf645, 0xf646, 0xf647, 0xf648, 0xf649, 0xf64a, 0xf64b,
+    0xf64c, 0xf64d, 0xf64e, 0xf64f, 0xf650, 0xf651, 0xf652, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf653, 0xf654, 0xf655, 0xf656, 0xf657, 0xf658, 0xf659,
+    0xf65a, 0xf65b, 0xf65c, 0xf65d, 0xf65e, 0xf65f, 0xf660, 0xf661,
+    0xf662, 0xf663, 0xf664, 0xf665, 0xf666, 0xf667, 0xf668, 0xf669,
+    0xf66a, 0xf66b, 0xf66c, 0xf66d, 0xf66e, 0xf66f, 0xf670, 0xf671,
+    0xf672, 0xf673, 0xf674, 0xf675, 0xf676, 0xf677, 0xf678, 0xf679,
+    0xf67a, 0xf67b, 0xf67c, 0xf67d, 0xf67e, 0xf67f, 0xf680, 0xf681,
+    0xf682, 0xf683, 0xf684, 0xf685, 0xf686, 0xf687, 0xf688, 0xf689,
+    0xf68a, 0xf68b, 0xf68c, 0xf68d, 0xf68e, 0xf68f, 0xf690, 0xf691,
+    0xf692, 0xf693, 0xf694, 0xf695, 0xf696, 0xf697, 0xf698, 0xf699,
+    0xf69a, 0xf69b, 0xf69c, 0xf69d, 0xf69e, 0xf69f, 0xf6a0, 0xf6a1,
+    0xf6a2, 0xf6a3, 0xf6a4, 0xf6a5, 0xf6a6, 0xf6a7, 0xf6a8, 0xf6a9,
+    0xf6aa, 0xf6ab, 0xf6ac, 0xf6ad, 0xf6ae, 0xf6af, 0xf6b0, 0x003f,
+    /* lead byte 8e */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe311, 0xe312, 0xe313, 0xe314, 0xe315, 0xe316, 0xe317, 0xe318,
+    0xe319, 0xe31a, 0xe31b, 0xe31c, 0xe31d, 0xe31e, 0xe31f, 0xe320,
+    0xe321, 0xe322, 0xe323, 0xe324, 0xe325, 0xe326, 0xe327, 0xe328,
+    0xe329, 0xe32a, 0xe32b, 0xe32c, 0xe32d, 0xe32e, 0xe32f, 0xe330,
+    0xe331, 0xe332, 0xe333, 0xe334, 0xe335, 0xe336, 0xe337, 0xe338,
+    0xe339, 0xe33a, 0xe33b, 0xe33c, 0xe33d, 0xe33e, 0xe33f, 0xe340,
+    0xe341, 0xe342, 0xe343, 0xe344, 0xe345, 0xe346, 0xe347, 0xe348,
+    0xe349, 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0xe34e, 0xe34f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe350, 0xe351, 0xe352, 0xe353, 0xe354, 0xe355, 0xe356,
+    0xe357, 0xe358, 0xe359, 0xe35a, 0xe35b, 0xe35c, 0xe35d, 0xe35e,
+    0xe35f, 0xe360, 0xe361, 0xe362, 0xe363, 0xe364, 0xe365, 0xe366,
+    0xe367, 0xe368, 0xe369, 0xe36a, 0xe36b, 0xe36c, 0xe36d, 0xe36e,
+    0xe36f, 0xe370, 0xe371, 0xe372, 0xe373, 0xe374, 0xe375, 0xe376,
+    0xe377, 0xe378, 0xe379, 0xe37a, 0xe37b, 0xe37c, 0xe37d, 0xe37e,
+    0xe37f, 0xe380, 0xe381, 0xe382, 0xe383, 0xe384, 0xe385, 0xe386,
+    0xe387, 0xe388, 0xe389, 0xe38a, 0xe38b, 0xe38c, 0xe38d, 0xe38e,
+    0xe38f, 0xe390, 0xe391, 0xe392, 0xe393, 0xe394, 0xe395, 0xe396,
+    0xe397, 0xe398, 0xe399, 0xe39a, 0xe39b, 0xe39c, 0xe39d, 0xe39e,
+    0xe39f, 0xe3a0, 0xe3a1, 0xe3a2, 0xe3a3, 0xe3a4, 0xe3a5, 0xe3a6,
+    0xe3a7, 0xe3a8, 0xe3a9, 0xe3aa, 0xe3ab, 0xe3ac, 0xe3ad, 0x003f,
+    /* lead byte 8f */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe3ae, 0xe3af, 0xe3b0, 0xe3b1, 0xe3b2, 0xe3b3, 0xe3b4, 0xe3b5,
+    0xe3b6, 0xe3b7, 0xe3b8, 0xe3b9, 0xe3ba, 0xe3bb, 0xe3bc, 0xe3bd,
+    0xe3be, 0xe3bf, 0xe3c0, 0xe3c1, 0xe3c2, 0xe3c3, 0xe3c4, 0xe3c5,
+    0xe3c6, 0xe3c7, 0xe3c8, 0xe3c9, 0xe3ca, 0xe3cb, 0xe3cc, 0xe3cd,
+    0xe3ce, 0xe3cf, 0xe3d0, 0xe3d1, 0xe3d2, 0xe3d3, 0xe3d4, 0xe3d5,
+    0xe3d6, 0xe3d7, 0xe3d8, 0xe3d9, 0xe3da, 0xe3db, 0xe3dc, 0xe3dd,
+    0xe3de, 0xe3df, 0xe3e0, 0xe3e1, 0xe3e2, 0xe3e3, 0xe3e4, 0xe3e5,
+    0xe3e6, 0xe3e7, 0xe3e8, 0xe3e9, 0xe3ea, 0xe3eb, 0xe3ec, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe3ed, 0xe3ee, 0xe3ef, 0xe3f0, 0xe3f1, 0xe3f2, 0xe3f3,
+    0xe3f4, 0xe3f5, 0xe3f6, 0xe3f7, 0xe3f8, 0xe3f9, 0xe3fa, 0xe3fb,
+    0xe3fc, 0xe3fd, 0xe3fe, 0xe3ff, 0xe400, 0xe401, 0xe402, 0xe403,
+    0xe404, 0xe405, 0xe406, 0xe407, 0xe408, 0xe409, 0xe40a, 0xe40b,
+    0xe40c, 0xe40d, 0xe40e, 0xe40f, 0xe410, 0xe411, 0xe412, 0xe413,
+    0xe414, 0xe415, 0xe416, 0xe417, 0xe418, 0xe419, 0xe41a, 0xe41b,
+    0xe41c, 0xe41d, 0xe41e, 0xe41f, 0xe420, 0xe421, 0xe422, 0xe423,
+    0xe424, 0xe425, 0xe426, 0xe427, 0xe428, 0xe429, 0xe42a, 0xe42b,
+    0xe42c, 0xe42d, 0xe42e, 0xe42f, 0xe430, 0xe431, 0xe432, 0xe433,
+    0xe434, 0xe435, 0xe436, 0xe437, 0xe438, 0xe439, 0xe43a, 0xe43b,
+    0xe43c, 0xe43d, 0xe43e, 0xe43f, 0xe440, 0xe441, 0xe442, 0xe443,
+    0xe444, 0xe445, 0xe446, 0xe447, 0xe448, 0xe449, 0xe44a, 0x003f,
+    /* lead byte 90 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe44b, 0xe44c, 0xe44d, 0xe44e, 0xe44f, 0xe450, 0xe451, 0xe452,
+    0xe453, 0xe454, 0xe455, 0xe456, 0xe457, 0xe458, 0xe459, 0xe45a,
+    0xe45b, 0xe45c, 0xe45d, 0xe45e, 0xe45f, 0xe460, 0xe461, 0xe462,
+    0xe463, 0xe464, 0xe465, 0xe466, 0xe467, 0xe468, 0xe469, 0xe46a,
+    0xe46b, 0xe46c, 0xe46d, 0xe46e, 0xe46f, 0xe470, 0xe471, 0xe472,
+    0xe473, 0xe474, 0xe475, 0xe476, 0xe477, 0xe478, 0xe479, 0xe47a,
+    0xe47b, 0xe47c, 0xe47d, 0xe47e, 0xe47f, 0xe480, 0xe481, 0xe482,
+    0xe483, 0xe484, 0xe485, 0xe486, 0xe487, 0xe488, 0xe489, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, 0xe48f, 0xe490,
+    0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, 0xe497, 0xe498,
+    0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, 0xe49f, 0xe4a0,
+    0xe4a1, 0xe4a2, 0xe4a3, 0xe4a4, 0xe4a5, 0xe4a6, 0xe4a7, 0xe4a8,
+    0xe4a9, 0xe4aa, 0xe4ab, 0xe4ac, 0xe4ad, 0xe4ae, 0xe4af, 0xe4b0,
+    0xe4b1, 0xe4b2, 0xe4b3, 0xe4b4, 0xe4b5, 0xe4b6, 0xe4b7, 0xe4b8,
+    0xe4b9, 0xe4ba, 0xe4bb, 0xe4bc, 0xe4bd, 0xe4be, 0xe4bf, 0xe4c0,
+    0xe4c1, 0xe4c2, 0xe4c3, 0xe4c4, 0xe4c5, 0xe4c6, 0xe4c7, 0xe4c8,
+    0xe4c9, 0xe4ca, 0xe4cb, 0xe4cc, 0xe4cd, 0xe4ce, 0xe4cf, 0xe4d0,
+    0xe4d1, 0xe4d2, 0xe4d3, 0xe4d4, 0xe4d5, 0xe4d6, 0xe4d7, 0xe4d8,
+    0xe4d9, 0xe4da, 0xe4db, 0xe4dc, 0xe4dd, 0xe4de, 0xe4df, 0xe4e0,
+    0xe4e1, 0xe4e2, 0xe4e3, 0xe4e4, 0xe4e5, 0xe4e6, 0xe4e7, 0x003f,
+    /* lead byte 91 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe4e8, 0xe4e9, 0xe4ea, 0xe4eb, 0xe4ec, 0xe4ed, 0xe4ee, 0xe4ef,
+    0xe4f0, 0xe4f1, 0xe4f2, 0xe4f3, 0xe4f4, 0xe4f5, 0xe4f6, 0xe4f7,
+    0xe4f8, 0xe4f9, 0xe4fa, 0xe4fb, 0xe4fc, 0xe4fd, 0xe4fe, 0xe4ff,
+    0xe500, 0xe501, 0xe502, 0xe503, 0xe504, 0xe505, 0xe506, 0xe507,
+    0xe508, 0xe509, 0xe50a, 0xe50b, 0xe50c, 0xe50d, 0xe50e, 0xe50f,
+    0xe510, 0xe511, 0xe512, 0xe513, 0xe514, 0xe515, 0xe516, 0xe517,
+    0xe518, 0xe519, 0xe51a, 0xe51b, 0xe51c, 0xe51d, 0xe51e, 0xe51f,
+    0xe520, 0xe521, 0xe522, 0xe523, 0xe524, 0xe525, 0xe526, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe527, 0xe528, 0xe529, 0xe52a, 0xe52b, 0xe52c, 0xe52d,
+    0xe52e, 0xe52f, 0xe530, 0xe531, 0xe532, 0xe533, 0xe534, 0xe535,
+    0xe536, 0xe537, 0xe538, 0xe539, 0xe53a, 0xe53b, 0xe53c, 0xe53d,
+    0xe53e, 0xe53f, 0xe540, 0xe541, 0xe542, 0xe543, 0xe544, 0xe545,
+    0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b, 0xe54c, 0xe54d,
+    0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553, 0xe554, 0xe555,
+    0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b, 0xe55c, 0xe55d,
+    0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0xe563, 0xe564, 0xe565,
+    0xe566, 0xe567, 0xe568, 0xe569, 0xe56a, 0xe56b, 0xe56c, 0xe56d,
+    0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572, 0xe573, 0xe574, 0xe575,
+    0xe576, 0xe577, 0xe578, 0xe579, 0xe57a, 0xe57b, 0xe57c, 0xe57d,
+    0xe57e, 0xe57f, 0xe580, 0xe581, 0xe582, 0xe583, 0xe584, 0x003f,
+    /* lead byte 92 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe585, 0xe586, 0xe587, 0xe588, 0xe589, 0xe58a, 0xe58b, 0xe58c,
+    0xe58d, 0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592, 0xe593, 0xe594,
+    0xe595, 0xe596, 0xe597, 0xe598, 0xe599, 0xe59a, 0xe59b, 0xe59c,
+    0xe59d, 0xe59e, 0xe59f, 0xe5a0, 0xe5a1, 0xe5a2, 0xe5a3, 0xe5a4,
+    0xe5a5, 0xe5a6, 0xe5a7, 0xe5a8, 0xe5a9, 0xe5aa, 0xe5ab, 0xe5ac,
+    0xe5ad, 0xe5ae, 0xe5af, 0xe5b0, 0xe5b1, 0xe5b2, 0xe5b3, 0xe5b4,
+    0xe5b5, 0xe5b6, 0xe5b7, 0xe5b8, 0xe5b9, 0xe5ba, 0xe5bb, 0xe5bc,
+    0xe5bd, 0xe5be, 0xe5bf, 0xe5c0, 0xe5c1, 0xe5c2, 0xe5c3, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe5c4, 0xe5c5, 0xe5c6, 0xe5c7, 0xe5c8, 0xe5c9, 0xe5ca,
+    0xe5cb, 0xe5cc, 0xe5cd, 0xe5ce, 0xe5cf, 0xe5d0, 0xe5d1, 0xe5d2,
+    0xe5d3, 0xe5d4, 0xe5d5, 0xe5d6, 0xe5d7, 0xe5d8, 0xe5d9, 0xe5da,
+    0xe5db, 0xe5dc, 0xe5dd, 0xe5de, 0xe5df, 0xe5e0, 0xe5e1, 0xe5e2,
+    0xe5e3, 0xe5e4, 0xe5e5, 0xe5e6, 0xe5e7, 0xe5e8, 0xe5e9, 0xe5ea,
+    0xe5eb, 0xe5ec, 0xe5ed, 0xe5ee, 0xe5ef, 0xe5f0, 0xe5f1, 0xe5f2,
+    0xe5f3, 0xe5f4, 0xe5f5, 0xe5f6, 0xe5f7, 0xe5f8, 0xe5f9, 0xe5fa,
+    0xe5fb, 0xe5fc, 0xe5fd, 0xe5fe, 0xe5ff, 0xe600, 0xe601, 0xe602,
+    0xe603, 0xe604, 0xe605, 0xe606, 0xe607, 0xe608, 0xe609, 0xe60a,
+    0xe60b, 0xe60c, 0xe60d, 0xe60e, 0xe60f, 0xe610, 0xe611, 0xe612,
+    0xe613, 0xe614, 0xe615, 0xe616, 0xe617, 0xe618, 0xe619, 0xe61a,
+    0xe61b, 0xe61c, 0xe61d, 0xe61e, 0xe61f, 0xe620, 0xe621, 0x003f,
+    /* lead byte 93 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe622, 0xe623, 0xe624, 0xe625, 0xe626, 0xe627, 0xe628, 0xe629,
+    0xe62a, 0xe62b, 0xe62c, 0xe62d, 0xe62e, 0xe62f, 0xe630, 0xe631,
+    0xe632, 0xe633, 0xe634, 0xe635, 0xe636, 0xe637, 0xe638, 0xe639,
+    0xe63a, 0xe63b, 0xe63c, 0xe63d, 0xe63e, 0xe63f, 0xe640, 0xe641,
+    0xe642, 0xe643, 0xe644, 0xe645, 0xe646, 0xe647, 0xe648, 0xe649,
+    0xe64a, 0xe64b, 0xe64c, 0xe64d, 0xe64e, 0xe64f, 0xe650, 0xe651,
+    0xe652, 0xe653, 0xe654, 0xe655, 0xe656, 0xe657, 0xe658, 0xe659,
+    0xe65a, 0xe65b, 0xe65c, 0xe65d, 0xe65e, 0xe65f, 0xe660, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe661, 0xe662, 0xe663, 0xe664, 0xe665, 0xe666, 0xe667,
+    0xe668, 0xe669, 0xe66a, 0xe66b, 0xe66c, 0xe66d, 0xe66e, 0xe66f,
+    0xe670, 0xe671, 0xe672, 0xe673, 0xe674, 0xe675, 0xe676, 0xe677,
+    0xe678, 0xe679, 0xe67a, 0xe67b, 0xe67c, 0xe67d, 0xe67e, 0xe67f,
+    0xe680, 0xe681, 0xe682, 0xe683, 0xe684, 0xe685, 0xe686, 0xe687,
+    0xe688, 0xe689, 0xe68a, 0xe68b, 0xe68c, 0xe68d, 0xe68e, 0xe68f,
+    0xe690, 0xe691, 0xe692, 0xe693, 0xe694, 0xe695, 0xe696, 0xe697,
+    0xe698, 0xe699, 0xe69a, 0xe69b, 0xe69c, 0xe69d, 0xe69e, 0xe69f,
+    0xe6a0, 0xe6a1, 0xe6a2, 0xe6a3, 0xe6a4, 0xe6a5, 0xe6a6, 0xe6a7,
+    0xe6a8, 0xe6a9, 0xe6aa, 0xe6ab, 0xe6ac, 0xe6ad, 0xe6ae, 0xe6af,
+    0xe6b0, 0xe6b1, 0xe6b2, 0xe6b3, 0xe6b4, 0xe6b5, 0xe6b6, 0xe6b7,
+    0xe6b8, 0xe6b9, 0xe6ba, 0xe6bb, 0xe6bc, 0xe6bd, 0xe6be, 0x003f,
+    /* lead byte 94 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe6bf, 0xe6c0, 0xe6c1, 0xe6c2, 0xe6c3, 0xe6c4, 0xe6c5, 0xe6c6,
+    0xe6c7, 0xe6c8, 0xe6c9, 0xe6ca, 0xe6cb, 0xe6cc, 0xe6cd, 0xe6ce,
+    0xe6cf, 0xe6d0, 0xe6d1, 0xe6d2, 0xe6d3, 0xe6d4, 0xe6d5, 0xe6d6,
+    0xe6d7, 0xe6d8, 0xe6d9, 0xe6da, 0xe6db, 0xe6dc, 0xe6dd, 0xe6de,
+    0xe6df, 0xe6e0, 0xe6e1, 0xe6e2, 0xe6e3, 0xe6e4, 0xe6e5, 0xe6e6,
+    0xe6e7, 0xe6e8, 0xe6e9, 0xe6ea, 0xe6eb, 0xe6ec, 0xe6ed, 0xe6ee,
+    0xe6ef, 0xe6f0, 0xe6f1, 0xe6f2, 0xe6f3, 0xe6f4, 0xe6f5, 0xe6f6,
+    0xe6f7, 0xe6f8, 0xe6f9, 0xe6fa, 0xe6fb, 0xe6fc, 0xe6fd, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe6fe, 0xe6ff, 0xe700, 0xe701, 0xe702, 0xe703, 0xe704,
+    0xe705, 0xe706, 0xe707, 0xe708, 0xe709, 0xe70a, 0xe70b, 0xe70c,
+    0xe70d, 0xe70e, 0xe70f, 0xe710, 0xe711, 0xe712, 0xe713, 0xe714,
+    0xe715, 0xe716, 0xe717, 0xe718, 0xe719, 0xe71a, 0xe71b, 0xe71c,
+    0xe71d, 0xe71e, 0xe71f, 0xe720, 0xe721, 0xe722, 0xe723, 0xe724,
+    0xe725, 0xe726, 0xe727, 0xe728, 0xe729, 0xe72a, 0xe72b, 0xe72c,
+    0xe72d, 0xe72e, 0xe72f, 0xe730, 0xe731, 0xe732, 0xe733, 0xe734,
+    0xe735, 0xe736, 0xe737, 0xe738, 0xe739, 0xe73a, 0xe73b, 0xe73c,
+    0xe73d, 0xe73e, 0xe73f, 0xe740, 0xe741, 0xe742, 0xe743, 0xe744,
+    0xe745, 0xe746, 0xe747, 0xe748, 0xe749, 0xe74a, 0xe74b, 0xe74c,
+    0xe74d, 0xe74e, 0xe74f, 0xe750, 0xe751, 0xe752, 0xe753, 0xe754,
+    0xe755, 0xe756, 0xe757, 0xe758, 0xe759, 0xe75a, 0xe75b, 0x003f,
+    /* lead byte 95 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe75c, 0xe75d, 0xe75e, 0xe75f, 0xe760, 0xe761, 0xe762, 0xe763,
+    0xe764, 0xe765, 0xe766, 0xe767, 0xe768, 0xe769, 0xe76a, 0xe76b,
+    0xe76c, 0xe76d, 0xe76e, 0xe76f, 0xe770, 0xe771, 0xe772, 0xe773,
+    0xe774, 0xe775, 0xe776, 0xe777, 0xe778, 0xe779, 0xe77a, 0xe77b,
+    0xe77c, 0xe77d, 0xe77e, 0xe77f, 0xe780, 0xe781, 0xe782, 0xe783,
+    0xe784, 0xe785, 0xe786, 0xe787, 0xe788, 0xe789, 0xe78a, 0xe78b,
+    0xe78c, 0xe78d, 0xe78e, 0xe78f, 0xe790, 0xe791, 0xe792, 0xe793,
+    0xe794, 0xe795, 0xe796, 0xe797, 0xe798, 0xe799, 0xe79a, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe79b, 0xe79c, 0xe79d, 0xe79e, 0xe79f, 0xe7a0, 0xe7a1,
+    0xe7a2, 0xe7a3, 0xe7a4, 0xe7a5, 0xe7a6, 0xe7a7, 0xe7a8, 0xe7a9,
+    0xe7aa, 0xe7ab, 0xe7ac, 0xe7ad, 0xe7ae, 0xe7af, 0xe7b0, 0xe7b1,
+    0xe7b2, 0xe7b3, 0xe7b4, 0xe7b5, 0xe7b6, 0xe7b7, 0xe7b8, 0xe7b9,
+    0xe7ba, 0xe7bb, 0xe7bc, 0xe7bd, 0xe7be, 0xe7bf, 0xe7c0, 0xe7c1,
+    0xe7c2, 0xe7c3, 0xe7c4, 0xe7c5, 0xe7c6, 0xe7c7, 0xe7c8, 0xe7c9,
+    0xe7ca, 0xe7cb, 0xe7cc, 0xe7cd, 0xe7ce, 0xe7cf, 0xe7d0, 0xe7d1,
+    0xe7d2, 0xe7d3, 0xe7d4, 0xe7d5, 0xe7d6, 0xe7d7, 0xe7d8, 0xe7d9,
+    0xe7da, 0xe7db, 0xe7dc, 0xe7dd, 0xe7de, 0xe7df, 0xe7e0, 0xe7e1,
+    0xe7e2, 0xe7e3, 0xe7e4, 0xe7e5, 0xe7e6, 0xe7e7, 0xe7e8, 0xe7e9,
+    0xe7ea, 0xe7eb, 0xe7ec, 0xe7ed, 0xe7ee, 0xe7ef, 0xe7f0, 0xe7f1,
+    0xe7f2, 0xe7f3, 0xe7f4, 0xe7f5, 0xe7f6, 0xe7f7, 0xe7f8, 0x003f,
+    /* lead byte 96 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe7f9, 0xe7fa, 0xe7fb, 0xe7fc, 0xe7fd, 0xe7fe, 0xe7ff, 0xe800,
+    0xe801, 0xe802, 0xe803, 0xe804, 0xe805, 0xe806, 0xe807, 0xe808,
+    0xe809, 0xe80a, 0xe80b, 0xe80c, 0xe80d, 0xe80e, 0xe80f, 0xe810,
+    0xe811, 0xe812, 0xe813, 0xe814, 0xe815, 0xe816, 0xe817, 0xe818,
+    0xe819, 0xe81a, 0xe81b, 0xe81c, 0xe81d, 0xe81e, 0xe81f, 0xe820,
+    0xe821, 0xe822, 0xe823, 0xe824, 0xe825, 0xe826, 0xe827, 0xe828,
+    0xe829, 0xe82a, 0xe82b, 0xe82c, 0xe82d, 0xe82e, 0xe82f, 0xe830,
+    0xe831, 0xe832, 0xe833, 0xe834, 0xe835, 0xe836, 0xe837, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe838, 0xe839, 0xe83a, 0xe83b, 0xe83c, 0xe83d, 0xe83e,
+    0xe83f, 0xe840, 0xe841, 0xe842, 0xe843, 0xe844, 0xe845, 0xe846,
+    0xe847, 0xe848, 0xe849, 0xe84a, 0xe84b, 0xe84c, 0xe84d, 0xe84e,
+    0xe84f, 0xe850, 0xe851, 0xe852, 0xe853, 0xe854, 0xe855, 0xe856,
+    0xe857, 0xe858, 0xe859, 0xe85a, 0xe85b, 0xe85c, 0xe85d, 0xe85e,
+    0xe85f, 0xe860, 0xe861, 0xe862, 0xe863, 0xe864, 0xe865, 0xe866,
+    0xe867, 0xe868, 0xe869, 0xe86a, 0xe86b, 0xe86c, 0xe86d, 0xe86e,
+    0xe86f, 0xe870, 0xe871, 0xe872, 0xe873, 0xe874, 0xe875, 0xe876,
+    0xe877, 0xe878, 0xe879, 0xe87a, 0xe87b, 0xe87c, 0xe87d, 0xe87e,
+    0xe87f, 0xe880, 0xe881, 0xe882, 0xe883, 0xe884, 0xe885, 0xe886,
+    0xe887, 0xe888, 0xe889, 0xe88a, 0xe88b, 0xe88c, 0xe88d, 0xe88e,
+    0xe88f, 0xe890, 0xe891, 0xe892, 0xe893, 0xe894, 0xe895, 0x003f,
+    /* lead byte 97 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe896, 0xe897, 0xe898, 0xe899, 0xe89a, 0xe89b, 0xe89c, 0xe89d,
+    0xe89e, 0xe89f, 0xe8a0, 0xe8a1, 0xe8a2, 0xe8a3, 0xe8a4, 0xe8a5,
+    0xe8a6, 0xe8a7, 0xe8a8, 0xe8a9, 0xe8aa, 0xe8ab, 0xe8ac, 0xe8ad,
+    0xe8ae, 0xe8af, 0xe8b0, 0xe8b1, 0xe8b2, 0xe8b3, 0xe8b4, 0xe8b5,
+    0xe8b6, 0xe8b7, 0xe8b8, 0xe8b9, 0xe8ba, 0xe8bb, 0xe8bc, 0xe8bd,
+    0xe8be, 0xe8bf, 0xe8c0, 0xe8c1, 0xe8c2, 0xe8c3, 0xe8c4, 0xe8c5,
+    0xe8c6, 0xe8c7, 0xe8c8, 0xe8c9, 0xe8ca, 0xe8cb, 0xe8cc, 0xe8cd,
+    0xe8ce, 0xe8cf, 0xe8d0, 0xe8d1, 0xe8d2, 0xe8d3, 0xe8d4, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe8d5, 0xe8d6, 0xe8d7, 0xe8d8, 0xe8d9, 0xe8da, 0xe8db,
+    0xe8dc, 0xe8dd, 0xe8de, 0xe8df, 0xe8e0, 0xe8e1, 0xe8e2, 0xe8e3,
+    0xe8e4, 0xe8e5, 0xe8e6, 0xe8e7, 0xe8e8, 0xe8e9, 0xe8ea, 0xe8eb,
+    0xe8ec, 0xe8ed, 0xe8ee, 0xe8ef, 0xe8f0, 0xe8f1, 0xe8f2, 0xe8f3,
+    0xe8f4, 0xe8f5, 0xe8f6, 0xe8f7, 0xe8f8, 0xe8f9, 0xe8fa, 0xe8fb,
+    0xe8fc, 0xe8fd, 0xe8fe, 0xe8ff, 0xe900, 0xe901, 0xe902, 0xe903,
+    0xe904, 0xe905, 0xe906, 0xe907, 0xe908, 0xe909, 0xe90a, 0xe90b,
+    0xe90c, 0xe90d, 0xe90e, 0xe90f, 0xe910, 0xe911, 0xe912, 0xe913,
+    0xe914, 0xe915, 0xe916, 0xe917, 0xe918, 0xe919, 0xe91a, 0xe91b,
+    0xe91c, 0xe91d, 0xe91e, 0xe91f, 0xe920, 0xe921, 0xe922, 0xe923,
+    0xe924, 0xe925, 0xe926, 0xe927, 0xe928, 0xe929, 0xe92a, 0xe92b,
+    0xe92c, 0xe92d, 0xe92e, 0xe92f, 0xe930, 0xe931, 0xe932, 0x003f,
+    /* lead byte 98 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe933, 0xe934, 0xe935, 0xe936, 0xe937, 0xe938, 0xe939, 0xe93a,
+    0xe93b, 0xe93c, 0xe93d, 0xe93e, 0xe93f, 0xe940, 0xe941, 0xe942,
+    0xe943, 0xe944, 0xe945, 0xe946, 0xe947, 0xe948, 0xe949, 0xe94a,
+    0xe94b, 0xe94c, 0xe94d, 0xe94e, 0xe94f, 0xe950, 0xe951, 0xe952,
+    0xe953, 0xe954, 0xe955, 0xe956, 0xe957, 0xe958, 0xe959, 0xe95a,
+    0xe95b, 0xe95c, 0xe95d, 0xe95e, 0xe95f, 0xe960, 0xe961, 0xe962,
+    0xe963, 0xe964, 0xe965, 0xe966, 0xe967, 0xe968, 0xe969, 0xe96a,
+    0xe96b, 0xe96c, 0xe96d, 0xe96e, 0xe96f, 0xe970, 0xe971, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe972, 0xe973, 0xe974, 0xe975, 0xe976, 0xe977, 0xe978,
+    0xe979, 0xe97a, 0xe97b, 0xe97c, 0xe97d, 0xe97e, 0xe97f, 0xe980,
+    0xe981, 0xe982, 0xe983, 0xe984, 0xe985, 0xe986, 0xe987, 0xe988,
+    0xe989, 0xe98a, 0xe98b, 0xe98c, 0xe98d, 0xe98e, 0xe98f, 0xe990,
+    0xe991, 0xe992, 0xe993, 0xe994, 0xe995, 0xe996, 0xe997, 0xe998,
+    0xe999, 0xe99a, 0xe99b, 0xe99c, 0xe99d, 0xe99e, 0xe99f, 0xe9a0,
+    0xe9a1, 0xe9a2, 0xe9a3, 0xe9a4, 0xe9a5, 0xe9a6, 0xe9a7, 0xe9a8,
+    0xe9a9, 0xe9aa, 0xe9ab, 0xe9ac, 0xe9ad, 0xe9ae, 0xe9af, 0xe9b0,
+    0xe9b1, 0xe9b2, 0xe9b3, 0xe9b4, 0xe9b5, 0xe9b6, 0xe9b7, 0xe9b8,
+    0xe9b9, 0xe9ba, 0xe9bb, 0xe9bc, 0xe9bd, 0xe9be, 0xe9bf, 0xe9c0,
+    0xe9c1, 0xe9c2, 0xe9c3, 0xe9c4, 0xe9c5, 0xe9c6, 0xe9c7, 0xe9c8,
+    0xe9c9, 0xe9ca, 0xe9cb, 0xe9cc, 0xe9cd, 0xe9ce, 0xe9cf, 0x003f,
+    /* lead byte 99 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe9d0, 0xe9d1, 0xe9d2, 0xe9d3, 0xe9d4, 0xe9d5, 0xe9d6, 0xe9d7,
+    0xe9d8, 0xe9d9, 0xe9da, 0xe9db, 0xe9dc, 0xe9dd, 0xe9de, 0xe9df,
+    0xe9e0, 0xe9e1, 0xe9e2, 0xe9e3, 0xe9e4, 0xe9e5, 0xe9e6, 0xe9e7,
+    0xe9e8, 0xe9e9, 0xe9ea, 0xe9eb, 0xe9ec, 0xe9ed, 0xe9ee, 0xe9ef,
+    0xe9f0, 0xe9f1, 0xe9f2, 0xe9f3, 0xe9f4, 0xe9f5, 0xe9f6, 0xe9f7,
+    0xe9f8, 0xe9f9, 0xe9fa, 0xe9fb, 0xe9fc, 0xe9fd, 0xe9fe, 0xe9ff,
+    0xea00, 0xea01, 0xea02, 0xea03, 0xea04, 0xea05, 0xea06, 0xea07,
+    0xea08, 0xea09, 0xea0a, 0xea0b, 0xea0c, 0xea0d, 0xea0e, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xea0f, 0xea10, 0xea11, 0xea12, 0xea13, 0xea14, 0xea15,
+    0xea16, 0xea17, 0xea18, 0xea19, 0xea1a, 0xea1b, 0xea1c, 0xea1d,
+    0xea1e, 0xea1f, 0xea20, 0xea21, 0xea22, 0xea23, 0xea24, 0xea25,
+    0xea26, 0xea27, 0xea28, 0xea29, 0xea2a, 0xea2b, 0xea2c, 0xea2d,
+    0xea2e, 0xea2f, 0xea30, 0xea31, 0xea32, 0xea33, 0xea34, 0xea35,
+    0xea36, 0xea37, 0xea38, 0xea39, 0xea3a, 0xea3b, 0xea3c, 0xea3d,
+    0xea3e, 0xea3f, 0xea40, 0xea41, 0xea42, 0xea43, 0xea44, 0xea45,
+    0xea46, 0xea47, 0xea48, 0xea49, 0xea4a, 0xea4b, 0xea4c, 0xea4d,
+    0xea4e, 0xea4f, 0xea50, 0xea51, 0xea52, 0xea53, 0xea54, 0xea55,
+    0xea56, 0xea57, 0xea58, 0xea59, 0xea5a, 0xea5b, 0xea5c, 0xea5d,
+    0xea5e, 0xea5f, 0xea60, 0xea61, 0xea62, 0xea63, 0xea64, 0xea65,
+    0xea66, 0xea67, 0xea68, 0xea69, 0xea6a, 0xea6b, 0xea6c, 0x003f,
+    /* lead byte 9a */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xea6d, 0xea6e, 0xea6f, 0xea70, 0xea71, 0xea72, 0xea73, 0xea74,
+    0xea75, 0xea76, 0xea77, 0xea78, 0xea79, 0xea7a, 0xea7b, 0xea7c,
+    0xea7d, 0xea7e, 0xea7f, 0xea80, 0xea81, 0xea82, 0xea83, 0xea84,
+    0xea85, 0xea86, 0xea87, 0xea88, 0xea89, 0xea8a, 0xea8b, 0xea8c,
+    0xea8d, 0xea8e, 0xea8f, 0xea90, 0xea91, 0xea92, 0xea93, 0xea94,
+    0xea95, 0xea96, 0xea97, 0xea98, 0xea99, 0xea9a, 0xea9b, 0xea9c,
+    0xea9d, 0xea9e, 0xea9f, 0xeaa0, 0xeaa1, 0xeaa2, 0xeaa3, 0xeaa4,
+    0xeaa5, 0xeaa6, 0xeaa7, 0xeaa8, 0xeaa9, 0xeaaa, 0xeaab, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xeaac, 0xeaad, 0xeaae, 0xeaaf, 0xeab0, 0xeab1, 0xeab2,
+    0xeab3, 0xeab4, 0xeab5, 0xeab6, 0xeab7, 0xeab8, 0xeab9, 0xeaba,
+    0xeabb, 0xeabc, 0xeabd, 0xeabe, 0xeabf, 0xeac0, 0xeac1, 0xeac2,
+    0xeac3, 0xeac4, 0xeac5, 0xeac6, 0xeac7, 0xeac8, 0xeac9, 0xeaca,
+    0xeacb, 0xeacc, 0xeacd, 0xeace, 0xeacf, 0xead0, 0xead1, 0xead2,
+    0xead3, 0xead4, 0xead5, 0xead6, 0xead7, 0xead8, 0xead9, 0xeada,
+    0xeadb, 0xeadc, 0xeadd, 0xeade, 0xeadf, 0xeae0, 0xeae1, 0xeae2,
+    0xeae3, 0xeae4, 0xeae5, 0xeae6, 0xeae7, 0xeae8, 0xeae9, 0xeaea,
+    0xeaeb, 0xeaec, 0xeaed, 0xeaee, 0xeaef, 0xeaf0, 0xeaf1, 0xeaf2,
+    0xeaf3, 0xeaf4, 0xeaf5, 0xeaf6, 0xeaf7, 0xeaf8, 0xeaf9, 0xeafa,
+    0xeafb, 0xeafc, 0xeafd, 0xeafe, 0xeaff, 0xeb00, 0xeb01, 0xeb02,
+    0xeb03, 0xeb04, 0xeb05, 0xeb06, 0xeb07, 0xeb08, 0xeb09, 0x003f,
+    /* lead byte 9b */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xeb0a, 0xeb0b, 0xeb0c, 0xeb0d, 0xeb0e, 0xeb0f, 0xeb10, 0xeb11,
+    0xeb12, 0xeb13, 0xeb14, 0xeb15, 0xeb16, 0xeb17, 0xeb18, 0xeb19,
+    0xeb1a, 0xeb1b, 0xeb1c, 0xeb1d, 0xeb1e, 0xeb1f, 0xeb20, 0xeb21,
+    0xeb22, 0xeb23, 0xeb24, 0xeb25, 0xeb26, 0xeb27, 0xeb28, 0xeb29,
+    0xeb2a, 0xeb2b, 0xeb2c, 0xeb2d, 0xeb2e, 0xeb2f, 0xeb30, 0xeb31,
+    0xeb32, 0xeb33, 0xeb34, 0xeb35, 0xeb36, 0xeb37, 0xeb38, 0xeb39,
+    0xeb3a, 0xeb3b, 0xeb3c, 0xeb3d, 0xeb3e, 0xeb3f, 0xeb40, 0xeb41,
+    0xeb42, 0xeb43, 0xeb44, 0xeb45, 0xeb46, 0xeb47, 0xeb48, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xeb49, 0xeb4a, 0xeb4b, 0xeb4c, 0xeb4d, 0xeb4e, 0xeb4f,
+    0xeb50, 0xeb51, 0xeb52, 0xeb53, 0xeb54, 0xeb55, 0xeb56, 0xeb57,
+    0xeb58, 0xeb59, 0xeb5a, 0xeb5b, 0xeb5c, 0xeb5d, 0xeb5e, 0xeb5f,
+    0xeb60, 0xeb61, 0xeb62, 0xeb63, 0xeb64, 0xeb65, 0xeb66, 0xeb67,
+    0xeb68, 0xeb69, 0xeb6a, 0xeb6b, 0xeb6c, 0xeb6d, 0xeb6e, 0xeb6f,
+    0xeb70, 0xeb71, 0xeb72, 0xeb73, 0xeb74, 0xeb75, 0xeb76, 0xeb77,
+    0xeb78, 0xeb79, 0xeb7a, 0xeb7b, 0xeb7c, 0xeb7d, 0xeb7e, 0xeb7f,
+    0xeb80, 0xeb81, 0xeb82, 0xeb83, 0xeb84, 0xeb85, 0xeb86, 0xeb87,
+    0xeb88, 0xeb89, 0xeb8a, 0xeb8b, 0xeb8c, 0xeb8d, 0xeb8e, 0xeb8f,
+    0xeb90, 0xeb91, 0xeb92, 0xeb93, 0xeb94, 0xeb95, 0xeb96, 0xeb97,
+    0xeb98, 0xeb99, 0xeb9a, 0xeb9b, 0xeb9c, 0xeb9d, 0xeb9e, 0xeb9f,
+    0xeba0, 0xeba1, 0xeba2, 0xeba3, 0xeba4, 0xeba5, 0xeba6, 0x003f,
+    /* lead byte 9c */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xeba7, 0xeba8, 0xeba9, 0xebaa, 0xebab, 0xebac, 0xebad, 0xebae,
+    0xebaf, 0xebb0, 0xebb1, 0xebb2, 0xebb3, 0xebb4, 0xebb5, 0xebb6,
+    0xebb7, 0xebb8, 0xebb9, 0xebba, 0xebbb, 0xebbc, 0xebbd, 0xebbe,
+    0xebbf, 0xebc0, 0xebc1, 0xebc2, 0xebc3, 0xebc4, 0xebc5, 0xebc6,
+    0xebc7, 0xebc8, 0xebc9, 0xebca, 0xebcb, 0xebcc, 0xebcd, 0xebce,
+    0xebcf, 0xebd0, 0xebd1, 0xebd2, 0xebd3, 0xebd4, 0xebd5, 0xebd6,
+    0xebd7, 0xebd8, 0xebd9, 0xebda, 0xebdb, 0xebdc, 0xebdd, 0xebde,
+    0xebdf, 0xebe0, 0xebe1, 0xebe2, 0xebe3, 0xebe4, 0xebe5, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xebe6, 0xebe7, 0xebe8, 0xebe9, 0xebea, 0xebeb, 0xebec,
+    0xebed, 0xebee, 0xebef, 0xebf0, 0xebf1, 0xebf2, 0xebf3, 0xebf4,
+    0xebf5, 0xebf6, 0xebf7, 0xebf8, 0xebf9, 0xebfa, 0xebfb, 0xebfc,
+    0xebfd, 0xebfe, 0xebff, 0xec00, 0xec01, 0xec02, 0xec03, 0xec04,
+    0xec05, 0xec06, 0xec07, 0xec08, 0xec09, 0xec0a, 0xec0b, 0xec0c,
+    0xec0d, 0xec0e, 0xec0f, 0xec10, 0xec11, 0xec12, 0xec13, 0xec14,
+    0xec15, 0xec16, 0xec17, 0xec18, 0xec19, 0xec1a, 0xec1b, 0xec1c,
+    0xec1d, 0xec1e, 0xec1f, 0xec20, 0xec21, 0xec22, 0xec23, 0xec24,
+    0xec25, 0xec26, 0xec27, 0xec28, 0xec29, 0xec2a, 0xec2b, 0xec2c,
+    0xec2d, 0xec2e, 0xec2f, 0xec30, 0xec31, 0xec32, 0xec33, 0xec34,
+    0xec35, 0xec36, 0xec37, 0xec38, 0xec39, 0xec3a, 0xec3b, 0xec3c,
+    0xec3d, 0xec3e, 0xec3f, 0xec40, 0xec41, 0xec42, 0xec43, 0x003f,
+    /* lead byte 9d */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xec44, 0xec45, 0xec46, 0xec47, 0xec48, 0xec49, 0xec4a, 0xec4b,
+    0xec4c, 0xec4d, 0xec4e, 0xec4f, 0xec50, 0xec51, 0xec52, 0xec53,
+    0xec54, 0xec55, 0xec56, 0xec57, 0xec58, 0xec59, 0xec5a, 0xec5b,
+    0xec5c, 0xec5d, 0xec5e, 0xec5f, 0xec60, 0xec61, 0xec62, 0xec63,
+    0xec64, 0xec65, 0xec66, 0xec67, 0xec68, 0xec69, 0xec6a, 0xec6b,
+    0xec6c, 0xec6d, 0xec6e, 0xec6f, 0xec70, 0xec71, 0xec72, 0xec73,
+    0xec74, 0xec75, 0xec76, 0xec77, 0xec78, 0xec79, 0xec7a, 0xec7b,
+    0xec7c, 0xec7d, 0xec7e, 0xec7f, 0xec80, 0xec81, 0xec82, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xec83, 0xec84, 0xec85, 0xec86, 0xec87, 0xec88, 0xec89,
+    0xec8a, 0xec8b, 0xec8c, 0xec8d, 0xec8e, 0xec8f, 0xec90, 0xec91,
+    0xec92, 0xec93, 0xec94, 0xec95, 0xec96, 0xec97, 0xec98, 0xec99,
+    0xec9a, 0xec9b, 0xec9c, 0xec9d, 0xec9e, 0xec9f, 0xeca0, 0xeca1,
+    0xeca2, 0xeca3, 0xeca4, 0xeca5, 0xeca6, 0xeca7, 0xeca8, 0xeca9,
+    0xecaa, 0xecab, 0xecac, 0xecad, 0xecae, 0xecaf, 0xecb0, 0xecb1,
+    0xecb2, 0xecb3, 0xecb4, 0xecb5, 0xecb6, 0xecb7, 0xecb8, 0xecb9,
+    0xecba, 0xecbb, 0xecbc, 0xecbd, 0xecbe, 0xecbf, 0xecc0, 0xecc1,
+    0xecc2, 0xecc3, 0xecc4, 0xecc5, 0xecc6, 0xecc7, 0xecc8, 0xecc9,
+    0xecca, 0xeccb, 0xeccc, 0xeccd, 0xecce, 0xeccf, 0xecd0, 0xecd1,
+    0xecd2, 0xecd3, 0xecd4, 0xecd5, 0xecd6, 0xecd7, 0xecd8, 0xecd9,
+    0xecda, 0xecdb, 0xecdc, 0xecdd, 0xecde, 0xecdf, 0xece0, 0x003f,
+    /* lead byte 9e */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xece1, 0xece2, 0xece3, 0xece4, 0xece5, 0xece6, 0xece7, 0xece8,
+    0xece9, 0xecea, 0xeceb, 0xecec, 0xeced, 0xecee, 0xecef, 0xecf0,
+    0xecf1, 0xecf2, 0xecf3, 0xecf4, 0xecf5, 0xecf6, 0xecf7, 0xecf8,
+    0xecf9, 0xecfa, 0xecfb, 0xecfc, 0xecfd, 0xecfe, 0xecff, 0xed00,
+    0xed01, 0xed02, 0xed03, 0xed04, 0xed05, 0xed06, 0xed07, 0xed08,
+    0xed09, 0xed0a, 0xed0b, 0xed0c, 0xed0d, 0xed0e, 0xed0f, 0xed10,
+    0xed11, 0xed12, 0xed13, 0xed14, 0xed15, 0xed16, 0xed17, 0xed18,
+    0xed19, 0xed1a, 0xed1b, 0xed1c, 0xed1d, 0xed1e, 0xed1f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xed20, 0xed21, 0xed22, 0xed23, 0xed24, 0xed25, 0xed26,
+    0xed27, 0xed28, 0xed29, 0xed2a, 0xed2b, 0xed2c, 0xed2d, 0xed2e,
+    0xed2f, 0xed30, 0xed31, 0xed32, 0xed33, 0xed34, 0xed35, 0xed36,
+    0xed37, 0xed38, 0xed39, 0xed3a, 0xed3b, 0xed3c, 0xed3d, 0xed3e,
+    0xed3f, 0xed40, 0xed41, 0xed42, 0xed43, 0xed44, 0xed45, 0xed46,
+    0xed47, 0xed48, 0xed49, 0xed4a, 0xed4b, 0xed4c, 0xed4d, 0xed4e,
+    0xed4f, 0xed50, 0xed51, 0xed52, 0xed53, 0xed54, 0xed55, 0xed56,
+    0xed57, 0xed58, 0xed59, 0xed5a, 0xed5b, 0xed5c, 0xed5d, 0xed5e,
+    0xed5f, 0xed60, 0xed61, 0xed62, 0xed63, 0xed64, 0xed65, 0xed66,
+    0xed67, 0xed68, 0xed69, 0xed6a, 0xed6b, 0xed6c, 0xed6d, 0xed6e,
+    0xed6f, 0xed70, 0xed71, 0xed72, 0xed73, 0xed74, 0xed75, 0xed76,
+    0xed77, 0xed78, 0xed79, 0xed7a, 0xed7b, 0xed7c, 0xed7d, 0x003f,
+    /* lead byte 9f */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xed7e, 0xed7f, 0xed80, 0xed81, 0xed82, 0xed83, 0xed84, 0xed85,
+    0xed86, 0xed87, 0xed88, 0xed89, 0xed8a, 0xed8b, 0xed8c, 0xed8d,
+    0xed8e, 0xed8f, 0xed90, 0xed91, 0xed92, 0xed93, 0xed94, 0xed95,
+    0xed96, 0xed97, 0xed98, 0xed99, 0xed9a, 0xed9b, 0xed9c, 0xed9d,
+    0xed9e, 0xed9f, 0xeda0, 0xeda1, 0xeda2, 0xeda3, 0xeda4, 0xeda5,
+    0xeda6, 0xeda7, 0xeda8, 0xeda9, 0xedaa, 0xedab, 0xedac, 0xedad,
+    0xedae, 0xedaf, 0xedb0, 0xedb1, 0xedb2, 0xedb3, 0xedb4, 0xedb5,
+    0xedb6, 0xedb7, 0xedb8, 0xedb9, 0xedba, 0xedbb, 0xedbc, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xedbd, 0xedbe, 0xedbf, 0xedc0, 0xedc1, 0xedc2, 0xedc3,
+    0xedc4, 0xedc5, 0xedc6, 0xedc7, 0xedc8, 0xedc9, 0xedca, 0xedcb,
+    0xedcc, 0xedcd, 0xedce, 0xedcf, 0xedd0, 0xedd1, 0xedd2, 0xedd3,
+    0xedd4, 0xedd5, 0xedd6, 0xedd7, 0xedd8, 0xedd9, 0xedda, 0xeddb,
+    0xeddc, 0xeddd, 0xedde, 0xeddf, 0xede0, 0xede1, 0xede2, 0xede3,
+    0xede4, 0xede5, 0xede6, 0xede7, 0xede8, 0xede9, 0xedea, 0xedeb,
+    0xedec, 0xeded, 0xedee, 0xedef, 0xedf0, 0xedf1, 0xedf2, 0xedf3,
+    0xedf4, 0xedf5, 0xedf6, 0xedf7, 0xedf8, 0xedf9, 0xedfa, 0xedfb,
+    0xedfc, 0xedfd, 0xedfe, 0xedff, 0xee00, 0xee01, 0xee02, 0xee03,
+    0xee04, 0xee05, 0xee06, 0xee07, 0xee08, 0xee09, 0xee0a, 0xee0b,
+    0xee0c, 0xee0d, 0xee0e, 0xee0f, 0xee10, 0xee11, 0xee12, 0xee13,
+    0xee14, 0xee15, 0xee16, 0xee17, 0xee18, 0xee19, 0xee1a, 0x003f,
+    /* lead byte a0 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xee1b, 0xee1c, 0xee1d, 0xee1e, 0xee1f, 0xee20, 0xee21, 0xee22,
+    0xee23, 0xee24, 0xee25, 0xee26, 0xee27, 0xee28, 0xee29, 0xee2a,
+    0xee2b, 0xee2c, 0xee2d, 0xee2e, 0xee2f, 0xee30, 0xee31, 0xee32,
+    0xee33, 0xee34, 0xee35, 0xee36, 0xee37, 0xee38, 0xee39, 0xee3a,
+    0xee3b, 0xee3c, 0xee3d, 0xee3e, 0xee3f, 0xee40, 0xee41, 0xee42,
+    0xee43, 0xee44, 0xee45, 0xee46, 0xee47, 0xee48, 0xee49, 0xee4a,
+    0xee4b, 0xee4c, 0xee4d, 0xee4e, 0xee4f, 0xee50, 0xee51, 0xee52,
+    0xee53, 0xee54, 0xee55, 0xee56, 0xee57, 0xee58, 0xee59, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xee5a, 0xee5b, 0xee5c, 0xee5d, 0xee5e, 0xee5f, 0xee60,
+    0xee61, 0xee62, 0xee63, 0xee64, 0xee65, 0xee66, 0xee67, 0xee68,
+    0xee69, 0xee6a, 0xee6b, 0xee6c, 0xee6d, 0xee6e, 0xee6f, 0xee70,
+    0xee71, 0xee72, 0xee73, 0xee74, 0xee75, 0xee76, 0xee77, 0xee78,
+    0xee79, 0xee7a, 0xee7b, 0xee7c, 0xee7d, 0xee7e, 0xee7f, 0xee80,
+    0xee81, 0xee82, 0xee83, 0xee84, 0xee85, 0xee86, 0xee87, 0xee88,
+    0xee89, 0xee8a, 0xee8b, 0xee8c, 0xee8d, 0xee8e, 0xee8f, 0xee90,
+    0xee91, 0xee92, 0xee93, 0xee94, 0xee95, 0xee96, 0xee97, 0xee98,
+    0xee99, 0xee9a, 0xee9b, 0xee9c, 0xee9d, 0xee9e, 0xee9f, 0xeea0,
+    0xeea1, 0xeea2, 0xeea3, 0xeea4, 0xeea5, 0xeea6, 0xeea7, 0xeea8,
+    0xeea9, 0xeeaa, 0xeeab, 0xeeac, 0xeead, 0xeeae, 0xeeaf, 0xeeb0,
+    0xeeb1, 0xeeb2, 0xeeb3, 0xeeb4, 0xeeb5, 0xeeb6, 0xeeb7, 0x003f,
     /* lead byte a1 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -1314,16 +2337,82 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf6b1, 0xf6b2, 0xf6b3, 0xf6b4, 0xf6b5, 0xf6b6, 0xf6b7,
+    0xf6b8, 0xf6b9, 0xf6ba, 0xf6bb, 0xf6bc, 0xf6bd, 0xf6be, 0xf6bf,
+    0xf6c0, 0xf6c1, 0xf6c2, 0xf6c3, 0xf6c4, 0xf6c5, 0xf6c6, 0xf6c7,
+    0xf6c8, 0xf6c9, 0xf6ca, 0xf6cb, 0xf6cc, 0xf6cd, 0xf6ce, 0xf6cf,
+    0xf6d0, 0xf6d1, 0xf6d2, 0xf6d3, 0xf6d4, 0xf6d5, 0xf6d6, 0xf6d7,
+    0xf6d8, 0xf6d9, 0xf6da, 0xf6db, 0xf6dc, 0xf6dd, 0xf6de, 0xf6df,
+    0xf6e0, 0xf6e1, 0xf6e2, 0xf6e3, 0xf6e4, 0xf6e5, 0xf6e6, 0xf6e7,
+    0xf6e8, 0xf6e9, 0xf6ea, 0xf6eb, 0xf6ec, 0xf6ed, 0xf6ee, 0xf6ef,
+    0xf6f0, 0xf6f1, 0xf6f2, 0xf6f3, 0xf6f4, 0xf6f5, 0xf6f6, 0xf6f7,
+    0xf6f8, 0xf6f9, 0xf6fa, 0xf6fb, 0xf6fc, 0xf6fd, 0xf6fe, 0xf6ff,
+    0xf700, 0xf701, 0xf702, 0xf703, 0xf704, 0xf705, 0xf706, 0xf707,
+    0xf708, 0xf709, 0xf70a, 0xf70b, 0xf70c, 0xf70d, 0xf70e, 0x003f,
+    /* lead byte c7 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf70f, 0xf710, 0xf711, 0xf712, 0xf713, 0xf714, 0xf715, 0xf716,
+    0xf717, 0xf718, 0xf719, 0xf71a, 0xf71b, 0xf71c, 0xf71d, 0xf71e,
+    0xf71f, 0xf720, 0xf721, 0xf722, 0xf723, 0xf724, 0xf725, 0xf726,
+    0xf727, 0xf728, 0xf729, 0xf72a, 0xf72b, 0xf72c, 0xf72d, 0xf72e,
+    0xf72f, 0xf730, 0xf731, 0xf732, 0xf733, 0xf734, 0xf735, 0xf736,
+    0xf737, 0xf738, 0xf739, 0xf73a, 0xf73b, 0xf73c, 0xf73d, 0xf73e,
+    0xf73f, 0xf740, 0xf741, 0xf742, 0xf743, 0xf744, 0xf745, 0xf746,
+    0xf747, 0xf748, 0xf749, 0xf74a, 0xf74b, 0xf74c, 0xf74d, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf74e, 0xf74f, 0xf750, 0xf751, 0xf752, 0xf753, 0xf754,
+    0xf755, 0xf756, 0xf757, 0xf758, 0xf759, 0xf75a, 0xf75b, 0xf75c,
+    0xf75d, 0xf75e, 0xf75f, 0xf760, 0xf761, 0xf762, 0xf763, 0xf764,
+    0xf765, 0xf766, 0xf767, 0xf768, 0xf769, 0xf76a, 0xf76b, 0xf76c,
+    0xf76d, 0xf76e, 0xf76f, 0xf770, 0xf771, 0xf772, 0xf773, 0xf774,
+    0xf775, 0xf776, 0xf777, 0xf778, 0xf779, 0xf77a, 0xf77b, 0xf77c,
+    0xf77d, 0xf77e, 0xf77f, 0xf780, 0xf781, 0xf782, 0xf783, 0xf784,
+    0xf785, 0xf786, 0xf787, 0xf788, 0xf789, 0xf78a, 0xf78b, 0xf78c,
+    0xf78d, 0xf78e, 0xf78f, 0xf790, 0xf791, 0xf792, 0xf793, 0xf794,
+    0xf795, 0xf796, 0xf797, 0xf798, 0xf799, 0xf79a, 0xf79b, 0xf79c,
+    0xf79d, 0xf79e, 0xf79f, 0xf7a0, 0xf7a1, 0xf7a2, 0xf7a3, 0xf7a4,
+    0xf7a5, 0xf7a6, 0xf7a7, 0xf7a8, 0xf7a9, 0xf7aa, 0xf7ab, 0x003f,
+    /* lead byte c8 */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf7ac, 0xf7ad, 0xf7ae, 0xf7af, 0xf7b0, 0xf7b1, 0xf7b2, 0xf7b3,
+    0xf7b4, 0xf7b5, 0xf7b6, 0xf7b7, 0xf7b8, 0xf7b9, 0xf7ba, 0xf7bb,
+    0xf7bc, 0xf7bd, 0xf7be, 0xf7bf, 0xf7c0, 0xf7c1, 0xf7c2, 0xf7c3,
+    0xf7c4, 0xf7c5, 0xf7c6, 0xf7c7, 0xf7c8, 0xf7c9, 0xf7ca, 0xf7cb,
+    0xf7cc, 0xf7cd, 0xf7ce, 0xf7cf, 0xf7d0, 0xf7d1, 0xf7d2, 0xf7d3,
+    0xf7d4, 0xf7d5, 0xf7d6, 0xf7d7, 0xf7d8, 0xf7d9, 0xf7da, 0xf7db,
+    0xf7dc, 0xf7dd, 0xf7de, 0xf7df, 0xf7e0, 0xf7e1, 0xf7e2, 0xf7e3,
+    0xf7e4, 0xf7e5, 0xf7e6, 0xf7e7, 0xf7e8, 0xf7e9, 0xf7ea, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xf7eb, 0xf7ec, 0xf7ed, 0xf7ee, 0xf7ef, 0xf7f0, 0xf7f1,
+    0xf7f2, 0xf7f3, 0xf7f4, 0xf7f5, 0xf7f6, 0xf7f7, 0xf7f8, 0xf7f9,
+    0xf7fa, 0xf7fb, 0xf7fc, 0xf7fd, 0xf7fe, 0xf7ff, 0xf800, 0xf801,
+    0xf802, 0xf803, 0xf804, 0xf805, 0xf806, 0xf807, 0xf808, 0xf809,
+    0xf80a, 0xf80b, 0xf80c, 0xf80d, 0xf80e, 0xf80f, 0xf810, 0xf811,
+    0xf812, 0xf813, 0xf814, 0xf815, 0xf816, 0xf817, 0xf818, 0xf819,
+    0xf81a, 0xf81b, 0xf81c, 0xf81d, 0xf81e, 0xf81f, 0xf820, 0xf821,
+    0xf822, 0xf823, 0xf824, 0xf825, 0xf826, 0xf827, 0xf828, 0xf829,
+    0xf82a, 0xf82b, 0xf82c, 0xf82d, 0xf82e, 0xf82f, 0xf830, 0xf831,
+    0xf832, 0xf833, 0xf834, 0xf835, 0xf836, 0xf837, 0xf838, 0xf839,
+    0xf83a, 0xf83b, 0xf83c, 0xf83d, 0xf83e, 0xf83f, 0xf840, 0xf841,
+    0xf842, 0xf843, 0xf844, 0xf845, 0xf846, 0xf847, 0xf848, 0x003f,
     /* lead byte c9 */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -2942,5 +4031,170 @@
     0x2555, 0x255e, 0x256a, 0x2561, 0x2558, 0x2567, 0x255b, 0x2553,
     0x2565, 0x2556, 0x255f, 0x256b, 0x2562, 0x2559, 0x2568, 0x255c,
-    0x2551, 0x2550, 0x256d, 0x256e, 0x2570, 0x256f, 0x2593, 0x003f
+    0x2551, 0x2550, 0x256d, 0x256e, 0x2570, 0x256f, 0x2593, 0x003f,
+    /* lead byte fa */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, 0xe007,
+    0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, 0xe00f,
+    0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, 0xe017,
+    0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, 0xe01f,
+    0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026, 0xe027,
+    0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e, 0xe02f,
+    0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036, 0xe037,
+    0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045,
+    0xe046, 0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d,
+    0xe04e, 0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055,
+    0xe056, 0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d,
+    0xe05e, 0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064, 0xe065,
+    0xe066, 0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c, 0xe06d,
+    0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074, 0xe075,
+    0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c, 0xe07d,
+    0xe07e, 0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084, 0xe085,
+    0xe086, 0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, 0xe08d,
+    0xe08e, 0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, 0xe095,
+    0xe096, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, 0x003f,
+    /* lead byte fb */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe09d, 0xe09e, 0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4,
+    0xe0a5, 0xe0a6, 0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac,
+    0xe0ad, 0xe0ae, 0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4,
+    0xe0b5, 0xe0b6, 0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0xe0bc,
+    0xe0bd, 0xe0be, 0xe0bf, 0xe0c0, 0xe0c1, 0xe0c2, 0xe0c3, 0xe0c4,
+    0xe0c5, 0xe0c6, 0xe0c7, 0xe0c8, 0xe0c9, 0xe0ca, 0xe0cb, 0xe0cc,
+    0xe0cd, 0xe0ce, 0xe0cf, 0xe0d0, 0xe0d1, 0xe0d2, 0xe0d3, 0xe0d4,
+    0xe0d5, 0xe0d6, 0xe0d7, 0xe0d8, 0xe0d9, 0xe0da, 0xe0db, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe0dc, 0xe0dd, 0xe0de, 0xe0df, 0xe0e0, 0xe0e1, 0xe0e2,
+    0xe0e3, 0xe0e4, 0xe0e5, 0xe0e6, 0xe0e7, 0xe0e8, 0xe0e9, 0xe0ea,
+    0xe0eb, 0xe0ec, 0xe0ed, 0xe0ee, 0xe0ef, 0xe0f0, 0xe0f1, 0xe0f2,
+    0xe0f3, 0xe0f4, 0xe0f5, 0xe0f6, 0xe0f7, 0xe0f8, 0xe0f9, 0xe0fa,
+    0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, 0xe100, 0xe101, 0xe102,
+    0xe103, 0xe104, 0xe105, 0xe106, 0xe107, 0xe108, 0xe109, 0xe10a,
+    0xe10b, 0xe10c, 0xe10d, 0xe10e, 0xe10f, 0xe110, 0xe111, 0xe112,
+    0xe113, 0xe114, 0xe115, 0xe116, 0xe117, 0xe118, 0xe119, 0xe11a,
+    0xe11b, 0xe11c, 0xe11d, 0xe11e, 0xe11f, 0xe120, 0xe121, 0xe122,
+    0xe123, 0xe124, 0xe125, 0xe126, 0xe127, 0xe128, 0xe129, 0xe12a,
+    0xe12b, 0xe12c, 0xe12d, 0xe12e, 0xe12f, 0xe130, 0xe131, 0xe132,
+    0xe133, 0xe134, 0xe135, 0xe136, 0xe137, 0xe138, 0xe139, 0x003f,
+    /* lead byte fc */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe13a, 0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, 0xe140, 0xe141,
+    0xe142, 0xe143, 0xe144, 0xe145, 0xe146, 0xe147, 0xe148, 0xe149,
+    0xe14a, 0xe14b, 0xe14c, 0xe14d, 0xe14e, 0xe14f, 0xe150, 0xe151,
+    0xe152, 0xe153, 0xe154, 0xe155, 0xe156, 0xe157, 0xe158, 0xe159,
+    0xe15a, 0xe15b, 0xe15c, 0xe15d, 0xe15e, 0xe15f, 0xe160, 0xe161,
+    0xe162, 0xe163, 0xe164, 0xe165, 0xe166, 0xe167, 0xe168, 0xe169,
+    0xe16a, 0xe16b, 0xe16c, 0xe16d, 0xe16e, 0xe16f, 0xe170, 0xe171,
+    0xe172, 0xe173, 0xe174, 0xe175, 0xe176, 0xe177, 0xe178, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe179, 0xe17a, 0xe17b, 0xe17c, 0xe17d, 0xe17e, 0xe17f,
+    0xe180, 0xe181, 0xe182, 0xe183, 0xe184, 0xe185, 0xe186, 0xe187,
+    0xe188, 0xe189, 0xe18a, 0xe18b, 0xe18c, 0xe18d, 0xe18e, 0xe18f,
+    0xe190, 0xe191, 0xe192, 0xe193, 0xe194, 0xe195, 0xe196, 0xe197,
+    0xe198, 0xe199, 0xe19a, 0xe19b, 0xe19c, 0xe19d, 0xe19e, 0xe19f,
+    0xe1a0, 0xe1a1, 0xe1a2, 0xe1a3, 0xe1a4, 0xe1a5, 0xe1a6, 0xe1a7,
+    0xe1a8, 0xe1a9, 0xe1aa, 0xe1ab, 0xe1ac, 0xe1ad, 0xe1ae, 0xe1af,
+    0xe1b0, 0xe1b1, 0xe1b2, 0xe1b3, 0xe1b4, 0xe1b5, 0xe1b6, 0xe1b7,
+    0xe1b8, 0xe1b9, 0xe1ba, 0xe1bb, 0xe1bc, 0xe1bd, 0xe1be, 0xe1bf,
+    0xe1c0, 0xe1c1, 0xe1c2, 0xe1c3, 0xe1c4, 0xe1c5, 0xe1c6, 0xe1c7,
+    0xe1c8, 0xe1c9, 0xe1ca, 0xe1cb, 0xe1cc, 0xe1cd, 0xe1ce, 0xe1cf,
+    0xe1d0, 0xe1d1, 0xe1d2, 0xe1d3, 0xe1d4, 0xe1d5, 0xe1d6, 0x003f,
+    /* lead byte fd */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe1d7, 0xe1d8, 0xe1d9, 0xe1da, 0xe1db, 0xe1dc, 0xe1dd, 0xe1de,
+    0xe1df, 0xe1e0, 0xe1e1, 0xe1e2, 0xe1e3, 0xe1e4, 0xe1e5, 0xe1e6,
+    0xe1e7, 0xe1e8, 0xe1e9, 0xe1ea, 0xe1eb, 0xe1ec, 0xe1ed, 0xe1ee,
+    0xe1ef, 0xe1f0, 0xe1f1, 0xe1f2, 0xe1f3, 0xe1f4, 0xe1f5, 0xe1f6,
+    0xe1f7, 0xe1f8, 0xe1f9, 0xe1fa, 0xe1fb, 0xe1fc, 0xe1fd, 0xe1fe,
+    0xe1ff, 0xe200, 0xe201, 0xe202, 0xe203, 0xe204, 0xe205, 0xe206,
+    0xe207, 0xe208, 0xe209, 0xe20a, 0xe20b, 0xe20c, 0xe20d, 0xe20e,
+    0xe20f, 0xe210, 0xe211, 0xe212, 0xe213, 0xe214, 0xe215, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe216, 0xe217, 0xe218, 0xe219, 0xe21a, 0xe21b, 0xe21c,
+    0xe21d, 0xe21e, 0xe21f, 0xe220, 0xe221, 0xe222, 0xe223, 0xe224,
+    0xe225, 0xe226, 0xe227, 0xe228, 0xe229, 0xe22a, 0xe22b, 0xe22c,
+    0xe22d, 0xe22e, 0xe22f, 0xe230, 0xe231, 0xe232, 0xe233, 0xe234,
+    0xe235, 0xe236, 0xe237, 0xe238, 0xe239, 0xe23a, 0xe23b, 0xe23c,
+    0xe23d, 0xe23e, 0xe23f, 0xe240, 0xe241, 0xe242, 0xe243, 0xe244,
+    0xe245, 0xe246, 0xe247, 0xe248, 0xe249, 0xe24a, 0xe24b, 0xe24c,
+    0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, 0xe252, 0xe253, 0xe254,
+    0xe255, 0xe256, 0xe257, 0xe258, 0xe259, 0xe25a, 0xe25b, 0xe25c,
+    0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, 0xe262, 0xe263, 0xe264,
+    0xe265, 0xe266, 0xe267, 0xe268, 0xe269, 0xe26a, 0xe26b, 0xe26c,
+    0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, 0xe272, 0xe273, 0x003f,
+    /* lead byte fe */
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, 0xe27a, 0xe27b,
+    0xe27c, 0xe27d, 0xe27e, 0xe27f, 0xe280, 0xe281, 0xe282, 0xe283,
+    0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a, 0xe28b,
+    0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0xe292, 0xe293,
+    0xe294, 0xe295, 0xe296, 0xe297, 0xe298, 0xe299, 0xe29a, 0xe29b,
+    0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0, 0xe2a1, 0xe2a2, 0xe2a3,
+    0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, 0xe2a8, 0xe2a9, 0xe2aa, 0xe2ab,
+    0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, 0xe2b0, 0xe2b1, 0xe2b2, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xe2b3, 0xe2b4, 0xe2b5, 0xe2b6, 0xe2b7, 0xe2b8, 0xe2b9,
+    0xe2ba, 0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, 0xe2bf, 0xe2c0, 0xe2c1,
+    0xe2c2, 0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, 0xe2c8, 0xe2c9,
+    0xe2ca, 0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, 0xe2d0, 0xe2d1,
+    0xe2d2, 0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, 0xe2d8, 0xe2d9,
+    0xe2da, 0xe2db, 0xe2dc, 0xe2dd, 0xe2de, 0xe2df, 0xe2e0, 0xe2e1,
+    0xe2e2, 0xe2e3, 0xe2e4, 0xe2e5, 0xe2e6, 0xe2e7, 0xe2e8, 0xe2e9,
+    0xe2ea, 0xe2eb, 0xe2ec, 0xe2ed, 0xe2ee, 0xe2ef, 0xe2f0, 0xe2f1,
+    0xe2f2, 0xe2f3, 0xe2f4, 0xe2f5, 0xe2f6, 0xe2f7, 0xe2f8, 0xe2f9,
+    0xe2fa, 0xe2fb, 0xe2fc, 0xe2fd, 0xe2fe, 0xe2ff, 0xe300, 0xe301,
+    0xe302, 0xe303, 0xe304, 0xe305, 0xe306, 0xe307, 0xe308, 0xe309,
+    0xe30a, 0xe30b, 0xe30c, 0xe30d, 0xe30e, 0xe30f, 0xe310, 0x003f
 };
 
@@ -2963,23 +4217,23 @@
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-    0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-    0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
-    0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
-    0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
-    0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x01,
-    0x01, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e,
-    0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
-    0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
-    0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46,
-    0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e,
-    0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56,
-    0x57, 0x58, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00
+    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+    0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+    0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+    0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+    0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
+    0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
+    0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
+    0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+    0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
+    0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+    0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x00
 };
 
-static const unsigned short uni2cp_low[27648] =
+static const unsigned short uni2cp_low[32000] =
 {
     /* 0x0000 .. 0x00ff */
@@ -3004,236 +4258,104 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0020, 0x0021, 0x0063, 0x004c, 0x003f, 0x0059, 0x007c, 0xa1b1,
-    0x0022, 0x0063, 0x0061, 0xa16d, 0x003f, 0x002d, 0x0072, 0xa1c2,
-    0xa258, 0xa1d3, 0x0032, 0x0033, 0xa3bd, 0xa367, 0x003f, 0xa150,
-    0x002c, 0x0031, 0x006f, 0xa16e, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x0021, 0xa246, 0xa247, 0x003f, 0xa244, 0x007c, 0xa1b1,
+    0xa14c, 0x0063, 0x0061, 0x003f, 0x003f, 0x002d, 0x0052, 0xa1c2,
+    0xa258, 0xa1d3, 0x0032, 0x0033, 0xa1a6, 0xa367, 0x003f, 0xa150,
+    0xa14d, 0x0031, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0043,
     0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049,
     0x0044, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0xa1d1,
-    0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x003f, 0xa35d,
+    0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x0054, 0x0073,
     0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0063,
     0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069,
-    0x0064, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0xa1d2,
-    0x006f, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x003f, 0x0079,
-    /* 0x0100 .. 0x01ff */
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063,
-    0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064,
-    0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x0049, 0x0069, 0x003f, 0x003f, 0x004a, 0x006a, 0x004b, 0x006b,
-    0x003f, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x003f,
-    0x003f, 0x004c, 0x006c, 0x004e, 0x006e, 0x004e, 0x006e, 0x004e,
-    0x006e, 0x003f, 0x003f, 0x003f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079,
-    0x0059, 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0073,
-    0x0062, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0044, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0045, 0x0046, 0x0066, 0x003f, 0x003f, 0x003f, 0x003f, 0x0049,
-    0x003f, 0x003f, 0x006c, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f,
-    0x004f, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, 0x0054, 0x0055,
-    0x0075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x007a, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa278, 0x003f, 0x003f, 0x0021, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061, 0x0049,
-    0x0069, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055,
-    0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x003f, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0047, 0x0067, 0x0047, 0x0067,
-    0x004b, 0x006b, 0x004f, 0x006f, 0x004f, 0x006f, 0x003f, 0x003f,
-    0x006a, 0x003f, 0x003f, 0x003f, 0x0047, 0x0067, 0x003f, 0x003f,
-    0x004e, 0x006e, 0x0041, 0x0061, 0x0041, 0x0061, 0x004f, 0x006f,
+    0x0065, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0xa1d2,
+    0x006f, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x0074, 0x0079,
     /* 0x0200 .. 0x02ff */
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x003f, 0x003f, 0x0048, 0x0068,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0068, 0x003f, 0x006a, 0x0072, 0x003f, 0x003f, 0x003f, 0x0077,
-    0x0079, 0xa3bd, 0x0022, 0xa1a5, 0xa1a6, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x005e, 0xa3be,
-    0x0027, 0xa3bc, 0xa3bd, 0xa3bf, 0x003f, 0xa1c5, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa3bb, 0xa258, 0x003f, 0x007e, 0x0022, 0x003f, 0x003f,
-    0x003f, 0x006c, 0x0073, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa3be,
+    0x003f, 0xa3bc, 0xa3bd, 0xa3bf, 0x003f, 0xa1c5, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa3bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x0300 .. 0x03ff */
-    0xa3bf, 0xa3bd, 0x005e, 0x007e, 0xa1c2, 0xa1c2, 0x003f, 0xa3bb,
-    0x0022, 0x003f, 0xa258, 0x0022, 0xa3be, 0x003f, 0x0022, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002c,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa1c5, 0xa1c5, 0x005f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa3bf, 0xa3bd, 0x003f, 0x003f, 0x0022, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa3bd, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003b, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa3bd, 0x0022, 0xa344, 0xa150,
-    0xa348, 0xa34a, 0xa34c, 0x003f, 0xa352, 0x003f, 0xa357, 0xa35b,
-    0xa364, 0xa344, 0xa345, 0xa346, 0xa347, 0xa348, 0xa349, 0xa34a,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1c2, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa344, 0xa345, 0xa346, 0xa347, 0xa348, 0xa349, 0xa34a,
     0xa34b, 0xa34c, 0xa34d, 0xa34e, 0xa34f, 0xa350, 0xa351, 0xa352,
     0xa353, 0xa354, 0x003f, 0xa355, 0xa356, 0xa357, 0xa358, 0xa359,
-    0xa35a, 0xa35b, 0xa34c, 0xa357, 0xa35c, 0xa360, 0xa362, 0xa364,
-    0xa36f, 0xa35c, 0xa35d, 0xa35e, 0xa35f, 0xa360, 0xa361, 0xa362,
+    0xa35a, 0xa35b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0xa35c, 0xa35d, 0xa35e, 0xa35f, 0xa360, 0xa361, 0xa362,
     0xa363, 0xa364, 0xa365, 0xa366, 0xa367, 0xa368, 0xa369, 0xa36a,
     0xa36b, 0xa36c, 0x003f, 0xa36d, 0xa36e, 0xa36f, 0xa370, 0xa371,
-    0xa372, 0xa373, 0xa364, 0xa36f, 0xa36a, 0xa36f, 0xa373, 0x003f,
-    0xa35d, 0xa363, 0xa357, 0xa357, 0xa357, 0xa370, 0xa36b, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa365, 0xa36c, 0x003f, 0x003f, 0xa34b, 0xa360, 0x003f, 0x003f,
-    0x003f, 0xa355, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1d00 .. 0x1dff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0041, 0x0042, 0x003f,
-    0x0044, 0x0045, 0x003f, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b,
-    0x004c, 0x004d, 0x004e, 0x003f, 0x004f, 0x003f, 0x0050, 0x0052,
-    0x0054, 0x0055, 0x0057, 0x0061, 0x003f, 0x003f, 0x003f, 0x0062,
-    0x0064, 0x0065, 0x003f, 0x003f, 0x003f, 0x0067, 0x003f, 0x006b,
-    0x006d, 0x003f, 0x006f, 0x003f, 0x003f, 0x003f, 0x0070, 0x0074,
-    0x0075, 0x003f, 0x003f, 0x0076, 0x003f, 0xa35d, 0xa35e, 0xa35f,
-    0xa370, 0xa371, 0x0069, 0x0072, 0x0075, 0x0076, 0xa35d, 0xa35e,
-    0xa36c, 0xa370, 0xa371, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x0063, 0x003f, 0x0064, 0x003f,
-    0x0066, 0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x007a, 0x003f, 0x003f, 0x003f, 0xa363,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1e00 .. 0x1eff */
-    0x0041, 0x0061, 0x0042, 0x0062, 0x0042, 0x0062, 0x0042, 0x0062,
-    0x0043, 0x0063, 0x0044, 0x0064, 0x0044, 0x0064, 0x0044, 0x0064,
-    0x0044, 0x0064, 0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0046, 0x0066,
-    0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068, 0x0048, 0x0068,
-    0x0048, 0x0068, 0x0048, 0x0068, 0x0049, 0x0069, 0x0049, 0x0069,
-    0x004b, 0x006b, 0x004b, 0x006b, 0x004b, 0x006b, 0x004c, 0x006c,
-    0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x004d, 0x006d,
-    0x004d, 0x006d, 0x004d, 0x006d, 0x004e, 0x006e, 0x004e, 0x006e,
-    0x004e, 0x006e, 0x004e, 0x006e, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0050, 0x0070, 0x0050, 0x0070,
-    0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072,
-    0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
-    0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074,
-    0x0054, 0x0074, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0056, 0x0076, 0x0056, 0x0076,
-    0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077,
-    0x0057, 0x0077, 0x0058, 0x0078, 0x0058, 0x0078, 0x0059, 0x0079,
-    0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0068, 0x0074,
-    0x0077, 0x0079, 0x003f, 0x0073, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
-    0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f,
-    0x004f, 0x006f, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
-    0x0055, 0x0075, 0x0059, 0x0079, 0x0059, 0x0079, 0x0059, 0x0079,
-    0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x1f00 .. 0x1fff */
-    0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c,
-    0xa344, 0xa344, 0xa344, 0xa344, 0xa344, 0xa344, 0xa344, 0xa344,
-    0xa360, 0xa360, 0xa360, 0xa360, 0xa360, 0xa360, 0x003f, 0x003f,
-    0xa348, 0xa348, 0xa348, 0xa348, 0xa348, 0xa348, 0x003f, 0x003f,
-    0xa362, 0xa362, 0xa362, 0xa362, 0xa362, 0xa362, 0xa362, 0xa362,
-    0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a,
-    0xa364, 0xa364, 0xa364, 0xa364, 0xa364, 0xa364, 0xa364, 0xa364,
-    0xa34c, 0xa34c, 0xa34c, 0xa34c, 0xa34c, 0xa34c, 0xa34c, 0xa34c,
-    0xa36a, 0xa36a, 0xa36a, 0xa36a, 0xa36a, 0xa36a, 0x003f, 0x003f,
-    0xa352, 0xa352, 0xa352, 0xa352, 0xa352, 0xa352, 0x003f, 0x003f,
-    0xa36f, 0xa36f, 0xa36f, 0xa36f, 0xa36f, 0xa36f, 0xa36f, 0xa36f,
-    0x003f, 0xa357, 0x003f, 0xa357, 0x003f, 0xa357, 0x003f, 0xa357,
-    0xa373, 0xa373, 0xa373, 0xa373, 0xa373, 0xa373, 0xa373, 0xa373,
-    0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b,
-    0xa35c, 0xa35c, 0xa360, 0xa360, 0xa362, 0xa362, 0xa364, 0xa364,
-    0xa36a, 0xa36a, 0xa36f, 0xa36f, 0xa373, 0xa373, 0x003f, 0x003f,
-    0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c,
-    0xa344, 0xa344, 0xa344, 0xa344, 0xa344, 0xa344, 0xa344, 0xa344,
-    0xa362, 0xa362, 0xa362, 0xa362, 0xa362, 0xa362, 0xa362, 0xa362,
-    0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a, 0xa34a,
-    0xa373, 0xa373, 0xa373, 0xa373, 0xa373, 0xa373, 0xa373, 0xa373,
-    0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b, 0xa35b,
-    0xa35c, 0xa35c, 0xa35c, 0xa35c, 0xa35c, 0x003f, 0xa35c, 0xa35c,
-    0xa344, 0xa344, 0xa344, 0xa344, 0xa344, 0x003f, 0xa364, 0x003f,
-    0x003f, 0x0022, 0xa362, 0xa362, 0xa362, 0x003f, 0xa362, 0xa362,
-    0xa348, 0xa348, 0xa34a, 0xa34a, 0xa34a, 0x003f, 0x003f, 0x003f,
-    0xa364, 0xa364, 0xa364, 0xa364, 0x003f, 0x003f, 0xa364, 0xa364,
-    0xa34c, 0xa34c, 0xa34c, 0xa34c, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa36f, 0xa36f, 0xa36f, 0xa36f, 0xa36c, 0xa36c, 0xa36f, 0xa36f,
-    0xa357, 0xa357, 0xa357, 0xa357, 0xa354, 0x0022, 0x0022, 0x0060,
-    0x003f, 0x003f, 0xa373, 0xa373, 0xa373, 0x003f, 0xa373, 0xa373,
-    0xa352, 0xa352, 0xa35b, 0xa35b, 0xa35b, 0xa3bd, 0x003f, 0x003f,
+    0xa372, 0xa373, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2000 .. 0x20ff */
-    0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
-    0x0020, 0x0020, 0x0020, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x002d, 0x002d, 0x003f, 0xa156, 0xa158, 0xa156, 0x003f, 0x005f,
-    0xa1a5, 0xa1a6, 0x002c, 0xa1a5, 0xa1a7, 0xa1a8, 0x002c, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x002e, 0xa14c, 0xa14b, 0xa145,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
-    0x003f, 0x003f, 0xa1ac, 0x0022, 0x003f, 0xa1ab, 0x003f, 0x003f,
-    0x003f, 0xa171, 0xa172, 0xa1b0, 0x0021, 0x003f, 0xa1c2, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa241, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa258, 0x0069, 0x003f, 0x003f, 0x0034, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0x002d, 0x003d, 0x0028, 0x0029, 0x006e,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
-    0x0038, 0x0039, 0x002b, 0x002d, 0x003d, 0x0028, 0x0029, 0x003f,
-    0x0061, 0x0065, 0x006f, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0063, 0x003f, 0x003f, 0x004c, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa156, 0xa158, 0xa277, 0xa1fc, 0x003f,
+    0xa1a5, 0xa1a6, 0x003f, 0x003f, 0xa1a7, 0xa1a8, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa145, 0x003f, 0xa3bb, 0xa14c, 0xa14b, 0xa145,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0xa1ac, 0xa1b2, 0x003f, 0xa1ab, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa1b0, 0x003f, 0x003f, 0xa1c3, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0xa3e1, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3248,26 +4370,26 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2100 .. 0x21ff */
-    0x003f, 0x003f, 0x0043, 0xa24a, 0x003f, 0xa1c1, 0x003f, 0x0045,
-    0x003f, 0xa24b, 0x0067, 0x0048, 0x0048, 0x0048, 0x0068, 0x0068,
-    0x0049, 0x0049, 0x004c, 0x006c, 0x003f, 0x004e, 0x003f, 0x003f,
-    0x0050, 0x0050, 0x0051, 0x0052, 0x0052, 0x0052, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x005a, 0x003f, 0xa35b, 0x003f,
-    0x005a, 0x003f, 0x004b, 0x0041, 0x0042, 0x0043, 0x0065, 0x0065,
-    0x0045, 0x0046, 0x003f, 0x004d, 0x006f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0069, 0x003f, 0x003f, 0xa36b, 0xa35e, 0xa346, 0xa353,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0044, 0x0064, 0x0065,
-    0x0069, 0x006a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0xa24a, 0x003f, 0xa1c1, 0x003f, 0x003f,
+    0x003f, 0xa24b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa2b9, 0xa2ba, 0xa2bb, 0xa2bc, 0xa2bd, 0xa2be, 0xa2bf, 0xa2c0,
-    0xa2c1, 0xa2c2, 0x003f, 0x003f, 0x004c, 0x0043, 0x0044, 0x004d,
-    0x0069, 0x003f, 0x003f, 0x003f, 0x0076, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x0078, 0x003f, 0x003f, 0x006c, 0x0063, 0x0064, 0x006d,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1f6, 0xa1f4, 0xa1f7, 0xa1f5, 0x002d, 0x007c, 0xa1f8, 0xa1f9,
-    0xa1fb, 0xa1fa, 0xa1f6, 0xa1f7, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002d, 0x003f,
+    0xa2c1, 0xa2c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1f6, 0xa1f4, 0xa1f7, 0xa1f5, 0x003f, 0x003f, 0xa1f8, 0xa1f9,
+    0xa1fb, 0xa1fa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3281,18 +4403,18 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2200 .. 0x22ff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x002d, 0xa1d3, 0x003f, 0xa241, 0x005c, 0x002a,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa241, 0xa242, 0x003f,
     0xa258, 0x003f, 0xa1d4, 0x003f, 0x003f, 0x003f, 0xa1db, 0xa1e8,
-    0xa1e7, 0x003f, 0x003f, 0xa1fd, 0xa1fd, 0xa1fc, 0xa1fc, 0x003f,
+    0xa1e7, 0x003f, 0x003f, 0xa1fd, 0x003f, 0xa1fc, 0x003f, 0x003f,
     0x003f, 0xa1e4, 0xa1e5, 0xa1ec, 0x003f, 0x003f, 0xa1ed, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0xa1ef, 0xa1ee, 0x003a, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x007e, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x007e, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa1ef, 0xa1ee, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa1dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1da, 0xa1dd, 0xa1dd, 0xa1dd, 0x003f, 0x003f, 0xa1d8, 0xa1d9,
-    0x003f, 0x003f, 0xa16d, 0xa16e, 0x003f, 0x003f, 0x003c, 0x003e,
+    0xa1da, 0xa1dd, 0x003f, 0xa1dd, 0x003f, 0x003f, 0xa1d8, 0xa1d9,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3305,5 +4427,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1e9,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa150, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3314,86 +4436,53 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2300 .. 0x23ff */
-    0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0xa171, 0xa172, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2400 .. 0x24ff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038,
-    0x0039, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0042,
-    0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a,
-    0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052,
-    0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a,
-    0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068,
-    0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070,
-    0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078,
-    0x0079, 0x007a, 0x0030, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa15b,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2500 .. 0x25ff */
-    0xa277, 0xa277, 0xa278, 0xa278, 0x002d, 0x002d, 0x007c, 0x007c,
-    0x002d, 0x002d, 0x007c, 0x007c, 0xa27a, 0xa27a, 0xa27a, 0xa27a,
-    0xa27b, 0xa27b, 0xa27b, 0xa27b, 0xa27c, 0xa27c, 0xa27c, 0xa27c,
-    0xa27d, 0xa27d, 0xa27d, 0xa27d, 0xa275, 0xa275, 0xa275, 0xa275,
-    0xa275, 0xa275, 0xa275, 0xa275, 0xa274, 0xa274, 0xa274, 0xa274,
-    0xa274, 0xa274, 0xa274, 0xa274, 0xa273, 0xa273, 0xa273, 0xa273,
-    0xa273, 0xa273, 0xa273, 0xa273, 0xa272, 0xa272, 0xa272, 0xa272,
-    0xa272, 0xa272, 0xa272, 0xa272, 0xa271, 0xa271, 0xa271, 0xa271,
-    0xa271, 0xa271, 0xa271, 0xa271, 0xa271, 0xa271, 0xa271, 0xa271,
-    0xa271, 0xa271, 0xa271, 0xa271, 0x002d, 0x002d, 0x007c, 0x007c,
-    0xa2a4, 0xf9f8, 0xf9e6, 0xf9ef, 0xf9dd, 0xf9e8, 0xf9f1, 0xf9df,
-    0xf9ec, 0xf9f5, 0xf9e3, 0xf9ee, 0xf9f7, 0xf9e5, 0xa2a5, 0xf9f2,
-    0xf9e0, 0xa2a7, 0xf9f4, 0xf9e2, 0xf9e7, 0xf9f0, 0xf9de, 0xf9ed,
-    0xf9f6, 0xf9e4, 0xa2a6, 0xf9f3, 0xf9e1, 0xa27e, 0xa2a1, 0xa2a3,
-    0xa2a2, 0xa2ac, 0xa2ad, 0xa2ae, 0xa15a, 0x007c, 0xa15a, 0x007c,
-    0xa15a, 0x007c, 0xa15a, 0x007c, 0xa15a, 0x007c, 0xa15a, 0x007c,
+    0xa277, 0x003f, 0xa278, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa27a, 0x003f, 0x003f, 0x003f,
+    0xa27b, 0x003f, 0x003f, 0x003f, 0xa27c, 0x003f, 0x003f, 0x003f,
+    0xa27d, 0x003f, 0x003f, 0x003f, 0xa275, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa274, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa273, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa272, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa271, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xf9f9, 0xf9f8, 0xf9e6, 0xf9ef, 0xf9dd, 0xf9e8, 0xf9f1, 0xf9df,
+    0xf9ec, 0xf9f5, 0xf9e3, 0xf9ee, 0xf9f7, 0xf9e5, 0xf9e9, 0xf9f2,
+    0xf9e0, 0xf9eb, 0xf9f4, 0xf9e2, 0xf9e7, 0xf9f0, 0xf9de, 0xf9ed,
+    0xf9f6, 0xf9e4, 0xf9ea, 0xf9f3, 0xf9e1, 0xa27e, 0xa2a1, 0xa2a3,
+    0xa2a2, 0xa2ac, 0xa2ad, 0xa2ae, 0xa15a, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0xa262, 0xa263, 0xa264, 0xa265, 0xa266, 0xa267, 0xa268,
     0xa269, 0xa270, 0xa26f, 0xa26e, 0xa26d, 0xa26c, 0xa26b, 0xa26a,
@@ -3409,101 +4498,35 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0xa2a8, 0xa2a9, 0xa2ab, 0xa2aa, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1b3,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0x2600 .. 0x26ff */
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1b9, 0xa1b8, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa1f0, 0x003f, 0xa1f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2e00 .. 0x2eff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa5c0,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0x2f00 .. 0x2fff */
-    0xa440, 0x003f, 0x003f, 0x003f, 0xa441, 0x003f, 0xa447, 0x003f,
-    0xa448, 0xa449, 0xa44a, 0xa44b, 0x003f, 0x003f, 0x003f, 0xa44c,
-    0xc942, 0xa44d, 0xa44f, 0x003f, 0xa450, 0xc943, 0x003f, 0xa2cc,
-    0xa452, 0x003f, 0xc944, 0x003f, 0xa453, 0xa466, 0xc949, 0xa467,
-    0xa468, 0x003f, 0x003f, 0xa469, 0xa46a, 0xa46b, 0xa46c, 0x003f,
-    0xa46f, 0xa470, 0xa471, 0xa472, 0xc94b, 0xa473, 0x003f, 0xa475,
-    0xa476, 0xa479, 0xa47a, 0x003f, 0x003f, 0x003f, 0xa47b, 0xa47c,
-    0xa47d, 0x003f, 0x003f, 0xc94c, 0xa4df, 0xa4e0, 0xa4e1, 0xa4e2,
-    0xa4e4, 0x003f, 0xa4e5, 0xa4e6, 0xa4e7, 0xa4e8, 0x003f, 0xa4e9,
-    0xa4ea, 0xa4eb, 0xa4ec, 0xa4ed, 0xa4ee, 0xa4ef, 0xc95f, 0xa4f0,
-    0xa4f1, 0xa4f2, 0xa4f3, 0xc961, 0xa4f4, 0xa4f5, 0xa4f6, 0xa4f7,
-    0xa4f8, 0xc962, 0xa4f9, 0xa4fa, 0xa4fb, 0xa4fc, 0xa5c8, 0xa5c9,
-    0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5d0, 0xa5d4, 0x003f,
-    0x003f, 0xa5d5, 0xa5d6, 0xa5d7, 0xa5d8, 0xa5d9, 0xa5da, 0xa5db,
-    0xa5dc, 0xc9a8, 0xa5dd, 0xa5de, 0xa5df, 0xa6cb, 0xa6cc, 0xa6cd,
-    0xa6ce, 0xca49, 0xa6cf, 0xa6d0, 0xa6d1, 0xa6d3, 0xa6d4, 0xa6d5,
-    0xa6d6, 0xa6d7, 0xa6da, 0xa6db, 0xa6dc, 0xa6dd, 0xa6de, 0xa6df,
-    0xa6e0, 0xa6e1, 0xa6e2, 0xca4a, 0xca4f, 0xa6e4, 0xa6e5, 0xa6e6,
-    0xa6e7, 0xca50, 0xa8a3, 0xa8a4, 0xa8a5, 0xa8a6, 0xa8a7, 0xa8a8,
-    0xcba4, 0xa8a9, 0xa8aa, 0xa8ab, 0xa8ac, 0xa8ad, 0xa8ae, 0xa8af,
-    0xa8b0, 0x003f, 0xa8b6, 0xa8bb, 0xa8bc, 0xa8bd, 0xaaf7, 0xaaf8,
-    0xaaf9, 0xaafa, 0x003f, 0xab41, 0xab42, 0x003f, 0xab44, 0xadb1,
-    0xadb2, 0xadb3, 0xadb4, 0xadb5, 0xadb6, 0xadb7, 0xadb8, 0xadb9,
-    0xadba, 0xadbb, 0xb0a8, 0xb0a9, 0xb0aa, 0xd449, 0xb0ab, 0xd44a,
-    0xb0ac, 0xb0ad, 0xb3bd, 0xb3be, 0xb3bf, 0xb3c0, 0xb3c1, 0xb3c2,
-    0xb6c0, 0xb6c1, 0xb6c2, 0xdcb0, 0xe0ef, 0xb9a9, 0xb9aa, 0xb9ab,
-    0xbbf3, 0xbbf4, 0xbea6, 0xc073, 0xc074, 0xefb6, 0x003f, 0x003f,
+    0x003f, 0xa1f3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1f0, 0xa1f2, 0xa1f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3515,9 +4538,9 @@
     0xa171, 0xa172, 0xa16d, 0xa16e, 0xa175, 0xa176, 0xa179, 0xa17a,
     0xa169, 0xa16a, 0xa245, 0x003f, 0xa165, 0xa166, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x005b, 0x005d, 0x003f, 0xa1a9, 0xa1aa, 0x002c,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa1e3, 0xa1a9, 0xa1aa, 0x003f,
     0x003f, 0xa2c3, 0xa2c4, 0xa2c5, 0xa2c6, 0xa2c7, 0xa2c8, 0xa2c9,
     0xa2ca, 0xa2cb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa245, 0x003f,
-    0xa2cc, 0xa2cd, 0xa2ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa1ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3582,22 +4605,22 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0xa440, 0xa447, 0xa454, 0xa57c, 0xa4ad, 0xa4bb, 0xa443, 0xa44b,
-    0xa445, 0xa2cc, 0xa4eb, 0xa4f5, 0xa4f4, 0xa4ec, 0xaaf7, 0xa467,
+    0xa445, 0xa451, 0xa4eb, 0xa4f5, 0xa4f4, 0xa4ec, 0xaaf7, 0xa467,
     0xa4e9, 0xaee8, 0xa6b3, 0xaac0, 0xa657, 0xaf53, 0xb05d, 0xafac,
-    0x003f, 0xafb5, 0xa86b, 0xa46b, 0xbe41, 0xc075, 0xa64c, 0xaa60,
-    0xb6b5, 0xa5f0, 0x003f, 0xa1c0, 0xa457, 0xa4a4, 0xa455, 0xa5aa,
-    0xa56b, 0x003f, 0xa976, 0x003f, 0xbaca, 0xa5f8, 0xb8ea, 0xa8f3,
+    0xb3d2, 0xa54e, 0xa949, 0xbec7, 0xbaca, 0xa5f8, 0xb8ea, 0xa8f3,
+    0xb2bd, 0xa5f0, 0xa6db, 0xa6dc, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa440, 0xa447, 0xa454, 0xa57c, 0xa4ad, 0xa4bb, 0xa443, 0xa44b,
+    0xa445, 0xa451, 0xa4eb, 0xa4f5, 0xa4f4, 0xa4ec, 0xaaf7, 0xa467,
+    0xa4e9, 0xaee8, 0xa6b3, 0xaac0, 0xa657, 0xaf53, 0xb05d, 0xafac,
+    0xb3d2, 0xafb5, 0xa86b, 0xa46b, 0xbe41, 0xc075, 0xa64c, 0xaa60,
+    0xb6b5, 0xa5f0, 0xbc67, 0xa1c0, 0xa457, 0xa4a4, 0xa455, 0xa5aa,
+    0xa56b, 0xc2e5, 0xa976, 0xbec7, 0xbaca, 0xa5f8, 0xb8ea, 0xa8f3,
     0xa95d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -3817,5 +4840,5 @@
     0xe145, 0xb9bc, 0x003f, 0x003f, 0xe8fa, 0x003f, 0x003f, 0xf3fd,
     0x003f, 0xa4c7, 0x003f, 0x003f, 0xcbd8, 0xcdf4, 0xb0d0, 0xb0ce,
-    0xb0cf, 0xa2cc, 0x003f, 0xa464, 0xa2cd, 0xa2ce, 0x003f, 0xa4c9,
+    0xb0cf, 0xa451, 0x003f, 0xa464, 0xa2cd, 0xa4ca, 0x003f, 0xa4c9,
     0xa4c8, 0xa563, 0xa562, 0x003f, 0xc96d, 0xc9c3, 0x003f, 0x003f,
     0x003f, 0xa8f5, 0xa8f2, 0xa8f4, 0xa8f3, 0x003f, 0x003f, 0xab6e,
@@ -6349,4 +7372,829 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    /* 0xe000 .. 0xe0ff */
+    0xfa40, 0xfa41, 0xfa42, 0xfa43, 0xfa44, 0xfa45, 0xfa46, 0xfa47,
+    0xfa48, 0xfa49, 0xfa4a, 0xfa4b, 0xfa4c, 0xfa4d, 0xfa4e, 0xfa4f,
+    0xfa50, 0xfa51, 0xfa52, 0xfa53, 0xfa54, 0xfa55, 0xfa56, 0xfa57,
+    0xfa58, 0xfa59, 0xfa5a, 0xfa5b, 0xfa5c, 0xfa5d, 0xfa5e, 0xfa5f,
+    0xfa60, 0xfa61, 0xfa62, 0xfa63, 0xfa64, 0xfa65, 0xfa66, 0xfa67,
+    0xfa68, 0xfa69, 0xfa6a, 0xfa6b, 0xfa6c, 0xfa6d, 0xfa6e, 0xfa6f,
+    0xfa70, 0xfa71, 0xfa72, 0xfa73, 0xfa74, 0xfa75, 0xfa76, 0xfa77,
+    0xfa78, 0xfa79, 0xfa7a, 0xfa7b, 0xfa7c, 0xfa7d, 0xfa7e, 0xfaa1,
+    0xfaa2, 0xfaa3, 0xfaa4, 0xfaa5, 0xfaa6, 0xfaa7, 0xfaa8, 0xfaa9,
+    0xfaaa, 0xfaab, 0xfaac, 0xfaad, 0xfaae, 0xfaaf, 0xfab0, 0xfab1,
+    0xfab2, 0xfab3, 0xfab4, 0xfab5, 0xfab6, 0xfab7, 0xfab8, 0xfab9,
+    0xfaba, 0xfabb, 0xfabc, 0xfabd, 0xfabe, 0xfabf, 0xfac0, 0xfac1,
+    0xfac2, 0xfac3, 0xfac4, 0xfac5, 0xfac6, 0xfac7, 0xfac8, 0xfac9,
+    0xfaca, 0xfacb, 0xfacc, 0xfacd, 0xface, 0xfacf, 0xfad0, 0xfad1,
+    0xfad2, 0xfad3, 0xfad4, 0xfad5, 0xfad6, 0xfad7, 0xfad8, 0xfad9,
+    0xfada, 0xfadb, 0xfadc, 0xfadd, 0xfade, 0xfadf, 0xfae0, 0xfae1,
+    0xfae2, 0xfae3, 0xfae4, 0xfae5, 0xfae6, 0xfae7, 0xfae8, 0xfae9,
+    0xfaea, 0xfaeb, 0xfaec, 0xfaed, 0xfaee, 0xfaef, 0xfaf0, 0xfaf1,
+    0xfaf2, 0xfaf3, 0xfaf4, 0xfaf5, 0xfaf6, 0xfaf7, 0xfaf8, 0xfaf9,
+    0xfafa, 0xfafb, 0xfafc, 0xfafd, 0xfafe, 0xfb40, 0xfb41, 0xfb42,
+    0xfb43, 0xfb44, 0xfb45, 0xfb46, 0xfb47, 0xfb48, 0xfb49, 0xfb4a,
+    0xfb4b, 0xfb4c, 0xfb4d, 0xfb4e, 0xfb4f, 0xfb50, 0xfb51, 0xfb52,
+    0xfb53, 0xfb54, 0xfb55, 0xfb56, 0xfb57, 0xfb58, 0xfb59, 0xfb5a,
+    0xfb5b, 0xfb5c, 0xfb5d, 0xfb5e, 0xfb5f, 0xfb60, 0xfb61, 0xfb62,
+    0xfb63, 0xfb64, 0xfb65, 0xfb66, 0xfb67, 0xfb68, 0xfb69, 0xfb6a,
+    0xfb6b, 0xfb6c, 0xfb6d, 0xfb6e, 0xfb6f, 0xfb70, 0xfb71, 0xfb72,
+    0xfb73, 0xfb74, 0xfb75, 0xfb76, 0xfb77, 0xfb78, 0xfb79, 0xfb7a,
+    0xfb7b, 0xfb7c, 0xfb7d, 0xfb7e, 0xfba1, 0xfba2, 0xfba3, 0xfba4,
+    0xfba5, 0xfba6, 0xfba7, 0xfba8, 0xfba9, 0xfbaa, 0xfbab, 0xfbac,
+    0xfbad, 0xfbae, 0xfbaf, 0xfbb0, 0xfbb1, 0xfbb2, 0xfbb3, 0xfbb4,
+    0xfbb5, 0xfbb6, 0xfbb7, 0xfbb8, 0xfbb9, 0xfbba, 0xfbbb, 0xfbbc,
+    0xfbbd, 0xfbbe, 0xfbbf, 0xfbc0, 0xfbc1, 0xfbc2, 0xfbc3, 0xfbc4,
+    /* 0xe100 .. 0xe1ff */
+    0xfbc5, 0xfbc6, 0xfbc7, 0xfbc8, 0xfbc9, 0xfbca, 0xfbcb, 0xfbcc,
+    0xfbcd, 0xfbce, 0xfbcf, 0xfbd0, 0xfbd1, 0xfbd2, 0xfbd3, 0xfbd4,
+    0xfbd5, 0xfbd6, 0xfbd7, 0xfbd8, 0xfbd9, 0xfbda, 0xfbdb, 0xfbdc,
+    0xfbdd, 0xfbde, 0xfbdf, 0xfbe0, 0xfbe1, 0xfbe2, 0xfbe3, 0xfbe4,
+    0xfbe5, 0xfbe6, 0xfbe7, 0xfbe8, 0xfbe9, 0xfbea, 0xfbeb, 0xfbec,
+    0xfbed, 0xfbee, 0xfbef, 0xfbf0, 0xfbf1, 0xfbf2, 0xfbf3, 0xfbf4,
+    0xfbf5, 0xfbf6, 0xfbf7, 0xfbf8, 0xfbf9, 0xfbfa, 0xfbfb, 0xfbfc,
+    0xfbfd, 0xfbfe, 0xfc40, 0xfc41, 0xfc42, 0xfc43, 0xfc44, 0xfc45,
+    0xfc46, 0xfc47, 0xfc48, 0xfc49, 0xfc4a, 0xfc4b, 0xfc4c, 0xfc4d,
+    0xfc4e, 0xfc4f, 0xfc50, 0xfc51, 0xfc52, 0xfc53, 0xfc54, 0xfc55,
+    0xfc56, 0xfc57, 0xfc58, 0xfc59, 0xfc5a, 0xfc5b, 0xfc5c, 0xfc5d,
+    0xfc5e, 0xfc5f, 0xfc60, 0xfc61, 0xfc62, 0xfc63, 0xfc64, 0xfc65,
+    0xfc66, 0xfc67, 0xfc68, 0xfc69, 0xfc6a, 0xfc6b, 0xfc6c, 0xfc6d,
+    0xfc6e, 0xfc6f, 0xfc70, 0xfc71, 0xfc72, 0xfc73, 0xfc74, 0xfc75,
+    0xfc76, 0xfc77, 0xfc78, 0xfc79, 0xfc7a, 0xfc7b, 0xfc7c, 0xfc7d,
+    0xfc7e, 0xfca1, 0xfca2, 0xfca3, 0xfca4, 0xfca5, 0xfca6, 0xfca7,
+    0xfca8, 0xfca9, 0xfcaa, 0xfcab, 0xfcac, 0xfcad, 0xfcae, 0xfcaf,
+    0xfcb0, 0xfcb1, 0xfcb2, 0xfcb3, 0xfcb4, 0xfcb5, 0xfcb6, 0xfcb7,
+    0xfcb8, 0xfcb9, 0xfcba, 0xfcbb, 0xfcbc, 0xfcbd, 0xfcbe, 0xfcbf,
+    0xfcc0, 0xfcc1, 0xfcc2, 0xfcc3, 0xfcc4, 0xfcc5, 0xfcc6, 0xfcc7,
+    0xfcc8, 0xfcc9, 0xfcca, 0xfccb, 0xfccc, 0xfccd, 0xfcce, 0xfccf,
+    0xfcd0, 0xfcd1, 0xfcd2, 0xfcd3, 0xfcd4, 0xfcd5, 0xfcd6, 0xfcd7,
+    0xfcd8, 0xfcd9, 0xfcda, 0xfcdb, 0xfcdc, 0xfcdd, 0xfcde, 0xfcdf,
+    0xfce0, 0xfce1, 0xfce2, 0xfce3, 0xfce4, 0xfce5, 0xfce6, 0xfce7,
+    0xfce8, 0xfce9, 0xfcea, 0xfceb, 0xfcec, 0xfced, 0xfcee, 0xfcef,
+    0xfcf0, 0xfcf1, 0xfcf2, 0xfcf3, 0xfcf4, 0xfcf5, 0xfcf6, 0xfcf7,
+    0xfcf8, 0xfcf9, 0xfcfa, 0xfcfb, 0xfcfc, 0xfcfd, 0xfcfe, 0xfd40,
+    0xfd41, 0xfd42, 0xfd43, 0xfd44, 0xfd45, 0xfd46, 0xfd47, 0xfd48,
+    0xfd49, 0xfd4a, 0xfd4b, 0xfd4c, 0xfd4d, 0xfd4e, 0xfd4f, 0xfd50,
+    0xfd51, 0xfd52, 0xfd53, 0xfd54, 0xfd55, 0xfd56, 0xfd57, 0xfd58,
+    0xfd59, 0xfd5a, 0xfd5b, 0xfd5c, 0xfd5d, 0xfd5e, 0xfd5f, 0xfd60,
+    0xfd61, 0xfd62, 0xfd63, 0xfd64, 0xfd65, 0xfd66, 0xfd67, 0xfd68,
+    /* 0xe200 .. 0xe2ff */
+    0xfd69, 0xfd6a, 0xfd6b, 0xfd6c, 0xfd6d, 0xfd6e, 0xfd6f, 0xfd70,
+    0xfd71, 0xfd72, 0xfd73, 0xfd74, 0xfd75, 0xfd76, 0xfd77, 0xfd78,
+    0xfd79, 0xfd7a, 0xfd7b, 0xfd7c, 0xfd7d, 0xfd7e, 0xfda1, 0xfda2,
+    0xfda3, 0xfda4, 0xfda5, 0xfda6, 0xfda7, 0xfda8, 0xfda9, 0xfdaa,
+    0xfdab, 0xfdac, 0xfdad, 0xfdae, 0xfdaf, 0xfdb0, 0xfdb1, 0xfdb2,
+    0xfdb3, 0xfdb4, 0xfdb5, 0xfdb6, 0xfdb7, 0xfdb8, 0xfdb9, 0xfdba,
+    0xfdbb, 0xfdbc, 0xfdbd, 0xfdbe, 0xfdbf, 0xfdc0, 0xfdc1, 0xfdc2,
+    0xfdc3, 0xfdc4, 0xfdc5, 0xfdc6, 0xfdc7, 0xfdc8, 0xfdc9, 0xfdca,
+    0xfdcb, 0xfdcc, 0xfdcd, 0xfdce, 0xfdcf, 0xfdd0, 0xfdd1, 0xfdd2,
+    0xfdd3, 0xfdd4, 0xfdd5, 0xfdd6, 0xfdd7, 0xfdd8, 0xfdd9, 0xfdda,
+    0xfddb, 0xfddc, 0xfddd, 0xfdde, 0xfddf, 0xfde0, 0xfde1, 0xfde2,
+    0xfde3, 0xfde4, 0xfde5, 0xfde6, 0xfde7, 0xfde8, 0xfde9, 0xfdea,
+    0xfdeb, 0xfdec, 0xfded, 0xfdee, 0xfdef, 0xfdf0, 0xfdf1, 0xfdf2,
+    0xfdf3, 0xfdf4, 0xfdf5, 0xfdf6, 0xfdf7, 0xfdf8, 0xfdf9, 0xfdfa,
+    0xfdfb, 0xfdfc, 0xfdfd, 0xfdfe, 0xfe40, 0xfe41, 0xfe42, 0xfe43,
+    0xfe44, 0xfe45, 0xfe46, 0xfe47, 0xfe48, 0xfe49, 0xfe4a, 0xfe4b,
+    0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, 0xfe50, 0xfe51, 0xfe52, 0xfe53,
+    0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe58, 0xfe59, 0xfe5a, 0xfe5b,
+    0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0xfe62, 0xfe63,
+    0xfe64, 0xfe65, 0xfe66, 0xfe67, 0xfe68, 0xfe69, 0xfe6a, 0xfe6b,
+    0xfe6c, 0xfe6d, 0xfe6e, 0xfe6f, 0xfe70, 0xfe71, 0xfe72, 0xfe73,
+    0xfe74, 0xfe75, 0xfe76, 0xfe77, 0xfe78, 0xfe79, 0xfe7a, 0xfe7b,
+    0xfe7c, 0xfe7d, 0xfe7e, 0xfea1, 0xfea2, 0xfea3, 0xfea4, 0xfea5,
+    0xfea6, 0xfea7, 0xfea8, 0xfea9, 0xfeaa, 0xfeab, 0xfeac, 0xfead,
+    0xfeae, 0xfeaf, 0xfeb0, 0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4, 0xfeb5,
+    0xfeb6, 0xfeb7, 0xfeb8, 0xfeb9, 0xfeba, 0xfebb, 0xfebc, 0xfebd,
+    0xfebe, 0xfebf, 0xfec0, 0xfec1, 0xfec2, 0xfec3, 0xfec4, 0xfec5,
+    0xfec6, 0xfec7, 0xfec8, 0xfec9, 0xfeca, 0xfecb, 0xfecc, 0xfecd,
+    0xfece, 0xfecf, 0xfed0, 0xfed1, 0xfed2, 0xfed3, 0xfed4, 0xfed5,
+    0xfed6, 0xfed7, 0xfed8, 0xfed9, 0xfeda, 0xfedb, 0xfedc, 0xfedd,
+    0xfede, 0xfedf, 0xfee0, 0xfee1, 0xfee2, 0xfee3, 0xfee4, 0xfee5,
+    0xfee6, 0xfee7, 0xfee8, 0xfee9, 0xfeea, 0xfeeb, 0xfeec, 0xfeed,
+    /* 0xe300 .. 0xe3ff */
+    0xfeee, 0xfeef, 0xfef0, 0xfef1, 0xfef2, 0xfef3, 0xfef4, 0xfef5,
+    0xfef6, 0xfef7, 0xfef8, 0xfef9, 0xfefa, 0xfefb, 0xfefc, 0xfefd,
+    0xfefe, 0x8e40, 0x8e41, 0x8e42, 0x8e43, 0x8e44, 0x8e45, 0x8e46,
+    0x8e47, 0x8e48, 0x8e49, 0x8e4a, 0x8e4b, 0x8e4c, 0x8e4d, 0x8e4e,
+    0x8e4f, 0x8e50, 0x8e51, 0x8e52, 0x8e53, 0x8e54, 0x8e55, 0x8e56,
+    0x8e57, 0x8e58, 0x8e59, 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e,
+    0x8e5f, 0x8e60, 0x8e61, 0x8e62, 0x8e63, 0x8e64, 0x8e65, 0x8e66,
+    0x8e67, 0x8e68, 0x8e69, 0x8e6a, 0x8e6b, 0x8e6c, 0x8e6d, 0x8e6e,
+    0x8e6f, 0x8e70, 0x8e71, 0x8e72, 0x8e73, 0x8e74, 0x8e75, 0x8e76,
+    0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7c, 0x8e7d, 0x8e7e,
+    0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, 0x8ea8,
+    0x8ea9, 0x8eaa, 0x8eab, 0x8eac, 0x8ead, 0x8eae, 0x8eaf, 0x8eb0,
+    0x8eb1, 0x8eb2, 0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, 0x8eb8,
+    0x8eb9, 0x8eba, 0x8ebb, 0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, 0x8ec0,
+    0x8ec1, 0x8ec2, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8,
+    0x8ec9, 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ece, 0x8ecf, 0x8ed0,
+    0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, 0x8ed8,
+    0x8ed9, 0x8eda, 0x8edb, 0x8edc, 0x8edd, 0x8ede, 0x8edf, 0x8ee0,
+    0x8ee1, 0x8ee2, 0x8ee3, 0x8ee4, 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8,
+    0x8ee9, 0x8eea, 0x8eeb, 0x8eec, 0x8eed, 0x8eee, 0x8eef, 0x8ef0,
+    0x8ef1, 0x8ef2, 0x8ef3, 0x8ef4, 0x8ef5, 0x8ef6, 0x8ef7, 0x8ef8,
+    0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8f40, 0x8f41,
+    0x8f42, 0x8f43, 0x8f44, 0x8f45, 0x8f46, 0x8f47, 0x8f48, 0x8f49,
+    0x8f4a, 0x8f4b, 0x8f4c, 0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, 0x8f51,
+    0x8f52, 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59,
+    0x8f5a, 0x8f5b, 0x8f5c, 0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, 0x8f61,
+    0x8f62, 0x8f63, 0x8f64, 0x8f65, 0x8f66, 0x8f67, 0x8f68, 0x8f69,
+    0x8f6a, 0x8f6b, 0x8f6c, 0x8f6d, 0x8f6e, 0x8f6f, 0x8f70, 0x8f71,
+    0x8f72, 0x8f73, 0x8f74, 0x8f75, 0x8f76, 0x8f77, 0x8f78, 0x8f79,
+    0x8f7a, 0x8f7b, 0x8f7c, 0x8f7d, 0x8f7e, 0x8fa1, 0x8fa2, 0x8fa3,
+    0x8fa4, 0x8fa5, 0x8fa6, 0x8fa7, 0x8fa8, 0x8fa9, 0x8faa, 0x8fab,
+    0x8fac, 0x8fad, 0x8fae, 0x8faf, 0x8fb0, 0x8fb1, 0x8fb2, 0x8fb3,
+    /* 0xe400 .. 0xe4ff */
+    0x8fb4, 0x8fb5, 0x8fb6, 0x8fb7, 0x8fb8, 0x8fb9, 0x8fba, 0x8fbb,
+    0x8fbc, 0x8fbd, 0x8fbe, 0x8fbf, 0x8fc0, 0x8fc1, 0x8fc2, 0x8fc3,
+    0x8fc4, 0x8fc5, 0x8fc6, 0x8fc7, 0x8fc8, 0x8fc9, 0x8fca, 0x8fcb,
+    0x8fcc, 0x8fcd, 0x8fce, 0x8fcf, 0x8fd0, 0x8fd1, 0x8fd2, 0x8fd3,
+    0x8fd4, 0x8fd5, 0x8fd6, 0x8fd7, 0x8fd8, 0x8fd9, 0x8fda, 0x8fdb,
+    0x8fdc, 0x8fdd, 0x8fde, 0x8fdf, 0x8fe0, 0x8fe1, 0x8fe2, 0x8fe3,
+    0x8fe4, 0x8fe5, 0x8fe6, 0x8fe7, 0x8fe8, 0x8fe9, 0x8fea, 0x8feb,
+    0x8fec, 0x8fed, 0x8fee, 0x8fef, 0x8ff0, 0x8ff1, 0x8ff2, 0x8ff3,
+    0x8ff4, 0x8ff5, 0x8ff6, 0x8ff7, 0x8ff8, 0x8ff9, 0x8ffa, 0x8ffb,
+    0x8ffc, 0x8ffd, 0x8ffe, 0x9040, 0x9041, 0x9042, 0x9043, 0x9044,
+    0x9045, 0x9046, 0x9047, 0x9048, 0x9049, 0x904a, 0x904b, 0x904c,
+    0x904d, 0x904e, 0x904f, 0x9050, 0x9051, 0x9052, 0x9053, 0x9054,
+    0x9055, 0x9056, 0x9057, 0x9058, 0x9059, 0x905a, 0x905b, 0x905c,
+    0x905d, 0x905e, 0x905f, 0x9060, 0x9061, 0x9062, 0x9063, 0x9064,
+    0x9065, 0x9066, 0x9067, 0x9068, 0x9069, 0x906a, 0x906b, 0x906c,
+    0x906d, 0x906e, 0x906f, 0x9070, 0x9071, 0x9072, 0x9073, 0x9074,
+    0x9075, 0x9076, 0x9077, 0x9078, 0x9079, 0x907a, 0x907b, 0x907c,
+    0x907d, 0x907e, 0x90a1, 0x90a2, 0x90a3, 0x90a4, 0x90a5, 0x90a6,
+    0x90a7, 0x90a8, 0x90a9, 0x90aa, 0x90ab, 0x90ac, 0x90ad, 0x90ae,
+    0x90af, 0x90b0, 0x90b1, 0x90b2, 0x90b3, 0x90b4, 0x90b5, 0x90b6,
+    0x90b7, 0x90b8, 0x90b9, 0x90ba, 0x90bb, 0x90bc, 0x90bd, 0x90be,
+    0x90bf, 0x90c0, 0x90c1, 0x90c2, 0x90c3, 0x90c4, 0x90c5, 0x90c6,
+    0x90c7, 0x90c8, 0x90c9, 0x90ca, 0x90cb, 0x90cc, 0x90cd, 0x90ce,
+    0x90cf, 0x90d0, 0x90d1, 0x90d2, 0x90d3, 0x90d4, 0x90d5, 0x90d6,
+    0x90d7, 0x90d8, 0x90d9, 0x90da, 0x90db, 0x90dc, 0x90dd, 0x90de,
+    0x90df, 0x90e0, 0x90e1, 0x90e2, 0x90e3, 0x90e4, 0x90e5, 0x90e6,
+    0x90e7, 0x90e8, 0x90e9, 0x90ea, 0x90eb, 0x90ec, 0x90ed, 0x90ee,
+    0x90ef, 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f4, 0x90f5, 0x90f6,
+    0x90f7, 0x90f8, 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90fd, 0x90fe,
+    0x9140, 0x9141, 0x9142, 0x9143, 0x9144, 0x9145, 0x9146, 0x9147,
+    0x9148, 0x9149, 0x914a, 0x914b, 0x914c, 0x914d, 0x914e, 0x914f,
+    0x9150, 0x9151, 0x9152, 0x9153, 0x9154, 0x9155, 0x9156, 0x9157,
+    /* 0xe500 .. 0xe5ff */
+    0x9158, 0x9159, 0x915a, 0x915b, 0x915c, 0x915d, 0x915e, 0x915f,
+    0x9160, 0x9161, 0x9162, 0x9163, 0x9164, 0x9165, 0x9166, 0x9167,
+    0x9168, 0x9169, 0x916a, 0x916b, 0x916c, 0x916d, 0x916e, 0x916f,
+    0x9170, 0x9171, 0x9172, 0x9173, 0x9174, 0x9175, 0x9176, 0x9177,
+    0x9178, 0x9179, 0x917a, 0x917b, 0x917c, 0x917d, 0x917e, 0x91a1,
+    0x91a2, 0x91a3, 0x91a4, 0x91a5, 0x91a6, 0x91a7, 0x91a8, 0x91a9,
+    0x91aa, 0x91ab, 0x91ac, 0x91ad, 0x91ae, 0x91af, 0x91b0, 0x91b1,
+    0x91b2, 0x91b3, 0x91b4, 0x91b5, 0x91b6, 0x91b7, 0x91b8, 0x91b9,
+    0x91ba, 0x91bb, 0x91bc, 0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1,
+    0x91c2, 0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c7, 0x91c8, 0x91c9,
+    0x91ca, 0x91cb, 0x91cc, 0x91cd, 0x91ce, 0x91cf, 0x91d0, 0x91d1,
+    0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, 0x91d8, 0x91d9,
+    0x91da, 0x91db, 0x91dc, 0x91dd, 0x91de, 0x91df, 0x91e0, 0x91e1,
+    0x91e2, 0x91e3, 0x91e4, 0x91e5, 0x91e6, 0x91e7, 0x91e8, 0x91e9,
+    0x91ea, 0x91eb, 0x91ec, 0x91ed, 0x91ee, 0x91ef, 0x91f0, 0x91f1,
+    0x91f2, 0x91f3, 0x91f4, 0x91f5, 0x91f6, 0x91f7, 0x91f8, 0x91f9,
+    0x91fa, 0x91fb, 0x91fc, 0x91fd, 0x91fe, 0x9240, 0x9241, 0x9242,
+    0x9243, 0x9244, 0x9245, 0x9246, 0x9247, 0x9248, 0x9249, 0x924a,
+    0x924b, 0x924c, 0x924d, 0x924e, 0x924f, 0x9250, 0x9251, 0x9252,
+    0x9253, 0x9254, 0x9255, 0x9256, 0x9257, 0x9258, 0x9259, 0x925a,
+    0x925b, 0x925c, 0x925d, 0x925e, 0x925f, 0x9260, 0x9261, 0x9262,
+    0x9263, 0x9264, 0x9265, 0x9266, 0x9267, 0x9268, 0x9269, 0x926a,
+    0x926b, 0x926c, 0x926d, 0x926e, 0x926f, 0x9270, 0x9271, 0x9272,
+    0x9273, 0x9274, 0x9275, 0x9276, 0x9277, 0x9278, 0x9279, 0x927a,
+    0x927b, 0x927c, 0x927d, 0x927e, 0x92a1, 0x92a2, 0x92a3, 0x92a4,
+    0x92a5, 0x92a6, 0x92a7, 0x92a8, 0x92a9, 0x92aa, 0x92ab, 0x92ac,
+    0x92ad, 0x92ae, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92b3, 0x92b4,
+    0x92b5, 0x92b6, 0x92b7, 0x92b8, 0x92b9, 0x92ba, 0x92bb, 0x92bc,
+    0x92bd, 0x92be, 0x92bf, 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c4,
+    0x92c5, 0x92c6, 0x92c7, 0x92c8, 0x92c9, 0x92ca, 0x92cb, 0x92cc,
+    0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1, 0x92d2, 0x92d3, 0x92d4,
+    0x92d5, 0x92d6, 0x92d7, 0x92d8, 0x92d9, 0x92da, 0x92db, 0x92dc,
+    /* 0xe600 .. 0xe6ff */
+    0x92dd, 0x92de, 0x92df, 0x92e0, 0x92e1, 0x92e2, 0x92e3, 0x92e4,
+    0x92e5, 0x92e6, 0x92e7, 0x92e8, 0x92e9, 0x92ea, 0x92eb, 0x92ec,
+    0x92ed, 0x92ee, 0x92ef, 0x92f0, 0x92f1, 0x92f2, 0x92f3, 0x92f4,
+    0x92f5, 0x92f6, 0x92f7, 0x92f8, 0x92f9, 0x92fa, 0x92fb, 0x92fc,
+    0x92fd, 0x92fe, 0x9340, 0x9341, 0x9342, 0x9343, 0x9344, 0x9345,
+    0x9346, 0x9347, 0x9348, 0x9349, 0x934a, 0x934b, 0x934c, 0x934d,
+    0x934e, 0x934f, 0x9350, 0x9351, 0x9352, 0x9353, 0x9354, 0x9355,
+    0x9356, 0x9357, 0x9358, 0x9359, 0x935a, 0x935b, 0x935c, 0x935d,
+    0x935e, 0x935f, 0x9360, 0x9361, 0x9362, 0x9363, 0x9364, 0x9365,
+    0x9366, 0x9367, 0x9368, 0x9369, 0x936a, 0x936b, 0x936c, 0x936d,
+    0x936e, 0x936f, 0x9370, 0x9371, 0x9372, 0x9373, 0x9374, 0x9375,
+    0x9376, 0x9377, 0x9378, 0x9379, 0x937a, 0x937b, 0x937c, 0x937d,
+    0x937e, 0x93a1, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0x93a7,
+    0x93a8, 0x93a9, 0x93aa, 0x93ab, 0x93ac, 0x93ad, 0x93ae, 0x93af,
+    0x93b0, 0x93b1, 0x93b2, 0x93b3, 0x93b4, 0x93b5, 0x93b6, 0x93b7,
+    0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc, 0x93bd, 0x93be, 0x93bf,
+    0x93c0, 0x93c1, 0x93c2, 0x93c3, 0x93c4, 0x93c5, 0x93c6, 0x93c7,
+    0x93c8, 0x93c9, 0x93ca, 0x93cb, 0x93cc, 0x93cd, 0x93ce, 0x93cf,
+    0x93d0, 0x93d1, 0x93d2, 0x93d3, 0x93d4, 0x93d5, 0x93d6, 0x93d7,
+    0x93d8, 0x93d9, 0x93da, 0x93db, 0x93dc, 0x93dd, 0x93de, 0x93df,
+    0x93e0, 0x93e1, 0x93e2, 0x93e3, 0x93e4, 0x93e5, 0x93e6, 0x93e7,
+    0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, 0x93ee, 0x93ef,
+    0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, 0x93f7,
+    0x93f8, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0x93fd, 0x93fe, 0x9440,
+    0x9441, 0x9442, 0x9443, 0x9444, 0x9445, 0x9446, 0x9447, 0x9448,
+    0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, 0x9450,
+    0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, 0x9458,
+    0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, 0x9460,
+    0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, 0x9468,
+    0x9469, 0x946a, 0x946b, 0x946c, 0x946d, 0x946e, 0x946f, 0x9470,
+    0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, 0x9478,
+    0x9479, 0x947a, 0x947b, 0x947c, 0x947d, 0x947e, 0x94a1, 0x94a2,
+    /* 0xe700 .. 0xe7ff */
+    0x94a3, 0x94a4, 0x94a5, 0x94a6, 0x94a7, 0x94a8, 0x94a9, 0x94aa,
+    0x94ab, 0x94ac, 0x94ad, 0x94ae, 0x94af, 0x94b0, 0x94b1, 0x94b2,
+    0x94b3, 0x94b4, 0x94b5, 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba,
+    0x94bb, 0x94bc, 0x94bd, 0x94be, 0x94bf, 0x94c0, 0x94c1, 0x94c2,
+    0x94c3, 0x94c4, 0x94c5, 0x94c6, 0x94c7, 0x94c8, 0x94c9, 0x94ca,
+    0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94cf, 0x94d0, 0x94d1, 0x94d2,
+    0x94d3, 0x94d4, 0x94d5, 0x94d6, 0x94d7, 0x94d8, 0x94d9, 0x94da,
+    0x94db, 0x94dc, 0x94dd, 0x94de, 0x94df, 0x94e0, 0x94e1, 0x94e2,
+    0x94e3, 0x94e4, 0x94e5, 0x94e6, 0x94e7, 0x94e8, 0x94e9, 0x94ea,
+    0x94eb, 0x94ec, 0x94ed, 0x94ee, 0x94ef, 0x94f0, 0x94f1, 0x94f2,
+    0x94f3, 0x94f4, 0x94f5, 0x94f6, 0x94f7, 0x94f8, 0x94f9, 0x94fa,
+    0x94fb, 0x94fc, 0x94fd, 0x94fe, 0x9540, 0x9541, 0x9542, 0x9543,
+    0x9544, 0x9545, 0x9546, 0x9547, 0x9548, 0x9549, 0x954a, 0x954b,
+    0x954c, 0x954d, 0x954e, 0x954f, 0x9550, 0x9551, 0x9552, 0x9553,
+    0x9554, 0x9555, 0x9556, 0x9557, 0x9558, 0x9559, 0x955a, 0x955b,
+    0x955c, 0x955d, 0x955e, 0x955f, 0x9560, 0x9561, 0x9562, 0x9563,
+    0x9564, 0x9565, 0x9566, 0x9567, 0x9568, 0x9569, 0x956a, 0x956b,
+    0x956c, 0x956d, 0x956e, 0x956f, 0x9570, 0x9571, 0x9572, 0x9573,
+    0x9574, 0x9575, 0x9576, 0x9577, 0x9578, 0x9579, 0x957a, 0x957b,
+    0x957c, 0x957d, 0x957e, 0x95a1, 0x95a2, 0x95a3, 0x95a4, 0x95a5,
+    0x95a6, 0x95a7, 0x95a8, 0x95a9, 0x95aa, 0x95ab, 0x95ac, 0x95ad,
+    0x95ae, 0x95af, 0x95b0, 0x95b1, 0x95b2, 0x95b3, 0x95b4, 0x95b5,
+    0x95b6, 0x95b7, 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0x95bd,
+    0x95be, 0x95bf, 0x95c0, 0x95c1, 0x95c2, 0x95c3, 0x95c4, 0x95c5,
+    0x95c6, 0x95c7, 0x95c8, 0x95c9, 0x95ca, 0x95cb, 0x95cc, 0x95cd,
+    0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, 0x95d3, 0x95d4, 0x95d5,
+    0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, 0x95db, 0x95dc, 0x95dd,
+    0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, 0x95e3, 0x95e4, 0x95e5,
+    0x95e6, 0x95e7, 0x95e8, 0x95e9, 0x95ea, 0x95eb, 0x95ec, 0x95ed,
+    0x95ee, 0x95ef, 0x95f0, 0x95f1, 0x95f2, 0x95f3, 0x95f4, 0x95f5,
+    0x95f6, 0x95f7, 0x95f8, 0x95f9, 0x95fa, 0x95fb, 0x95fc, 0x95fd,
+    0x95fe, 0x9640, 0x9641, 0x9642, 0x9643, 0x9644, 0x9645, 0x9646,
+    /* 0xe800 .. 0xe8ff */
+    0x9647, 0x9648, 0x9649, 0x964a, 0x964b, 0x964c, 0x964d, 0x964e,
+    0x964f, 0x9650, 0x9651, 0x9652, 0x9653, 0x9654, 0x9655, 0x9656,
+    0x9657, 0x9658, 0x9659, 0x965a, 0x965b, 0x965c, 0x965d, 0x965e,
+    0x965f, 0x9660, 0x9661, 0x9662, 0x9663, 0x9664, 0x9665, 0x9666,
+    0x9667, 0x9668, 0x9669, 0x966a, 0x966b, 0x966c, 0x966d, 0x966e,
+    0x966f, 0x9670, 0x9671, 0x9672, 0x9673, 0x9674, 0x9675, 0x9676,
+    0x9677, 0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, 0x967e,
+    0x96a1, 0x96a2, 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a7, 0x96a8,
+    0x96a9, 0x96aa, 0x96ab, 0x96ac, 0x96ad, 0x96ae, 0x96af, 0x96b0,
+    0x96b1, 0x96b2, 0x96b3, 0x96b4, 0x96b5, 0x96b6, 0x96b7, 0x96b8,
+    0x96b9, 0x96ba, 0x96bb, 0x96bc, 0x96bd, 0x96be, 0x96bf, 0x96c0,
+    0x96c1, 0x96c2, 0x96c3, 0x96c4, 0x96c5, 0x96c6, 0x96c7, 0x96c8,
+    0x96c9, 0x96ca, 0x96cb, 0x96cc, 0x96cd, 0x96ce, 0x96cf, 0x96d0,
+    0x96d1, 0x96d2, 0x96d3, 0x96d4, 0x96d5, 0x96d6, 0x96d7, 0x96d8,
+    0x96d9, 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96de, 0x96df, 0x96e0,
+    0x96e1, 0x96e2, 0x96e3, 0x96e4, 0x96e5, 0x96e6, 0x96e7, 0x96e8,
+    0x96e9, 0x96ea, 0x96eb, 0x96ec, 0x96ed, 0x96ee, 0x96ef, 0x96f0,
+    0x96f1, 0x96f2, 0x96f3, 0x96f4, 0x96f5, 0x96f6, 0x96f7, 0x96f8,
+    0x96f9, 0x96fa, 0x96fb, 0x96fc, 0x96fd, 0x96fe, 0x9740, 0x9741,
+    0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747, 0x9748, 0x9749,
+    0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f, 0x9750, 0x9751,
+    0x9752, 0x9753, 0x9754, 0x9755, 0x9756, 0x9757, 0x9758, 0x9759,
+    0x975a, 0x975b, 0x975c, 0x975d, 0x975e, 0x975f, 0x9760, 0x9761,
+    0x9762, 0x9763, 0x9764, 0x9765, 0x9766, 0x9767, 0x9768, 0x9769,
+    0x976a, 0x976b, 0x976c, 0x976d, 0x976e, 0x976f, 0x9770, 0x9771,
+    0x9772, 0x9773, 0x9774, 0x9775, 0x9776, 0x9777, 0x9778, 0x9779,
+    0x977a, 0x977b, 0x977c, 0x977d, 0x977e, 0x97a1, 0x97a2, 0x97a3,
+    0x97a4, 0x97a5, 0x97a6, 0x97a7, 0x97a8, 0x97a9, 0x97aa, 0x97ab,
+    0x97ac, 0x97ad, 0x97ae, 0x97af, 0x97b0, 0x97b1, 0x97b2, 0x97b3,
+    0x97b4, 0x97b5, 0x97b6, 0x97b7, 0x97b8, 0x97b9, 0x97ba, 0x97bb,
+    0x97bc, 0x97bd, 0x97be, 0x97bf, 0x97c0, 0x97c1, 0x97c2, 0x97c3,
+    0x97c4, 0x97c5, 0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb,
+    /* 0xe900 .. 0xe9ff */
+    0x97cc, 0x97cd, 0x97ce, 0x97cf, 0x97d0, 0x97d1, 0x97d2, 0x97d3,
+    0x97d4, 0x97d5, 0x97d6, 0x97d7, 0x97d8, 0x97d9, 0x97da, 0x97db,
+    0x97dc, 0x97dd, 0x97de, 0x97df, 0x97e0, 0x97e1, 0x97e2, 0x97e3,
+    0x97e4, 0x97e5, 0x97e6, 0x97e7, 0x97e8, 0x97e9, 0x97ea, 0x97eb,
+    0x97ec, 0x97ed, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, 0x97f3,
+    0x97f4, 0x97f5, 0x97f6, 0x97f7, 0x97f8, 0x97f9, 0x97fa, 0x97fb,
+    0x97fc, 0x97fd, 0x97fe, 0x9840, 0x9841, 0x9842, 0x9843, 0x9844,
+    0x9845, 0x9846, 0x9847, 0x9848, 0x9849, 0x984a, 0x984b, 0x984c,
+    0x984d, 0x984e, 0x984f, 0x9850, 0x9851, 0x9852, 0x9853, 0x9854,
+    0x9855, 0x9856, 0x9857, 0x9858, 0x9859, 0x985a, 0x985b, 0x985c,
+    0x985d, 0x985e, 0x985f, 0x9860, 0x9861, 0x9862, 0x9863, 0x9864,
+    0x9865, 0x9866, 0x9867, 0x9868, 0x9869, 0x986a, 0x986b, 0x986c,
+    0x986d, 0x986e, 0x986f, 0x9870, 0x9871, 0x9872, 0x9873, 0x9874,
+    0x9875, 0x9876, 0x9877, 0x9878, 0x9879, 0x987a, 0x987b, 0x987c,
+    0x987d, 0x987e, 0x98a1, 0x98a2, 0x98a3, 0x98a4, 0x98a5, 0x98a6,
+    0x98a7, 0x98a8, 0x98a9, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae,
+    0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3, 0x98b4, 0x98b5, 0x98b6,
+    0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb, 0x98bc, 0x98bd, 0x98be,
+    0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, 0x98c4, 0x98c5, 0x98c6,
+    0x98c7, 0x98c8, 0x98c9, 0x98ca, 0x98cb, 0x98cc, 0x98cd, 0x98ce,
+    0x98cf, 0x98d0, 0x98d1, 0x98d2, 0x98d3, 0x98d4, 0x98d5, 0x98d6,
+    0x98d7, 0x98d8, 0x98d9, 0x98da, 0x98db, 0x98dc, 0x98dd, 0x98de,
+    0x98df, 0x98e0, 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0x98e5, 0x98e6,
+    0x98e7, 0x98e8, 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee,
+    0x98ef, 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6,
+    0x98f7, 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x98fe,
+    0x9940, 0x9941, 0x9942, 0x9943, 0x9944, 0x9945, 0x9946, 0x9947,
+    0x9948, 0x9949, 0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f,
+    0x9950, 0x9951, 0x9952, 0x9953, 0x9954, 0x9955, 0x9956, 0x9957,
+    0x9958, 0x9959, 0x995a, 0x995b, 0x995c, 0x995d, 0x995e, 0x995f,
+    0x9960, 0x9961, 0x9962, 0x9963, 0x9964, 0x9965, 0x9966, 0x9967,
+    0x9968, 0x9969, 0x996a, 0x996b, 0x996c, 0x996d, 0x996e, 0x996f,
+    /* 0xea00 .. 0xeaff */
+    0x9970, 0x9971, 0x9972, 0x9973, 0x9974, 0x9975, 0x9976, 0x9977,
+    0x9978, 0x9979, 0x997a, 0x997b, 0x997c, 0x997d, 0x997e, 0x99a1,
+    0x99a2, 0x99a3, 0x99a4, 0x99a5, 0x99a6, 0x99a7, 0x99a8, 0x99a9,
+    0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, 0x99b0, 0x99b1,
+    0x99b2, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0x99b8, 0x99b9,
+    0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99be, 0x99bf, 0x99c0, 0x99c1,
+    0x99c2, 0x99c3, 0x99c4, 0x99c5, 0x99c6, 0x99c7, 0x99c8, 0x99c9,
+    0x99ca, 0x99cb, 0x99cc, 0x99cd, 0x99ce, 0x99cf, 0x99d0, 0x99d1,
+    0x99d2, 0x99d3, 0x99d4, 0x99d5, 0x99d6, 0x99d7, 0x99d8, 0x99d9,
+    0x99da, 0x99db, 0x99dc, 0x99dd, 0x99de, 0x99df, 0x99e0, 0x99e1,
+    0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, 0x99e8, 0x99e9,
+    0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0x99f0, 0x99f1,
+    0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, 0x99f8, 0x99f9,
+    0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x9a40, 0x9a41, 0x9a42,
+    0x9a43, 0x9a44, 0x9a45, 0x9a46, 0x9a47, 0x9a48, 0x9a49, 0x9a4a,
+    0x9a4b, 0x9a4c, 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, 0x9a51, 0x9a52,
+    0x9a53, 0x9a54, 0x9a55, 0x9a56, 0x9a57, 0x9a58, 0x9a59, 0x9a5a,
+    0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, 0x9a5f, 0x9a60, 0x9a61, 0x9a62,
+    0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, 0x9a69, 0x9a6a,
+    0x9a6b, 0x9a6c, 0x9a6d, 0x9a6e, 0x9a6f, 0x9a70, 0x9a71, 0x9a72,
+    0x9a73, 0x9a74, 0x9a75, 0x9a76, 0x9a77, 0x9a78, 0x9a79, 0x9a7a,
+    0x9a7b, 0x9a7c, 0x9a7d, 0x9a7e, 0x9aa1, 0x9aa2, 0x9aa3, 0x9aa4,
+    0x9aa5, 0x9aa6, 0x9aa7, 0x9aa8, 0x9aa9, 0x9aaa, 0x9aab, 0x9aac,
+    0x9aad, 0x9aae, 0x9aaf, 0x9ab0, 0x9ab1, 0x9ab2, 0x9ab3, 0x9ab4,
+    0x9ab5, 0x9ab6, 0x9ab7, 0x9ab8, 0x9ab9, 0x9aba, 0x9abb, 0x9abc,
+    0x9abd, 0x9abe, 0x9abf, 0x9ac0, 0x9ac1, 0x9ac2, 0x9ac3, 0x9ac4,
+    0x9ac5, 0x9ac6, 0x9ac7, 0x9ac8, 0x9ac9, 0x9aca, 0x9acb, 0x9acc,
+    0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad1, 0x9ad2, 0x9ad3, 0x9ad4,
+    0x9ad5, 0x9ad6, 0x9ad7, 0x9ad8, 0x9ad9, 0x9ada, 0x9adb, 0x9adc,
+    0x9add, 0x9ade, 0x9adf, 0x9ae0, 0x9ae1, 0x9ae2, 0x9ae3, 0x9ae4,
+    0x9ae5, 0x9ae6, 0x9ae7, 0x9ae8, 0x9ae9, 0x9aea, 0x9aeb, 0x9aec,
+    0x9aed, 0x9aee, 0x9aef, 0x9af0, 0x9af1, 0x9af2, 0x9af3, 0x9af4,
+    /* 0xeb00 .. 0xebff */
+    0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9af9, 0x9afa, 0x9afb, 0x9afc,
+    0x9afd, 0x9afe, 0x9b40, 0x9b41, 0x9b42, 0x9b43, 0x9b44, 0x9b45,
+    0x9b46, 0x9b47, 0x9b48, 0x9b49, 0x9b4a, 0x9b4b, 0x9b4c, 0x9b4d,
+    0x9b4e, 0x9b4f, 0x9b50, 0x9b51, 0x9b52, 0x9b53, 0x9b54, 0x9b55,
+    0x9b56, 0x9b57, 0x9b58, 0x9b59, 0x9b5a, 0x9b5b, 0x9b5c, 0x9b5d,
+    0x9b5e, 0x9b5f, 0x9b60, 0x9b61, 0x9b62, 0x9b63, 0x9b64, 0x9b65,
+    0x9b66, 0x9b67, 0x9b68, 0x9b69, 0x9b6a, 0x9b6b, 0x9b6c, 0x9b6d,
+    0x9b6e, 0x9b6f, 0x9b70, 0x9b71, 0x9b72, 0x9b73, 0x9b74, 0x9b75,
+    0x9b76, 0x9b77, 0x9b78, 0x9b79, 0x9b7a, 0x9b7b, 0x9b7c, 0x9b7d,
+    0x9b7e, 0x9ba1, 0x9ba2, 0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7,
+    0x9ba8, 0x9ba9, 0x9baa, 0x9bab, 0x9bac, 0x9bad, 0x9bae, 0x9baf,
+    0x9bb0, 0x9bb1, 0x9bb2, 0x9bb3, 0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7,
+    0x9bb8, 0x9bb9, 0x9bba, 0x9bbb, 0x9bbc, 0x9bbd, 0x9bbe, 0x9bbf,
+    0x9bc0, 0x9bc1, 0x9bc2, 0x9bc3, 0x9bc4, 0x9bc5, 0x9bc6, 0x9bc7,
+    0x9bc8, 0x9bc9, 0x9bca, 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0x9bcf,
+    0x9bd0, 0x9bd1, 0x9bd2, 0x9bd3, 0x9bd4, 0x9bd5, 0x9bd6, 0x9bd7,
+    0x9bd8, 0x9bd9, 0x9bda, 0x9bdb, 0x9bdc, 0x9bdd, 0x9bde, 0x9bdf,
+    0x9be0, 0x9be1, 0x9be2, 0x9be3, 0x9be4, 0x9be5, 0x9be6, 0x9be7,
+    0x9be8, 0x9be9, 0x9bea, 0x9beb, 0x9bec, 0x9bed, 0x9bee, 0x9bef,
+    0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3, 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7,
+    0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb, 0x9bfc, 0x9bfd, 0x9bfe, 0x9c40,
+    0x9c41, 0x9c42, 0x9c43, 0x9c44, 0x9c45, 0x9c46, 0x9c47, 0x9c48,
+    0x9c49, 0x9c4a, 0x9c4b, 0x9c4c, 0x9c4d, 0x9c4e, 0x9c4f, 0x9c50,
+    0x9c51, 0x9c52, 0x9c53, 0x9c54, 0x9c55, 0x9c56, 0x9c57, 0x9c58,
+    0x9c59, 0x9c5a, 0x9c5b, 0x9c5c, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c60,
+    0x9c61, 0x9c62, 0x9c63, 0x9c64, 0x9c65, 0x9c66, 0x9c67, 0x9c68,
+    0x9c69, 0x9c6a, 0x9c6b, 0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70,
+    0x9c71, 0x9c72, 0x9c73, 0x9c74, 0x9c75, 0x9c76, 0x9c77, 0x9c78,
+    0x9c79, 0x9c7a, 0x9c7b, 0x9c7c, 0x9c7d, 0x9c7e, 0x9ca1, 0x9ca2,
+    0x9ca3, 0x9ca4, 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8, 0x9ca9, 0x9caa,
+    0x9cab, 0x9cac, 0x9cad, 0x9cae, 0x9caf, 0x9cb0, 0x9cb1, 0x9cb2,
+    0x9cb3, 0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cb8, 0x9cb9, 0x9cba,
+    /* 0xec00 .. 0xecff */
+    0x9cbb, 0x9cbc, 0x9cbd, 0x9cbe, 0x9cbf, 0x9cc0, 0x9cc1, 0x9cc2,
+    0x9cc3, 0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cc8, 0x9cc9, 0x9cca,
+    0x9ccb, 0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd1, 0x9cd2,
+    0x9cd3, 0x9cd4, 0x9cd5, 0x9cd6, 0x9cd7, 0x9cd8, 0x9cd9, 0x9cda,
+    0x9cdb, 0x9cdc, 0x9cdd, 0x9cde, 0x9cdf, 0x9ce0, 0x9ce1, 0x9ce2,
+    0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea,
+    0x9ceb, 0x9cec, 0x9ced, 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0x9cf2,
+    0x9cf3, 0x9cf4, 0x9cf5, 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa,
+    0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, 0x9d40, 0x9d41, 0x9d42, 0x9d43,
+    0x9d44, 0x9d45, 0x9d46, 0x9d47, 0x9d48, 0x9d49, 0x9d4a, 0x9d4b,
+    0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, 0x9d50, 0x9d51, 0x9d52, 0x9d53,
+    0x9d54, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0x9d5a, 0x9d5b,
+    0x9d5c, 0x9d5d, 0x9d5e, 0x9d5f, 0x9d60, 0x9d61, 0x9d62, 0x9d63,
+    0x9d64, 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a, 0x9d6b,
+    0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d72, 0x9d73,
+    0x9d74, 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, 0x9d7b,
+    0x9d7c, 0x9d7d, 0x9d7e, 0x9da1, 0x9da2, 0x9da3, 0x9da4, 0x9da5,
+    0x9da6, 0x9da7, 0x9da8, 0x9da9, 0x9daa, 0x9dab, 0x9dac, 0x9dad,
+    0x9dae, 0x9daf, 0x9db0, 0x9db1, 0x9db2, 0x9db3, 0x9db4, 0x9db5,
+    0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd,
+    0x9dbe, 0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2, 0x9dc3, 0x9dc4, 0x9dc5,
+    0x9dc6, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca, 0x9dcb, 0x9dcc, 0x9dcd,
+    0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2, 0x9dd3, 0x9dd4, 0x9dd5,
+    0x9dd6, 0x9dd7, 0x9dd8, 0x9dd9, 0x9dda, 0x9ddb, 0x9ddc, 0x9ddd,
+    0x9dde, 0x9ddf, 0x9de0, 0x9de1, 0x9de2, 0x9de3, 0x9de4, 0x9de5,
+    0x9de6, 0x9de7, 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, 0x9ded,
+    0x9dee, 0x9def, 0x9df0, 0x9df1, 0x9df2, 0x9df3, 0x9df4, 0x9df5,
+    0x9df6, 0x9df7, 0x9df8, 0x9df9, 0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd,
+    0x9dfe, 0x9e40, 0x9e41, 0x9e42, 0x9e43, 0x9e44, 0x9e45, 0x9e46,
+    0x9e47, 0x9e48, 0x9e49, 0x9e4a, 0x9e4b, 0x9e4c, 0x9e4d, 0x9e4e,
+    0x9e4f, 0x9e50, 0x9e51, 0x9e52, 0x9e53, 0x9e54, 0x9e55, 0x9e56,
+    0x9e57, 0x9e58, 0x9e59, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5d, 0x9e5e,
+    /* 0xed00 .. 0xedff */
+    0x9e5f, 0x9e60, 0x9e61, 0x9e62, 0x9e63, 0x9e64, 0x9e65, 0x9e66,
+    0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e6d, 0x9e6e,
+    0x9e6f, 0x9e70, 0x9e71, 0x9e72, 0x9e73, 0x9e74, 0x9e75, 0x9e76,
+    0x9e77, 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, 0x9e7e,
+    0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea6, 0x9ea7, 0x9ea8,
+    0x9ea9, 0x9eaa, 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0x9eaf, 0x9eb0,
+    0x9eb1, 0x9eb2, 0x9eb3, 0x9eb4, 0x9eb5, 0x9eb6, 0x9eb7, 0x9eb8,
+    0x9eb9, 0x9eba, 0x9ebb, 0x9ebc, 0x9ebd, 0x9ebe, 0x9ebf, 0x9ec0,
+    0x9ec1, 0x9ec2, 0x9ec3, 0x9ec4, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8,
+    0x9ec9, 0x9eca, 0x9ecb, 0x9ecc, 0x9ecd, 0x9ece, 0x9ecf, 0x9ed0,
+    0x9ed1, 0x9ed2, 0x9ed3, 0x9ed4, 0x9ed5, 0x9ed6, 0x9ed7, 0x9ed8,
+    0x9ed9, 0x9eda, 0x9edb, 0x9edc, 0x9edd, 0x9ede, 0x9edf, 0x9ee0,
+    0x9ee1, 0x9ee2, 0x9ee3, 0x9ee4, 0x9ee5, 0x9ee6, 0x9ee7, 0x9ee8,
+    0x9ee9, 0x9eea, 0x9eeb, 0x9eec, 0x9eed, 0x9eee, 0x9eef, 0x9ef0,
+    0x9ef1, 0x9ef2, 0x9ef3, 0x9ef4, 0x9ef5, 0x9ef6, 0x9ef7, 0x9ef8,
+    0x9ef9, 0x9efa, 0x9efb, 0x9efc, 0x9efd, 0x9efe, 0x9f40, 0x9f41,
+    0x9f42, 0x9f43, 0x9f44, 0x9f45, 0x9f46, 0x9f47, 0x9f48, 0x9f49,
+    0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f50, 0x9f51,
+    0x9f52, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, 0x9f58, 0x9f59,
+    0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, 0x9f5f, 0x9f60, 0x9f61,
+    0x9f62, 0x9f63, 0x9f64, 0x9f65, 0x9f66, 0x9f67, 0x9f68, 0x9f69,
+    0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71,
+    0x9f72, 0x9f73, 0x9f74, 0x9f75, 0x9f76, 0x9f77, 0x9f78, 0x9f79,
+    0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, 0x9f7e, 0x9fa1, 0x9fa2, 0x9fa3,
+    0x9fa4, 0x9fa5, 0x9fa6, 0x9fa7, 0x9fa8, 0x9fa9, 0x9faa, 0x9fab,
+    0x9fac, 0x9fad, 0x9fae, 0x9faf, 0x9fb0, 0x9fb1, 0x9fb2, 0x9fb3,
+    0x9fb4, 0x9fb5, 0x9fb6, 0x9fb7, 0x9fb8, 0x9fb9, 0x9fba, 0x9fbb,
+    0x9fbc, 0x9fbd, 0x9fbe, 0x9fbf, 0x9fc0, 0x9fc1, 0x9fc2, 0x9fc3,
+    0x9fc4, 0x9fc5, 0x9fc6, 0x9fc7, 0x9fc8, 0x9fc9, 0x9fca, 0x9fcb,
+    0x9fcc, 0x9fcd, 0x9fce, 0x9fcf, 0x9fd0, 0x9fd1, 0x9fd2, 0x9fd3,
+    0x9fd4, 0x9fd5, 0x9fd6, 0x9fd7, 0x9fd8, 0x9fd9, 0x9fda, 0x9fdb,
+    0x9fdc, 0x9fdd, 0x9fde, 0x9fdf, 0x9fe0, 0x9fe1, 0x9fe2, 0x9fe3,
+    /* 0xee00 .. 0xeeff */
+    0x9fe4, 0x9fe5, 0x9fe6, 0x9fe7, 0x9fe8, 0x9fe9, 0x9fea, 0x9feb,
+    0x9fec, 0x9fed, 0x9fee, 0x9fef, 0x9ff0, 0x9ff1, 0x9ff2, 0x9ff3,
+    0x9ff4, 0x9ff5, 0x9ff6, 0x9ff7, 0x9ff8, 0x9ff9, 0x9ffa, 0x9ffb,
+    0x9ffc, 0x9ffd, 0x9ffe, 0xa040, 0xa041, 0xa042, 0xa043, 0xa044,
+    0xa045, 0xa046, 0xa047, 0xa048, 0xa049, 0xa04a, 0xa04b, 0xa04c,
+    0xa04d, 0xa04e, 0xa04f, 0xa050, 0xa051, 0xa052, 0xa053, 0xa054,
+    0xa055, 0xa056, 0xa057, 0xa058, 0xa059, 0xa05a, 0xa05b, 0xa05c,
+    0xa05d, 0xa05e, 0xa05f, 0xa060, 0xa061, 0xa062, 0xa063, 0xa064,
+    0xa065, 0xa066, 0xa067, 0xa068, 0xa069, 0xa06a, 0xa06b, 0xa06c,
+    0xa06d, 0xa06e, 0xa06f, 0xa070, 0xa071, 0xa072, 0xa073, 0xa074,
+    0xa075, 0xa076, 0xa077, 0xa078, 0xa079, 0xa07a, 0xa07b, 0xa07c,
+    0xa07d, 0xa07e, 0xa0a1, 0xa0a2, 0xa0a3, 0xa0a4, 0xa0a5, 0xa0a6,
+    0xa0a7, 0xa0a8, 0xa0a9, 0xa0aa, 0xa0ab, 0xa0ac, 0xa0ad, 0xa0ae,
+    0xa0af, 0xa0b0, 0xa0b1, 0xa0b2, 0xa0b3, 0xa0b4, 0xa0b5, 0xa0b6,
+    0xa0b7, 0xa0b8, 0xa0b9, 0xa0ba, 0xa0bb, 0xa0bc, 0xa0bd, 0xa0be,
+    0xa0bf, 0xa0c0, 0xa0c1, 0xa0c2, 0xa0c3, 0xa0c4, 0xa0c5, 0xa0c6,
+    0xa0c7, 0xa0c8, 0xa0c9, 0xa0ca, 0xa0cb, 0xa0cc, 0xa0cd, 0xa0ce,
+    0xa0cf, 0xa0d0, 0xa0d1, 0xa0d2, 0xa0d3, 0xa0d4, 0xa0d5, 0xa0d6,
+    0xa0d7, 0xa0d8, 0xa0d9, 0xa0da, 0xa0db, 0xa0dc, 0xa0dd, 0xa0de,
+    0xa0df, 0xa0e0, 0xa0e1, 0xa0e2, 0xa0e3, 0xa0e4, 0xa0e5, 0xa0e6,
+    0xa0e7, 0xa0e8, 0xa0e9, 0xa0ea, 0xa0eb, 0xa0ec, 0xa0ed, 0xa0ee,
+    0xa0ef, 0xa0f0, 0xa0f1, 0xa0f2, 0xa0f3, 0xa0f4, 0xa0f5, 0xa0f6,
+    0xa0f7, 0xa0f8, 0xa0f9, 0xa0fa, 0xa0fb, 0xa0fc, 0xa0fd, 0xa0fe,
+    0x8140, 0x8141, 0x8142, 0x8143, 0x8144, 0x8145, 0x8146, 0x8147,
+    0x8148, 0x8149, 0x814a, 0x814b, 0x814c, 0x814d, 0x814e, 0x814f,
+    0x8150, 0x8151, 0x8152, 0x8153, 0x8154, 0x8155, 0x8156, 0x8157,
+    0x8158, 0x8159, 0x815a, 0x815b, 0x815c, 0x815d, 0x815e, 0x815f,
+    0x8160, 0x8161, 0x8162, 0x8163, 0x8164, 0x8165, 0x8166, 0x8167,
+    0x8168, 0x8169, 0x816a, 0x816b, 0x816c, 0x816d, 0x816e, 0x816f,
+    0x8170, 0x8171, 0x8172, 0x8173, 0x8174, 0x8175, 0x8176, 0x8177,
+    0x8178, 0x8179, 0x817a, 0x817b, 0x817c, 0x817d, 0x817e, 0x81a1,
+    0x81a2, 0x81a3, 0x81a4, 0x81a5, 0x81a6, 0x81a7, 0x81a8, 0x81a9,
+    /* 0xef00 .. 0xefff */
+    0x81aa, 0x81ab, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1,
+    0x81b2, 0x81b3, 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9,
+    0x81ba, 0x81bb, 0x81bc, 0x81bd, 0x81be, 0x81bf, 0x81c0, 0x81c1,
+    0x81c2, 0x81c3, 0x81c4, 0x81c5, 0x81c6, 0x81c7, 0x81c8, 0x81c9,
+    0x81ca, 0x81cb, 0x81cc, 0x81cd, 0x81ce, 0x81cf, 0x81d0, 0x81d1,
+    0x81d2, 0x81d3, 0x81d4, 0x81d5, 0x81d6, 0x81d7, 0x81d8, 0x81d9,
+    0x81da, 0x81db, 0x81dc, 0x81dd, 0x81de, 0x81df, 0x81e0, 0x81e1,
+    0x81e2, 0x81e3, 0x81e4, 0x81e5, 0x81e6, 0x81e7, 0x81e8, 0x81e9,
+    0x81ea, 0x81eb, 0x81ec, 0x81ed, 0x81ee, 0x81ef, 0x81f0, 0x81f1,
+    0x81f2, 0x81f3, 0x81f4, 0x81f5, 0x81f6, 0x81f7, 0x81f8, 0x81f9,
+    0x81fa, 0x81fb, 0x81fc, 0x81fd, 0x81fe, 0x8240, 0x8241, 0x8242,
+    0x8243, 0x8244, 0x8245, 0x8246, 0x8247, 0x8248, 0x8249, 0x824a,
+    0x824b, 0x824c, 0x824d, 0x824e, 0x824f, 0x8250, 0x8251, 0x8252,
+    0x8253, 0x8254, 0x8255, 0x8256, 0x8257, 0x8258, 0x8259, 0x825a,
+    0x825b, 0x825c, 0x825d, 0x825e, 0x825f, 0x8260, 0x8261, 0x8262,
+    0x8263, 0x8264, 0x8265, 0x8266, 0x8267, 0x8268, 0x8269, 0x826a,
+    0x826b, 0x826c, 0x826d, 0x826e, 0x826f, 0x8270, 0x8271, 0x8272,
+    0x8273, 0x8274, 0x8275, 0x8276, 0x8277, 0x8278, 0x8279, 0x827a,
+    0x827b, 0x827c, 0x827d, 0x827e, 0x82a1, 0x82a2, 0x82a3, 0x82a4,
+    0x82a5, 0x82a6, 0x82a7, 0x82a8, 0x82a9, 0x82aa, 0x82ab, 0x82ac,
+    0x82ad, 0x82ae, 0x82af, 0x82b0, 0x82b1, 0x82b2, 0x82b3, 0x82b4,
+    0x82b5, 0x82b6, 0x82b7, 0x82b8, 0x82b9, 0x82ba, 0x82bb, 0x82bc,
+    0x82bd, 0x82be, 0x82bf, 0x82c0, 0x82c1, 0x82c2, 0x82c3, 0x82c4,
+    0x82c5, 0x82c6, 0x82c7, 0x82c8, 0x82c9, 0x82ca, 0x82cb, 0x82cc,
+    0x82cd, 0x82ce, 0x82cf, 0x82d0, 0x82d1, 0x82d2, 0x82d3, 0x82d4,
+    0x82d5, 0x82d6, 0x82d7, 0x82d8, 0x82d9, 0x82da, 0x82db, 0x82dc,
+    0x82dd, 0x82de, 0x82df, 0x82e0, 0x82e1, 0x82e2, 0x82e3, 0x82e4,
+    0x82e5, 0x82e6, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82eb, 0x82ec,
+    0x82ed, 0x82ee, 0x82ef, 0x82f0, 0x82f1, 0x82f2, 0x82f3, 0x82f4,
+    0x82f5, 0x82f6, 0x82f7, 0x82f8, 0x82f9, 0x82fa, 0x82fb, 0x82fc,
+    0x82fd, 0x82fe, 0x8340, 0x8341, 0x8342, 0x8343, 0x8344, 0x8345,
+    0x8346, 0x8347, 0x8348, 0x8349, 0x834a, 0x834b, 0x834c, 0x834d,
+    /* 0xf000 .. 0xf0ff */
+    0x834e, 0x834f, 0x8350, 0x8351, 0x8352, 0x8353, 0x8354, 0x8355,
+    0x8356, 0x8357, 0x8358, 0x8359, 0x835a, 0x835b, 0x835c, 0x835d,
+    0x835e, 0x835f, 0x8360, 0x8361, 0x8362, 0x8363, 0x8364, 0x8365,
+    0x8366, 0x8367, 0x8368, 0x8369, 0x836a, 0x836b, 0x836c, 0x836d,
+    0x836e, 0x836f, 0x8370, 0x8371, 0x8372, 0x8373, 0x8374, 0x8375,
+    0x8376, 0x8377, 0x8378, 0x8379, 0x837a, 0x837b, 0x837c, 0x837d,
+    0x837e, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5, 0x83a6, 0x83a7,
+    0x83a8, 0x83a9, 0x83aa, 0x83ab, 0x83ac, 0x83ad, 0x83ae, 0x83af,
+    0x83b0, 0x83b1, 0x83b2, 0x83b3, 0x83b4, 0x83b5, 0x83b6, 0x83b7,
+    0x83b8, 0x83b9, 0x83ba, 0x83bb, 0x83bc, 0x83bd, 0x83be, 0x83bf,
+    0x83c0, 0x83c1, 0x83c2, 0x83c3, 0x83c4, 0x83c5, 0x83c6, 0x83c7,
+    0x83c8, 0x83c9, 0x83ca, 0x83cb, 0x83cc, 0x83cd, 0x83ce, 0x83cf,
+    0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d4, 0x83d5, 0x83d6, 0x83d7,
+    0x83d8, 0x83d9, 0x83da, 0x83db, 0x83dc, 0x83dd, 0x83de, 0x83df,
+    0x83e0, 0x83e1, 0x83e2, 0x83e3, 0x83e4, 0x83e5, 0x83e6, 0x83e7,
+    0x83e8, 0x83e9, 0x83ea, 0x83eb, 0x83ec, 0x83ed, 0x83ee, 0x83ef,
+    0x83f0, 0x83f1, 0x83f2, 0x83f3, 0x83f4, 0x83f5, 0x83f6, 0x83f7,
+    0x83f8, 0x83f9, 0x83fa, 0x83fb, 0x83fc, 0x83fd, 0x83fe, 0x8440,
+    0x8441, 0x8442, 0x8443, 0x8444, 0x8445, 0x8446, 0x8447, 0x8448,
+    0x8449, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450,
+    0x8451, 0x8452, 0x8453, 0x8454, 0x8455, 0x8456, 0x8457, 0x8458,
+    0x8459, 0x845a, 0x845b, 0x845c, 0x845d, 0x845e, 0x845f, 0x8460,
+    0x8461, 0x8462, 0x8463, 0x8464, 0x8465, 0x8466, 0x8467, 0x8468,
+    0x8469, 0x846a, 0x846b, 0x846c, 0x846d, 0x846e, 0x846f, 0x8470,
+    0x8471, 0x8472, 0x8473, 0x8474, 0x8475, 0x8476, 0x8477, 0x8478,
+    0x8479, 0x847a, 0x847b, 0x847c, 0x847d, 0x847e, 0x84a1, 0x84a2,
+    0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, 0x84a8, 0x84a9, 0x84aa,
+    0x84ab, 0x84ac, 0x84ad, 0x84ae, 0x84af, 0x84b0, 0x84b1, 0x84b2,
+    0x84b3, 0x84b4, 0x84b5, 0x84b6, 0x84b7, 0x84b8, 0x84b9, 0x84ba,
+    0x84bb, 0x84bc, 0x84bd, 0x84be, 0x84bf, 0x84c0, 0x84c1, 0x84c2,
+    0x84c3, 0x84c4, 0x84c5, 0x84c6, 0x84c7, 0x84c8, 0x84c9, 0x84ca,
+    0x84cb, 0x84cc, 0x84cd, 0x84ce, 0x84cf, 0x84d0, 0x84d1, 0x84d2,
+    /* 0xf100 .. 0xf1ff */
+    0x84d3, 0x84d4, 0x84d5, 0x84d6, 0x84d7, 0x84d8, 0x84d9, 0x84da,
+    0x84db, 0x84dc, 0x84dd, 0x84de, 0x84df, 0x84e0, 0x84e1, 0x84e2,
+    0x84e3, 0x84e4, 0x84e5, 0x84e6, 0x84e7, 0x84e8, 0x84e9, 0x84ea,
+    0x84eb, 0x84ec, 0x84ed, 0x84ee, 0x84ef, 0x84f0, 0x84f1, 0x84f2,
+    0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, 0x84f8, 0x84f9, 0x84fa,
+    0x84fb, 0x84fc, 0x84fd, 0x84fe, 0x8540, 0x8541, 0x8542, 0x8543,
+    0x8544, 0x8545, 0x8546, 0x8547, 0x8548, 0x8549, 0x854a, 0x854b,
+    0x854c, 0x854d, 0x854e, 0x854f, 0x8550, 0x8551, 0x8552, 0x8553,
+    0x8554, 0x8555, 0x8556, 0x8557, 0x8558, 0x8559, 0x855a, 0x855b,
+    0x855c, 0x855d, 0x855e, 0x855f, 0x8560, 0x8561, 0x8562, 0x8563,
+    0x8564, 0x8565, 0x8566, 0x8567, 0x8568, 0x8569, 0x856a, 0x856b,
+    0x856c, 0x856d, 0x856e, 0x856f, 0x8570, 0x8571, 0x8572, 0x8573,
+    0x8574, 0x8575, 0x8576, 0x8577, 0x8578, 0x8579, 0x857a, 0x857b,
+    0x857c, 0x857d, 0x857e, 0x85a1, 0x85a2, 0x85a3, 0x85a4, 0x85a5,
+    0x85a6, 0x85a7, 0x85a8, 0x85a9, 0x85aa, 0x85ab, 0x85ac, 0x85ad,
+    0x85ae, 0x85af, 0x85b0, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5,
+    0x85b6, 0x85b7, 0x85b8, 0x85b9, 0x85ba, 0x85bb, 0x85bc, 0x85bd,
+    0x85be, 0x85bf, 0x85c0, 0x85c1, 0x85c2, 0x85c3, 0x85c4, 0x85c5,
+    0x85c6, 0x85c7, 0x85c8, 0x85c9, 0x85ca, 0x85cb, 0x85cc, 0x85cd,
+    0x85ce, 0x85cf, 0x85d0, 0x85d1, 0x85d2, 0x85d3, 0x85d4, 0x85d5,
+    0x85d6, 0x85d7, 0x85d8, 0x85d9, 0x85da, 0x85db, 0x85dc, 0x85dd,
+    0x85de, 0x85df, 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e4, 0x85e5,
+    0x85e6, 0x85e7, 0x85e8, 0x85e9, 0x85ea, 0x85eb, 0x85ec, 0x85ed,
+    0x85ee, 0x85ef, 0x85f0, 0x85f1, 0x85f2, 0x85f3, 0x85f4, 0x85f5,
+    0x85f6, 0x85f7, 0x85f8, 0x85f9, 0x85fa, 0x85fb, 0x85fc, 0x85fd,
+    0x85fe, 0x8640, 0x8641, 0x8642, 0x8643, 0x8644, 0x8645, 0x8646,
+    0x8647, 0x8648, 0x8649, 0x864a, 0x864b, 0x864c, 0x864d, 0x864e,
+    0x864f, 0x8650, 0x8651, 0x8652, 0x8653, 0x8654, 0x8655, 0x8656,
+    0x8657, 0x8658, 0x8659, 0x865a, 0x865b, 0x865c, 0x865d, 0x865e,
+    0x865f, 0x8660, 0x8661, 0x8662, 0x8663, 0x8664, 0x8665, 0x8666,
+    0x8667, 0x8668, 0x8669, 0x866a, 0x866b, 0x866c, 0x866d, 0x866e,
+    0x866f, 0x8670, 0x8671, 0x8672, 0x8673, 0x8674, 0x8675, 0x8676,
+    /* 0xf200 .. 0xf2ff */
+    0x8677, 0x8678, 0x8679, 0x867a, 0x867b, 0x867c, 0x867d, 0x867e,
+    0x86a1, 0x86a2, 0x86a3, 0x86a4, 0x86a5, 0x86a6, 0x86a7, 0x86a8,
+    0x86a9, 0x86aa, 0x86ab, 0x86ac, 0x86ad, 0x86ae, 0x86af, 0x86b0,
+    0x86b1, 0x86b2, 0x86b3, 0x86b4, 0x86b5, 0x86b6, 0x86b7, 0x86b8,
+    0x86b9, 0x86ba, 0x86bb, 0x86bc, 0x86bd, 0x86be, 0x86bf, 0x86c0,
+    0x86c1, 0x86c2, 0x86c3, 0x86c4, 0x86c5, 0x86c6, 0x86c7, 0x86c8,
+    0x86c9, 0x86ca, 0x86cb, 0x86cc, 0x86cd, 0x86ce, 0x86cf, 0x86d0,
+    0x86d1, 0x86d2, 0x86d3, 0x86d4, 0x86d5, 0x86d6, 0x86d7, 0x86d8,
+    0x86d9, 0x86da, 0x86db, 0x86dc, 0x86dd, 0x86de, 0x86df, 0x86e0,
+    0x86e1, 0x86e2, 0x86e3, 0x86e4, 0x86e5, 0x86e6, 0x86e7, 0x86e8,
+    0x86e9, 0x86ea, 0x86eb, 0x86ec, 0x86ed, 0x86ee, 0x86ef, 0x86f0,
+    0x86f1, 0x86f2, 0x86f3, 0x86f4, 0x86f5, 0x86f6, 0x86f7, 0x86f8,
+    0x86f9, 0x86fa, 0x86fb, 0x86fc, 0x86fd, 0x86fe, 0x8740, 0x8741,
+    0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x8747, 0x8748, 0x8749,
+    0x874a, 0x874b, 0x874c, 0x874d, 0x874e, 0x874f, 0x8750, 0x8751,
+    0x8752, 0x8753, 0x8754, 0x8755, 0x8756, 0x8757, 0x8758, 0x8759,
+    0x875a, 0x875b, 0x875c, 0x875d, 0x875e, 0x875f, 0x8760, 0x8761,
+    0x8762, 0x8763, 0x8764, 0x8765, 0x8766, 0x8767, 0x8768, 0x8769,
+    0x876a, 0x876b, 0x876c, 0x876d, 0x876e, 0x876f, 0x8770, 0x8771,
+    0x8772, 0x8773, 0x8774, 0x8775, 0x8776, 0x8777, 0x8778, 0x8779,
+    0x877a, 0x877b, 0x877c, 0x877d, 0x877e, 0x87a1, 0x87a2, 0x87a3,
+    0x87a4, 0x87a5, 0x87a6, 0x87a7, 0x87a8, 0x87a9, 0x87aa, 0x87ab,
+    0x87ac, 0x87ad, 0x87ae, 0x87af, 0x87b0, 0x87b1, 0x87b2, 0x87b3,
+    0x87b4, 0x87b5, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87ba, 0x87bb,
+    0x87bc, 0x87bd, 0x87be, 0x87bf, 0x87c0, 0x87c1, 0x87c2, 0x87c3,
+    0x87c4, 0x87c5, 0x87c6, 0x87c7, 0x87c8, 0x87c9, 0x87ca, 0x87cb,
+    0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d1, 0x87d2, 0x87d3,
+    0x87d4, 0x87d5, 0x87d6, 0x87d7, 0x87d8, 0x87d9, 0x87da, 0x87db,
+    0x87dc, 0x87dd, 0x87de, 0x87df, 0x87e0, 0x87e1, 0x87e2, 0x87e3,
+    0x87e4, 0x87e5, 0x87e6, 0x87e7, 0x87e8, 0x87e9, 0x87ea, 0x87eb,
+    0x87ec, 0x87ed, 0x87ee, 0x87ef, 0x87f0, 0x87f1, 0x87f2, 0x87f3,
+    0x87f4, 0x87f5, 0x87f6, 0x87f7, 0x87f8, 0x87f9, 0x87fa, 0x87fb,
+    /* 0xf300 .. 0xf3ff */
+    0x87fc, 0x87fd, 0x87fe, 0x8840, 0x8841, 0x8842, 0x8843, 0x8844,
+    0x8845, 0x8846, 0x8847, 0x8848, 0x8849, 0x884a, 0x884b, 0x884c,
+    0x884d, 0x884e, 0x884f, 0x8850, 0x8851, 0x8852, 0x8853, 0x8854,
+    0x8855, 0x8856, 0x8857, 0x8858, 0x8859, 0x885a, 0x885b, 0x885c,
+    0x885d, 0x885e, 0x885f, 0x8860, 0x8861, 0x8862, 0x8863, 0x8864,
+    0x8865, 0x8866, 0x8867, 0x8868, 0x8869, 0x886a, 0x886b, 0x886c,
+    0x886d, 0x886e, 0x886f, 0x8870, 0x8871, 0x8872, 0x8873, 0x8874,
+    0x8875, 0x8876, 0x8877, 0x8878, 0x8879, 0x887a, 0x887b, 0x887c,
+    0x887d, 0x887e, 0x88a1, 0x88a2, 0x88a3, 0x88a4, 0x88a5, 0x88a6,
+    0x88a7, 0x88a8, 0x88a9, 0x88aa, 0x88ab, 0x88ac, 0x88ad, 0x88ae,
+    0x88af, 0x88b0, 0x88b1, 0x88b2, 0x88b3, 0x88b4, 0x88b5, 0x88b6,
+    0x88b7, 0x88b8, 0x88b9, 0x88ba, 0x88bb, 0x88bc, 0x88bd, 0x88be,
+    0x88bf, 0x88c0, 0x88c1, 0x88c2, 0x88c3, 0x88c4, 0x88c5, 0x88c6,
+    0x88c7, 0x88c8, 0x88c9, 0x88ca, 0x88cb, 0x88cc, 0x88cd, 0x88ce,
+    0x88cf, 0x88d0, 0x88d1, 0x88d2, 0x88d3, 0x88d4, 0x88d5, 0x88d6,
+    0x88d7, 0x88d8, 0x88d9, 0x88da, 0x88db, 0x88dc, 0x88dd, 0x88de,
+    0x88df, 0x88e0, 0x88e1, 0x88e2, 0x88e3, 0x88e4, 0x88e5, 0x88e6,
+    0x88e7, 0x88e8, 0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee,
+    0x88ef, 0x88f0, 0x88f1, 0x88f2, 0x88f3, 0x88f4, 0x88f5, 0x88f6,
+    0x88f7, 0x88f8, 0x88f9, 0x88fa, 0x88fb, 0x88fc, 0x88fd, 0x88fe,
+    0x8940, 0x8941, 0x8942, 0x8943, 0x8944, 0x8945, 0x8946, 0x8947,
+    0x8948, 0x8949, 0x894a, 0x894b, 0x894c, 0x894d, 0x894e, 0x894f,
+    0x8950, 0x8951, 0x8952, 0x8953, 0x8954, 0x8955, 0x8956, 0x8957,
+    0x8958, 0x8959, 0x895a, 0x895b, 0x895c, 0x895d, 0x895e, 0x895f,
+    0x8960, 0x8961, 0x8962, 0x8963, 0x8964, 0x8965, 0x8966, 0x8967,
+    0x8968, 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f,
+    0x8970, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0x8976, 0x8977,
+    0x8978, 0x8979, 0x897a, 0x897b, 0x897c, 0x897d, 0x897e, 0x89a1,
+    0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, 0x89a8, 0x89a9,
+    0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, 0x89b1,
+    0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9,
+    0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89be, 0x89bf, 0x89c0, 0x89c1,
+    /* 0xf400 .. 0xf4ff */
+    0x89c2, 0x89c3, 0x89c4, 0x89c5, 0x89c6, 0x89c7, 0x89c8, 0x89c9,
+    0x89ca, 0x89cb, 0x89cc, 0x89cd, 0x89ce, 0x89cf, 0x89d0, 0x89d1,
+    0x89d2, 0x89d3, 0x89d4, 0x89d5, 0x89d6, 0x89d7, 0x89d8, 0x89d9,
+    0x89da, 0x89db, 0x89dc, 0x89dd, 0x89de, 0x89df, 0x89e0, 0x89e1,
+    0x89e2, 0x89e3, 0x89e4, 0x89e5, 0x89e6, 0x89e7, 0x89e8, 0x89e9,
+    0x89ea, 0x89eb, 0x89ec, 0x89ed, 0x89ee, 0x89ef, 0x89f0, 0x89f1,
+    0x89f2, 0x89f3, 0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9,
+    0x89fa, 0x89fb, 0x89fc, 0x89fd, 0x89fe, 0x8a40, 0x8a41, 0x8a42,
+    0x8a43, 0x8a44, 0x8a45, 0x8a46, 0x8a47, 0x8a48, 0x8a49, 0x8a4a,
+    0x8a4b, 0x8a4c, 0x8a4d, 0x8a4e, 0x8a4f, 0x8a50, 0x8a51, 0x8a52,
+    0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57, 0x8a58, 0x8a59, 0x8a5a,
+    0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0x8a5f, 0x8a60, 0x8a61, 0x8a62,
+    0x8a63, 0x8a64, 0x8a65, 0x8a66, 0x8a67, 0x8a68, 0x8a69, 0x8a6a,
+    0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f, 0x8a70, 0x8a71, 0x8a72,
+    0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77, 0x8a78, 0x8a79, 0x8a7a,
+    0x8a7b, 0x8a7c, 0x8a7d, 0x8a7e, 0x8aa1, 0x8aa2, 0x8aa3, 0x8aa4,
+    0x8aa5, 0x8aa6, 0x8aa7, 0x8aa8, 0x8aa9, 0x8aaa, 0x8aab, 0x8aac,
+    0x8aad, 0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4,
+    0x8ab5, 0x8ab6, 0x8ab7, 0x8ab8, 0x8ab9, 0x8aba, 0x8abb, 0x8abc,
+    0x8abd, 0x8abe, 0x8abf, 0x8ac0, 0x8ac1, 0x8ac2, 0x8ac3, 0x8ac4,
+    0x8ac5, 0x8ac6, 0x8ac7, 0x8ac8, 0x8ac9, 0x8aca, 0x8acb, 0x8acc,
+    0x8acd, 0x8ace, 0x8acf, 0x8ad0, 0x8ad1, 0x8ad2, 0x8ad3, 0x8ad4,
+    0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, 0x8ad9, 0x8ada, 0x8adb, 0x8adc,
+    0x8add, 0x8ade, 0x8adf, 0x8ae0, 0x8ae1, 0x8ae2, 0x8ae3, 0x8ae4,
+    0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb, 0x8aec,
+    0x8aed, 0x8aee, 0x8aef, 0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4,
+    0x8af5, 0x8af6, 0x8af7, 0x8af8, 0x8af9, 0x8afa, 0x8afb, 0x8afc,
+    0x8afd, 0x8afe, 0x8b40, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0x8b45,
+    0x8b46, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, 0x8b4d,
+    0x8b4e, 0x8b4f, 0x8b50, 0x8b51, 0x8b52, 0x8b53, 0x8b54, 0x8b55,
+    0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d,
+    0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65,
+    /* 0xf500 .. 0xf5ff */
+    0x8b66, 0x8b67, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6c, 0x8b6d,
+    0x8b6e, 0x8b6f, 0x8b70, 0x8b71, 0x8b72, 0x8b73, 0x8b74, 0x8b75,
+    0x8b76, 0x8b77, 0x8b78, 0x8b79, 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d,
+    0x8b7e, 0x8ba1, 0x8ba2, 0x8ba3, 0x8ba4, 0x8ba5, 0x8ba6, 0x8ba7,
+    0x8ba8, 0x8ba9, 0x8baa, 0x8bab, 0x8bac, 0x8bad, 0x8bae, 0x8baf,
+    0x8bb0, 0x8bb1, 0x8bb2, 0x8bb3, 0x8bb4, 0x8bb5, 0x8bb6, 0x8bb7,
+    0x8bb8, 0x8bb9, 0x8bba, 0x8bbb, 0x8bbc, 0x8bbd, 0x8bbe, 0x8bbf,
+    0x8bc0, 0x8bc1, 0x8bc2, 0x8bc3, 0x8bc4, 0x8bc5, 0x8bc6, 0x8bc7,
+    0x8bc8, 0x8bc9, 0x8bca, 0x8bcb, 0x8bcc, 0x8bcd, 0x8bce, 0x8bcf,
+    0x8bd0, 0x8bd1, 0x8bd2, 0x8bd3, 0x8bd4, 0x8bd5, 0x8bd6, 0x8bd7,
+    0x8bd8, 0x8bd9, 0x8bda, 0x8bdb, 0x8bdc, 0x8bdd, 0x8bde, 0x8bdf,
+    0x8be0, 0x8be1, 0x8be2, 0x8be3, 0x8be4, 0x8be5, 0x8be6, 0x8be7,
+    0x8be8, 0x8be9, 0x8bea, 0x8beb, 0x8bec, 0x8bed, 0x8bee, 0x8bef,
+    0x8bf0, 0x8bf1, 0x8bf2, 0x8bf3, 0x8bf4, 0x8bf5, 0x8bf6, 0x8bf7,
+    0x8bf8, 0x8bf9, 0x8bfa, 0x8bfb, 0x8bfc, 0x8bfd, 0x8bfe, 0x8c40,
+    0x8c41, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c46, 0x8c47, 0x8c48,
+    0x8c49, 0x8c4a, 0x8c4b, 0x8c4c, 0x8c4d, 0x8c4e, 0x8c4f, 0x8c50,
+    0x8c51, 0x8c52, 0x8c53, 0x8c54, 0x8c55, 0x8c56, 0x8c57, 0x8c58,
+    0x8c59, 0x8c5a, 0x8c5b, 0x8c5c, 0x8c5d, 0x8c5e, 0x8c5f, 0x8c60,
+    0x8c61, 0x8c62, 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, 0x8c68,
+    0x8c69, 0x8c6a, 0x8c6b, 0x8c6c, 0x8c6d, 0x8c6e, 0x8c6f, 0x8c70,
+    0x8c71, 0x8c72, 0x8c73, 0x8c74, 0x8c75, 0x8c76, 0x8c77, 0x8c78,
+    0x8c79, 0x8c7a, 0x8c7b, 0x8c7c, 0x8c7d, 0x8c7e, 0x8ca1, 0x8ca2,
+    0x8ca3, 0x8ca4, 0x8ca5, 0x8ca6, 0x8ca7, 0x8ca8, 0x8ca9, 0x8caa,
+    0x8cab, 0x8cac, 0x8cad, 0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb2,
+    0x8cb3, 0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba,
+    0x8cbb, 0x8cbc, 0x8cbd, 0x8cbe, 0x8cbf, 0x8cc0, 0x8cc1, 0x8cc2,
+    0x8cc3, 0x8cc4, 0x8cc5, 0x8cc6, 0x8cc7, 0x8cc8, 0x8cc9, 0x8cca,
+    0x8ccb, 0x8ccc, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, 0x8cd1, 0x8cd2,
+    0x8cd3, 0x8cd4, 0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda,
+    0x8cdb, 0x8cdc, 0x8cdd, 0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, 0x8ce2,
+    0x8ce3, 0x8ce4, 0x8ce5, 0x8ce6, 0x8ce7, 0x8ce8, 0x8ce9, 0x8cea,
+    /* 0xf600 .. 0xf6ff */
+    0x8ceb, 0x8cec, 0x8ced, 0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf2,
+    0x8cf3, 0x8cf4, 0x8cf5, 0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa,
+    0x8cfb, 0x8cfc, 0x8cfd, 0x8cfe, 0x8d40, 0x8d41, 0x8d42, 0x8d43,
+    0x8d44, 0x8d45, 0x8d46, 0x8d47, 0x8d48, 0x8d49, 0x8d4a, 0x8d4b,
+    0x8d4c, 0x8d4d, 0x8d4e, 0x8d4f, 0x8d50, 0x8d51, 0x8d52, 0x8d53,
+    0x8d54, 0x8d55, 0x8d56, 0x8d57, 0x8d58, 0x8d59, 0x8d5a, 0x8d5b,
+    0x8d5c, 0x8d5d, 0x8d5e, 0x8d5f, 0x8d60, 0x8d61, 0x8d62, 0x8d63,
+    0x8d64, 0x8d65, 0x8d66, 0x8d67, 0x8d68, 0x8d69, 0x8d6a, 0x8d6b,
+    0x8d6c, 0x8d6d, 0x8d6e, 0x8d6f, 0x8d70, 0x8d71, 0x8d72, 0x8d73,
+    0x8d74, 0x8d75, 0x8d76, 0x8d77, 0x8d78, 0x8d79, 0x8d7a, 0x8d7b,
+    0x8d7c, 0x8d7d, 0x8d7e, 0x8da1, 0x8da2, 0x8da3, 0x8da4, 0x8da5,
+    0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0x8dac, 0x8dad,
+    0x8dae, 0x8daf, 0x8db0, 0x8db1, 0x8db2, 0x8db3, 0x8db4, 0x8db5,
+    0x8db6, 0x8db7, 0x8db8, 0x8db9, 0x8dba, 0x8dbb, 0x8dbc, 0x8dbd,
+    0x8dbe, 0x8dbf, 0x8dc0, 0x8dc1, 0x8dc2, 0x8dc3, 0x8dc4, 0x8dc5,
+    0x8dc6, 0x8dc7, 0x8dc8, 0x8dc9, 0x8dca, 0x8dcb, 0x8dcc, 0x8dcd,
+    0x8dce, 0x8dcf, 0x8dd0, 0x8dd1, 0x8dd2, 0x8dd3, 0x8dd4, 0x8dd5,
+    0x8dd6, 0x8dd7, 0x8dd8, 0x8dd9, 0x8dda, 0x8ddb, 0x8ddc, 0x8ddd,
+    0x8dde, 0x8ddf, 0x8de0, 0x8de1, 0x8de2, 0x8de3, 0x8de4, 0x8de5,
+    0x8de6, 0x8de7, 0x8de8, 0x8de9, 0x8dea, 0x8deb, 0x8dec, 0x8ded,
+    0x8dee, 0x8def, 0x8df0, 0x8df1, 0x8df2, 0x8df3, 0x8df4, 0x8df5,
+    0x8df6, 0x8df7, 0x8df8, 0x8df9, 0x8dfa, 0x8dfb, 0x8dfc, 0x8dfd,
+    0x8dfe, 0xc6a1, 0xc6a2, 0xc6a3, 0xc6a4, 0xc6a5, 0xc6a6, 0xc6a7,
+    0xc6a8, 0xc6a9, 0xc6aa, 0xc6ab, 0xc6ac, 0xc6ad, 0xc6ae, 0xc6af,
+    0xc6b0, 0xc6b1, 0xc6b2, 0xc6b3, 0xc6b4, 0xc6b5, 0xc6b6, 0xc6b7,
+    0xc6b8, 0xc6b9, 0xc6ba, 0xc6bb, 0xc6bc, 0xc6bd, 0xc6be, 0xc6bf,
+    0xc6c0, 0xc6c1, 0xc6c2, 0xc6c3, 0xc6c4, 0xc6c5, 0xc6c6, 0xc6c7,
+    0xc6c8, 0xc6c9, 0xc6ca, 0xc6cb, 0xc6cc, 0xc6cd, 0xc6ce, 0xc6cf,
+    0xc6d0, 0xc6d1, 0xc6d2, 0xc6d3, 0xc6d4, 0xc6d5, 0xc6d6, 0xc6d7,
+    0xc6d8, 0xc6d9, 0xc6da, 0xc6db, 0xc6dc, 0xc6dd, 0xc6de, 0xc6df,
+    0xc6e0, 0xc6e1, 0xc6e2, 0xc6e3, 0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7,
+    0xc6e8, 0xc6e9, 0xc6ea, 0xc6eb, 0xc6ec, 0xc6ed, 0xc6ee, 0xc6ef,
+    /* 0xf700 .. 0xf7ff */
+    0xc6f0, 0xc6f1, 0xc6f2, 0xc6f3, 0xc6f4, 0xc6f5, 0xc6f6, 0xc6f7,
+    0xc6f8, 0xc6f9, 0xc6fa, 0xc6fb, 0xc6fc, 0xc6fd, 0xc6fe, 0xc740,
+    0xc741, 0xc742, 0xc743, 0xc744, 0xc745, 0xc746, 0xc747, 0xc748,
+    0xc749, 0xc74a, 0xc74b, 0xc74c, 0xc74d, 0xc74e, 0xc74f, 0xc750,
+    0xc751, 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758,
+    0xc759, 0xc75a, 0xc75b, 0xc75c, 0xc75d, 0xc75e, 0xc75f, 0xc760,
+    0xc761, 0xc762, 0xc763, 0xc764, 0xc765, 0xc766, 0xc767, 0xc768,
+    0xc769, 0xc76a, 0xc76b, 0xc76c, 0xc76d, 0xc76e, 0xc76f, 0xc770,
+    0xc771, 0xc772, 0xc773, 0xc774, 0xc775, 0xc776, 0xc777, 0xc778,
+    0xc779, 0xc77a, 0xc77b, 0xc77c, 0xc77d, 0xc77e, 0xc7a1, 0xc7a2,
+    0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa,
+    0xc7ab, 0xc7ac, 0xc7ad, 0xc7ae, 0xc7af, 0xc7b0, 0xc7b1, 0xc7b2,
+    0xc7b3, 0xc7b4, 0xc7b5, 0xc7b6, 0xc7b7, 0xc7b8, 0xc7b9, 0xc7ba,
+    0xc7bb, 0xc7bc, 0xc7bd, 0xc7be, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c2,
+    0xc7c3, 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, 0xc7c8, 0xc7c9, 0xc7ca,
+    0xc7cb, 0xc7cc, 0xc7cd, 0xc7ce, 0xc7cf, 0xc7d0, 0xc7d1, 0xc7d2,
+    0xc7d3, 0xc7d4, 0xc7d5, 0xc7d6, 0xc7d7, 0xc7d8, 0xc7d9, 0xc7da,
+    0xc7db, 0xc7dc, 0xc7dd, 0xc7de, 0xc7df, 0xc7e0, 0xc7e1, 0xc7e2,
+    0xc7e3, 0xc7e4, 0xc7e5, 0xc7e6, 0xc7e7, 0xc7e8, 0xc7e9, 0xc7ea,
+    0xc7eb, 0xc7ec, 0xc7ed, 0xc7ee, 0xc7ef, 0xc7f0, 0xc7f1, 0xc7f2,
+    0xc7f3, 0xc7f4, 0xc7f5, 0xc7f6, 0xc7f7, 0xc7f8, 0xc7f9, 0xc7fa,
+    0xc7fb, 0xc7fc, 0xc7fd, 0xc7fe, 0xc840, 0xc841, 0xc842, 0xc843,
+    0xc844, 0xc845, 0xc846, 0xc847, 0xc848, 0xc849, 0xc84a, 0xc84b,
+    0xc84c, 0xc84d, 0xc84e, 0xc84f, 0xc850, 0xc851, 0xc852, 0xc853,
+    0xc854, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, 0xc85a, 0xc85b,
+    0xc85c, 0xc85d, 0xc85e, 0xc85f, 0xc860, 0xc861, 0xc862, 0xc863,
+    0xc864, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, 0xc86a, 0xc86b,
+    0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc870, 0xc871, 0xc872, 0xc873,
+    0xc874, 0xc875, 0xc876, 0xc877, 0xc878, 0xc879, 0xc87a, 0xc87b,
+    0xc87c, 0xc87d, 0xc87e, 0xc8a1, 0xc8a2, 0xc8a3, 0xc8a4, 0xc8a5,
+    0xc8a6, 0xc8a7, 0xc8a8, 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, 0xc8ad,
+    0xc8ae, 0xc8af, 0xc8b0, 0xc8b1, 0xc8b2, 0xc8b3, 0xc8b4, 0xc8b5,
+    /* 0xf800 .. 0xf8ff */
+    0xc8b6, 0xc8b7, 0xc8b8, 0xc8b9, 0xc8ba, 0xc8bb, 0xc8bc, 0xc8bd,
+    0xc8be, 0xc8bf, 0xc8c0, 0xc8c1, 0xc8c2, 0xc8c3, 0xc8c4, 0xc8c5,
+    0xc8c6, 0xc8c7, 0xc8c8, 0xc8c9, 0xc8ca, 0xc8cb, 0xc8cc, 0xc8cd,
+    0xc8ce, 0xc8cf, 0xc8d0, 0xc8d1, 0xc8d2, 0xc8d3, 0xc8d4, 0xc8d5,
+    0xc8d6, 0xc8d7, 0xc8d8, 0xc8d9, 0xc8da, 0xc8db, 0xc8dc, 0xc8dd,
+    0xc8de, 0xc8df, 0xc8e0, 0xc8e1, 0xc8e2, 0xc8e3, 0xc8e4, 0xc8e5,
+    0xc8e6, 0xc8e7, 0xc8e8, 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, 0xc8ed,
+    0xc8ee, 0xc8ef, 0xc8f0, 0xc8f1, 0xc8f2, 0xc8f3, 0xc8f4, 0xc8f5,
+    0xc8f6, 0xc8f7, 0xc8f8, 0xc8f9, 0xc8fa, 0xc8fb, 0xc8fc, 0xc8fd,
+    0xc8fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x00ff, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0xf900 .. 0xf9ff */
     0xb05a, 0xa7f3, 0xa8ae, 0xb8eb, 0xb7c6, 0xa6ea, 0xa579, 0xc074,
@@ -6355,5 +8203,5 @@
     0xb8a8, 0xb954, 0xc064, 0xb6c3, 0xa75a, 0xc4e6, 0xc4ea, 0xc4f5,
     0xc67d, 0xb450, 0xc0dd, 0xc2c5, 0xc4b0, 0xa9d4, 0xc3be, 0xc4fa,
-    0xb459, 0xaed4, 0xaef6, 0xaf54, 0xada6, 0xa8d3, 0xa74e, 0xb3d2,
+    0xb459, 0xaed4, 0xaef6, 0xaf54, 0x003f, 0xa8d3, 0xa74e, 0xb3d2,
     0xbedb, 0xc372, 0xc46c, 0xbf63, 0xa6d1, 0xc4aa, 0xb8b8, 0xb8f4,
     0xc553, 0xbe7c, 0xc64f, 0xb84c, 0xb853, 0xbaf1, 0xdb77, 0xbffd,
@@ -6378,5 +8226,5 @@
     0xc3fe, 0xa4bb, 0xbcae, 0xb3b0, 0xaddb, 0xb15b, 0xb25f, 0xbdfc,
     0xabdf, 0xb758, 0xaedf, 0xb276, 0xb6a9, 0xa751, 0xa64f, 0xbc69,
-    0xa9f6, 0xa7f5, 0xb1f9, 0xaa64, 0xb27a, 0xb567, 0xbfa9, 0xf9d8,
+    0xa9f6, 0xa7f5, 0xb1f9, 0xaa64, 0xb27a, 0xb567, 0xbfa9, 0x003f,
     0xb8cc, 0xa8bd, 0xc2f7, 0xb0ce, 0xb7c4, 0xa75b, 0xbf4d, 0xbf5a,
     0xc4a9, 0x003f, 0xc5ec, 0xc5ef, 0xaa4c, 0xb24f, 0xc17b, 0xa5df,
@@ -6385,41 +8233,8 @@
     0xa4c1, 0xabd7, 0xa9dd, 0xbf7d, 0xa676, 0xac7d, 0xbcc9, 0xbfe7,
     0xa6e6, 0xadb0, 0xa8a3, 0xb9f8, 0xc94a, 0xddfc, 0x003f, 0x003f,
-    0xb6ef, 0x003f, 0xb4b8, 0x003f, 0x003f, 0xe8f9, 0x003f, 0xaf71,
+    0xb6ef, 0x003f, 0xb4b8, 0x003f, 0x003f, 0xe8f9, 0xbdde, 0xaf71,
     0x003f, 0xafab, 0xb2bb, 0xbad6, 0xb974, 0xbaeb, 0xa6d0, 0x003f,
     0x003f, 0x003f, 0xbdd1, 0x003f, 0x003f, 0xb668, 0xb3a3, 0x003f,
     0x003f, 0x003f, 0xb6ba, 0xb97d, 0xc05d, 0xc562, 0x003f, 0x003f,
-    0xab56, 0xb9ac, 0xa74b, 0xab6a, 0xb6d4, 0xa8f5, 0xb3dc, 0xb9c4,
-    0xbeb9, 0x003f, 0xbea5, 0xbc68, 0xc94b, 0xaeac, 0xb46e, 0xbca8,
-    0xc367, 0xb1d3, 0xac4a, 0xb4bb, 0xb1f6, 0xaefc, 0xb25a, 0xba7e,
-    0xb54e, 0x003f, 0xb55a, 0xb84f, 0xaac0, 0xace7, 0xace8, 0xafa7,
-    0xafaa, 0xafac, 0xbad7, 0xbad5, 0xbd5c, 0xacf0, 0xb860, 0xbd6d,
-    0xbfa7, 0xc163, 0xb870, 0xaacc, 0xafe4, 0x003f, 0x003f, 0xb5db,
-    0xbdc5, 0xb5f8, 0xbfd6, 0xc2d4, 0xbbab, 0xc3d8, 0x003f, 0xb668,
-    0xc3f8, 0xc554, 0xc057, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa8c3, 0x003f, 0xa5fe, 0xcbb6, 0xa552, 0xbeac, 0xab69, 0xa463,
-    0xb3dc, 0xb0de, 0xb3f1, 0xdcda, 0xb6ef, 0xbc58, 0xa961, 0xa962,
-    0xb141, 0xe959, 0xe1bc, 0xe1bb, 0xb16d, 0xdd64, 0xb1a6, 0xb756,
-    0xb755, 0xbca8, 0x003f, 0xc367, 0xc0b9, 0xd967, 0xb76a, 0xb4ac,
-    0xb1ce, 0xb4b8, 0xaed4, 0xb1e6, 0xa7fa, 0xa4ef, 0xb1fe, 0xac79,
-    0x003f, 0xb4fe, 0xba7e, 0x003f, 0xb54e, 0xc140, 0xc0ef, 0xa5c7,
-    0x003f, 0xe2d0, 0x003f, 0x003f, 0xe6b2, 0xbd45, 0xaf71, 0xb2b1,
-    0xaabd, 0xdabf, 0x003f, 0xe6c3, 0xeab5, 0xb860, 0x003f, 0xb86c,
-    0xbd6d, 0xdafc, 0xaacc, 0xafee, 0xb5d8, 0xeb64, 0xee75, 0xc2d0,
-    0xb5f8, 0xbdd5, 0xbdd1, 0xbdd0, 0xbfd6, 0xbfd5, 0xbfd9, 0xc2d4,
-    0xc5dc, 0xc3d8, 0xbfe9, 0xbff0, 0xeec8, 0xe478, 0xd847, 0xc3f8,
-    0xb974, 0x003f, 0xc554, 0x003f, 0xc057, 0xf568, 0xc074, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xf87d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    /* 0xfb00 .. 0xfbff */
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x002b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -6460,5 +8275,5 @@
     0x003f, 0xa1c6, 0xa1c7, 0xa1ca, 0xa1cb, 0xa1c8, 0xa1c9, 0xa15c,
     0xa14d, 0xa14e, 0xa14f, 0x003f, 0xa151, 0xa152, 0xa153, 0xa154,
-    0xa158, 0xa17d, 0xa17e, 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1cc,
+    0x003f, 0xa17d, 0xa17e, 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1cc,
     0xa1cd, 0xa1ce, 0xa1de, 0xa1df, 0xa1e0, 0xa1e1, 0xa1e2, 0x003f,
     0xa242, 0xa24c, 0xa24d, 0xa24e, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -6482,5 +8297,5 @@
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     /* 0xff00 .. 0xffff */
-    0x003f, 0xa149, 0x0022, 0xa1ad, 0xa243, 0xa248, 0xa1ae, 0x0027,
+    0x003f, 0xa149, 0xa1a8, 0xa1ad, 0xa243, 0xa248, 0xa1ae, 0xa1a6,
     0xa15d, 0xa15e, 0xa1af, 0xa1cf, 0xa141, 0xa1d0, 0xa144, 0xa1fe,
     0xa2af, 0xa2b0, 0xa2b1, 0xa2b2, 0xa2b3, 0xa2b4, 0xa2b5, 0xa2b6,
@@ -6489,27 +8304,27 @@
     0xa2d6, 0xa2d7, 0xa2d8, 0xa2d9, 0xa2da, 0xa2db, 0xa2dc, 0xa2dd,
     0xa2de, 0xa2df, 0xa2e0, 0xa2e1, 0xa2e2, 0xa2e3, 0xa2e4, 0xa2e5,
-    0xa2e6, 0xa2e7, 0xa2e8, 0x005b, 0xa240, 0x005d, 0x005e, 0xa1c4,
-    0x0060, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, 0xa2ed, 0xa2ee, 0xa2ef,
+    0xa2e6, 0xa2e7, 0xa2e8, 0xa165, 0xa240, 0xa166, 0xa173, 0xa1c4,
+    0xa1a5, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, 0xa2ed, 0xa2ee, 0xa2ef,
     0xa2f0, 0xa2f1, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7,
     0xa2f8, 0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0xa2fd, 0xa2fe, 0xa340,
     0xa341, 0xa342, 0xa343, 0xa161, 0xa155, 0xa162, 0xa1e3, 0x003f,
-    0x003f, 0xa143, 0xa175, 0xa176, 0xa142, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-    0xa246, 0xa247, 0x003f, 0xa1c3, 0x007c, 0xa244, 0x003f, 0x003f,
-    0xa278, 0xa1f6, 0xa1f4, 0xa1f7, 0xa1f5, 0xa1bd, 0xa1b3, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0xa14e, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
+    0xa246, 0xa247, 0x003f, 0xa1c3, 0x003f, 0xa244, 0x003f, 0x003f,
+    0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
     0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
@@ -6551,36 +8366,36 @@
 static const unsigned short uni2cp_high[256] =
 {
-    0x0000, 0x0100, 0x0200, 0x0300, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x0400, 0x0500, 0x0600,
-    0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x0e00, 0x0f00,
-    0x1000, 0x1100, 0x1200, 0x1300, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x1400, 0x1500,
-    0x1600, 0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00,
-    0x1e00, 0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500,
-    0x2600, 0x2700, 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00,
-    0x2e00, 0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500,
-    0x3600, 0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00,
-    0x3e00, 0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500,
-    0x4600, 0x4700, 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00,
-    0x4e00, 0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500,
-    0x5600, 0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00,
-    0x5e00, 0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00,
-    0x6b00, 0x6600, 0x6700, 0x6800, 0x6b00, 0x6b00, 0x6900, 0x6a00
+    0x0000, 0x7c00, 0x0100, 0x0200, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x0300, 0x0400, 0x0500, 0x0600, 0x7c00, 0x0700, 0x0800, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x0900, 0x0a00, 0x0b00, 0x0c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x0d00, 0x0e00,
+    0x0f00, 0x1000, 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1600,
+    0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00,
+    0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600,
+    0x2700, 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00,
+    0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600,
+    0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00,
+    0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600,
+    0x4700, 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00,
+    0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600,
+    0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+    0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600,
+    0x6700, 0x6800, 0x6900, 0x6a00, 0x6b00, 0x6c00, 0x6d00, 0x6e00,
+    0x6f00, 0x7000, 0x7100, 0x7200, 0x7300, 0x7400, 0x7500, 0x7600,
+    0x7700, 0x7800, 0x7900, 0x7c00, 0x7c00, 0x7c00, 0x7a00, 0x7b00
 };
 
@@ -6592,4 +8407,6 @@
     uni2cp_low,
     uni2cp_high,
-    { 0x81, 0xfe, 0x00, 0x00 }
+    {
+        0x81, 0xfe, 0x00, 0x00
+    }
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/config.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/config.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/config.c	(revision 19678)
@@ -431,5 +431,5 @@
 static void preloader_exec( char **argv, int use_preloader )
 {
-#ifdef linux
+#if defined(linux) && defined(__i386__)
     if (use_preloader)
     {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/cpmap.pl
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/cpmap.pl	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/cpmap.pl	(revision 19678)
@@ -1,3 +1,3 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
 #
 # Generate code page .c files from ftp.unicode.org descriptions
@@ -20,5 +20,5 @@
 #
 
-
+#
 # Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
 # other than GPL or LGPL is available it will apply instead, Sun elects to use only
@@ -27,21 +27,25 @@
 # that LGPLv2 or any later version may be used, or where a choice of which version
 # of the LGPL is applied is otherwise unspecified.
+#
+
+use strict;
+
 # base directory for ftp.unicode.org files
-$BASEDIR = "ftp.unicode.org/Public/";
-$MAPPREFIX = $BASEDIR . "MAPPINGS/";
+my $BASEDIR = "ftp.unicode.org/Public/";
+my $MAPPREFIX = $BASEDIR . "MAPPINGS/";
 
 # UnicodeData file
-$UNICODEDATA = $BASEDIR . "UNIDATA/UnicodeData.txt";
+my $UNICODEDATA = $BASEDIR . "UNIDATA/UnicodeData.txt";
 
 # Sort keys file
-$SORTKEYS = "www.unicode.org/reports/tr10/allkeys.txt";
+my $SORTKEYS = "www.unicode.org/reports/tr10/allkeys.txt";
 
 # Defaults mapping
-$DEFAULTS = "./defaults";
+my $DEFAULTS = "./defaults";
 
 # Default char for undefined mappings
-$DEF_CHAR = ord '?';
-
-@allfiles =
+my $DEF_CHAR = ord '?';
+
+my @allfiles =
 (
     [ 37,    "VENDORS/MICSFT/EBCDIC/CP037.TXT",   0, "IBM EBCDIC US Canada" ],
@@ -64,22 +68,22 @@
     [ 866,   "VENDORS/MICSFT/PC/CP866.TXT",       1, "OEM Russian" ],
     [ 869,   "VENDORS/MICSFT/PC/CP869.TXT",       1, "OEM Greek" ],
-    [ 874,   "VENDORS/MICSFT/PC/CP874.TXT",       1, "ANSI/OEM Thai" ],
-    [ 875,   "VENDORS/MICSFT/EBCDIC/CP875.TXT",   0, "IBM EBCDIC Greek" ],
-    [ 878,   "VENDORS/MISC/KOI8-R.TXT",           0, "Russian KOI8" ],
-    [ 932,   "VENDORS/MICSFT/WINDOWS/CP932.TXT",  0, "ANSI/OEM Japanese Shift-JIS" ],
-    [ 936,   "VENDORS/MICSFT/WINDOWS/CP936.TXT",  0, "ANSI/OEM Simplified Chinese GBK" ],
-    [ 949,   "VENDORS/MICSFT/WINDOWS/CP949.TXT",  0, "ANSI/OEM Korean Unified Hangul" ],
-    [ 950,   "VENDORS/MICSFT/WINDOWS/CP950.TXT",  0, "ANSI/OEM Traditional Chinese Big5" ],
-    [ 1006,  "VENDORS/MISC/CP1006.TXT",           0, "IBM Arabic" ],
-    [ 1026,  "VENDORS/MICSFT/EBCDIC/CP1026.TXT",  0, "IBM EBCDIC Latin 5 Turkish" ],
-    [ 1250,  "VENDORS/MICSFT/WINDOWS/CP1250.TXT", 0, "ANSI Eastern Europe" ],
-    [ 1251,  "VENDORS/MICSFT/WINDOWS/CP1251.TXT", 0, "ANSI Cyrillic" ],
-    [ 1252,  "VENDORS/MICSFT/WINDOWS/CP1252.TXT", 0, "ANSI Latin 1" ],
-    [ 1253,  "VENDORS/MICSFT/WINDOWS/CP1253.TXT", 0, "ANSI Greek" ],
-    [ 1254,  "VENDORS/MICSFT/WINDOWS/CP1254.TXT", 0, "ANSI Turkish" ],
-    [ 1255,  "VENDORS/MICSFT/WINDOWS/CP1255.TXT", 0, "ANSI Hebrew" ],
-    [ 1256,  "VENDORS/MICSFT/WINDOWS/CP1256.TXT", 0, "ANSI Arabic" ],
-    [ 1257,  "VENDORS/MICSFT/WINDOWS/CP1257.TXT", 0, "ANSI Baltic" ],
-    [ 1258,  "VENDORS/MICSFT/WINDOWS/CP1258.TXT", 0, "ANSI/OEM Viet Nam" ],
+    [ 874,   "VENDORS/MICSFT/WindowsBestFit/bestfit874.txt",  1, "ANSI/OEM Thai" ],
+    [ 875,   "VENDORS/MICSFT/EBCDIC/CP875.TXT",               0, "IBM EBCDIC Greek" ],
+    [ 878,   "VENDORS/MISC/KOI8-R.TXT",                       0, "Russian KOI8" ],
+    [ 932,   "VENDORS/MICSFT/WindowsBestFit/bestfit932.txt",  0, "ANSI/OEM Japanese Shift-JIS" ],
+    [ 936,   "VENDORS/MICSFT/WindowsBestFit/bestfit936.txt",  0, "ANSI/OEM Simplified Chinese GBK" ],
+    [ 949,   "VENDORS/MICSFT/WindowsBestFit/bestfit949.txt",  0, "ANSI/OEM Korean Unified Hangul" ],
+    [ 950,   "VENDORS/MICSFT/WindowsBestFit/bestfit950.txt",  0, "ANSI/OEM Traditional Chinese Big5" ],
+    [ 1006,  "VENDORS/MISC/CP1006.TXT",                       0, "IBM Arabic" ],
+    [ 1026,  "VENDORS/MICSFT/EBCDIC/CP1026.TXT",              0, "IBM EBCDIC Latin 5 Turkish" ],
+    [ 1250,  "VENDORS/MICSFT/WindowsBestFit/bestfit1250.txt", 0, "ANSI Eastern Europe" ],
+    [ 1251,  "VENDORS/MICSFT/WindowsBestFit/bestfit1251.txt", 0, "ANSI Cyrillic" ],
+    [ 1252,  "VENDORS/MICSFT/WindowsBestFit/bestfit1252.txt", 0, "ANSI Latin 1" ],
+    [ 1253,  "VENDORS/MICSFT/WindowsBestFit/bestfit1253.txt", 0, "ANSI Greek" ],
+    [ 1254,  "VENDORS/MICSFT/WindowsBestFit/bestfit1254.txt", 0, "ANSI Turkish" ],
+    [ 1255,  "VENDORS/MICSFT/WindowsBestFit/bestfit1255.txt", 0, "ANSI Hebrew" ],
+    [ 1256,  "VENDORS/MICSFT/WindowsBestFit/bestfit1256.txt", 0, "ANSI Arabic" ],
+    [ 1257,  "VENDORS/MICSFT/WindowsBestFit/bestfit1257.txt", 0, "ANSI Baltic" ],
+    [ 1258,  "VENDORS/MICSFT/WindowsBestFit/bestfit1258.txt", 0, "ANSI/OEM Viet Nam" ],
     [ 1361,  "OBSOLETE/EASTASIA/KSC/JOHAB.TXT",   0, "Korean Johab" ],
     [ 10000, "VENDORS/MICSFT/MAC/ROMAN.TXT",      0, "Mac Roman" ],
@@ -110,5 +114,5 @@
 
 
-%ctype =
+my %ctype =
 (
     "upper"  => 0x0001,
@@ -123,5 +127,5 @@
 );
 
-%categories =
+my %categories =
 (
     "Lu" => $ctype{"alpha"}|$ctype{"upper"}, # Letter, Uppercase
@@ -158,5 +162,5 @@
 
 # a few characters need additional categories that cannot be determined automatically
-%special_categories =
+my %special_categories =
 (
     "xdigit" => [ ord('0')..ord('9'),ord('A')..ord('F'),ord('a')..ord('f'),
@@ -170,5 +174,5 @@
 );
 
-%directions =
+my %directions =
 (
     "L"   => 1,    # Left-to-Right
@@ -193,41 +197,30 @@
 );
 
-
-################################################################
-# main routine
-
-READ_DEFAULTS();
-my @sortkeys = READ_SORTKEYS_FILE();
-DUMP_CASE_MAPPINGS();
-DUMP_SORTKEYS(@sortkeys);
-DUMP_COMPOSE_TABLES();
-DUMP_CTYPE_TABLES();
-
-foreach $file (@allfiles) { HANDLE_FILE( @$file ); }
-
-OUTPUT_CPTABLE();
-
-exit(0);
+my @cp2uni = ();
+my @lead_bytes = ();
+my @uni2cp = ();
+my @unicode_defaults = ();
+my @unicode_aliases = ();
+my @tolower_table = ();
+my @toupper_table = ();
+my @digitmap_table = ();
+my @compatmap_table = ();
+my @category_table = (0) x 65536;
+my @direction_table = ();
+my @decomp_table = ();
+my @compose_table = ();
 
 
 ################################################################
 # read in the defaults file
-sub READ_DEFAULTS
-{
-    @unicode_defaults = ();
-    @unicode_aliases = ();
-    @tolower_table = ();
-    @toupper_table = ();
-    @digitmap_table = ();
-    @compatmap_table = ();
-    @category_table = ();
-    @direction_table = ();
-    @decomp_table = ();
-    @compose_table = ();
+sub READ_DEFAULTS($)
+{
+    my $filename = shift;
+    my $start;
 
     # first setup a few default mappings
 
-    open DEFAULTS or die "Cannot open $DEFAULTS";
-    print "Loading $DEFAULTS\n";
+    open DEFAULTS, "$filename" or die "Cannot open $filename";
+    print "Loading $filename\n";
     while (<DEFAULTS>)
     {
@@ -242,5 +235,5 @@
             next if ($dst eq "none");
             $dst = ($dst =~ /\'.\'/) ? ord substr($dst,1,1) : hex $dst;
-            foreach $src (@src)
+            foreach my $src (@src)
             {
                 die "Duplicate value" if defined($unicode_defaults[$src]);
@@ -254,13 +247,13 @@
     # now build mappings from the decomposition field of the Unicode database
 
-    open UNICODEDATA or die "Cannot open $UNICODEDATA";
+    open UNICODEDATA, "$UNICODEDATA" or die "Cannot open $UNICODEDATA";
     print "Loading $UNICODEDATA\n";
     while (<UNICODEDATA>)
     {
 	# Decode the fields ...
-	($code, $name, $cat, $comb, $bidi,
-	 $decomp, $dec, $dig, $num, $mirror,
-	 $oldname, $comment, $upper, $lower, $title) = split /;/;
-
+	my ($code, $name, $cat, $comb, $bidi,
+            $decomp, $dec, $dig, $num, $mirror,
+            $oldname, $comment, $upper, $lower, $title) = split /;/;
+        my $dst;
         my $src = hex $code;
 
@@ -268,5 +261,4 @@
         die "unknown directionality $bidi" unless defined $directions{$bidi};
 
-        $uniname[$src] = $name;
         $category_table[$src] = $categories{$cat};
         $direction_table[$src] = $directions{$bidi};
@@ -333,5 +325,5 @@
             # decomposition contains only char values without prefix -> use first char
             $dst = hex $1;
-            $category_table[$src] |= $category_table[$dst];
+            $category_table[$src] |= $category_table[$dst] if defined $category_table[$dst];
             # store decomposition if it contains two chars
             if ($decomp =~ /^([0-9a-fA-F]+)\s+([0-9a-fA-F]+)$/)
@@ -355,5 +347,5 @@
 
         # check for loops
-        for ($i = $dst; ; $i = $unicode_defaults[$i])
+        for (my $i = $dst; ; $i = $unicode_defaults[$i])
         {
             die sprintf("loop detected for %04x -> %04x",$src,$dst) if $i == $src;
@@ -365,8 +357,8 @@
     # patch the category of some special characters
 
-    foreach $cat (keys %special_categories)
+    foreach my $cat (keys %special_categories)
     {
         my $flag = $ctype{$cat};
-        foreach $i (@{$special_categories{$cat}}) { $category_table[$i] |= $flag; }
+        foreach my $i (@{$special_categories{$cat}}) { $category_table[$i] |= $flag; }
     }
 }
@@ -375,5 +367,5 @@
 ################################################################
 # parse the input file
-sub READ_FILE
+sub READ_FILE($)
 {
     my $name = shift;
@@ -389,5 +381,5 @@
         if (/^0x([0-9a-fA-F]+)\s+\#DBCS LEAD BYTE/)
         {
-            $cp = hex $1;
+            my $cp = hex $1;
             push @lead_bytes,$cp;
             $cp2uni[$cp] = 0;
@@ -396,6 +388,6 @@
         if (/^0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)\s+(\#.*)?/)
         {
-            $cp = hex $1;
-            $uni = hex $2;
+            my $cp = hex $1;
+            my $uni = hex $2;
             $cp2uni[$cp] = $uni unless defined($cp2uni[$cp]);
             $uni2cp[$uni] = $cp unless defined($uni2cp[$uni]);
@@ -464,10 +456,10 @@
 # FIXME: for proper EUC-JP we should probably read JIS 0212 too
 # but this would require 3-byte DBCS characters
-sub READ_JIS0208_FILE
+sub READ_JIS0208_FILE($)
 {
     my $name = shift;
 
     # ASCII chars
-    for ($i = 0x00; $i <= 0x7f; $i++)
+    for (my $i = 0x00; $i <= 0x7f; $i++)
     {
         $cp2uni[$i] = $i;
@@ -476,5 +468,5 @@
 
     # JIS X 0201 right plane
-    for ($i = 0xa1; $i <= 0xdf; $i++)
+    for (my $i = 0xa1; $i <= 0xdf; $i++)
     {
         $cp2uni[0x8e00 + $i] = 0xfec0 + $i;
@@ -483,5 +475,5 @@
 
     # lead bytes
-    foreach $i (0x8e, 0x8f, 0xa1 .. 0xfe)
+    foreach my $i (0x8e, 0x8f, 0xa1 .. 0xfe)
     {
         push @lead_bytes,$i;
@@ -490,5 +482,5 @@
 
     # undefined chars
-    foreach $i (0x80 .. 0x8d, 0x90 .. 0xa0, 0xff)
+    foreach my $i (0x80 .. 0x8d, 0x90 .. 0xa0, 0xff)
     {
         $cp2uni[$i] = $DEF_CHAR;
@@ -511,6 +503,6 @@
         if (/^0x[0-9a-fA-F]+\s+0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)\s+(\#.*)?/)
         {
-            $cp = 0x8080 + hex $1;
-            $uni = hex $2;
+            my $cp = 0x8080 + hex $1;
+            my $uni = hex $2;
             $cp2uni[$cp] = $uni unless defined($cp2uni[$cp]);
             $uni2cp[$uni] = $cp unless defined($uni2cp[$uni]);
@@ -524,5 +516,5 @@
 ################################################################
 # build the sort keys table
-sub READ_SORTKEYS_FILE
+sub READ_SORTKEYS_FILE()
 {
     my @sortkeys = ();
@@ -615,7 +607,7 @@
 ################################################################
 # build the sort keys table
-sub DUMP_SORTKEYS
-{
-    my @keys = @_;
+sub DUMP_SORTKEYS($@)
+{
+    my ($filename, @keys) = @_;
 
     # count the number of 256-key ranges that contain something
@@ -634,6 +626,6 @@
     # output the range offsets
 
-    open OUTPUT,">collation.c.new" or die "Cannot create collation.c";
-    printf "Building collation.c\n";
+    open OUTPUT,">$filename.new" or die "Cannot create $filename";
+    printf "Building $filename\n";
     printf OUTPUT "/* Unicode collation element table */\n";
     printf OUTPUT "/* generated from %s */\n", $SORTKEYS;
@@ -659,5 +651,5 @@
     printf OUTPUT "\n};\n";
     close OUTPUT;
-    save_file("collation.c");
+    save_file($filename);
 }
 
@@ -665,12 +657,12 @@
 ################################################################
 # add default mappings once the file had been read
-sub ADD_DEFAULT_MAPPINGS
+sub ADD_DEFAULT_MAPPINGS()
 {
     # Apply aliases
 
-    foreach $alias (@unicode_aliases)
+    foreach my $alias (@unicode_aliases)
     {
         my $target = undef;
-        foreach $src (@$alias)
+        foreach my $src (@$alias)
         {
             if (defined($uni2cp[$src]))
@@ -683,5 +675,5 @@
 
         # At least one char of the alias set is defined, set the others to the same value
-        foreach $src (@$alias)
+        foreach my $src (@$alias)
         {
             $uni2cp[$src] = $target unless defined($uni2cp[$src]);
@@ -692,5 +684,5 @@
     # make uni2cp[src] = uni2cp[target] if uni2cp[target] is defined
 
-    for ($src = 0; $src < 65536; $src++)
+    for (my $src = 0; $src < 65536; $src++)
     {
         next if defined($uni2cp[$src]);  # source has a definition already
@@ -707,5 +699,5 @@
     # Add an identity mapping for all undefined chars
 
-    for ($i = 0; $i < 256; $i++)
+    for (my $i = 0; $i < 256; $i++)
     {
         next if defined($cp2uni[$i]);
@@ -717,8 +709,9 @@
 ################################################################
 # dump an array of integers
-sub DUMP_ARRAY
+sub DUMP_ARRAY($$@)
 {
     my ($format,$default,@array) = @_;
-    my $i, $ret = "    ";
+    my $i;
+    my $ret = "    ";
     for ($i = 0; $i < $#array; $i++)
     {
@@ -732,7 +725,7 @@
 ################################################################
 # dump an SBCS mapping table
-sub DUMP_SBCS_TABLE
-{
-    my ($codepage, $has_glyphs, $name) = @_;
+sub dump_sbcs_table($$$$$)
+{
+    my ($codepage, $has_glyphs, $name, $def, $defw) = @_;
     my $i;
 
@@ -742,12 +735,12 @@
     {
         printf OUTPUT "static const WCHAR cp2uni[512] =\n";
-        printf OUTPUT "{\n%s", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[0 .. 255] );
+        printf OUTPUT "{\n%s", DUMP_ARRAY( "0x%04x", $defw, @cp2uni[0 .. 255] );
         printf OUTPUT ",\n    /* glyphs */\n%s\n};\n\n",
-                      DUMP_ARRAY( "0x%04x", $DEF_CHAR, get_glyphs_mapping(@cp2uni[0 .. 255]) );
+                      DUMP_ARRAY( "0x%04x", $defw, get_glyphs_mapping(@cp2uni[0 .. 255]) );
     }
     else
     {
         printf OUTPUT "static const WCHAR cp2uni[256] =\n";
-        printf OUTPUT "{\n%s\n};\n\n", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[0 .. 255] );
+        printf OUTPUT "{\n%s\n};\n\n", DUMP_ARRAY( "0x%04x", $defw, @cp2uni[0 .. 255] );
     }
 
@@ -756,5 +749,5 @@
     my @filled = ();
     my $subtables = 1;
-    for ($i = 0; $i < 65536; $i++)
+    for (my $i = 0; $i < 65536; $i++)
     {
         next unless defined $uni2cp[$i];
@@ -767,12 +760,12 @@
 
     printf OUTPUT "static const unsigned char uni2cp_low[%d] =\n{\n", $subtables*256;
-    for ($i = 0; $i < 256; $i++)
+    for (my $i = 0; $i < 256; $i++)
     {
         next unless $filled[$i];
         printf OUTPUT "    /* 0x%02x00 .. 0x%02xff */\n", $i, $i;
-        printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%02x", $DEF_CHAR, @uni2cp[($i<<8) .. ($i<<8)+255] );
+        printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%02x", $def, @uni2cp[($i<<8) .. ($i<<8)+255] );
     }
     printf OUTPUT "    /* defaults */\n";
-    printf OUTPUT "%s\n};\n\n", DUMP_ARRAY( "0x%02x", 0, ($DEF_CHAR) x 256 );
+    printf OUTPUT "%s\n};\n\n", DUMP_ARRAY( "0x%02x", 0, ($def) x 256 );
 
     # output a table of the offsets of the subtables in the previous array
@@ -780,5 +773,5 @@
     my $pos = 0;
     my @offsets = ();
-    for ($i = 0; $i < 256; $i++)
+    for (my $i = 0; $i < 256; $i++)
     {
         if ($filled[$i]) { push @offsets, $pos; $pos += 256; }
@@ -792,5 +785,5 @@
     printf OUTPUT "const struct sbcs_table cptable_%03d =\n{\n", $codepage;
     printf OUTPUT "    { %d, 1, 0x%04x, 0x%04x, \"%s\" },\n",
-                  $codepage, $DEF_CHAR, $DEF_CHAR, $name;
+                  $codepage, $def, $defw, $name;
     printf OUTPUT "    cp2uni,\n";
     if ($has_glyphs) { printf OUTPUT "    cp2uni + 256,\n"; }
@@ -803,16 +796,15 @@
 ################################################################
 # dump a DBCS mapping table
-sub DUMP_DBCS_TABLE
-{
-    my ($codepage, $name) = @_;
-    my $i, $x, $y;
+sub dump_dbcs_table($$$$@)
+{
+    my ($codepage, $name, $def, $defw, @lb_ranges) = @_;
 
     # build a list of lead bytes that are actually used
 
     my @lblist = ();
-    LBLOOP: for ($y = 0; $y <= $#lead_bytes; $y++)
+    LBLOOP: for (my $y = 0; $y <= $#lead_bytes; $y++)
     {
         my $base = $lead_bytes[$y] << 8;
-        for ($x = 0; $x < 256; $x++)
+        for (my $x = 0; $x < 256; $x++)
         {
             if (defined $cp2uni[$base+$x])
@@ -828,5 +820,5 @@
 
     printf OUTPUT "static const WCHAR cp2uni[%d] =\n", 256 * ($#lblist + 2 + $unused);
-    printf OUTPUT "{\n%s,\n", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[0 .. 255] );
+    printf OUTPUT "{\n%s,\n", DUMP_ARRAY( "0x%04x", $defw, @cp2uni[0 .. 255] );
 
     # output the default table for unused lead bytes
@@ -835,14 +827,14 @@
     {
         printf OUTPUT "    /* unused lead bytes */\n";
-        printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", 0, ($DEF_CHAR) x 256 );
+        printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", 0, ($defw) x 256 );
     }
 
     # output the ascii->unicode table for each DBCS lead byte
 
-    for ($y = 0; $y <= $#lblist; $y++)
+    for (my $y = 0; $y <= $#lblist; $y++)
     {
         my $base = $lblist[$y] << 8;
         printf OUTPUT "    /* lead byte %02x */\n", $lblist[$y];
-        printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[$base .. $base+255] );
+        printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", $defw, @cp2uni[$base .. $base+255] );
         printf OUTPUT ($y < $#lblist) ? ",\n" : "\n};\n\n";
     }
@@ -851,10 +843,10 @@
 
     my @offsets = ();
-    for ($x = 0; $x < 256; $x++) { $offsets[$x] = 0; }
-    for ($x = 0; $x <= $#lblist; $x++) { $offsets[$lblist[$x]] = $x + 1; }
+    for (my $x = 0; $x < 256; $x++) { $offsets[$x] = 0; }
+    for (my $x = 0; $x <= $#lblist; $x++) { $offsets[$lblist[$x]] = $x + 1; }
     if ($unused)
     {
         # increment all lead bytes offset to take into account the unused table
-        for ($x = 0; $x <= $#lead_bytes; $x++) { $offsets[$lead_bytes[$x]]++; }
+        for (my $x = 0; $x <= $#lead_bytes; $x++) { $offsets[$lead_bytes[$x]]++; }
     }
     printf OUTPUT "static const unsigned char cp2uni_leadbytes[256] =\n";
@@ -865,5 +857,5 @@
     my @filled = ();
     my $subtables = 1;
-    for ($i = 0; $i < 65536; $i++)
+    for (my $i = 0; $i < 65536; $i++)
     {
         next unless defined $uni2cp[$i];
@@ -876,18 +868,18 @@
 
     printf OUTPUT "static const unsigned short uni2cp_low[%d] =\n{\n", $subtables*256;
-    for ($y = 0; $y < 256; $y++)
+    for (my $y = 0; $y < 256; $y++)
     {
         next unless $filled[$y];
         printf OUTPUT "    /* 0x%02x00 .. 0x%02xff */\n", $y, $y;
-        printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @uni2cp[($y<<8) .. ($y<<8)+255] );
+        printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", $def, @uni2cp[($y<<8) .. ($y<<8)+255] );
     }
     printf OUTPUT "    /* defaults */\n";
-    printf OUTPUT "%s\n};\n\n", DUMP_ARRAY( "0x%04x", 0, ($DEF_CHAR) x 256 );
+    printf OUTPUT "%s\n};\n\n", DUMP_ARRAY( "0x%04x", 0, ($def) x 256 );
 
     # output a table of the offsets of the subtables in the previous array
 
     my $pos = 0;
-    my @offsets = ();
-    for ($y = 0; $y < 256; $y++)
+    @offsets = ();
+    for (my $y = 0; $y < 256; $y++)
     {
         if ($filled[$y]) { push @offsets, $pos; $pos += 256; }
@@ -901,10 +893,10 @@
     printf OUTPUT "const struct dbcs_table cptable_%03d =\n{\n", $codepage;
     printf OUTPUT "    { %d, 2, 0x%04x, 0x%04x, \"%s\" },\n",
-                  $codepage, $DEF_CHAR, $DEF_CHAR, $name;
+                  $codepage, $def, $defw, $name;
     printf OUTPUT "    cp2uni,\n";
     printf OUTPUT "    cp2uni_leadbytes,\n";
     printf OUTPUT "    uni2cp_low,\n";
     printf OUTPUT "    uni2cp_high,\n";
-    DUMP_LB_RANGES();
+    printf OUTPUT "    {\n    %s\n    }\n", DUMP_ARRAY( "0x%02x", 0, @lb_ranges, 0, 0 );
     printf OUTPUT "};\n";
 }
@@ -912,25 +904,25 @@
 
 ################################################################
-# dump the list of defined lead byte ranges
-sub DUMP_LB_RANGES
+# get the list of defined lead byte ranges
+sub get_lb_ranges()
 {
     my @list = ();
+    my @ranges = ();
     my $i = 0;
     foreach $i (@lead_bytes) { $list[$i] = 1; }
     my $on = 0;
-    printf OUTPUT "    { ";
-    for ($i = 0; $i < 256; $i++)
+    for (my $i = 0; $i < 256; $i++)
     {
         if ($on)
         {
-            if (!defined $list[$i]) { printf OUTPUT "0x%02x, ", $i-1; $on = 0; }
+            if (!defined $list[$i]) { push @ranges, $i-1; $on = 0; }
         }
         else
         {
-            if ($list[$i]) { printf OUTPUT "0x%02x, ", $i; $on = 1; }
-        }
-    }
-    if ($on) { printf OUTPUT "0xff, "; }
-    printf OUTPUT "0x00, 0x00 }\n";
+            if ($list[$i]) { push @ranges, $i; $on = 1; }
+        }
+    }
+    if ($on) { push @ranges, 0xff; }
+    return @ranges;
 }
 
@@ -938,8 +930,9 @@
 ################################################################
 # dump the case mapping tables
-sub DUMP_CASE_MAPPINGS
-{
-    open OUTPUT,">casemap.c.new" or die "Cannot create casemap.c";
-    printf "Building casemap.c\n";
+sub DUMP_CASE_MAPPINGS($)
+{
+    my $filename = shift;
+    open OUTPUT,">$filename.new" or die "Cannot create $filename";
+    printf "Building $filename\n";
     printf OUTPUT "/* Unicode case mappings */\n";
     printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n";
@@ -951,5 +944,5 @@
     DUMP_CASE_TABLE( "wine_compatmap", @compatmap_table );
     close OUTPUT;
-    save_file("casemap.c");
+    save_file($filename);
 }
 
@@ -957,5 +950,5 @@
 ################################################################
 # dump a case mapping table
-sub DUMP_CASE_TABLE
+sub DUMP_CASE_TABLE($@)
 {
     my ($name,@table) = @_;
@@ -968,5 +961,5 @@
     my $index = 0;
     my @filled = ();
-    for ($i = 0; $i < 65536; $i++)
+    for (my $i = 0; $i < 65536; $i++)
     {
         next unless defined $table[$i];
@@ -988,5 +981,5 @@
     my $removed = 0;
     $index = 0;
-    for ($i = 0; $i < 256; $i++)
+    for (my $i = 0; $i < 256; $i++)
     {
         next unless defined $filled[$i];
@@ -1012,5 +1005,5 @@
     printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, (0) x 256 );
     $index = 0;
-    for ($i = 0; $i < 256; $i++)
+    for (my $i = 0; $i < 256; $i++)
     {
         next unless $filled[$i];
@@ -1026,23 +1019,24 @@
 ################################################################
 # dump the ctype tables
-sub DUMP_CTYPE_TABLES
-{
-    open OUTPUT,">wctype.c.new" or die "Cannot create wctype.c";
-    printf "Building wctype.c\n";
+sub DUMP_CTYPE_TABLES($)
+{
+    my $filename = shift;
+    open OUTPUT,">$filename.new" or die "Cannot create $filename";
+    printf "Building $filename\n";
     printf OUTPUT "/* Unicode ctype tables */\n";
     printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n";
     printf OUTPUT "#include \"wine/unicode.h\"\n\n";
 
-    my $i;
     my @array = (0) x 256;
+    my %sequences;
 
     # add the direction in the high 4 bits of the category
-    for ($i = 0; $i < 65536; $i++)
-    {
-        $category_table[$i] |= $direction_table[$i] << 12;
+    for (my $i = 0; $i < 65536; $i++)
+    {
+        $category_table[$i] |= $direction_table[$i] << 12 if defined $direction_table[$i];
     }
 
     # try to merge table rows
-    for ($row = 0; $row < 256; $row++)
+    for (my $row = 0; $row < 256; $row++)
     {
         my $rowtxt = sprintf "%04x" x 256, @category_table[($row<<8)..($row<<8)+255];
@@ -1065,5 +1059,5 @@
 
     close OUTPUT;
-    save_file("wctype.c");
+    save_file($filename);
 }
 
@@ -1071,8 +1065,10 @@
 ################################################################
 # dump the char composition tables
-sub DUMP_COMPOSE_TABLES
-{
-    open OUTPUT,">compose.c.new" or die "Cannot create compose.c";
-    printf "Building compose.c\n";
+sub DUMP_COMPOSE_TABLES($)
+{
+    my $filename = shift;
+
+    open OUTPUT,">$filename.new" or die "Cannot create $filename";
+    printf "Building $filename\n";
     printf OUTPUT "/* Unicode char composition */\n";
     printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n";
@@ -1082,5 +1078,5 @@
 
     my @filled = ();
-    foreach $i (@compose_table)
+    foreach my $i (@compose_table)
     {
         my @comp = @$i;
@@ -1090,5 +1086,6 @@
     # count how many different second chars we have
 
-    for ($i = $count = 0; $i < 65536; $i++)
+    my $count = 0;
+    for (my $i = 0; $i < 65536; $i++)
     {
         next unless defined $filled[$i];
@@ -1099,5 +1096,6 @@
 
     my $pos = $count + 1;
-    for ($i = 0; $i < 65536; $i++)
+    my @table = ();
+    for (my $i = 0; $i < 65536; $i++)
     {
         next unless defined $filled[$i];
@@ -1112,10 +1110,10 @@
     # build the table of first chars and mappings
 
-    for ($i = 0; $i < 65536; $i++)
+    for (my $i = 0; $i < 65536; $i++)
     {
         next unless defined $filled[$i];
         my @table = ();
         my @list = sort { $a->[0] <=> $b->[0] } @{$filled[$i]};
-        for ($j = 0; $j <= $#list; $j++)
+        for (my $j = 0; $j <= $#list; $j++)
         {
             push @table, $list[$j][0], $list[$j][1];
@@ -1129,7 +1127,7 @@
     # first determine all the 16-char subsets that contain something
 
-    my @filled = (0) x 4096;
-    my $pos = 16*2;  # for the null subset
-    for ($i = 0; $i < 65536; $i++)
+    @filled = (0) x 4096;
+    $pos = 16*2;  # for the null subset
+    for (my $i = 0; $i < 65536; $i++)
     {
         next unless defined $decomp_table[$i];
@@ -1144,5 +1142,5 @@
     my @filled_idx = (256) x 256;
     $pos = 256 + 16;
-    for ($i = 0; $i < 4096; $i++)
+    for (my $i = 0; $i < 4096; $i++)
     {
         next unless $filled[$i];
@@ -1156,5 +1154,5 @@
     # add the index offsets to the subsets positions
 
-    for ($i = 0; $i < 4096; $i++)
+    for (my $i = 0; $i < 4096; $i++)
     {
         next unless $filled[$i];
@@ -1171,9 +1169,9 @@
     # dump the second-level indexes
 
-    for ($i = 0; $i < 256; $i++)
+    for (my $i = 0; $i < 256; $i++)
     {
         next unless ($filled_idx[$i] > 256);
         my @table = @filled[($i<<4)..($i<<4)+15];
-        for ($j = 0; $j < 16; $j++) { $table[$j] ||= $null_offset; }
+        for (my $j = 0; $j < 16; $j++) { $table[$j] ||= $null_offset; }
         printf OUTPUT ",\n    /* sub-index %02x */\n", $i;
         printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, @table );
@@ -1185,9 +1183,9 @@
     printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, (0) x 32 );
 
-    for ($i = 0; $i < 4096; $i++)
+    for (my $i = 0; $i < 4096; $i++)
     {
         next unless $filled[$i];
         my @table = (0) x 32;
-        for ($j = 0; $j < 16; $j++)
+        for (my $j = 0; $j < 16; $j++)
         {
             if (defined $decomp_table[($i<<4) + $j])
@@ -1203,5 +1201,109 @@
     printf OUTPUT "\n};\n";
     close OUTPUT;
-    save_file("compose.c");
+    save_file($filename);
+}
+
+
+################################################################
+# handle a "bestfit" Windows mapping file
+
+sub handle_bestfit_file($$$)
+{
+    my ($filename, $has_glyphs, $comment) = @_;
+    my $state = "";
+    my ($codepage, $width, $def, $defw, $count);
+    my ($lb_cur, $lb_end);
+    my @lb_ranges = ();
+
+    open INPUT,$MAPPREFIX . $filename or die "Cannot open $filename";
+
+    while (<INPUT>)
+    {
+        next if /^;/;  # skip comments
+        next if /^\s*$/;  # skip empty lines
+        next if /\x1a/;  # skip ^Z
+        last if /^ENDCODEPAGE/;
+
+        if (/^CODEPAGE\s+(\d+)/)
+        {
+            $codepage = $1;
+            next;
+        }
+        if (/^CPINFO\s+(\d+)\s+0x([0-9a-fA-f]+)\s+0x([0-9a-fA-F]+)/)
+        {
+            $width = $1;
+            $def = hex $2;
+            $defw = hex $3;
+            next;
+        }
+        if (/^(MBTABLE|WCTABLE|DBCSRANGE|DBCSTABLE)\s+(\d+)/)
+        {
+            $state = $1;
+            $count = $2;
+            next;
+        }
+        if (/^0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)/)
+        {
+            if ($state eq "MBTABLE")
+            {
+                my $cp = hex $1;
+                my $uni = hex $2;
+                $cp2uni[$cp] = $uni unless defined($cp2uni[$cp]);
+                next;
+            }
+            if ($state eq "WCTABLE")
+            {
+                my $uni = hex $1;
+                my $cp = hex $2;
+                $uni2cp[$uni] = $cp unless defined($uni2cp[$uni]);
+                next;
+            }
+            if ($state eq "DBCSRANGE")
+            {
+                my $start = hex $1;
+                my $end = hex $2;
+                push @lb_ranges, $start, $end;
+                for (my $i = $start; $i <= $end; $i++)
+                {
+                    push @lead_bytes, $i;
+                    $cp2uni[$i] = 0;
+                }
+                $lb_cur = $start;
+                $lb_end = $end;
+                next;
+            }
+            if ($state eq "DBCSTABLE")
+            {
+                my $mb = hex $1;
+                my $uni = hex $2;
+                my $cp = ($lb_cur << 8) | $mb;
+                $cp2uni[$cp] = $uni unless defined($cp2uni[$cp]);
+                if (!--$count)
+                {
+                    if (++$lb_cur > $lb_end) { $state = "DBCSRANGE"; }
+                }
+                next;
+            }
+        }
+        die "$filename: Unrecognized line $_\n";
+    }
+    close INPUT;
+
+    my $output = sprintf "c_%03d.c", $codepage;
+    open OUTPUT,">$output.new" or die "Cannot create $output";
+
+    printf "Building %s from %s (%s)\n", $output, $filename, $comment;
+
+    # dump all tables
+
+    printf OUTPUT "/* code page %03d (%s) */\n", $codepage, $comment;
+    printf OUTPUT "/* generated from %s */\n", $MAPPREFIX . $filename;
+    printf OUTPUT "/* DO NOT EDIT!! */\n\n";
+    printf OUTPUT "#include \"wine/unicode.h\"\n\n";
+
+    if ($width == 1) { dump_sbcs_table( $codepage, $has_glyphs, $comment, $def, $defw ); }
+    else { dump_dbcs_table( $codepage, $comment, $def, $defw, @lb_ranges ); }
+    close OUTPUT;
+    save_file($output);
 }
 
@@ -1209,5 +1311,5 @@
 ################################################################
 # read an input file and generate the corresponding .c file
-sub HANDLE_FILE
+sub HANDLE_FILE(@)
 {
     my ($codepage,$filename,$has_glyphs,$comment) = @_;
@@ -1220,8 +1322,10 @@
     if ($codepage == 20932) { READ_JIS0208_FILE($MAPPREFIX . $filename); }
     elsif ($codepage == 20127) { fill_20127_codepage(); }
+    elsif ($filename =~ /\/bestfit/)
+    {
+        handle_bestfit_file( $filename, $has_glyphs, $comment );
+        return;
+    }
     else { READ_FILE($MAPPREFIX . $filename); }
-
-    # hack: 0x00a5 must map to backslash in Shift-JIS
-    if ($codepage == 932) { $uni2cp[0x00a5] = 0x5c; }
 
     ADD_DEFAULT_MAPPINGS();
@@ -1246,6 +1350,6 @@
     printf OUTPUT "#include \"wine/unicode.h\"\n\n";
 
-    if ($#lead_bytes == -1) { DUMP_SBCS_TABLE( $codepage, $has_glyphs, $comment ); }
-    else { DUMP_DBCS_TABLE( $codepage, $comment ); }
+    if (!@lead_bytes) { dump_sbcs_table( $codepage, $has_glyphs, $comment, $DEF_CHAR, $DEF_CHAR ); }
+    else { dump_dbcs_table( $codepage, $comment, $DEF_CHAR, $DEF_CHAR, get_lb_ranges() ); }
     close OUTPUT;
     save_file($output);
@@ -1271,9 +1375,9 @@
 ################################################################
 # output the list of codepage tables into the cptable.c file
-sub OUTPUT_CPTABLE
-{
-    @tables_decl = ();
-
-    foreach $file (@allfiles)
+sub OUTPUT_CPTABLE()
+{
+    my @tables_decl = ();
+
+    foreach my $file (@allfiles)
     {
         my ($codepage,$filename,$comment) = @$file;
@@ -1282,5 +1386,5 @@
 
     push @tables_decl, sprintf("\nstatic const union cptable * const cptables[%d] =\n{\n",$#allfiles+1);
-    foreach $file (@allfiles)
+    foreach my $file (@allfiles)
     {
         my ($codepage,$filename,$comment) = @$file;
@@ -1294,5 +1398,5 @@
 # replace the contents of a file between ### cpmap ### marks
 
-sub REPLACE_IN_FILE
+sub REPLACE_IN_FILE($@)
 {
     my $name = shift;
@@ -1316,2 +1420,21 @@
     save_file($name);
 }
+
+################################################################
+# main routine
+
+READ_DEFAULTS( $DEFAULTS );
+DUMP_CASE_MAPPINGS( "casemap.c" );
+DUMP_SORTKEYS( "collation.c", READ_SORTKEYS_FILE() );
+DUMP_COMPOSE_TABLES( "compose.c" );
+DUMP_CTYPE_TABLES( "wctype.c" );
+
+foreach my $file (@allfiles) { HANDLE_FILE( @{$file} ); }
+
+OUTPUT_CPTABLE();
+
+exit 0;
+
+# Local Variables:
+# compile-command: "./cpmap.pl && make -k"
+# End:
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/defaults
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/defaults	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/defaults	(revision 19678)
@@ -34,4 +34,13 @@
 # are handled automatically and do not have to be defined here. They can
 # still be defined if necessary to override the unicode decomposition.
+#
+
+#
+# Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+# other than GPL or LGPL is available it will apply instead, Sun elects to use only
+# the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+# a choice of LGPL license versions is made available with the language indicating
+# that LGPLv2 or any later version may be used, or where a choice of which version
+# of the LGPL is applied is otherwise unspecified.
 #
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/loader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/loader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/loader.c	(revision 19678)
@@ -179,15 +179,5 @@
     switch(index)
     {
-    case 0:  /* try programs dir for .exe files */
-        if (!context->win16 && namelen > 4 && !memcmp( context->name + namelen - 4, ".exe", 4 ))
-        {
-            path = prepend( path, context->name, namelen - 4 );
-            path = prepend( path, "/programs", sizeof("/programs") - 1 );
-            path = prepend( path, build_dir, strlen(build_dir) );
-            return path;
-        }
-        context->index++;
-        /* fall through */
-    case 1:  /* try dlls dir with subdir prefix */
+    case 0:  /* try dlls dir with subdir prefix */
         if (namelen > 4 && !memcmp( context->name + namelen - 4, ".dll", 4 )) namelen -= 4;
         if (!context->win16) path = prepend( path, context->name, namelen );
@@ -195,4 +185,15 @@
         path = prepend( path, build_dir, strlen(build_dir) );
         return path;
+    case 1:  /* try programs dir with subdir prefix */
+        if (!context->win16)
+        {
+            if (namelen > 4 && !memcmp( context->name + namelen - 4, ".exe", 4 )) namelen -= 4;
+            path = prepend( path, context->name, namelen );
+            path = prepend( path, "/programs", sizeof("/programs") - 1 );
+            path = prepend( path, build_dir, strlen(build_dir) );
+            return path;
+        }
+        context->index++;
+        /* fall through */
     default:
         index -= 2;
@@ -450,4 +451,16 @@
 
 /***********************************************************************
+ *           __wine_get_main_environment
+ *
+ * Return an environment pointer to work around lack of environ variable.
+ * Only exported on Mac OS.
+ */
+char **__wine_get_main_environment(void)
+{
+    return environ;
+}
+
+
+/***********************************************************************
  *           __wine_dll_register
  *
@@ -647,5 +660,5 @@
     __wine_main_argc = argc;
     __wine_main_argv = argv;
-    __wine_main_environ = environ;
+    __wine_main_environ = __wine_get_main_environment();
     mmap_init();
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/mbtowc.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/mbtowc.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/mbtowc.c	(revision 19678)
@@ -54,8 +54,10 @@
 {
     const WCHAR * const cp2uni = (flags & MB_USEGLYPHCHARS) ? table->cp2uni_glyphs : table->cp2uni;
+    const WCHAR def_unicode_char = table->info.def_unicode_char;
+    const unsigned char def_char = table->uni2cp_low[table->uni2cp_high[def_unicode_char >> 8]
+                                                     + (def_unicode_char & 0xff)];
     while (srclen)
     {
-        if (cp2uni[*src] == table->info.def_unicode_char && *src != table->info.def_char)
-            break;
+        if (cp2uni[*src] == def_unicode_char && *src != def_char) break;
         src++;
         srclen--;
@@ -161,5 +163,7 @@
     const WCHAR * const cp2uni = table->cp2uni;
     const unsigned char * const cp2uni_lb = table->cp2uni_leadbytes;
-
+    const WCHAR def_unicode_char = table->info.def_unicode_char;
+    const unsigned short def_char = table->uni2cp_low[table->uni2cp_high[def_unicode_char >> 8]
+                                                      + (def_unicode_char & 0xff)];
     while (srclen)
     {
@@ -168,11 +172,10 @@
         {
             if (srclen == 1) break;  /* partial char, error */
-            if (cp2uni[(off << 8) + src[1]] == table->info.def_unicode_char &&
-                ((src[0] << 8) | src[1]) != table->info.def_char) break;
+            if (cp2uni[(off << 8) + src[1]] == def_unicode_char &&
+                ((src[0] << 8) | src[1]) != def_char) break;
             src++;
             srclen--;
         }
-        else if (cp2uni[*src] == table->info.def_unicode_char &&
-                 *src != table->info.def_char) break;
+        else if (cp2uni[*src] == def_unicode_char && *src != def_char) break;
         src++;
         srclen--;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/mmap.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/mmap.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/mmap.c	(revision 19678)
@@ -51,4 +51,6 @@
 #include "wine/list.h"
 
+#ifdef HAVE_MMAP
+
 struct reserved_area
 {
@@ -60,6 +62,4 @@
 static struct list reserved_areas = LIST_INIT(reserved_areas);
 static const unsigned int granularity_mask = 0xffff;  /* reserved areas have 64k granularity */
-
-#ifdef HAVE_MMAP
 
 #ifndef MAP_NORESERVE
@@ -253,5 +253,5 @@
  * Reserve as much memory as possible in the given area.
  */
-#if defined(__i386__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)  /* commented out until FreeBSD gets fixed */
+#ifdef __i386__
 static void reserve_area( void *addr, void *end )
 {
@@ -353,5 +353,5 @@
     struct reserved_area *area;
     struct list *ptr;
-#if defined(__i386__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)  /* commented out until FreeBSD gets fixed */
+#ifdef __i386__
     char stack;
     char * const stack_ptr = &stack;
@@ -379,6 +379,6 @@
         if (base > user_space_limit) reserve_area( user_space_limit, base );
         base = stack_ptr - ((unsigned int)stack_ptr & granularity_mask) + (granularity_mask + 1);
-#ifdef linux
-        /* Linux heuristic: assume the stack is near the end of the address */
+#if defined(linux) || defined(__FreeBSD__)
+        /* Heuristic: assume the stack is near the end of the address */
         /* space, this avoids a lot of futile allocation attempts */
         end = (char *)(((unsigned long)base + 0x0fffffff) & 0xf0000000);
@@ -400,21 +400,4 @@
 }
 
-#else /* HAVE_MMAP */
-
-void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
-{
-    return (void *)-1;
-}
-
-static inline int munmap( void *ptr, size_t size )
-{
-    return 0;
-}
-
-void mmap_init(void)
-{
-}
-
-#endif
 
 /***********************************************************************
@@ -612,2 +595,10 @@
     return ret;
 }
+
+#else /* HAVE_MMAP */
+
+void mmap_init(void)
+{
+}
+
+#endif
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/string.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/string.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/string.c	(revision 19678)
@@ -28,4 +28,5 @@
  */
 
+#include <assert.h>
 #include <limits.h>
 #include <stdio.h>
@@ -308,4 +309,51 @@
 
 
+/* format a WCHAR string according to a printf format; helper for vsnprintfW */
+static int format_string( WCHAR *buffer, size_t len, const char *format, const WCHAR *str )
+{
+    size_t count = 0;
+    int i, left_align = 0, width = 0, max = 0;
+
+    assert( *format == '%' );
+    format++; /* skip '%' */
+
+    while (*format == '0' || *format == '+' || *format == '-' || *format == ' ' || *format == '#')
+    {
+        if (*format == '-') left_align = 1;
+        format++;
+    }
+
+    while (isdigit(*format)) width = width * 10 + *format++ - '0';
+
+    if (*format == '.')
+    {
+        format++;
+        while (isdigit(*format)) max = max * 10 + *format++ - '0';
+        for (i = 0; i < max; i++) if (!str[i]) max = i;
+    }
+    else max = strlenW(str);
+
+    if (*format == 'h' || *format == 'l') format++;
+
+    assert( *format == 's' );
+
+    if (!left_align && width > max)
+    {
+        if ((count += width - max) >= len) return -1;
+        for (i = 0; i < width - max; i++) *buffer++ = ' ';
+    }
+
+    if ((count += max) >= len) return -1;
+    memcpy( buffer, str, max * sizeof(WCHAR) );
+    buffer += max;
+
+    if (left_align && width > max)
+    {
+        if ((count += width - max) >= len) return -1;
+        for (i = 0; i < width - max; i++) *buffer++ = ' ';
+    }
+    return count;
+}
+
 int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist)
 {
@@ -382,11 +430,12 @@
                 static const WCHAR none[] = { '(','n','u','l','l',')',0 };
                 const WCHAR *wstr = va_arg(valist, const WCHAR *);
-                const WCHAR *striter = wstr ? wstr : none;
-                while (*striter)
-                {
-                    if (written++ >= len)
-                        return -1;
-                    *str++ = *striter++;
-                }
+                int count;
+
+                *fmta++ = 's';
+                *fmta = 0;
+                count = format_string( str, len - written, fmtbufa, wstr ? wstr : none );
+                if (count == -1) return -1;
+                str += count;
+                written += count;
                 iter++;
                 break;
@@ -394,9 +443,19 @@
 
             case 'c':
-                if (written++ >= len)
-                    return -1;
-                *str++ = (WCHAR)va_arg(valist, int);
+            {
+                WCHAR wstr[2];
+                int count;
+
+                wstr[0] = va_arg(valist, int);
+                wstr[1] = 0;
+                *fmta++ = 's';
+                *fmta = 0;
+                count = format_string( str, len - written, fmtbufa, wstr );
+                if (count == -1) return -1;
+                str += count;
+                written += count;
                 iter++;
                 break;
+            }
 
             default:
@@ -406,5 +465,6 @@
                 char *bufaiter = bufa;
                 if (*iter == 'p')
-                    sprintf(bufaiter, "%08lX", va_arg(valist, long));
+                    sprintf(bufaiter, "%0*lX", 2 * (int)sizeof(void*),
+                            (unsigned long)va_arg(valist, void *));
                 else
                 {
@@ -418,7 +478,5 @@
                     else
                     {
-                        /* FIXME: On 32 bit systems this doesn't handle int 64's.
-                         *        on 64 bit systems this doesn't work for 32 bit types
-			 */
+                        /* FIXME: On 32 bit systems this doesn't handle int 64's. */
                         sprintf(bufaiter, fmtbufa, va_arg(valist, void *));
                     }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/wine.def
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/wine.def	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/wine.def	(revision 19678)
@@ -50,5 +50,4 @@
     vsnprintfW
     vsprintfW
-    wine_anon_mmap
     wine_call_on_stack
     wine_casemap_lower
@@ -97,8 +96,4 @@
     wine_ldt_realloc_entries
     wine_ldt_set_entry
-    wine_mmap_add_reserved_area
-    wine_mmap_enum_reserved_areas
-    wine_mmap_is_in_reserved_area
-    wine_mmap_remove_reserved_area
     wine_pthread_get_functions
     wine_pthread_set_functions
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/arb_program_shader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/arb_program_shader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/arb_program_shader.c	(revision 19678)
@@ -11,4 +11,5 @@
  * Copyright 2006 Henri Verbeet
  * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
+ * Copyright 2009 Henri Verbeet for CodeWeavers
  *
  * This library is free software; you can redistribute it and/or
@@ -50,8 +51,18 @@
 #define GLINFO_LOCATION      (*gl_info)
 
+/* We have to subtract any other PARAMs that we might use in our shader programs.
+ * ATI seems to count 2 implicit PARAMs when we use fog and NVIDIA counts 1,
+ * and we reference one row of the PROJECTION matrix which counts as 1 PARAM. */
+#define ARB_SHADER_RESERVED_VS_CONSTS 3
+
+/* The arb shader only loads the bump mapping environment matrix into the shader if it finds
+ * a free constant to do that, so only reduce the number of available constants by 2 for the fog states.
+ */
+#define ARB_SHADER_RESERVED_PS_CONSTS 2
+
 /* Internally used shader constants. Applications can use constants 0 to GL_LIMITS(vshader_constantsF) - 1,
  * so upload them above that
  */
-#define ARB_SHADER_PRIVCONST_BASE GL_LIMITS(vshader_constantsF)
+#define ARB_SHADER_PRIVCONST_BASE (GL_LIMITS(vshader_constantsF) - ARB_SHADER_RESERVED_VS_CONSTS)
 #define ARB_SHADER_PRIVCONST_POS ARB_SHADER_PRIVCONST_BASE + 0
 
@@ -93,6 +104,6 @@
     }
     /* In 1.X pixel shaders constants are implicitly clamped in the range [-1;1] */
-    if(target_type == GL_FRAGMENT_PROGRAM_ARB &&
-       WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1) {
+    if (target_type == GL_FRAGMENT_PROGRAM_ARB && This->baseShader.reg_maps.shader_version.major == 1)
+    {
         float lcl_const[4];
         for(i = 0; i < max_constants; i++) {
@@ -170,4 +181,14 @@
         return 0; /* No constants are dirty now */
     }
+}
+
+/**
+ * Loads the texture dimensions for NP2 fixup into the currently set ARB_[vertex/fragment]_programs.
+ */
+static void shader_arb_load_np2fixup_constants(
+    IWineD3DDevice* device,
+    char usePixelShader,
+    char useVertexShader) {
+    /* not implemented */
 }
 
@@ -221,5 +242,6 @@
             deviceImpl->activeContext->pshader_const_dirty[psi->bumpenvmatconst[i].const_num] = 1;
 
-            if(psi->luminanceconst[i].const_num != -1) {
+            if (psi->luminanceconst[i].const_num != WINED3D_CONST_NUM_UNUSED)
+            {
                 /* WINED3DTSS_BUMPENVLSCALE and WINED3DTSS_BUMPENVLOFFSET are next to each other.
                  * point gl to the scale, and load 4 floats. x = scale, y = offset, z and w are junk, we
@@ -235,14 +257,57 @@
 }
 
+static void shader_arb_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+
+    /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
+     * context. On a context switch the old context will be fully dirtified */
+    memset(This->activeContext->vshader_const_dirty + start, 1,
+            sizeof(*This->activeContext->vshader_const_dirty) * count);
+    This->highest_dirty_vs_const = max(This->highest_dirty_vs_const, start + count + 1);
+}
+
+static void shader_arb_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+
+    /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
+     * context. On a context switch the old context will be fully dirtified */
+    memset(This->activeContext->pshader_const_dirty + start, 1,
+            sizeof(*This->activeContext->pshader_const_dirty) * count);
+    This->highest_dirty_ps_const = max(This->highest_dirty_ps_const, start + count + 1);
+}
+
+static DWORD *local_const_mapping(IWineD3DBaseShaderImpl *This)
+{
+    DWORD *ret;
+    DWORD idx = 0;
+    const local_constant *lconst;
+
+    if(This->baseShader.load_local_constsF || list_empty(&This->baseShader.constantsF)) return NULL;
+
+    ret = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * This->baseShader.limits.temporary);
+    if(!ret) {
+        ERR("Out of memory\n");
+        return NULL;
+    }
+
+    LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
+        ret[lconst->idx] = idx++;
+    }
+    return ret;
+}
+
 /* Generate the variable & register declarations for the ARB_vertex_program output target */
 static void shader_generate_arb_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps,
-        SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_info)
+        SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_info, DWORD *lconst_map)
 {
     IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
     IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device;
     DWORD i, cur;
-    char pshader = shader_is_pshader_version(This->baseShader.hex_version);
+    char pshader = shader_is_pshader_version(reg_maps->shader_version.type);
     unsigned max_constantsF = min(This->baseShader.limits.constant_float, 
-            (pshader ? GL_LIMITS(pshader_constantsF) : GL_LIMITS(vshader_constantsF)));
+            (pshader ? GL_LIMITS(pshader_constantsF) - ARB_SHADER_RESERVED_PS_CONSTS :
+                       GL_LIMITS(vshader_constantsF) - ARB_SHADER_RESERVED_VS_CONSTS));
     UINT extra_constants_needed = 0;
     const local_constant *lconst;
@@ -286,5 +351,5 @@
          * bump mapping.
          */
-        if(max_constantsF + extra_constants_needed < GL_LIMITS(pshader_constantsF)) {
+        if(max_constantsF + extra_constants_needed < GL_LIMITS(pshader_constantsF) - ARB_SHADER_RESERVED_PS_CONSTS) {
             ps->bumpenvmatconst[cur].const_num = max_constantsF + extra_constants_needed;
             shader_addline(buffer, "PARAM bumpenvmat%d = program.env[%d];\n",
@@ -292,5 +357,5 @@
             extra_constants_needed++;
 
-            if(reg_maps->luminanceparams && max_constantsF + extra_constants_needed < GL_LIMITS(pshader_constantsF)) {
+            if(reg_maps->luminanceparams && max_constantsF + extra_constants_needed < GL_LIMITS(pshader_constantsF) - ARB_SHADER_RESERVED_PS_CONSTS) {
                 ((IWineD3DPixelShaderImpl *)This)->luminanceconst[cur].const_num = max_constantsF + extra_constants_needed;
                 shader_addline(buffer, "PARAM luminance%d = program.env[%d];\n",
@@ -301,5 +366,5 @@
             }
         } else {
-            FIXME("No free constant found to load environemnt bump mapping matrix into the shader. texbem instruction will not apply bump mapping\n");
+            FIXME("No free constant found to load environment bump mapping matrix into the shader. texbem instruction will not apply bump mapping\n");
         }
 
@@ -308,14 +373,8 @@
 
     if(device->stateBlock->renderState[WINED3DRS_SRGBWRITEENABLE] && pshader) {
-        shader_addline(buffer, "PARAM srgb_mul_low = {%f, %f, %f, 1.0};\n",
-                        srgb_mul_low, srgb_mul_low, srgb_mul_low);
-        shader_addline(buffer, "PARAM srgb_comparison =  {%f, %f, %f, %f};\n",
-                        srgb_cmp, srgb_cmp, srgb_cmp, srgb_cmp);
-        shader_addline(buffer, "PARAM srgb_pow =  {%f, %f, %f, 1.0};\n",
-                       srgb_pow, srgb_pow, srgb_pow);
-        shader_addline(buffer, "PARAM srgb_mul_hi =  {%f, %f, %f, 1.0};\n",
-                       srgb_mul_high, srgb_mul_high, srgb_mul_high);
-        shader_addline(buffer, "PARAM srgb_sub_hi =  {%f, %f, %f, 0.0};\n",
-                       srgb_sub_high, srgb_sub_high, srgb_sub_high);
+        shader_addline(buffer, "PARAM srgb_consts1 = {%f, %f, %f, %f};\n",
+                       srgb_mul_low, srgb_cmp, srgb_pow, srgb_mul_high);
+        shader_addline(buffer, "PARAM srgb_consts2 = {%f, %f, %f, %f};\n",
+                       srgb_sub_high, 0.0, 0.0, 0.0);
     }
 
@@ -323,8 +382,8 @@
      * this avoids reloading them each time the shader is used
      */
-    if(!This->baseShader.load_local_constsF) {
+    if(lconst_map) {
         LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
             shader_addline(buffer, "PARAM C%u = program.local[%u];\n", lconst->idx,
-                           lconst->idx);
+                           lconst_map[lconst->idx]);
         }
     }
@@ -336,5 +395,5 @@
      * do not optimize unused constants away
      */
-    if(This->baseShader.load_local_constsF || list_empty(&This->baseShader.constantsF)) {
+    if(This->baseShader.reg_maps.usesrelconstF) {
         /* Need to PARAM the environment parameters (constants) so we can use relative addressing */
         shader_addline(buffer, "PARAM C[%d] = { program.env[0..%d] };\n",
@@ -342,5 +401,8 @@
     } else {
         for(i = 0; i < max_constantsF; i++) {
-            if(!shader_constant_is_local(This, i)) {
+            DWORD idx, mask;
+            idx = i >> 5;
+            mask = 1 << (i & 0x1f);
+            if(!shader_constant_is_local(This, i) && (This->baseShader.reg_maps.constf[idx] & mask)) {
                 shader_addline(buffer, "PARAM C%d = program.env[%d];\n",i, i);
             }
@@ -368,19 +430,22 @@
 };
 
-static void shader_arb_get_write_mask(const SHADER_OPCODE_ARG *arg, const DWORD param, char *write_mask)
-{
-    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) arg->shader;
+static void shader_arb_get_write_mask(const struct wined3d_shader_instruction *ins,
+        const struct wined3d_shader_dst_param *dst, char *write_mask)
+{
     char *ptr = write_mask;
-    char vshader = shader_is_vshader_version(This->baseShader.hex_version);
-
-    if(vshader && shader_get_regtype(param) == WINED3DSPR_ADDR) {
+    char vshader = shader_is_vshader_version(ins->ctx->reg_maps->shader_version.type);
+
+    if (vshader && dst->reg.type == WINED3DSPR_ADDR)
+    {
         *ptr++ = '.';
         *ptr++ = 'x';
-    } else if ((param & WINED3DSP_WRITEMASK_ALL) != WINED3DSP_WRITEMASK_ALL) {
+    }
+    else if (dst->write_mask != WINED3DSP_WRITEMASK_ALL)
+    {
         *ptr++ = '.';
-        if (param & WINED3DSP_WRITEMASK_0) *ptr++ = 'x';
-        if (param & WINED3DSP_WRITEMASK_1) *ptr++ = 'y';
-        if (param & WINED3DSP_WRITEMASK_2) *ptr++ = 'z';
-        if (param & WINED3DSP_WRITEMASK_3) *ptr++ = 'w';
+        if (dst->write_mask & WINED3DSP_WRITEMASK_0) *ptr++ = 'x';
+        if (dst->write_mask & WINED3DSP_WRITEMASK_1) *ptr++ = 'y';
+        if (dst->write_mask & WINED3DSP_WRITEMASK_2) *ptr++ = 'z';
+        if (dst->write_mask & WINED3DSP_WRITEMASK_3) *ptr++ = 'w';
     }
 
@@ -388,5 +453,6 @@
 }
 
-static void shader_arb_get_swizzle(const DWORD param, BOOL fixup, char *swizzle_str) {
+static void shader_arb_get_swizzle(const struct wined3d_shader_src_param *param, BOOL fixup, char *swizzle_str)
+{
     /* For registers of type WINED3DDECLTYPE_D3DCOLOR, data is stored as "bgra",
      * but addressed as "rgba". To fix this we need to swap the register's x
@@ -396,5 +462,5 @@
 
     /* swizzle bits fields: wwzzyyxx */
-    DWORD swizzle = (param & WINED3DSP_SWIZZLE_MASK) >> WINED3DSP_SWIZZLE_SHIFT;
+    DWORD swizzle = param->swizzle;
     DWORD swizzle_x = swizzle & 0x03;
     DWORD swizzle_y = (swizzle >> 2) & 0x03;
@@ -404,5 +470,6 @@
     /* If the swizzle is the default swizzle (ie, "xyzw"), we don't need to
      * generate a swizzle string. Unless we need to our own swizzling. */
-    if ((WINED3DSP_NOSWIZZLE >> WINED3DSP_SWIZZLE_SHIFT) != swizzle || fixup) {
+    if (swizzle != WINED3DSP_NOSWIZZLE || fixup)
+    {
         *ptr++ = '.';
         if (swizzle_x == swizzle_y && swizzle_x == swizzle_z && swizzle_x == swizzle_w) {
@@ -419,189 +486,128 @@
 }
 
-static void pshader_get_register_name(IWineD3DBaseShader* iface,
-    const DWORD param, char* regstr) {
-
-    DWORD reg = param & WINED3DSP_REGNUM_MASK;
-    DWORD regtype = shader_get_regtype(param);
-    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) iface;
-
-    switch (regtype) {
-    case WINED3DSPR_TEMP:
-        sprintf(regstr, "R%u", reg);
-    break;
-    case WINED3DSPR_INPUT:
-        if (reg==0) {
-            strcpy(regstr, "fragment.color.primary");
-        } else {
-            strcpy(regstr, "fragment.color.secondary");
-        }
-    break;
-    case WINED3DSPR_CONST:
-        if(This->baseShader.load_local_constsF || list_empty(&This->baseShader.constantsF)) {
-            sprintf(regstr, "C[%u]", reg);
-        } else {
-            sprintf(regstr, "C%u", reg);
-        }
-    break;
-    case WINED3DSPR_TEXTURE: /* case WINED3DSPR_ADDR: */
-        sprintf(regstr,"T%u", reg);
-    break;
-    case WINED3DSPR_COLOROUT:
-        if (reg == 0)
-            sprintf(regstr, "TMP_COLOR");
-        else {
-            /* TODO: See GL_ARB_draw_buffers */
-            FIXME("Unsupported write to render target %u\n", reg);
-            sprintf(regstr, "unsupported_register");
-        }
-    break;
-    case WINED3DSPR_DEPTHOUT:
-        sprintf(regstr, "result.depth");
-    break;
-    case WINED3DSPR_ATTROUT:
-        sprintf(regstr, "oD[%u]", reg);
-    break;
-    case WINED3DSPR_TEXCRDOUT:
-        sprintf(regstr, "oT[%u]", reg);
-    break;
-    default:
-        FIXME("Unhandled register name Type(%d)\n", regtype);
-        sprintf(regstr, "unrecognized_register");
-    break;
-    }
-}
-
-/* TODO: merge with pixel shader */
-static void vshader_program_add_param(const SHADER_OPCODE_ARG *arg, const DWORD param, BOOL is_input, char *hwLine)
-{
-  IWineD3DVertexShaderImpl* This = (IWineD3DVertexShaderImpl*) arg->shader;
-
-  /* oPos, oFog and oPts in D3D */
-  static const char * const hwrastout_reg_names[] = { "TMP_OUT", "result.fogcoord", "result.pointsize" };
-
-  DWORD reg = param & WINED3DSP_REGNUM_MASK;
-  DWORD regtype = shader_get_regtype(param);
-  char  tmpReg[255];
-  BOOL is_color = FALSE;
-
-  if ((param & WINED3DSP_SRCMOD_MASK) == WINED3DSPSM_NEG) {
-      strcat(hwLine, " -");
-  } else {
-      strcat(hwLine, " ");
-  }
-
-  switch (regtype) {
-  case WINED3DSPR_TEMP:
-    sprintf(tmpReg, "R%u", reg);
-    strcat(hwLine, tmpReg);
-    break;
-  case WINED3DSPR_INPUT:
-
-    if (vshader_input_is_color((IWineD3DVertexShader*) This, reg))
-        is_color = TRUE;
-
-    sprintf(tmpReg, "vertex.attrib[%u]", reg);
-    strcat(hwLine, tmpReg);
-    break;
-  case WINED3DSPR_CONST:
-      if(param & WINED3DSHADER_ADDRMODE_RELATIVE) {
-          if(reg >= This->rel_offset) {
-              sprintf(tmpReg, "C[A0.x + %u]", reg - This->rel_offset);
-          } else {
-              sprintf(tmpReg, "C[A0.x - %u]", -reg + This->rel_offset);
-          }
-      } else {
-          if(This->baseShader.load_local_constsF || list_empty(&This->baseShader.constantsF)) {
-              sprintf(tmpReg, "C[%u]", reg);
-          } else {
-              sprintf(tmpReg, "C%u", reg);
-          }
-      }
-    strcat(hwLine, tmpReg);
-    break;
-  case WINED3DSPR_ADDR: /*case D3DSPR_TEXTURE:*/
-    sprintf(tmpReg, "A%u", reg);
-    strcat(hwLine, tmpReg);
-    break;
-  case WINED3DSPR_RASTOUT:
-    sprintf(tmpReg, "%s", hwrastout_reg_names[reg]);
-    strcat(hwLine, tmpReg);
-    break;
-  case WINED3DSPR_ATTROUT:
-    if (reg==0) {
-       strcat(hwLine, "result.color.primary");
-    } else {
-       strcat(hwLine, "result.color.secondary");
-    }
-    break;
-  case WINED3DSPR_TEXCRDOUT:
-    sprintf(tmpReg, "result.texcoord[%u]", reg);
-    strcat(hwLine, tmpReg);
-    break;
-  default:
-    FIXME("Unknown reg type %d %d\n", regtype, reg);
-    strcat(hwLine, "unrecognized_register");
-    break;
-  }
-
-  if (!is_input) {
+static void shader_arb_get_register_name(IWineD3DBaseShader *iface, WINED3DSHADER_PARAM_REGISTER_TYPE register_type,
+        UINT register_idx, BOOL rel_addr, char *register_name, BOOL *is_color)
+{
+    /* oPos, oFog and oPts in D3D */
+    static const char * const rastout_reg_names[] = {"TMP_OUT", "result.fogcoord", "result.pointsize"};
+    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)iface;
+    BOOL pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
+
+    *is_color = FALSE;
+
+    switch (register_type)
+    {
+        case WINED3DSPR_TEMP:
+            sprintf(register_name, "R%u", register_idx);
+            break;
+
+        case WINED3DSPR_INPUT:
+            if (pshader)
+            {
+                if (register_idx == 0) strcpy(register_name, "fragment.color.primary");
+                else strcpy(register_name, "fragment.color.secondary");
+            }
+            else
+            {
+                if (((IWineD3DVertexShaderImpl *)This)->cur_args->swizzle_map & (1 << register_idx)) *is_color = TRUE;
+                sprintf(register_name, "vertex.attrib[%u]", register_idx);
+            }
+            break;
+
+        case WINED3DSPR_CONST:
+            if (!pshader && rel_addr)
+            {
+                UINT rel_offset = ((IWineD3DVertexShaderImpl *)This)->rel_offset;
+                if (register_idx >= rel_offset)
+                    sprintf(register_name, "C[A0.x + %u]", register_idx - rel_offset);
+                else
+                    sprintf(register_name, "C[A0.x - %u]", -register_idx + rel_offset);
+            }
+            else
+            {
+                if (This->baseShader.reg_maps.usesrelconstF)
+                    sprintf(register_name, "C[%u]", register_idx);
+                else
+                    sprintf(register_name, "C%u", register_idx);
+            }
+            break;
+
+        case WINED3DSPR_TEXTURE: /* case WINED3DSPR_ADDR: */
+            if (pshader) sprintf(register_name, "T%u", register_idx);
+            else  sprintf(register_name, "A%u", register_idx);
+            break;
+
+        case WINED3DSPR_COLOROUT:
+            if (register_idx == 0)
+            {
+                strcpy(register_name, "TMP_COLOR");
+            }
+            else
+            {
+                /* TODO: See GL_ARB_draw_buffers */
+                FIXME("Unsupported write to render target %u\n", register_idx);
+                sprintf(register_name, "unsupported_register");
+            }
+            break;
+
+        case WINED3DSPR_RASTOUT:
+            sprintf(register_name, "%s", rastout_reg_names[register_idx]);
+            break;
+
+        case WINED3DSPR_DEPTHOUT:
+            strcpy(register_name, "result.depth");
+            break;
+
+        case WINED3DSPR_ATTROUT:
+            if (pshader) sprintf(register_name, "oD[%u]", register_idx);
+            else if (register_idx == 0) strcpy(register_name, "result.color.primary");
+            else strcpy(register_name, "result.color.secondary");
+            break;
+
+        case WINED3DSPR_TEXCRDOUT:
+            if (pshader) sprintf(register_name, "oT[%u]", register_idx);
+            else sprintf(register_name, "result.texcoord[%u]", register_idx);
+            break;
+
+        default:
+            FIXME("Unhandled register type %#x[%u]\n", register_type, register_idx);
+            sprintf(register_name, "unrecognized_register[%u]", register_idx);
+            break;
+    }
+}
+
+static void shader_arb_add_src_param(const struct wined3d_shader_instruction *ins,
+        const struct wined3d_shader_src_param *wined3d_src, char *str)
+{
+    char register_name[255];
+    char swizzle[6];
+    BOOL is_color;
+
+    if (wined3d_src->modifiers == WINED3DSPSM_NEG) strcat(str, " -");
+    else strcat(str, " ");
+
+    shader_arb_get_register_name(ins->ctx->shader, wined3d_src->reg.type,
+            wined3d_src->reg.idx, !!wined3d_src->reg.rel_addr, register_name, &is_color);
+    strcat(str, register_name);
+
+    shader_arb_get_swizzle(wined3d_src, is_color, swizzle);
+    strcat(str, swizzle);
+}
+
+static void shader_arb_add_dst_param(const struct wined3d_shader_instruction *ins,
+        const struct wined3d_shader_dst_param *wined3d_dst, char *str)
+{
+    char register_name[255];
     char write_mask[6];
-    shader_arb_get_write_mask(arg, param, write_mask);
-    strcat(hwLine, write_mask);
-  } else {
-    char swizzle[6];
-    shader_arb_get_swizzle(param, is_color, swizzle);
-    strcat(hwLine, swizzle);
-  }
-}
-
-static void shader_hw_sample(const SHADER_OPCODE_ARG *arg, DWORD sampler_idx, const char *dst_str,
-        const char *coord_reg, BOOL projected, BOOL bias)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK;
-    const char *tex_type;
-
-    switch(sampler_type) {
-        case WINED3DSTT_1D:
-            tex_type = "1D";
-            break;
-
-        case WINED3DSTT_2D:
-        {
-            IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) arg->shader;
-            IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device;
-            if(device->stateBlock->textures[sampler_idx] &&
-               IWineD3DBaseTexture_GetTextureDimensions(device->stateBlock->textures[sampler_idx]) == GL_TEXTURE_RECTANGLE_ARB) {
-                tex_type = "RECT";
-            } else {
-                tex_type = "2D";
-            }
-            break;
-        }
-
-        case WINED3DSTT_VOLUME:
-            tex_type = "3D";
-            break;
-
-        case WINED3DSTT_CUBE:
-            tex_type = "CUBE";
-            break;
-
-        default:
-            ERR("Unexpected texture type %d\n", sampler_type);
-            tex_type = "";
-    }
-
-    if (bias) {
-        /* Shouldn't be possible, but let's check for it */
-        if(projected) FIXME("Biased and Projected texture sampling\n");
-        /* TXB takes the 4th component of the source vector automatically, as d3d. Nothing more to do */
-        shader_addline(buffer, "TXB %s, %s, texture[%u], %s;\n", dst_str, coord_reg, sampler_idx, tex_type);
-    } else if (projected) {
-        shader_addline(buffer, "TXP %s, %s, texture[%u], %s;\n", dst_str, coord_reg, sampler_idx, tex_type);
-    } else {
-        shader_addline(buffer, "TEX %s, %s, texture[%u], %s;\n", dst_str, coord_reg, sampler_idx, tex_type);
-    }
+    BOOL is_color;
+
+    strcat(str, " ");
+
+    shader_arb_get_register_name(ins->ctx->shader, wined3d_dst->reg.type,
+            wined3d_dst->reg.idx, !!wined3d_dst->reg.rel_addr, register_name, &is_color);
+    strcat(str, register_name);
+
+    shader_arb_get_write_mask(ins, wined3d_dst, write_mask);
+    strcat(str, write_mask);
 }
 
@@ -623,5 +629,5 @@
 
 static void gen_color_correction(SHADER_BUFFER *buffer, const char *reg, DWORD dst_mask,
-        const char *one, const char *two, struct color_fixup_desc fixup)
+                                 const char *one, const char *two, struct color_fixup_desc fixup)
 {
     DWORD mask;
@@ -674,19 +680,71 @@
 }
 
-static void shader_arb_color_correction(const struct SHADER_OPCODE_ARG* arg, struct color_fixup_desc fixup)
-{
-    char reg[256];
-    pshader_get_register_name(arg->shader, arg->dst, reg);
-    gen_color_correction(arg->buffer, reg, arg->dst & WINED3DSP_WRITEMASK_ALL, "one", "coefmul.x", fixup);
-}
-
-static void pshader_gen_input_modifier_line (
-    IWineD3DBaseShader *iface,
-    SHADER_BUFFER* buffer,
-    const DWORD instr,
-    int tmpreg,
-    char *outregstr) {
-
+static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD sampler_idx,
+        const char *dst_str, const char *coord_reg, BOOL projected, BOOL bias)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    DWORD sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
+    const char *tex_type;
+    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
+    IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device;
+
+    switch(sampler_type) {
+        case WINED3DSTT_1D:
+            tex_type = "1D";
+            break;
+
+        case WINED3DSTT_2D:
+            if(device->stateBlock->textures[sampler_idx] &&
+               IWineD3DBaseTexture_GetTextureDimensions(device->stateBlock->textures[sampler_idx]) == GL_TEXTURE_RECTANGLE_ARB) {
+                tex_type = "RECT";
+            } else {
+                tex_type = "2D";
+            }
+            if (shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type))
+            {
+               const IWineD3DPixelShaderImpl* const ps = (const IWineD3DPixelShaderImpl*)This;
+               if(ps->cur_args->np2_fixup & (1 << sampler_idx)) {
+                   FIXME("NP2 texcoord fixup is currently not implemented in ARB mode (use GLSL instead).\n");
+               }
+            }
+            break;
+
+        case WINED3DSTT_VOLUME:
+            tex_type = "3D";
+            break;
+
+        case WINED3DSTT_CUBE:
+            tex_type = "CUBE";
+            break;
+
+        default:
+            ERR("Unexpected texture type %d\n", sampler_type);
+            tex_type = "";
+    }
+
+    if (bias) {
+        /* Shouldn't be possible, but let's check for it */
+        if(projected) FIXME("Biased and Projected texture sampling\n");
+        /* TXB takes the 4th component of the source vector automatically, as d3d. Nothing more to do */
+        shader_addline(buffer, "TXB %s, %s, texture[%u], %s;\n", dst_str, coord_reg, sampler_idx, tex_type);
+    } else if (projected) {
+        shader_addline(buffer, "TXP %s, %s, texture[%u], %s;\n", dst_str, coord_reg, sampler_idx, tex_type);
+    } else {
+        shader_addline(buffer, "TEX %s, %s, texture[%u], %s;\n", dst_str, coord_reg, sampler_idx, tex_type);
+    }
+
+    if (shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type))
+    {
+        IWineD3DPixelShaderImpl *ps = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+        gen_color_correction(buffer, dst_str, ins->dst[0].write_mask,
+                "one", "coefmul.x", ps->cur_args->color_fixup[sampler_idx]);
+    }
+}
+
+static void pshader_gen_input_modifier_line(IWineD3DBaseShader *iface, SHADER_BUFFER *buffer,
+        const struct wined3d_shader_src_param *src, unsigned int tmpreg, char *outregstr)
+{
     /* Generate a line that does the input modifier computation and return the input register to use */
+    BOOL is_color = FALSE;
     char regstr[256];
     char swzstr[20];
@@ -697,8 +755,10 @@
 
     /* Get register name */
-    pshader_get_register_name(iface, instr, regstr);
-    shader_arb_get_swizzle(instr, FALSE, swzstr);
-
-    switch (instr & WINED3DSP_SRCMOD_MASK) {
+    shader_arb_get_register_name(iface, src->reg.type,
+            src->reg.idx, !!src->reg.rel_addr, regstr, &is_color);
+    shader_arb_get_swizzle(src, is_color, swzstr);
+
+    switch (src->modifiers)
+    {
     case WINED3DSPSM_NONE:
         sprintf(outregstr, "%s%s", regstr, swzstr);
@@ -748,26 +808,21 @@
 }
 
-static inline void pshader_gen_output_modifier_line(SHADER_BUFFER *buffer, int saturate, const char *write_mask,
-        int shift, const char *regstr)
-{
-    /* Generate a line that does the output modifier computation */
-    shader_addline(buffer, "MUL%s %s%s, %s, %s;\n", saturate ? "_SAT" : "",
-        regstr, write_mask, regstr, shift_tab[shift]);
-}
-
-static void pshader_hw_bem(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
-
-    SHADER_BUFFER* buffer = arg->buffer;
+static void pshader_hw_bem(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_name[50];
     char src_name[2][50];
     char dst_wmask[20];
-    DWORD sampler_code = arg->dst & WINED3DSP_REGNUM_MASK;
+    DWORD sampler_code = dst->reg.idx;
     BOOL has_bumpmat = FALSE;
+    BOOL is_color;
     int i;
 
     for(i = 0; i < This->numbumpenvmatconsts; i++) {
-        if(This->bumpenvmatconst[i].const_num != -1 && This->bumpenvmatconst[i].texunit == sampler_code) {
+        if (This->bumpenvmatconst[i].const_num != WINED3D_CONST_NUM_UNUSED
+                && This->bumpenvmatconst[i].texunit == sampler_code)
+        {
             has_bumpmat = TRUE;
             break;
@@ -775,10 +830,11 @@
     }
 
-    pshader_get_register_name(arg->shader, arg->dst, dst_name);
-    shader_arb_get_write_mask(arg, arg->dst, dst_wmask);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_name, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_wmask);
     strcat(dst_name, dst_wmask);
 
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_name[0]);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[1], 1, src_name[1]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_name[0]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[1], 1, src_name[1]);
 
     if(has_bumpmat) {
@@ -795,28 +851,31 @@
 }
 
-static void pshader_hw_cnd(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
-    SHADER_BUFFER* buffer = arg->buffer;
+static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_wmask[20];
     char dst_name[50];
     char src_name[3][50];
-    BOOL sat = (arg->dst & WINED3DSP_DSTMOD_MASK) & WINED3DSPDM_SATURATE;
-    DWORD shift = (arg->dst & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
+    BOOL sat = dst->modifiers & WINED3DSPDM_SATURATE;
+    BOOL is_color;
+    DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major,
+            ins->ctx->reg_maps->shader_version.minor);
 
     /* FIXME: support output modifiers */
 
     /* Handle output register */
-    pshader_get_register_name(arg->shader, arg->dst, dst_name);
-    shader_arb_get_write_mask(arg, arg->dst, dst_wmask);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_name, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_wmask);
 
     /* Generate input register names (with modifiers) */
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_name[0]);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[1], 1, src_name[1]);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[2], 2, src_name[2]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_name[0]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[1], 1, src_name[1]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[2], 2, src_name[2]);
 
     /* The coissue flag changes the semantic of the cnd instruction in <= 1.3 shaders */
-    if (shader->baseShader.hex_version <= WINED3DPS_VERSION(1, 3) &&
-        arg->opcode_token & WINED3DSI_COISSUE) {
+    if (shader_version <= WINED3D_SHADER_VERSION(1, 3) && ins->coissue)
+    {
         shader_addline(buffer, "MOV%s %s%s, %s;\n", sat ? "_SAT" : "", dst_name, dst_wmask, src_name[1]);
     } else {
@@ -825,52 +884,51 @@
                                 sat ? "_SAT" : "", dst_name, dst_wmask, src_name[1], src_name[2]);
     }
-    if (shift != 0)
-        pshader_gen_output_modifier_line(buffer, FALSE, dst_wmask, shift, dst_name);
-}
-
-static void pshader_hw_cmp(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
+}
+
+static void pshader_hw_cmp(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_wmask[20];
     char dst_name[50];
     char src_name[3][50];
-    DWORD shift = (arg->dst & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
-    BOOL sat = (arg->dst & WINED3DSP_DSTMOD_MASK) & WINED3DSPDM_SATURATE;
+    BOOL sat = dst->modifiers & WINED3DSPDM_SATURATE;
+    BOOL is_color;
 
     /* FIXME: support output modifiers */
 
     /* Handle output register */
-    pshader_get_register_name(arg->shader, arg->dst, dst_name);
-    shader_arb_get_write_mask(arg, arg->dst, dst_wmask);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_name, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_wmask);
 
     /* Generate input register names (with modifiers) */
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_name[0]);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[1], 1, src_name[1]);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[2], 2, src_name[2]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_name[0]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[1], 1, src_name[1]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[2], 2, src_name[2]);
 
     shader_addline(buffer, "CMP%s %s%s, %s, %s, %s;\n", sat ? "_SAT" : "", dst_name, dst_wmask,
                    src_name[0], src_name[2], src_name[1]);
-
-    if (shift != 0)
-        pshader_gen_output_modifier_line(buffer, FALSE, dst_wmask, shift, dst_name);
 }
 
 /** Process the WINED3DSIO_DP2ADD instruction in ARB.
  * dst = dot2(src0, src1) + src2 */
-static void pshader_hw_dp2add(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
+static void pshader_hw_dp2add(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_wmask[20];
     char dst_name[50];
     char src_name[3][50];
-    DWORD shift = (arg->dst & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
-    BOOL sat = (arg->dst & WINED3DSP_DSTMOD_MASK) & WINED3DSPDM_SATURATE;
-
-    pshader_get_register_name(arg->shader, arg->dst, dst_name);
-    shader_arb_get_write_mask(arg, arg->dst, dst_wmask);
-
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_name[0]);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[1], 1, src_name[1]);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[2], 2, src_name[2]);
+    BOOL sat = dst->modifiers & WINED3DSPDM_SATURATE;
+    BOOL is_color;
+
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_name, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_wmask);
+
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_name[0]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[1], 1, src_name[1]);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[2], 2, src_name[2]);
 
     /* Emulate a DP2 with a DP3 and 0.0 */
@@ -879,23 +937,48 @@
     shader_addline(buffer, "DP3 TMP2, TMP, %s;\n", src_name[1]);
     shader_addline(buffer, "ADD%s %s%s, TMP2, %s;\n", sat ? "_SAT" : "", dst_name, dst_wmask, src_name[2]);
-
-    if (shift != 0)
-        pshader_gen_output_modifier_line(buffer, FALSE, dst_wmask, shift, dst_name);
 }
 
 /* Map the opcode 1-to-1 to the GL code */
-static void shader_hw_map2gl(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl*)arg->shader;
-    CONST SHADER_OPCODE* curOpcode = arg->opcode;
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD dst = arg->dst;
-    const DWORD *src = arg->src;
+static void shader_hw_map2gl(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    const char *instruction;
     char arguments[256];
     unsigned int i;
 
-    if (shader_is_pshader_version(shader->baseShader.hex_version))
+    switch (ins->handler_idx)
+    {
+        case WINED3DSIH_ABS: instruction = "ABS"; break;
+        case WINED3DSIH_ADD: instruction = "ADD"; break;
+        case WINED3DSIH_CRS: instruction = "XPD"; break;
+        case WINED3DSIH_DP3: instruction = "DP3"; break;
+        case WINED3DSIH_DP4: instruction = "DP4"; break;
+        case WINED3DSIH_DST: instruction = "DST"; break;
+        case WINED3DSIH_EXP: instruction = "EX2"; break;
+        case WINED3DSIH_EXPP: instruction = "EXP"; break;
+        case WINED3DSIH_FRC: instruction = "FRC"; break;
+        case WINED3DSIH_LIT: instruction = "LIT"; break;
+        case WINED3DSIH_LOG: instruction = "LG2"; break;
+        case WINED3DSIH_LOGP: instruction = "LOG"; break;
+        case WINED3DSIH_LRP: instruction = "LRP"; break;
+        case WINED3DSIH_MAD: instruction = "MAD"; break;
+        case WINED3DSIH_MAX: instruction = "MAX"; break;
+        case WINED3DSIH_MIN: instruction = "MIN"; break;
+        case WINED3DSIH_MOV: instruction = "MOV"; break;
+        case WINED3DSIH_MUL: instruction = "MUL"; break;
+        case WINED3DSIH_NOP: instruction = "NOP"; break;
+        case WINED3DSIH_POW: instruction = "POW"; break;
+        case WINED3DSIH_SGE: instruction = "SGE"; break;
+        case WINED3DSIH_SLT: instruction = "SLT"; break;
+        case WINED3DSIH_SUB: instruction = "SUB"; break;
+        default: instruction = "";
+            FIXME("Unhandled opcode %#x\n", ins->handler_idx);
+            break;
+    }
+
+    if (shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type))
     {
         /* Output token related */
+        const struct wined3d_shader_dst_param *dst;
         char output_rname[256];
         char output_wmask[20];
@@ -905,16 +988,18 @@
         BOOL partialprecision = FALSE;
         const char *modifier;
+        BOOL is_color;
         DWORD shift;
 
-        if (!curOpcode->num_params)
+        if (!(ins->dst_count + ins->src_count))
         {
-            ERR("Opcode \"%s\" has no parameters\n", curOpcode->name);
+            ERR("Opcode \"%#x\" has no parameters\n", ins->handler_idx);
             return;
         }
+        dst = &ins->dst[0];
 
         /* Process modifiers */
-        if (dst & WINED3DSP_DSTMOD_MASK)
+        if (dst->modifiers)
         {
-            DWORD mask = dst & WINED3DSP_DSTMOD_MASK;
+            DWORD mask = dst->modifiers;
 
             saturate = mask & WINED3DSPDM_SATURATE;
@@ -923,63 +1008,63 @@
             mask &= ~(WINED3DSPDM_MSAMPCENTROID | WINED3DSPDM_PARTIALPRECISION | WINED3DSPDM_SATURATE);
             if (mask)
-                FIXME("Unrecognized modifier(%#x)\n", mask >> WINED3DSP_DSTMOD_SHIFT);
+                FIXME("Unrecognized modifier(%#x)\n", mask);
 
             if (centroid)
-                FIXME("Unhandled modifier(%#x)\n", mask >> WINED3DSP_DSTMOD_SHIFT);
-        }
-        shift = (dst & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
+                FIXME("Unhandled modifier(%#x)\n", mask);
+        }
+        shift = dst->shift;
         modifier = (saturate && !shift) ? "_SAT" : "";
 
         /* Generate input register names (with modifiers) */
-        for (i = 1; i < curOpcode->num_params; ++i)
-            pshader_gen_input_modifier_line(arg->shader, buffer, src[i-1], i-1, operands[i]);
+        for (i = 0; i < ins->src_count; ++i)
+        {
+            pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[i], i, operands[i + 1]);
+        }
 
         /* Handle output register */
-        pshader_get_register_name(arg->shader, dst, output_rname);
+        shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+                dst->reg.idx, !!dst->reg.rel_addr, output_rname, &is_color);
         strcpy(operands[0], output_rname);
-        shader_arb_get_write_mask(arg, dst, output_wmask);
+        shader_arb_get_write_mask(ins, dst, output_wmask);
         strcat(operands[0], output_wmask);
 
         arguments[0] = '\0';
         strcat(arguments, operands[0]);
-        for (i = 1; i < curOpcode->num_params; i++)
+        for (i = 0; i < ins->src_count; ++i)
         {
             strcat(arguments, ", ");
-            strcat(arguments, operands[i]);
-        }
-        shader_addline(buffer, "%s%s %s;\n", curOpcode->glname, modifier, arguments);
-
-        /* A shift requires another line. */
-        if (shift) pshader_gen_output_modifier_line(buffer, saturate, output_wmask, shift, output_rname);
+            strcat(arguments, operands[i + 1]);
+        }
+        shader_addline(buffer, "%s%s %s;\n", instruction, modifier, arguments);
     } else {
-        /* Note that vshader_program_add_param() adds spaces. */
+        /* Note that shader_arb_add_*_param() adds spaces. */
 
         arguments[0] = '\0';
-        if (curOpcode->num_params > 0)
+        if (ins->dst_count)
         {
-            vshader_program_add_param(arg, dst, FALSE, arguments);
-            for (i = 1; i < curOpcode->num_params; ++i)
+            shader_arb_add_dst_param(ins, &ins->dst[0], arguments);
+            for (i = 0; i < ins->src_count; ++i)
             {
                 strcat(arguments, ",");
-                vshader_program_add_param(arg, src[i-1], TRUE, arguments);
+                shader_arb_add_src_param(ins, &ins->src[i], arguments);
             }
         }
-        shader_addline(buffer, "%s%s;\n", curOpcode->glname, arguments);
-    }
-}
-
-static void shader_hw_mov(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl*)arg->shader;
-
-    if ((WINED3DSHADER_VERSION_MAJOR(shader->baseShader.hex_version) == 1
-            && !shader_is_pshader_version(shader->baseShader.hex_version)
-            && shader_get_regtype(arg->dst) == WINED3DSPR_ADDR)
-            || arg->opcode->opcode == WINED3DSIO_MOVA)
+        shader_addline(buffer, "%s%s;\n", instruction, arguments);
+    }
+}
+
+static void shader_hw_mov(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
+
+    if ((ins->ctx->reg_maps->shader_version.major == 1
+            && !shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type)
+            && ins->dst[0].reg.type == WINED3DSPR_ADDR)
+            || ins->handler_idx == WINED3DSIH_MOVA)
     {
-        SHADER_BUFFER *buffer = arg->buffer;
+        SHADER_BUFFER *buffer = ins->ctx->buffer;
         char src0_param[256];
 
-        if (arg->opcode->opcode == WINED3DSIO_MOVA)
+        if (ins->handler_idx == WINED3DSIH_MOVA)
             FIXME("mova should round\n");
 
@@ -987,5 +1072,5 @@
         if (((IWineD3DVertexShaderImpl *)shader)->rel_offset)
         {
-            vshader_program_add_param(arg, arg->src[0], TRUE, src0_param);
+            shader_arb_add_src_param(ins, &ins->src[0], src0_param);
             shader_addline(buffer, "ADD TMP.x, %s, helper_const.z;\n", src0_param);
             shader_addline(buffer, "ARL A0.x, TMP.x;\n");
@@ -995,16 +1080,8 @@
             /* Apple's ARB_vertex_program implementation does not accept an ARL source argument
              * with more than one component. Thus replicate the first source argument over all
-             * 4 components. For example, .xyzw -> .x (or better: .xxxx), .zwxy -> .z, etc)
-             */
-            DWORD parm = arg->src[0] & ~(WINED3DVS_SWIZZLE_MASK);
-            if((arg->src[0] & WINED3DVS_X_W) == WINED3DVS_X_W)
-                parm |= WINED3DVS_X_W | WINED3DVS_Y_W | WINED3DVS_Z_W | WINED3DVS_W_W;
-            else if((arg->src[0] & WINED3DVS_X_Z) == WINED3DVS_X_Z)
-                parm |= WINED3DVS_X_Z | WINED3DVS_Y_Z | WINED3DVS_Z_Z | WINED3DVS_W_Z;
-            else if((arg->src[0] & WINED3DVS_X_Y) == WINED3DVS_X_Y)
-                parm |= WINED3DVS_X_Y | WINED3DVS_Y_Y | WINED3DVS_Z_Y | WINED3DVS_W_Y;
-            else if((arg->src[0] & WINED3DVS_X_X) == WINED3DVS_X_X)
-                parm |= WINED3DVS_X_X | WINED3DVS_Y_X | WINED3DVS_Z_X | WINED3DVS_W_X;
-            vshader_program_add_param(arg, parm, TRUE, src0_param);
+             * 4 components. For example, .xyzw -> .x (or better: .xxxx), .zwxy -> .z, etc) */
+            struct wined3d_shader_src_param tmp_src = ins->src[0];
+            tmp_src.swizzle = (tmp_src.swizzle & 0x3) * 0x55;
+            shader_arb_add_src_param(ins, &tmp_src, src0_param);
             shader_addline(buffer, "ARL A0.x, %s;\n", src0_param);
         }
@@ -1012,21 +1089,23 @@
     else
     {
-        shader_hw_map2gl(arg);
-    }
-}
-
-static void pshader_hw_texkill(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
-    DWORD hex_version = This->baseShader.hex_version;
-    SHADER_BUFFER* buffer = arg->buffer;
+        shader_hw_map2gl(ins);
+    }
+}
+
+static void pshader_hw_texkill(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char reg_dest[40];
+    BOOL is_color;
 
     /* No swizzles are allowed in d3d's texkill. PS 1.x ignores the 4th component as documented,
      * but >= 2.0 honors it(undocumented, but tested by the d3d9 testsuit)
      */
-    pshader_get_register_name(arg->shader, arg->dst, reg_dest);
-
-    if(hex_version >= WINED3DPS_VERSION(2,0)) {
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, reg_dest, &is_color);
+
+    if (ins->ctx->reg_maps->shader_version.major >= 2)
+    {
         /* The arb backend doesn't claim ps 2.0 support, but try to eat what the app feeds to us */
         shader_addline(buffer, "KIL %s;\n", reg_dest);
@@ -1041,37 +1120,36 @@
 }
 
-static void pshader_hw_tex(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
-
-    DWORD dst = arg->dst;
-    const DWORD *src = arg->src;
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD hex_version = This->baseShader.hex_version;
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    BOOL is_color;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major,
+            ins->ctx->reg_maps->shader_version.minor);
     BOOL projected = FALSE, bias = FALSE;
 
     char reg_dest[40];
     char reg_coord[40];
-    DWORD reg_dest_code;
     DWORD reg_sampler_code;
 
     /* All versions have a destination register */
-    reg_dest_code = dst & WINED3DSP_REGNUM_MASK;
-    pshader_get_register_name(arg->shader, dst, reg_dest);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, reg_dest, &is_color);
 
     /* 1.0-1.3: Use destination register as coordinate source.
        1.4+: Use provided coordinate source register. */
-   if (hex_version < WINED3DPS_VERSION(1,4))
+   if (shader_version < WINED3D_SHADER_VERSION(1,4))
       strcpy(reg_coord, reg_dest);
    else
-      pshader_gen_input_modifier_line(arg->shader, buffer, src[0], 0, reg_coord);
+      pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, reg_coord);
 
   /* 1.0-1.4: Use destination register number as texture code.
      2.0+: Use provided sampler number as texure code. */
-  if (hex_version < WINED3DPS_VERSION(2,0))
-     reg_sampler_code = reg_dest_code;
+  if (shader_version < WINED3D_SHADER_VERSION(2,0))
+     reg_sampler_code = dst->reg.idx;
   else
-     reg_sampler_code = src[1] & WINED3DSP_REGNUM_MASK;
+     reg_sampler_code = ins->src[1].reg.idx;
 
   /* projection flag:
@@ -1080,5 +1158,6 @@
    * 2.0+: Use WINED3DSI_TEXLD_PROJECT on the opcode
    */
-  if(hex_version < WINED3DPS_VERSION(1,4)) {
+  if (shader_version < WINED3D_SHADER_VERSION(1,4))
+  {
       DWORD flags = 0;
       if(reg_sampler_code < MAX_TEXTURES) {
@@ -1088,6 +1167,8 @@
           projected = TRUE;
       }
-  } else if(hex_version < WINED3DPS_VERSION(2,0)) {
-      DWORD src_mod = arg->src[0] & WINED3DSP_SRCMOD_MASK;
+  }
+  else if (shader_version < WINED3D_SHADER_VERSION(2,0))
+  {
+      DWORD src_mod = ins->src[0].modifiers;
       if (src_mod == WINED3DSPSM_DZ) {
           projected = TRUE;
@@ -1096,91 +1177,87 @@
       }
   } else {
-      if(arg->opcode_token & WINED3DSI_TEXLD_PROJECT) {
-          projected = TRUE;
-      }
-      if(arg->opcode_token & WINED3DSI_TEXLD_BIAS) {
-          bias = TRUE;
-      }
+      if (ins->flags & WINED3DSI_TEXLD_PROJECT) projected = TRUE;
+      if (ins->flags & WINED3DSI_TEXLD_BIAS) bias = TRUE;
   }
-  shader_hw_sample(arg, reg_sampler_code, reg_dest, reg_coord, projected, bias);
-}
-
-static void pshader_hw_texcoord(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
-    DWORD dst = arg->dst;
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD hex_version = This->baseShader.hex_version;
+  shader_hw_sample(ins, reg_sampler_code, reg_dest, reg_coord, projected, bias);
+}
+
+static void pshader_hw_texcoord(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major,
+            ins->ctx->reg_maps->shader_version.minor);
 
     char tmp[20];
-    shader_arb_get_write_mask(arg, dst, tmp);
-    if (hex_version != WINED3DPS_VERSION(1,4)) {
-        DWORD reg = dst & WINED3DSP_REGNUM_MASK;
+    shader_arb_get_write_mask(ins, dst, tmp);
+    if (shader_version != WINED3D_SHADER_VERSION(1,4))
+    {
+        DWORD reg = dst->reg.idx;
         shader_addline(buffer, "MOV_SAT T%u%s, fragment.texcoord[%u];\n", reg, tmp, reg);
     } else {
-        DWORD reg1 = dst & WINED3DSP_REGNUM_MASK;
         char reg_src[40];
 
-        pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, reg_src);
-        shader_addline(buffer, "MOV R%u%s, %s;\n", reg1, tmp, reg_src);
+        pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, reg_src);
+        shader_addline(buffer, "MOV R%u%s, %s;\n", dst->reg.idx, tmp, reg_src);
    }
 }
 
-static void pshader_hw_texreg2ar(const SHADER_OPCODE_ARG *arg)
-{
-     SHADER_BUFFER* buffer = arg->buffer;
-     IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_hw_texreg2ar(const struct wined3d_shader_instruction *ins)
+{
+     SHADER_BUFFER *buffer = ins->ctx->buffer;
+     IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
      IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
      DWORD flags;
 
-     DWORD reg1 = arg->dst & WINED3DSP_REGNUM_MASK;
+     DWORD reg1 = ins->dst[0].reg.idx;
      char dst_str[8];
      char src_str[50];
 
      sprintf(dst_str, "T%u", reg1);
-     pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_str);
-     shader_addline(buffer, "MOV TMP.r, %s.a;\n", src_str);
-     shader_addline(buffer, "MOV TMP.g, %s.r;\n", src_str);
+     pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_str);
+     shader_addline(buffer, "MOV TMP.x, %s.w;\n", src_str);
+     shader_addline(buffer, "MOV TMP.y, %s.x;\n", src_str);
      flags = reg1 < MAX_TEXTURES ? deviceImpl->stateBlock->textureState[reg1][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
-     shader_hw_sample(arg, reg1, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
-}
-
-static void pshader_hw_texreg2gb(const SHADER_OPCODE_ARG *arg)
-{
-     SHADER_BUFFER* buffer = arg->buffer;
-
-     DWORD reg1 = arg->dst & WINED3DSP_REGNUM_MASK;
+     shader_hw_sample(ins, reg1, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
+}
+
+static void pshader_hw_texreg2gb(const struct wined3d_shader_instruction *ins)
+{
+     SHADER_BUFFER *buffer = ins->ctx->buffer;
+
+     DWORD reg1 = ins->dst[0].reg.idx;
      char dst_str[8];
      char src_str[50];
 
      sprintf(dst_str, "T%u", reg1);
-     pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_str);
-     shader_addline(buffer, "MOV TMP.r, %s.g;\n", src_str);
-     shader_addline(buffer, "MOV TMP.g, %s.b;\n", src_str);
-     shader_hw_sample(arg, reg1, dst_str, "TMP", FALSE, FALSE);
-}
-
-static void pshader_hw_texreg2rgb(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD reg1 = arg->dst & WINED3DSP_REGNUM_MASK;
+     pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_str);
+     shader_addline(buffer, "MOV TMP.x, %s.y;\n", src_str);
+     shader_addline(buffer, "MOV TMP.y, %s.z;\n", src_str);
+     shader_hw_sample(ins, reg1, dst_str, "TMP", FALSE, FALSE);
+}
+
+static void pshader_hw_texreg2rgb(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    DWORD reg1 = ins->dst[0].reg.idx;
     char dst_str[8];
     char src_str[50];
 
     sprintf(dst_str, "T%u", reg1);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_str);
-    shader_hw_sample(arg, reg1, dst_str, src_str, FALSE, FALSE);
-}
-
-static void pshader_hw_texbem(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_str);
+    shader_hw_sample(ins, reg1, dst_str, src_str, FALSE, FALSE);
+}
+
+static void pshader_hw_texbem(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
     BOOL has_bumpmat = FALSE;
     BOOL has_luminance = FALSE;
+    BOOL is_color;
     int i;
 
-    DWORD dst = arg->dst;
-    DWORD src = arg->src[0] & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
 
     char reg_coord[40];
@@ -1188,10 +1265,13 @@
 
     /* All versions have a destination register */
-    reg_dest_code = dst & WINED3DSP_REGNUM_MASK;
+    reg_dest_code = dst->reg.idx;
     /* Can directly use the name because texbem is only valid for <= 1.3 shaders */
-    pshader_get_register_name(arg->shader, dst, reg_coord);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, reg_coord, &is_color);
 
     for(i = 0; i < This->numbumpenvmatconsts; i++) {
-        if(This->bumpenvmatconst[i].const_num != -1 && reg_dest_code == This->bumpenvmatconst[i].texunit) {
+        if (This->bumpenvmatconst[i].const_num != WINED3D_CONST_NUM_UNUSED
+                && reg_dest_code == This->bumpenvmatconst[i].texunit)
+        {
             has_bumpmat = TRUE;
             break;
@@ -1199,5 +1279,7 @@
     }
     for(i = 0; i < This->numbumpenvmatconsts; i++) {
-        if(This->luminanceconst[i].const_num != -1 && reg_dest_code == This->luminanceconst[i].texunit) {
+        if (This->luminanceconst[i].const_num != WINED3D_CONST_NUM_UNUSED
+                && reg_dest_code == This->luminanceconst[i].texunit)
+        {
             has_luminance = TRUE;
             break;
@@ -1206,10 +1288,12 @@
 
     if(has_bumpmat) {
+        DWORD src = ins->src[0].reg.idx;
+
         /* Sampling the perturbation map in Tsrc was done already, including the signedness correction if needed */
 
         shader_addline(buffer, "SWZ TMP2, bumpenvmat%d, x, z, 0, 0;\n", reg_dest_code);
-        shader_addline(buffer, "DP3 TMP.r, TMP2, T%u;\n", src);
+        shader_addline(buffer, "DP3 TMP.x, TMP2, T%u;\n", src);
         shader_addline(buffer, "SWZ TMP2, bumpenvmat%d, y, w, 0, 0;\n", reg_dest_code);
-        shader_addline(buffer, "DP3 TMP.g, TMP2, T%u;\n", src);
+        shader_addline(buffer, "DP3 TMP.y, TMP2, T%u;\n", src);
 
         /* with projective textures, texbem only divides the static texture coord, not the displacement,
@@ -1218,14 +1302,15 @@
         if (((IWineD3DDeviceImpl*) This->baseShader.device)->stateBlock->textureState[reg_dest_code][WINED3DTSS_TEXTURETRANSFORMFLAGS]
               & WINED3DTTFF_PROJECTED) {
-            shader_addline(buffer, "RCP TMP2.a, %s.a;\n", reg_coord);
-            shader_addline(buffer, "MUL TMP2.rg, %s, TMP2.a;\n", reg_coord);
-            shader_addline(buffer, "ADD TMP.rg, TMP, TMP2;\n");
+            shader_addline(buffer, "RCP TMP2.w, %s.w;\n", reg_coord);
+            shader_addline(buffer, "MUL TMP2.xy, %s, TMP2.w;\n", reg_coord);
+            shader_addline(buffer, "ADD TMP.xy, TMP, TMP2;\n");
         } else {
-            shader_addline(buffer, "ADD TMP.rg, TMP, %s;\n", reg_coord);
-        }
-
-        shader_hw_sample(arg, reg_dest_code, reg_coord, "TMP", FALSE, FALSE);
-
-        if(arg->opcode->opcode == WINED3DSIO_TEXBEML && has_luminance) {
+            shader_addline(buffer, "ADD TMP.xy, TMP, %s;\n", reg_coord);
+        }
+
+        shader_hw_sample(ins, reg_dest_code, reg_coord, "TMP", FALSE, FALSE);
+
+        if (ins->handler_idx == WINED3DSIH_TEXBEML && has_luminance)
+        {
             shader_addline(buffer, "MAD TMP, T%u.z, luminance%d.x, luminance%d.y;\n",
                            src, reg_dest_code, reg_dest_code);
@@ -1241,60 +1326,60 @@
         }
         /* Without a bump matrix loaded, just sample with the unmodified coordinates */
-        shader_hw_sample(arg, reg_dest_code, reg_coord, reg_coord, tf & WINED3DTTFF_PROJECTED, FALSE);
-    }
-}
-
-static void pshader_hw_texm3x2pad(const SHADER_OPCODE_ARG *arg)
-{
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+        shader_hw_sample(ins, reg_dest_code, reg_coord, reg_coord, tf & WINED3DTTFF_PROJECTED, FALSE);
+    }
+}
+
+static void pshader_hw_texm3x2pad(const struct wined3d_shader_instruction *ins)
+{
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char src0_name[50];
 
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0_name);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0_name);
     shader_addline(buffer, "DP3 TMP.x, T%u, %s;\n", reg, src0_name);
 }
 
-static void pshader_hw_texm3x2tex(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_hw_texm3x2tex(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
     DWORD flags;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_str[8];
     char src0_name[50];
 
     sprintf(dst_str, "T%u", reg);
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0_name);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0_name);
     shader_addline(buffer, "DP3 TMP.y, T%u, %s;\n", reg, src0_name);
     flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->textureState[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
-    shader_hw_sample(arg, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
-}
-
-static void pshader_hw_texm3x3pad(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    shader_hw_sample(ins, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
+}
+
+static void pshader_hw_texm3x3pad(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     SHADER_PARSE_STATE* current_state = &This->baseShader.parse_state;
     char src0_name[50];
 
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0_name);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0_name);
     shader_addline(buffer, "DP3 TMP.%c, T%u, %s;\n", 'x' + current_state->current_row, reg, src0_name);
     current_state->texcoord_w[current_state->current_row++] = reg;
 }
 
-static void pshader_hw_texm3x3tex(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_hw_texm3x3tex(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
     DWORD flags;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     SHADER_PARSE_STATE* current_state = &This->baseShader.parse_state;
     char dst_str[8];
     char src0_name[50];
 
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0_name);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0_name);
     shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", reg, src0_name);
 
@@ -1302,20 +1387,20 @@
     sprintf(dst_str, "T%u", reg);
     flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->textureState[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
-    shader_hw_sample(arg, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
+    shader_hw_sample(ins, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
     current_state->current_row = 0;
 }
 
-static void pshader_hw_texm3x3vspec(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_hw_texm3x3vspec(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
     DWORD flags;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     SHADER_PARSE_STATE* current_state = &This->baseShader.parse_state;
     char dst_str[8];
     char src0_name[50];
 
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0_name);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0_name);
     shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", reg, src0_name);
 
@@ -1338,21 +1423,22 @@
     sprintf(dst_str, "T%u", reg);
     flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->textureState[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
-    shader_hw_sample(arg, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
+    shader_hw_sample(ins, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
     current_state->current_row = 0;
 }
 
-static void pshader_hw_texm3x3spec(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_hw_texm3x3spec(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
     DWORD flags;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    DWORD reg3 = arg->src[1] & WINED3DSP_REGNUM_MASK;
+    DWORD reg = ins->dst[0].reg.idx;
     SHADER_PARSE_STATE* current_state = &This->baseShader.parse_state;
-    SHADER_BUFFER* buffer = arg->buffer;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_str[8];
     char src0_name[50];
-
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0_name);
+    char src1_name[50];
+
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0_name);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[1], 1, src1_name);
     shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", reg, src0_name);
 
@@ -1365,22 +1451,24 @@
      * Which normalizes the normal vector
      */
-    shader_addline(buffer, "DP3 TMP.w, TMP, C[%u];\n", reg3);
+    shader_addline(buffer, "DP3 TMP.w, TMP, %s;\n", src1_name);
     shader_addline(buffer, "DP3 TMP2.w, TMP, TMP;\n");
     shader_addline(buffer, "RCP TMP2.w, TMP2.w;\n");
     shader_addline(buffer, "MUL TMP.w, TMP.w, TMP2.w;\n");
     shader_addline(buffer, "MUL TMP, TMP.w, TMP;\n");
-    shader_addline(buffer, "MAD TMP, coefmul.x, TMP, -C[%u];\n", reg3);
+    shader_addline(buffer, "MAD TMP, coefmul.x, TMP, -%s;\n", src1_name);
 
     /* Sample the texture using the calculated coordinates */
     sprintf(dst_str, "T%u", reg);
     flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->textureState[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
-    shader_hw_sample(arg, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
+    shader_hw_sample(ins, reg, dst_str, "TMP", flags & WINED3DTTFF_PROJECTED, FALSE);
     current_state->current_row = 0;
 }
 
-static void pshader_hw_texdepth(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
+static void pshader_hw_texdepth(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_name[50];
+    BOOL is_color;
 
     /* texdepth has an implicit destination, the fragment depth value. It's only parameter,
@@ -1389,10 +1477,11 @@
      * here
      */
-    pshader_get_register_name(arg->shader, arg->dst, dst_name);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_name, &is_color);
 
     /* According to the msdn, the source register(must be r5) is unusable after
      * the texdepth instruction, so we're free to modify it
      */
-    shader_addline(buffer, "MIN %s.g, %s.g, one.g;\n", dst_name, dst_name);
+    shader_addline(buffer, "MIN %s.y, %s.y, one.y;\n", dst_name, dst_name);
 
     /* How to deal with the special case dst_name.g == 0? if r != 0, then
@@ -1400,7 +1489,7 @@
      * result. But if r = 0.0, then 0 * inf = 0, which is incorrect.
      */
-    shader_addline(buffer, "RCP %s.g, %s.g;\n", dst_name, dst_name);
-    shader_addline(buffer, "MUL TMP.x, %s.r, %s.g;\n", dst_name, dst_name);
-    shader_addline(buffer, "MIN TMP.x, TMP.x, one.r;\n");
+    shader_addline(buffer, "RCP %s.y, %s.y;\n", dst_name, dst_name);
+    shader_addline(buffer, "MUL TMP.x, %s.x, %s.y;\n", dst_name, dst_name);
+    shader_addline(buffer, "MIN TMP.x, TMP.x, one.x;\n");
     shader_addline(buffer, "MAX result.depth, TMP.x, 0.0;\n");
 }
@@ -1409,35 +1498,37 @@
  * Take a 3-component dot product of the TexCoord[dstreg] and src,
  * then perform a 1D texture lookup from stage dstregnum, place into dst. */
-static void pshader_hw_texdp3tex(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
+static void pshader_hw_texdp3tex(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    DWORD sampler_idx = ins->dst[0].reg.idx;
     char src0[50];
     char dst_str[8];
 
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0);
     shader_addline(buffer, "MOV TMP, 0.0;\n");
     shader_addline(buffer, "DP3 TMP.x, T%u, %s;\n", sampler_idx, src0);
 
     sprintf(dst_str, "T%u", sampler_idx);
-    shader_hw_sample(arg, sampler_idx, dst_str, "TMP", FALSE /* Only one coord, can't be projected */, FALSE);
+    shader_hw_sample(ins, sampler_idx, dst_str, "TMP", FALSE /* Only one coord, can't be projected */, FALSE);
 }
 
 /** Process the WINED3DSIO_TEXDP3 instruction in ARB:
  * Take a 3-component dot product of the TexCoord[dstreg] and src. */
-static void pshader_hw_texdp3(const SHADER_OPCODE_ARG *arg)
-{
+static void pshader_hw_texdp3(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
     char src0[50];
     char dst_str[50];
     char dst_mask[6];
-    DWORD dstreg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    BOOL is_color;
 
     /* Handle output register */
-    pshader_get_register_name(arg->shader, arg->dst, dst_str);
-    shader_arb_get_write_mask(arg, arg->dst, dst_mask);
-
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0);
-    shader_addline(buffer, "DP3 %s%s, T%u, %s;\n", dst_str, dst_mask, dstreg, src0);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_str, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_mask);
+
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0);
+    shader_addline(buffer, "DP3 %s%s, T%u, %s;\n", dst_str, dst_mask, dst->reg.idx, src0);
 
     /* TODO: Handle output modifiers */
@@ -1446,17 +1537,19 @@
 /** Process the WINED3DSIO_TEXM3X3 instruction in ARB
  * Perform the 3rd row of a 3x3 matrix multiply */
-static void pshader_hw_texm3x3(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
+static void pshader_hw_texm3x3(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_str[50];
     char dst_mask[6];
     char src0[50];
-    DWORD dst_reg = arg->dst & WINED3DSP_REGNUM_MASK;
-
-    pshader_get_register_name(arg->shader, arg->dst, dst_str);
-    shader_arb_get_write_mask(arg, arg->dst, dst_mask);
-
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0);
-    shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", dst_reg, src0);
+    BOOL is_color;
+
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_str, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_mask);
+
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0);
+    shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", dst->reg.idx, src0);
     shader_addline(buffer, "MOV %s%s, TMP;\n", dst_str, dst_mask);
 
@@ -1469,11 +1562,11 @@
  * depth = (tmp0.y == 0.0) ? 1.0 : tmp0.x / tmp0.y
  */
-static void pshader_hw_texm3x2depth(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD dst_reg = arg->dst & WINED3DSP_REGNUM_MASK;
+static void pshader_hw_texm3x2depth(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    DWORD dst_reg = ins->dst[0].reg.idx;
     char src0[50];
 
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src0);
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src0);
     shader_addline(buffer, "DP3 TMP.y, T%u, %s;\n", dst_reg, src0);
 
@@ -1484,5 +1577,5 @@
     shader_addline(buffer, "RCP TMP.y, TMP.y;\n");
     shader_addline(buffer, "MUL TMP.x, TMP.x, TMP.y;\n");
-    shader_addline(buffer, "MIN TMP.x, TMP.x, one.r;\n");
+    shader_addline(buffer, "MIN TMP.x, TMP.x, one.x;\n");
     shader_addline(buffer, "MAX result.depth, TMP.x, 0.0;\n");
 }
@@ -1490,70 +1583,80 @@
 /** Handles transforming all WINED3DSIO_M?x? opcodes for
     Vertex/Pixel shaders to ARB_vertex_program codes */
-static void shader_hw_mnxn(const SHADER_OPCODE_ARG *arg)
+static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
 {
     int i;
     int nComponents = 0;
-    SHADER_OPCODE_ARG tmpArg;
-    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)arg->shader;
-    const SHADER_OPCODE *opcode_table = shader->baseShader.shader_ins;
-    DWORD shader_version = shader->baseShader.hex_version;
-
-    memset(&tmpArg, 0, sizeof(SHADER_OPCODE_ARG));
+    struct wined3d_shader_dst_param tmp_dst = {{0}};
+    struct wined3d_shader_src_param tmp_src[2] = {{{0}}};
+    struct wined3d_shader_instruction tmp_ins;
+
+    memset(&tmp_ins, 0, sizeof(tmp_ins));
 
     /* Set constants for the temporary argument */
-    tmpArg.shader      = arg->shader;
-    tmpArg.buffer      = arg->buffer;
-    tmpArg.src[0]      = arg->src[0];
-    tmpArg.src_addr[0] = arg->src_addr[0];
-    tmpArg.src_addr[1] = arg->src_addr[1];
-    tmpArg.reg_maps = arg->reg_maps;
-
-    switch(arg->opcode->opcode) {
-    case WINED3DSIO_M4x4:
-        nComponents = 4;
-        tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP4);
-        break;
-    case WINED3DSIO_M4x3:
-        nComponents = 3;
-        tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP4);
-        break;
-    case WINED3DSIO_M3x4:
-        nComponents = 4;
-        tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP3);
-        break;
-    case WINED3DSIO_M3x3:
-        nComponents = 3;
-        tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP3);
-        break;
-    case WINED3DSIO_M3x2:
-        nComponents = 2;
-        tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP3);
-        break;
-    default:
-        break;
-    }
-
+    tmp_ins.ctx = ins->ctx;
+    tmp_ins.dst_count = 1;
+    tmp_ins.dst = &tmp_dst;
+    tmp_ins.src_count = 2;
+    tmp_ins.src = tmp_src;
+
+    switch(ins->handler_idx)
+    {
+        case WINED3DSIH_M4x4:
+            nComponents = 4;
+            tmp_ins.handler_idx = WINED3DSIH_DP4;
+            break;
+        case WINED3DSIH_M4x3:
+            nComponents = 3;
+            tmp_ins.handler_idx = WINED3DSIH_DP4;
+            break;
+        case WINED3DSIH_M3x4:
+            nComponents = 4;
+            tmp_ins.handler_idx = WINED3DSIH_DP3;
+            break;
+        case WINED3DSIH_M3x3:
+            nComponents = 3;
+            tmp_ins.handler_idx = WINED3DSIH_DP3;
+            break;
+        case WINED3DSIH_M3x2:
+            nComponents = 2;
+            tmp_ins.handler_idx = WINED3DSIH_DP3;
+            break;
+        default:
+            FIXME("Unhandled opcode %#x\n", ins->handler_idx);
+            break;
+    }
+
+    tmp_dst = ins->dst[0];
+    tmp_src[0] = ins->src[0];
+    tmp_src[1] = ins->src[1];
     for (i = 0; i < nComponents; i++) {
-        tmpArg.dst = ((arg->dst) & ~WINED3DSP_WRITEMASK_ALL)|(WINED3DSP_WRITEMASK_0<<i);
-        tmpArg.src[1] = arg->src[1]+i;
-        shader_hw_map2gl(&tmpArg);
-    }
-}
-
-static void vshader_hw_rsq_rcp(const SHADER_OPCODE_ARG *arg)
-{
-    CONST SHADER_OPCODE* curOpcode = arg->opcode;
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD dst = arg->dst;
-    DWORD src = arg->src[0];
-    DWORD swizzle = (src & WINED3DSP_SWIZZLE_MASK) >> WINED3DSP_SWIZZLE_SHIFT;
+        tmp_dst.write_mask = WINED3DSP_WRITEMASK_0 << i;
+        shader_hw_map2gl(&tmp_ins);
+        ++tmp_src[1].reg.idx;
+    }
+}
+
+static void vshader_hw_rsq_rcp(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    const char *instruction;
 
     char tmpLine[256];
 
-    strcpy(tmpLine, curOpcode->glname); /* Opcode */
-    vshader_program_add_param(arg, dst, FALSE, tmpLine); /* Destination */
+    switch(ins->handler_idx)
+    {
+        case WINED3DSIH_RSQ: instruction = "RSQ"; break;
+        case WINED3DSIH_RCP: instruction = "RCP"; break;
+        default: instruction = "";
+            FIXME("Unhandled opcode %#x\n", ins->handler_idx);
+            break;
+    }
+
+    strcpy(tmpLine, instruction);
+    shader_arb_add_dst_param(ins, &ins->dst[0], tmpLine); /* Destination */
     strcat(tmpLine, ",");
-    vshader_program_add_param(arg, src, TRUE, tmpLine);
-    if ((WINED3DSP_NOSWIZZLE >> WINED3DSP_SWIZZLE_SHIFT) == swizzle) {
+    shader_arb_add_src_param(ins, &ins->src[0], tmpLine);
+    if (ins->src[0].swizzle == WINED3DSP_NOSWIZZLE)
+    {
         /* Dx sdk says .x is used if no swizzle is given, but our test shows that
          * .w is used
@@ -1565,17 +1668,19 @@
 }
 
-static void shader_hw_nrm(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
+static void shader_hw_nrm(const struct wined3d_shader_instruction *ins)
+{
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_name[50];
     char src_name[50];
     char dst_wmask[20];
-    DWORD shift = (arg->dst & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
-    BOOL sat = (arg->dst & WINED3DSP_DSTMOD_MASK) & WINED3DSPDM_SATURATE;
-
-    pshader_get_register_name(arg->shader, arg->dst, dst_name);
-    shader_arb_get_write_mask(arg, arg->dst, dst_wmask);
-
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_name);
+    BOOL sat = dst->modifiers & WINED3DSPDM_SATURATE;
+    BOOL is_color;
+
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_name, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_wmask);
+
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_name);
     shader_addline(buffer, "DP3 TMP, %s, %s;\n", src_name, src_name);
     shader_addline(buffer, "RSQ TMP, TMP.x;\n");
@@ -1583,10 +1688,7 @@
     shader_addline(buffer, "MUL%s %s%s, %s, TMP;\n", sat ? "_SAT" : "", dst_name, dst_wmask,
                    src_name);
-
-    if (shift != 0)
-        pshader_gen_output_modifier_line(buffer, FALSE, dst_wmask, shift, dst_name);
-}
-
-static void shader_hw_sincos(const SHADER_OPCODE_ARG *arg)
+}
+
+static void shader_hw_sincos(const struct wined3d_shader_instruction *ins)
 {
     /* This instruction exists in ARB, but the d3d instruction takes two extra parameters which
@@ -1594,21 +1696,19 @@
      * can't use map2gl
      */
-    SHADER_BUFFER* buffer = arg->buffer;
+    const struct wined3d_shader_dst_param *dst = &ins->dst[0];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     char dst_name[50];
     char src_name[50];
     char dst_wmask[20];
-    DWORD shift = (arg->dst & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
-    BOOL sat = (arg->dst & WINED3DSP_DSTMOD_MASK) & WINED3DSPDM_SATURATE;
-
-    pshader_get_register_name(arg->shader, arg->dst, dst_name);
-    shader_arb_get_write_mask(arg, arg->dst, dst_wmask);
-
-    pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_name);
+    BOOL sat = dst->modifiers & WINED3DSPDM_SATURATE;
+    BOOL is_color;
+
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+            dst->reg.idx, !!dst->reg.rel_addr, dst_name, &is_color);
+    shader_arb_get_write_mask(ins, dst, dst_wmask);
+
+    pshader_gen_input_modifier_line(ins->ctx->shader, buffer, &ins->src[0], 0, src_name);
     shader_addline(buffer, "SCS%s %s%s, %s;\n", sat ? "_SAT" : "", dst_name, dst_wmask,
                    src_name);
-
-    if (shift != 0)
-        pshader_gen_output_modifier_line(buffer, FALSE, dst_wmask, shift, dst_name);
-
 }
 
@@ -1641,5 +1741,5 @@
 {
     GLuint program_id = 0;
-    const char *blt_fprograms[tex_type_count] =
+    static const char * const blt_fprograms[tex_type_count] =
     {
         /* tex_1d */
@@ -1689,16 +1789,17 @@
 static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
+    struct shader_arb_priv *priv = This->shader_priv;
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
 
     if (useVS) {
+        struct vs_compile_args compile_args;
+
         TRACE("Using vertex shader\n");
-        IWineD3DVertexShaderImpl_CompileShader(This->stateBlock->vertexShader);
-
-        priv->current_vprogram_id = ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->prgId;
+        find_vs_compile_args((IWineD3DVertexShaderImpl *) This->stateBlock->vertexShader, This->stateBlock, &compile_args);
+        priv->current_vprogram_id = find_gl_vshader((IWineD3DVertexShaderImpl *) This->stateBlock->vertexShader, &compile_args);
 
         /* Bind the vertex program */
         GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id));
-        checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, vertexShader->prgId);");
+        checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id);");
 
         /* Enable OpenGL vertex programs */
@@ -1721,5 +1822,5 @@
         /* Bind the fragment program */
         GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id));
-        checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, pixelShader->prgId);");
+        checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id);");
 
         if(!priv->use_arbfp_fixed_func) {
@@ -1742,5 +1843,5 @@
 static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
+    struct shader_arb_priv *priv = This->shader_priv;
     GLuint *blt_fprogram = &priv->depth_blt_fprogram_id[tex_type];
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
@@ -1757,5 +1858,5 @@
 static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
+    struct shader_arb_priv *priv = This->shader_priv;
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
 
@@ -1787,17 +1888,10 @@
 }
 
-static void shader_arb_cleanup(IWineD3DDevice *iface) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
-    if (GL_SUPPORT(ARB_VERTEX_PROGRAM)) glDisable(GL_VERTEX_PROGRAM_ARB);
-    if (GL_SUPPORT(ARB_FRAGMENT_PROGRAM)) glDisable(GL_FRAGMENT_PROGRAM_ARB);
-}
-
 static void shader_arb_destroy(IWineD3DBaseShader *iface) {
     IWineD3DBaseShaderImpl *baseShader = (IWineD3DBaseShaderImpl *) iface;
     const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)baseShader->baseShader.device)->adapter->gl_info;
-    char pshader = shader_is_pshader_version(baseShader->baseShader.hex_version);
-
-    if(pshader) {
+
+    if (shader_is_pshader_version(baseShader->baseShader.reg_maps.shader_version.type))
+    {
         IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *) iface;
         UINT i;
@@ -1812,14 +1906,20 @@
         This->gl_shaders = NULL;
         This->num_gl_shaders = 0;
+        This->shader_array_size = 0;
     } else {
         IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *) iface;
+        UINT i;
 
         ENTER_GL();
-        GL_EXTCALL(glDeleteProgramsARB(1, &This->prgId));
-        checkGLcall("GL_EXTCALL(glDeleteProgramsARB(1, &This->prgId))");
-        ((IWineD3DVertexShaderImpl *) This)->prgId = 0;
+        for(i = 0; i < This->num_gl_shaders; i++) {
+            GL_EXTCALL(glDeleteProgramsARB(1, &This->gl_shaders[i].prgId));
+            checkGLcall("GL_EXTCALL(glDeleteProgramsARB(1, &This->gl_shaders[i].prgId))");
+        }
         LEAVE_GL();
-    }
-    baseShader->baseShader.is_compiled = FALSE;
+        HeapFree(GetProcessHeap(), 0, This->gl_shaders);
+        This->gl_shaders = NULL;
+        This->num_gl_shaders = 0;
+        This->shader_array_size = 0;
+    }
 }
 
@@ -1833,5 +1933,5 @@
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
-    struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
+    struct shader_arb_priv *priv = This->shader_priv;
     int i;
 
@@ -1857,14 +1957,14 @@
 
     /* Calculate the > 0.0031308 case */
-    shader_addline(buffer, "POW %s.x, %s.x, srgb_pow.x;\n", tmp1, fragcolor);
-    shader_addline(buffer, "POW %s.y, %s.y, srgb_pow.y;\n", tmp1, fragcolor);
-    shader_addline(buffer, "POW %s.z, %s.z, srgb_pow.z;\n", tmp1, fragcolor);
-    shader_addline(buffer, "MUL %s, %s, srgb_mul_hi;\n", tmp1, tmp1);
-    shader_addline(buffer, "SUB %s, %s, srgb_sub_hi;\n", tmp1, tmp1);
+    shader_addline(buffer, "POW %s.x, %s.x, srgb_consts1.z;\n", tmp1, fragcolor);
+    shader_addline(buffer, "POW %s.y, %s.y, srgb_consts1.z;\n", tmp1, fragcolor);
+    shader_addline(buffer, "POW %s.z, %s.z, srgb_consts1.z;\n", tmp1, fragcolor);
+    shader_addline(buffer, "MUL %s, %s, srgb_consts1.w;\n", tmp1, tmp1);
+    shader_addline(buffer, "SUB %s, %s, srgb_consts2.x;\n", tmp1, tmp1);
     /* Calculate the < case */
-    shader_addline(buffer, "MUL %s, srgb_mul_low, %s;\n", tmp2, fragcolor);
+    shader_addline(buffer, "MUL %s, srgb_consts1.x, %s;\n", tmp2, fragcolor);
     /* Get 1.0 / 0.0 masks for > 0.0031308 and < 0.0031308 */
-    shader_addline(buffer, "SLT %s, srgb_comparison, %s;\n", tmp3, fragcolor);
-    shader_addline(buffer, "SGE %s, srgb_comparison, %s;\n", tmp4, fragcolor);
+    shader_addline(buffer, "SLT %s, srgb_consts1.y, %s;\n", tmp3, fragcolor);
+    shader_addline(buffer, "SGE %s, srgb_consts1.y, %s;\n", tmp4, fragcolor);
     /* Store the components > 0.0031308 in the destination */
     shader_addline(buffer, "MUL %s, %s, %s;\n", fragcolor, tmp1, tmp3);
@@ -1874,15 +1974,35 @@
 }
 
-static GLuint shader_arb_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer) {
+static GLuint shader_arb_generate_pshader(IWineD3DPixelShader *iface,
+        SHADER_BUFFER *buffer, const struct ps_compile_args *args)
+{
     IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
     const shader_reg_maps* reg_maps = &This->baseShader.reg_maps;
     CONST DWORD *function = This->baseShader.function;
-    const char *fragcolor;
     const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info;
     const local_constant *lconst;
     GLuint retval;
+    const char *fragcolor;
+    DWORD *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This);
 
     /*  Create the hw ARB shader */
     shader_addline(buffer, "!!ARBfp1.0\n");
+
+    if (reg_maps->shader_version.major < 3)
+    {
+        switch(args->fog) {
+            case FOG_OFF:
+                break;
+            case FOG_LINEAR:
+                shader_addline(buffer, "OPTION ARB_fog_linear;\n");
+                break;
+            case FOG_EXP:
+                shader_addline(buffer, "OPTION ARB_fog_exp;\n");
+                break;
+            case FOG_EXP2:
+                shader_addline(buffer, "OPTION ARB_fog_exp2;\n");
+                break;
+        }
+    }
 
     shader_addline(buffer, "TEMP TMP;\n");     /* Used in matrix ops */
@@ -1895,35 +2015,22 @@
     shader_addline(buffer, "PARAM one = { 1.0, 1.0, 1.0, 1.0 };\n");
 
-    /* Base Declarations */
-    shader_generate_arb_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION);
-
-    /* We need two variables for fog blending */
-    shader_addline(buffer, "TEMP TMP_FOG;\n");
-    if (This->baseShader.hex_version >= WINED3DPS_VERSION(2,0)) {
-        shader_addline(buffer, "TEMP TMP_COLOR;\n");
-    }
-
-    /* Base Shader Body */
-    shader_generate_main( (IWineD3DBaseShader*) This, buffer, reg_maps, function);
-
-    /* calculate fog and blend it
-     * NOTE: state.fog.params.y and state.fog.params.z don't hold fog start s and end e but
-     * -1/(e-s) and e/(e-s) respectively.
-     */
-    shader_addline(buffer, "MAD_SAT TMP_FOG, fragment.fogcoord, state.fog.params.y, state.fog.params.z;\n");
-
-    if (This->baseShader.hex_version < WINED3DPS_VERSION(2,0)) {
+    if (reg_maps->shader_version.major < 2)
+    {
         fragcolor = "R0";
     } else {
+        shader_addline(buffer, "TEMP TMP_COLOR;\n");
         fragcolor = "TMP_COLOR";
     }
-    if(((IWineD3DDeviceImpl *)This->baseShader.device)->stateBlock->renderState[WINED3DRS_SRGBWRITEENABLE]) {
+
+    /* Base Declarations */
+    shader_generate_arb_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION, lconst_map);
+
+    /* Base Shader Body */
+    shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function);
+
+    if(args->srgb_correction) {
         arbfp_add_sRGB_correction(buffer, fragcolor, "TMP", "TMP2", "TA", "TB");
     }
-    if (This->baseShader.hex_version < WINED3DPS_VERSION(3,0)) {
-        shader_addline(buffer, "LRP result.color.rgb, TMP_FOG.x, %s, state.fog.color;\n", fragcolor);
-        shader_addline(buffer, "MOV result.color.a, %s.a;\n", fragcolor);
-    }
-
+    shader_addline(buffer, "MOV result.color, %s;\n", fragcolor);
     shader_addline(buffer, "END\n");
 
@@ -1948,10 +2055,11 @@
 
     /* Load immediate constants */
-    if(!This->baseShader.load_local_constsF) {
+    if(lconst_map) {
         LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
             const float *value = (const float *)lconst->value;
-            GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, lconst->idx, value));
+            GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, lconst_map[lconst->idx], value));
             checkGLcall("glProgramLocalParameter4fvARB");
         }
+        HeapFree(GetProcessHeap(), 0, lconst_map);
     }
 
@@ -1959,5 +2067,7 @@
 }
 
-static void shader_arb_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer) {
+static GLuint shader_arb_generate_vshader(IWineD3DVertexShader *iface,
+        SHADER_BUFFER *buffer, const struct vs_compile_args *args)
+{
     IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
     const shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
@@ -1966,4 +2076,6 @@
     const WineD3D_GL_Info *gl_info = &device->adapter->gl_info;
     const local_constant *lconst;
+    GLuint ret;
+    DWORD *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This);
 
     /*  Create the hw ARB shader */
@@ -1979,5 +2091,5 @@
 
     /* Base Declarations */
-    shader_generate_arb_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION);
+    shader_generate_arb_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION, lconst_map);
 
     /* We need a constant to fixup the final position */
@@ -2010,9 +2122,16 @@
 
     /* Base Shader Body */
-    shader_generate_main( (IWineD3DBaseShader*) This, buffer, reg_maps, function);
-
-    /* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
-    if (!reg_maps->fog)
+    shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function);
+
+    /* The D3DRS_FOGTABLEMODE render state defines if the shader-generated fog coord is used
+     * or if the fragment depth is used. If the fragment depth is used(FOGTABLEMODE != NONE),
+     * the fog frag coord is thrown away. If the fog frag coord is used, but not written by
+     * the shader, it is set to 0.0(fully fogged, since start = 1.0, end = 0.0)
+     */
+    if(args->fog_src == VS_FOG_Z) {
         shader_addline(buffer, "MOV result.fogcoord, TMP_OUT.z;\n");
+    } else if (!reg_maps->fog) {
+        shader_addline(buffer, "MOV result.fogcoord, helper_const.w;\n");
+    }
 
     /* Write the final position.
@@ -2037,10 +2156,10 @@
 
     /* TODO: change to resource.glObjectHandle or something like that */
-    GL_EXTCALL(glGenProgramsARB(1, &This->prgId));
-
-    TRACE("Creating a hw vertex shader, prg=%d\n", This->prgId);
-    GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, This->prgId));
-
-    TRACE("Created hw vertex shader, prg=%d\n", This->prgId);
+    GL_EXTCALL(glGenProgramsARB(1, &ret));
+
+    TRACE("Creating a hw vertex shader, prg=%d\n", ret);
+    GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, ret));
+
+    TRACE("Created hw vertex shader, prg=%d\n", ret);
     /* Create the program and check for errors */
     GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
@@ -2052,14 +2171,17 @@
         FIXME("HW VertexShader Error at position %d: %s\n",
               errPos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
-        This->prgId = -1;
-    }
-
-    /* Load immediate constants */
-    if(!This->baseShader.load_local_constsF) {
-        LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
-            const float *value = (const float *)lconst->value;
-            GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, lconst->idx, value));
-        }
-    }
+        ret = -1;
+    } else {
+        /* Load immediate constants */
+        if(lconst_map) {
+            LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
+                const float *value = (const float *)lconst->value;
+                GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, lconst_map[lconst->idx], value));
+            }
+        }
+    }
+    HeapFree(GetProcessHeap(), 0, lconst_map);
+
+    return ret;
 }
 
@@ -2074,5 +2196,5 @@
         pCaps->VertexShaderVersion = WINED3DVS_VERSION(1,1);
         TRACE_(d3d_caps)("Hardware vertex shader version 1.1 enabled (ARB_PROGRAM)\n");
-        pCaps->MaxVertexShaderConst = GL_LIMITS(vshader_constantsF);
+        pCaps->MaxVertexShaderConst = GL_LIMITS(vshader_constantsF) - ARB_SHADER_RESERVED_VS_CONSTS;
     }
 
@@ -2081,4 +2203,5 @@
         pCaps->PixelShader1xMaxValue = 8.0;
         TRACE_(d3d_caps)("Hardware pixel shader version 1.4 enabled (ARB_PROGRAM)\n");
+        pCaps->MaxPixelShaderConst = GL_LIMITS(pshader_constantsF) - ARB_SHADER_RESERVED_PS_CONSTS;
     }
 }
@@ -2101,4 +2224,28 @@
     TRACE("[FAILED]\n");
     return FALSE;
+}
+
+static void shader_arb_add_instruction_modifiers(const struct wined3d_shader_instruction *ins) {
+    BOOL saturate;
+    DWORD shift;
+    char write_mask[20], regstr[50];
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    BOOL is_color = FALSE;
+    const struct wined3d_shader_dst_param *dst;
+
+    if (!ins->dst_count) return;
+
+    dst = &ins->dst[0];
+    shift = dst->shift;
+    if(shift == 0) return; /* Saturate alone is handled by the instructions */
+    saturate = dst->modifiers & WINED3DSPDM_SATURATE;
+
+    shader_arb_get_write_mask(ins, dst, write_mask);
+    shader_arb_get_register_name(ins->ctx->shader, dst->reg.type,
+                                 dst->reg.idx, !!dst->reg.rel_addr, regstr, &is_color);
+
+    /* Generate a line that does the output modifier computation */
+    shader_addline(buffer, "MUL%s %s%s, %s, %s;\n", saturate ? "_SAT" : "",
+                   regstr, write_mask, regstr, shift_tab[shift]);
 }
 
@@ -2195,7 +2342,8 @@
     shader_arb_select_depth_blt,
     shader_arb_deselect_depth_blt,
+    shader_arb_update_float_vertex_constants,
+    shader_arb_update_float_pixel_constants,
     shader_arb_load_constants,
-    shader_arb_cleanup,
-    shader_arb_color_correction,
+    shader_arb_load_np2fixup_constants,
     shader_arb_destroy,
     shader_arb_alloc,
@@ -2206,4 +2354,5 @@
     shader_arb_get_caps,
     shader_arb_color_fixup_supported,
+    shader_arb_add_instruction_modifiers,
 };
 
@@ -2245,5 +2394,5 @@
         if(!This->fragment_priv) return E_OUTOFMEMORY;
     }
-    priv = (struct shader_arb_priv *) This->fragment_priv;
+    priv = This->fragment_priv;
     priv->fragment_shaders = hash_table_create(ffp_frag_program_key_hash, ffp_frag_program_key_compare);
     priv->use_arbfp_fixed_func = TRUE;
@@ -2264,5 +2413,5 @@
 static void arbfp_free(IWineD3DDevice *iface) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
-    struct shader_arb_priv *priv = (struct shader_arb_priv *) This->fragment_priv;
+    struct shader_arb_priv *priv = This->fragment_priv;
 
     hash_table_destroy(priv->fragment_shaders, arbfp_free_ffpshader, &This->adapter->gl_info);
@@ -2320,5 +2469,5 @@
      */
     if(device->shader_backend == &arb_program_shader_backend) {
-        if(use_ps(device)) return;
+        if (use_ps(stateblock)) return;
 
         device = stateblock->wineD3DDevice;
@@ -2341,5 +2490,5 @@
      */
     if(device->shader_backend == &arb_program_shader_backend) {
-        if(use_ps(device)) return;
+        if (use_ps(stateblock)) return;
 
         device = stateblock->wineD3DDevice;
@@ -2361,9 +2510,10 @@
 
 static void set_bumpmat_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
     float mat[2][2];
 
-    if(use_ps(device)) {
+    if (use_ps(stateblock))
+    {
         if(stage != 0 &&
            ((IWineD3DPixelShaderImpl *) stateblock->pixelShader)->baseShader.reg_maps.bumpmat[stage]) {
@@ -2395,9 +2545,10 @@
 
 static void tex_bumpenvlum_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
     float param[4];
 
-    if(use_ps(device)) {
+    if (use_ps(stateblock))
+    {
         if(stage != 0 &&
            ((IWineD3DPixelShaderImpl *) stateblock->pixelShader)->baseShader.reg_maps.luminanceparams[stage]) {
@@ -2491,5 +2642,5 @@
     }
     if(arg & WINED3DTA_ALPHAREPLICATE) {
-        shader_addline(buffer, "MOV arg%u, %s.a;\n", argnum, ret);
+        shader_addline(buffer, "MOV arg%u, %s.w;\n", argnum, ret);
         if(argnum == 0) ret = "arg0";
         if(argnum == 1) ret = "arg1";
@@ -2506,6 +2657,6 @@
 
     if(color && alpha) dstmask = "";
-    else if(color) dstmask = ".rgb";
-    else dstmask = ".a";
+    else if(color) dstmask = ".xyz";
+    else dstmask = ".w";
 
     if(dst == tempreg) dstreg = "tempreg";
@@ -2518,5 +2669,5 @@
     switch(op) {
         case WINED3DTOP_DISABLE:
-            if(stage == 1) shader_addline(buffer, "MOV %s%s, fragment.color.primary;\n", dstreg, dstmask);
+            if(stage == 0) shader_addline(buffer, "MOV %s%s, fragment.color.primary;\n", dstreg, dstmask);
             break;
 
@@ -2563,23 +2714,23 @@
         case WINED3DTOP_BLENDCURRENTALPHA:
             arg0 = get_argreg(buffer, 0, stage, WINED3DTA_CURRENT);
-            shader_addline(buffer, "LRP %s%s, %s.a, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
+            shader_addline(buffer, "LRP %s%s, %s.w, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
             break;
         case WINED3DTOP_BLENDFACTORALPHA:
             arg0 = get_argreg(buffer, 0, stage, WINED3DTA_TFACTOR);
-            shader_addline(buffer, "LRP %s%s, %s.a, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
+            shader_addline(buffer, "LRP %s%s, %s.w, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
             break;
         case WINED3DTOP_BLENDTEXTUREALPHA:
             arg0 = get_argreg(buffer, 0, stage, WINED3DTA_TEXTURE);
-            shader_addline(buffer, "LRP %s%s, %s.a, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
+            shader_addline(buffer, "LRP %s%s, %s.w, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
             break;
         case WINED3DTOP_BLENDDIFFUSEALPHA:
             arg0 = get_argreg(buffer, 0, stage, WINED3DTA_DIFFUSE);
-            shader_addline(buffer, "LRP %s%s, %s.a, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
+            shader_addline(buffer, "LRP %s%s, %s.w, %s, %s;\n", dstreg, dstmask, arg0, arg1, arg2);
             break;
 
         case WINED3DTOP_BLENDTEXTUREALPHAPM:
             arg0 = get_argreg(buffer, 0, stage, WINED3DTA_TEXTURE);
-            shader_addline(buffer, "SUB arg0.a, const.x, %s.a;\n", arg0);
-            shader_addline(buffer, "MAD_SAT %s%s, %s, arg0.a, %s;\n", dstreg, dstmask, arg2, arg1);
+            shader_addline(buffer, "SUB arg0.w, const.x, %s.w;\n", arg0);
+            shader_addline(buffer, "MAD_SAT %s%s, %s, arg0.w, %s;\n", dstreg, dstmask, arg2, arg1);
             break;
 
@@ -2587,16 +2738,16 @@
 
         case WINED3DTOP_MODULATEINVALPHA_ADDCOLOR:
-            shader_addline(buffer, "SUB arg0.a, const.x, %s;\n", arg1);
-            shader_addline(buffer, "MAD_SAT %s%s, arg0.a, %s, %s;\n", dstreg, dstmask, arg2, arg1);
+            shader_addline(buffer, "SUB arg0.w, const.x, %s;\n", arg1);
+            shader_addline(buffer, "MAD_SAT %s%s, arg0.w, %s, %s;\n", dstreg, dstmask, arg2, arg1);
             break;
         case WINED3DTOP_MODULATEALPHA_ADDCOLOR:
-            shader_addline(buffer, "MAD_SAT %s%s, %s.a, %s, %s;\n", dstreg, dstmask, arg1, arg2, arg1);
+            shader_addline(buffer, "MAD_SAT %s%s, %s.w, %s, %s;\n", dstreg, dstmask, arg1, arg2, arg1);
             break;
         case WINED3DTOP_MODULATEINVCOLOR_ADDALPHA:
             shader_addline(buffer, "SUB arg0, const.x, %s;\n", arg1);
-            shader_addline(buffer, "MAD_SAT %s%s, arg0, %s, %s.a;\n", dstreg, dstmask, arg2, arg1);
+            shader_addline(buffer, "MAD_SAT %s%s, arg0, %s, %s.w;\n", dstreg, dstmask, arg2, arg1);
             break;
         case WINED3DTOP_MODULATECOLOR_ADDALPHA:
-            shader_addline(buffer, "MAD_SAT %s%s, %s, %s, %s.a;\n", dstreg, dstmask, arg1, arg2, arg1);
+            shader_addline(buffer, "MAD_SAT %s%s, %s, %s, %s.w;\n", dstreg, dstmask, arg1, arg2, arg1);
             break;
 
@@ -2704,8 +2855,5 @@
 
     /* Shader header */
-    buffer.bsize = 0;
-    buffer.lineNo = 0;
-    buffer.newline = TRUE;
-    buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
+    shader_buffer_init(&buffer);
 
     shader_addline(&buffer, "!!ARBfp1.0\n");
@@ -2740,14 +2888,8 @@
 
     if(settings->sRGB_write) {
-        shader_addline(&buffer, "PARAM srgb_mul_low = {%f, %f, %f, 1.0};\n",
-                       srgb_mul_low, srgb_mul_low, srgb_mul_low);
-        shader_addline(&buffer, "PARAM srgb_comparison =  {%f, %f, %f, %f};\n",
-                       srgb_cmp, srgb_cmp, srgb_cmp, srgb_cmp);
-        shader_addline(&buffer, "PARAM srgb_pow =  {%f, %f, %f, 1.0};\n",
-                       srgb_pow, srgb_pow, srgb_pow);
-        shader_addline(&buffer, "PARAM srgb_mul_hi =  {%f, %f, %f, 1.0};\n",
-                       srgb_mul_high, srgb_mul_high, srgb_mul_high);
-        shader_addline(&buffer, "PARAM srgb_sub_hi =  {%f, %f, %f, 0.0};\n",
-                       srgb_sub_high, srgb_sub_high, srgb_sub_high);
+        shader_addline(&buffer, "PARAM srgb_consts1 = {%f, %f, %f, %f};\n",
+                       srgb_mul_low, srgb_cmp, srgb_pow, srgb_mul_high);
+        shader_addline(&buffer, "PARAM srgb_consts2 = {%f, %f, %f, %f};\n",
+                       srgb_sub_high, 0.0, 0.0, 0.0);
     }
 
@@ -2786,7 +2928,7 @@
             settings->op[stage - 1].cop == WINED3DTOP_BUMPENVMAPLUMINANCE)) {
             shader_addline(&buffer, "SWZ arg1, bumpmat%u, x, z, 0, 0;\n", stage - 1);
-            shader_addline(&buffer, "DP3 ret.r, arg1, tex%u;\n", stage - 1);
+            shader_addline(&buffer, "DP3 ret.x, arg1, tex%u;\n", stage - 1);
             shader_addline(&buffer, "SWZ arg1, bumpmat%u, y, w, 0, 0;\n", stage - 1);
-            shader_addline(&buffer, "DP3 ret.g, arg1, tex%u;\n", stage - 1);
+            shader_addline(&buffer, "DP3 ret.y, arg1, tex%u;\n", stage - 1);
 
             /* with projective textures, texbem only divides the static texture coord, not the displacement,
@@ -2795,9 +2937,9 @@
             if (settings->op[stage].projected != proj_none) {
                 if(settings->op[stage].projected == proj_count4) {
-                    shader_addline(&buffer, "MOV ret.a, fragment.texcoord[%u].a;\n", stage);
-                    shader_addline(&buffer, "MUL ret.rgb, ret, fragment.texcoord[%u].a, fragment.texcoord[%u];\n", stage, stage);
+                    shader_addline(&buffer, "MOV ret.w, fragment.texcoord[%u].w;\n", stage);
+                    shader_addline(&buffer, "MUL ret.xyz, ret, fragment.texcoord[%u].w, fragment.texcoord[%u];\n", stage, stage);
                 } else {
-                    shader_addline(&buffer, "MOV ret.a, fragment.texcoord[%u].b;\n", stage);
-                    shader_addline(&buffer, "MAD ret.rgb, ret, fragment.texcoord[%u].b, fragment.texcoord[%u];\n", stage, stage);
+                    shader_addline(&buffer, "MOV ret.w, fragment.texcoord[%u].z;\n", stage);
+                    shader_addline(&buffer, "MAD ret.xyz, ret, fragment.texcoord[%u].z, fragment.texcoord[%u];\n", stage, stage);
                 }
             } else {
@@ -2808,11 +2950,11 @@
                            instr, sat, stage, stage, textype);
             if(settings->op[stage - 1].cop == WINED3DTOP_BUMPENVMAPLUMINANCE) {
-                shader_addline(&buffer, "MAD_SAT ret.r, tex%u.b, luminance%u.r, luminance%u.g;\n",
+                shader_addline(&buffer, "MAD_SAT ret.x, tex%u.z, luminance%u.x, luminance%u.y;\n",
                                stage - 1, stage - 1, stage - 1);
-                shader_addline(&buffer, "MUL tex%u, tex%u, ret.r;\n", stage, stage);
+                shader_addline(&buffer, "MUL tex%u, tex%u, ret.x;\n", stage, stage);
             }
         } else if(settings->op[stage].projected == proj_count3) {
             shader_addline(&buffer, "MOV ret, fragment.texcoord[%u];\n", stage);
-            shader_addline(&buffer, "MOV ret.a, ret.b;\n");
+            shader_addline(&buffer, "MOV ret.w, ret.z;\n");
             shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n",
                             instr, sat, stage, stage, textype);
@@ -2824,5 +2966,5 @@
         sprintf(colorcor_dst, "tex%u", stage);
         gen_color_correction(&buffer, colorcor_dst, WINED3DSP_WRITEMASK_ALL, "const.x", "const.y",
-                settings->op[stage].color_correction);
+                settings->op[stage].color_fixup);
     }
 
@@ -2860,5 +3002,5 @@
                           settings->op[stage].carg1, settings->op[stage].carg2);
             if(stage == 0) {
-                shader_addline(&buffer, "MOV ret.a, fragment.color.primary.a;\n");
+                shader_addline(&buffer, "MOV ret.w, fragment.color.primary.w;\n");
             }
         } else if(op_equal) {
@@ -2879,5 +3021,5 @@
         shader_addline(&buffer, "MAD ret, fragment.color.secondary, specular_enable, %s;\n", final_combiner_src);
         arbfp_add_sRGB_correction(&buffer, "ret", "arg0", "arg1", "arg2", "tempreg");
-        shader_addline(&buffer, "MOV result.color.a, ret.a;\n");
+        shader_addline(&buffer, "MOV result.color.w, ret.w;\n");
     } else {
         shader_addline(&buffer, "MAD result.color, fragment.color.secondary, specular_enable, %s;\n", final_combiner_src);
@@ -2898,5 +3040,5 @@
               debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
     }
-    HeapFree(GetProcessHeap(), 0, buffer.buffer);
+    shader_buffer_free(&buffer);
     return ret;
 }
@@ -2904,10 +3046,12 @@
 static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
-    struct shader_arb_priv *priv = (struct shader_arb_priv *) device->fragment_priv;
-    BOOL use_pshader = use_ps(device);
-    BOOL use_vshader = use_vs(device);
+    struct shader_arb_priv *priv = device->fragment_priv;
+    BOOL use_pshader = use_ps(stateblock);
+    BOOL use_vshader = use_vs(stateblock);
     struct ffp_frag_settings settings;
     const struct arbfp_ffp_desc *desc;
     unsigned int i;
+
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
 
     if(isStateDirty(context, STATE_RENDER(WINED3DRS_FOGENABLE))) {
@@ -2919,4 +3063,6 @@
             state_texfactor_arbfp(STATE_RENDER(WINED3DRS_TEXTUREFACTOR), stateblock, context);
             state_arb_specularenable(STATE_RENDER(WINED3DRS_SPECULARENABLE), stateblock, context);
+        } else if(use_pshader && !isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) {
+            device->shader_backend->shader_select((IWineD3DDevice *)stateblock->wineD3DDevice, use_pshader, use_vshader);
         }
         return;
@@ -2963,4 +3109,7 @@
             state_arb_specularenable(STATE_RENDER(WINED3DRS_SPECULARENABLE), stateblock, context);
         }
+        context->last_was_pshader = FALSE;
+    } else {
+        context->last_was_pshader = TRUE;
     }
 
@@ -2971,6 +3120,6 @@
      * atifs or nvrc pixel shaders with arb fragment programs we'd have to disable GL_FRAGMENT_PROGRAM_ARB here
      *
-     * Don't call shader_select if the vertex shader is dirty, because some shader backends(GLSL) need both shaders
-     * to be compiled before activating them(needs some cleanups in the shader backend interface)
+     * Don't call shader_select if the vertex shader is dirty, because it will be called later on by the vertex
+     * shader handler
      */
     if(!isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) {
@@ -2993,6 +3142,30 @@
  */
 static void state_arbfp_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+    enum fogsource new_source;
+
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
     if(!isStateDirty(context, STATE_PIXELSHADER)) {
         fragment_prog_arbfp(state, stateblock, context);
+    }
+
+    if(!stateblock->renderState[WINED3DRS_FOGENABLE]) return;
+
+    if(stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE) {
+        if(use_vs(stateblock)) {
+            new_source = FOGSOURCE_VS;
+        } else {
+            if(stateblock->renderState[WINED3DRS_FOGVERTEXMODE] == WINED3DFOG_NONE || context->last_was_rhw) {
+                new_source = FOGSOURCE_COORD;
+            } else {
+                new_source = FOGSOURCE_FFP;
+            }
+        }
+    } else {
+        new_source = FOGSOURCE_FFP;
+    }
+    if(new_source != context->fog_source) {
+        context->fog_source = new_source;
+        state_fogstartend(STATE_RENDER(WINED3DRS_FOGSTART), stateblock, context);
     }
 }
@@ -3128,17 +3301,21 @@
     {STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE),     { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE),    tex_bumpenvlum_arbfp    }, 0                               },
     {STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLOFFSET),    { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE),    tex_bumpenvlum_arbfp    }, 0                               },
-    { STATE_SAMPLER(0),                                   { STATE_SAMPLER(0),                                   sampler_texdim          }, 0                               },
-    { STATE_SAMPLER(1),                                   { STATE_SAMPLER(1),                                   sampler_texdim          }, 0                               },
-    { STATE_SAMPLER(2),                                   { STATE_SAMPLER(2),                                   sampler_texdim          }, 0                               },
-    { STATE_SAMPLER(3),                                   { STATE_SAMPLER(3),                                   sampler_texdim          }, 0                               },
-    { STATE_SAMPLER(4),                                   { STATE_SAMPLER(4),                                   sampler_texdim          }, 0                               },
-    { STATE_SAMPLER(5),                                   { STATE_SAMPLER(5),                                   sampler_texdim          }, 0                               },
-    { STATE_SAMPLER(6),                                   { STATE_SAMPLER(6),                                   sampler_texdim          }, 0                               },
-    { STATE_SAMPLER(7),                                   { STATE_SAMPLER(7),                                   sampler_texdim          }, 0                               },
-    { STATE_PIXELSHADER,                                  { STATE_PIXELSHADER,                                  fragment_prog_arbfp     }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGENABLE),                  { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_arbfp_fog         }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGTABLEMODE),               { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_arbfp_fog         }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGVERTEXMODE),              { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_arbfp_fog         }, 0                               },
-    { STATE_RENDER(WINED3DRS_SRGBWRITEENABLE),            { STATE_PIXELSHADER,                                  fragment_prog_arbfp     }, 0                               },
+    {STATE_SAMPLER(0),                                    { STATE_SAMPLER(0),                                   sampler_texdim          }, 0                               },
+    {STATE_SAMPLER(1),                                    { STATE_SAMPLER(1),                                   sampler_texdim          }, 0                               },
+    {STATE_SAMPLER(2),                                    { STATE_SAMPLER(2),                                   sampler_texdim          }, 0                               },
+    {STATE_SAMPLER(3),                                    { STATE_SAMPLER(3),                                   sampler_texdim          }, 0                               },
+    {STATE_SAMPLER(4),                                    { STATE_SAMPLER(4),                                   sampler_texdim          }, 0                               },
+    {STATE_SAMPLER(5),                                    { STATE_SAMPLER(5),                                   sampler_texdim          }, 0                               },
+    {STATE_SAMPLER(6),                                    { STATE_SAMPLER(6),                                   sampler_texdim          }, 0                               },
+    {STATE_SAMPLER(7),                                    { STATE_SAMPLER(7),                                   sampler_texdim          }, 0                               },
+    {STATE_PIXELSHADER,                                   { STATE_PIXELSHADER,                                  fragment_prog_arbfp     }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGENABLE),                   { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_arbfp_fog         }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGTABLEMODE),                { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_arbfp_fog         }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGVERTEXMODE),               { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_arbfp_fog         }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGSTART),                    { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend       }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGEND),                      { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend       }, 0                               },
+    {STATE_RENDER(WINED3DRS_SRGBWRITEENABLE),             { STATE_PIXELSHADER,                                  fragment_prog_arbfp     }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGCOLOR),                    { STATE_RENDER(WINED3DRS_FOGCOLOR),                   state_fogcolor          }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGDENSITY),                  { STATE_RENDER(WINED3DRS_FOGDENSITY),                 state_fogdensity        }, 0                               },
     {STATE_TEXTURESTAGE(0,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(0, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform      }, 0                               },
     {STATE_TEXTURESTAGE(1,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(1, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform      }, 0                               },
@@ -3149,5 +3326,5 @@
     {STATE_TEXTURESTAGE(6,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(6, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform      }, 0                               },
     {STATE_TEXTURESTAGE(7,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(7, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform      }, 0                               },
-    { STATE_RENDER(WINED3DRS_SPECULARENABLE),             { STATE_RENDER(WINED3DRS_SPECULARENABLE),             state_arb_specularenable}, 0                               },
+    {STATE_RENDER(WINED3DRS_SPECULARENABLE),              { STATE_RENDER(WINED3DRS_SPECULARENABLE),             state_arb_specularenable}, 0                               },
     {0 /* Terminate */,                                   { 0,                                                  0                       }, 0                               },
 };
@@ -3182,5 +3359,5 @@
 static void arbfp_blit_free(IWineD3DDevice *iface) {
     IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface;
-    struct arbfp_blit_priv *priv = (struct arbfp_blit_priv *) device->blit_priv;
+    struct arbfp_blit_priv *priv = device->blit_priv;
 
     ENTER_GL();
@@ -3201,9 +3378,9 @@
 
     if (yuv_fixup == YUV_FIXUP_UYVY) {
-        chroma = 'r';
-        *luminance = 'a';
+        chroma = 'x';
+        *luminance = 'w';
     } else {
-        chroma = 'a';
-        *luminance = 'r';
+        chroma = 'w';
+        *luminance = 'x';
     }
     switch(textype) {
@@ -3231,6 +3408,6 @@
      */
     if(textype != GL_TEXTURE_RECTANGLE_ARB) {
-        shader_addline(buffer, "MUL texcrd.rg, fragment.texcoord[0], size.x;\n");
-        shader_addline(buffer, "MOV texcrd.a, size.x;\n");
+        shader_addline(buffer, "MUL texcrd.xy, fragment.texcoord[0], size.x;\n");
+        shader_addline(buffer, "MOV texcrd.w, size.x;\n");
     } else {
         shader_addline(buffer, "MOV texcrd, fragment.texcoord[0];\n");
@@ -3254,7 +3431,7 @@
     /* Put the value into either of the chroma values */
     shader_addline(buffer, "SGE temp.x, texcrd2.x, coef.y;\n");
-    shader_addline(buffer, "MUL chroma.r, luminance.%c, temp.x;\n", chroma);
+    shader_addline(buffer, "MUL chroma.x, luminance.%c, temp.x;\n", chroma);
     shader_addline(buffer, "SLT temp.x, texcrd2.x, coef.y;\n");
-    shader_addline(buffer, "MUL chroma.g, luminance.%c, temp.x;\n", chroma);
+    shader_addline(buffer, "MUL chroma.y, luminance.%c, temp.x;\n", chroma);
 
     /* Sample pixel 2. If we read an even pixel(SLT above returned 1), sample
@@ -3268,7 +3445,7 @@
     /* Put the value into the other chroma */
     shader_addline(buffer, "SGE temp.x, texcrd2.x, coef.y;\n");
-    shader_addline(buffer, "MAD chroma.g, luminance.%c, temp.x, chroma.g;\n", chroma);
+    shader_addline(buffer, "MAD chroma.y, luminance.%c, temp.x, chroma.y;\n", chroma);
     shader_addline(buffer, "SLT temp.x, texcrd2.x, coef.y;\n");
-    shader_addline(buffer, "MAD chroma.r, luminance.%c, temp.x, chroma.r;\n", chroma);
+    shader_addline(buffer, "MAD chroma.x, luminance.%c, temp.x, chroma.x;\n", chroma);
 
     /* TODO: If filtering is enabled, sample a 2nd pair of pixels left or right of
@@ -3390,5 +3567,5 @@
     /* Read the texture, put the result into the output register */
     shader_addline(buffer, "TEX temp, texcrd, texture[0], %s;\n", tex);
-    shader_addline(buffer, "MOV chroma.r, temp.a;\n");
+    shader_addline(buffer, "MOV chroma.x, temp.w;\n");
 
     /* The other chroma value is 1/6th of the texture lower, from 5/6th to 6/6th
@@ -3401,5 +3578,5 @@
     }
     shader_addline(buffer, "TEX temp, texcrd, texture[0], %s;\n", tex);
-    shader_addline(buffer, "MOV chroma.g, temp.a;\n");
+    shader_addline(buffer, "MOV chroma.y, temp.w;\n");
 
     /* Sample the luminance value. It is in the top 2/3rd of the texture, so scale the y coordinate.
@@ -3415,5 +3592,5 @@
         shader_addline(buffer, "TEX luminance, texcrd, texture[0], %s;\n", tex);
     } else {
-        /* Reading from texture_rectangles is pretty streightforward, just use the unmodified
+        /* Reading from texture_rectangles is pretty straightforward, just use the unmodified
          * texture coordinate. It is still a good idea to clamp it though, since the opengl texture
          * is bigger
@@ -3433,11 +3610,8 @@
     SHADER_BUFFER buffer;
     char luminance_component;
-    struct arbfp_blit_priv *priv = (struct arbfp_blit_priv *) device->blit_priv;
+    struct arbfp_blit_priv *priv = device->blit_priv;
 
     /* Shader header */
-    buffer.bsize = 0;
-    buffer.lineNo = 0;
-    buffer.newline = TRUE;
-    buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
+    shader_buffer_init(&buffer);
 
     ENTER_GL();
@@ -3448,5 +3622,5 @@
     LEAVE_GL();
     if(!shader) {
-        HeapFree(GetProcessHeap(), 0, buffer.buffer);
+        shader_buffer_free(&buffer);
         return 0;
     }
@@ -3462,5 +3636,5 @@
      * take the format into account when generating the read swizzles
      *
-     * Reading the Y value is streightforward - just sample the texture. The hardware
+     * Reading the Y value is straightforward - just sample the texture. The hardware
      * takes care of filtering in the horizontal and vertical direction.
      *
@@ -3503,5 +3677,5 @@
             if (!gen_planar_yuv_read(&buffer, yuv_fixup, textype, &luminance_component))
             {
-                HeapFree(GetProcessHeap(), 0, buffer.buffer);
+                shader_buffer_free(&buffer);
                 return 0;
             }
@@ -3511,5 +3685,5 @@
             if (!gen_yv12_read(&buffer, textype, &luminance_component))
             {
-                HeapFree(GetProcessHeap(), 0, buffer.buffer);
+                shader_buffer_free(&buffer);
                 return 0;
             }
@@ -3518,5 +3692,5 @@
         default:
             FIXME("Unsupported YUV fixup %#x\n", yuv_fixup);
-            HeapFree(GetProcessHeap(), 0, buffer.buffer);
+            shader_buffer_free(&buffer);
             return 0;
     }
@@ -3526,10 +3700,10 @@
      * ranges from -0.5 to 0.5
      */
-    shader_addline(&buffer, "SUB chroma.rg, chroma, coef.y;\n");
-
-    shader_addline(&buffer, "MAD result.color.r, chroma.r, yuv_coef.x, luminance.%c;\n", luminance_component);
-    shader_addline(&buffer, "MAD temp.r, -chroma.g, yuv_coef.y, luminance.%c;\n", luminance_component);
-    shader_addline(&buffer, "MAD result.color.g, -chroma.r, yuv_coef.z, temp.r;\n");
-    shader_addline(&buffer, "MAD result.color.b, chroma.g, yuv_coef.w, luminance.%c;\n", luminance_component);
+    shader_addline(&buffer, "SUB chroma.xy, chroma, coef.y;\n");
+
+    shader_addline(&buffer, "MAD result.color.x, chroma.x, yuv_coef.x, luminance.%c;\n", luminance_component);
+    shader_addline(&buffer, "MAD temp.x, -chroma.y, yuv_coef.y, luminance.%c;\n", luminance_component);
+    shader_addline(&buffer, "MAD result.color.y, -chroma.x, yuv_coef.z, temp.x;\n");
+    shader_addline(&buffer, "MAD result.color.z, chroma.y, yuv_coef.w, luminance.%c;\n", luminance_component);
     shader_addline(&buffer, "END\n");
 
@@ -3543,5 +3717,5 @@
               debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
     }
-    HeapFree(GetProcessHeap(), 0, buffer.buffer);
+    shader_buffer_free(&buffer);
     LEAVE_GL();
 
@@ -3567,18 +3741,17 @@
 }
 
-static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum textype, UINT width, UINT height) {
+static HRESULT arbfp_blit_set(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc,
+        GLenum textype, UINT width, UINT height)
+{
     GLenum shader;
     IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface;
     float size[4] = {width, height, 1, 1};
-    struct arbfp_blit_priv *priv = (struct arbfp_blit_priv *) device->blit_priv;
-    const struct GlPixelFormatDesc *glDesc;
+    struct arbfp_blit_priv *priv = device->blit_priv;
     enum yuv_fixup yuv_fixup;
 
-    getFormatDescEntry(fmt, &GLINFO_LOCATION, &glDesc);
-
-    if (!is_yuv_fixup(glDesc->color_fixup))
+    if (!is_yuv_fixup(format_desc->color_fixup))
     {
         TRACE("Fixup:\n");
-        dump_color_fixup_desc(glDesc->color_fixup);
+        dump_color_fixup_desc(format_desc->color_fixup);
         /* Don't bother setting up a shader for unconverted formats */
         ENTER_GL();
@@ -3589,5 +3762,5 @@
     }
 
-    yuv_fixup = get_yuv_fixup(glDesc->color_fixup);
+    yuv_fixup = get_yuv_fixup(format_desc->color_fixup);
 
     switch(yuv_fixup)
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/ati_fragment_shader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/ati_fragment_shader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/ati_fragment_shader.c	(revision 19678)
@@ -169,5 +169,94 @@
 }
 
+static const char *debug_op(GLuint op) {
+    switch(op) {
+        case GL_MOV_ATI:                return "GL_MOV_ATI";
+        case GL_ADD_ATI:                return "GL_ADD_ATI";
+        case GL_MUL_ATI:                return "GL_MUL_ATI";
+        case GL_SUB_ATI:                return "GL_SUB_ATI";
+        case GL_DOT3_ATI:               return "GL_DOT3_ATI";
+        case GL_DOT4_ATI:               return "GL_DOT4_ATI";
+        case GL_MAD_ATI:                return "GL_MAD_ATI";
+        case GL_LERP_ATI:               return "GL_LERP_ATI";
+        case GL_CND_ATI:                return "GL_CND_ATI";
+        case GL_CND0_ATI:               return "GL_CND0_ATI";
+        case GL_DOT2_ADD_ATI:           return "GL_DOT2_ADD_ATI";
+        default:                        return "unexpected op";
+    }
+}
+
+static const char *debug_mask(GLuint mask) {
+    switch(mask) {
+        case GL_NONE:                           return "GL_NONE";
+        case GL_RED_BIT_ATI:                    return "GL_RED_BIT_ATI";
+        case GL_GREEN_BIT_ATI:                  return "GL_GREEN_BIT_ATI";
+        case GL_BLUE_BIT_ATI:                   return "GL_BLUE_BIT_ATI";
+        case GL_RED_BIT_ATI | GL_GREEN_BIT_ATI: return "GL_RED_BIT_ATI | GL_GREEN_BIT_ATI";
+        case GL_RED_BIT_ATI | GL_BLUE_BIT_ATI:  return "GL_RED_BIT_ATI | GL_BLUE_BIT_ATI";
+        case GL_GREEN_BIT_ATI | GL_BLUE_BIT_ATI:return "GL_GREEN_BIT_ATI | GL_BLUE_BIT_ATI";
+        case GL_RED_BIT_ATI | GL_GREEN_BIT_ATI | GL_BLUE_BIT_ATI:return "GL_RED_BIT_ATI | GL_GREEN_BIT_ATI | GL_BLUE_BIT_ATI";
+        default:                                return "Unexpected writemask";
+    }
+}
 #define GLINFO_LOCATION (*gl_info)
+
+static void wrap_op1(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod,
+                     GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) {
+    if(dstMask == GL_ALPHA) {
+        TRACE("glAlphaFragmentOp1ATI(%s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod),
+              debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod));
+        GL_EXTCALL(glAlphaFragmentOp1ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod));
+    } else {
+        TRACE("glColorFragmentOp1ATI(%s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst),
+              debug_mask(dstMask), debug_dstmod(dstMod),
+              debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod));
+        GL_EXTCALL(glColorFragmentOp1ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod));
+    }
+}
+
+static void wrap_op2(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod,
+                     GLuint arg1, GLuint arg1Rep, GLuint arg1Mod,
+                     GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) {
+    if(dstMask == GL_ALPHA) {
+        TRACE("glAlphaFragmentOp2ATI(%s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod),
+              debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod),
+              debug_register(arg2), debug_rep(arg2Rep), debug_argmod(arg2Mod));
+        GL_EXTCALL(glAlphaFragmentOp2ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod));
+    } else {
+        TRACE("glColorFragmentOp2ATI(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst),
+              debug_mask(dstMask), debug_dstmod(dstMod),
+              debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod),
+              debug_register(arg2), debug_rep(arg2Rep), debug_argmod(arg2Mod));
+        GL_EXTCALL(glColorFragmentOp2ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod));
+    }
+}
+
+static void wrap_op3(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod,
+                     GLuint arg1, GLuint arg1Rep, GLuint arg1Mod,
+                     GLuint arg2, GLuint arg2Rep, GLuint arg2Mod,
+                     GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) {
+    if(dstMask == GL_ALPHA) {
+        /* Leave some free space to fit "GL_NONE, " in to align most alpha and color op lines */
+        TRACE("glAlphaFragmentOp3ATI(%s, %s,          %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod),
+              debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod),
+              debug_register(arg2), debug_rep(arg2Rep), debug_argmod(arg2Mod),
+              debug_register(arg3), debug_rep(arg3Rep), debug_argmod(arg3Mod));
+        GL_EXTCALL(glAlphaFragmentOp3ATI(op, dst, dstMod,
+                                         arg1, arg1Rep, arg1Mod,
+                                         arg2, arg2Rep, arg2Mod,
+                                         arg3, arg3Rep, arg3Mod));
+    } else {
+        TRACE("glColorFragmentOp3ATI(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst),
+              debug_mask(dstMask), debug_dstmod(dstMod),
+              debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod),
+              debug_register(arg2), debug_rep(arg2Rep), debug_argmod(arg2Mod),
+              debug_register(arg3), debug_rep(arg3Rep), debug_argmod(arg3Mod));
+        GL_EXTCALL(glColorFragmentOp3ATI(op, dst, dstMask, dstMod,
+                                         arg1, arg1Rep, arg1Mod,
+                                         arg2, arg2Rep, arg2Mod,
+                                         arg3, arg3Rep, arg3Mod));
+    }
+}
+
 static GLuint register_for_arg(DWORD arg, const WineD3D_GL_Info *gl_info,
         unsigned int stage, GLuint *mod, GLuint *rep, GLuint tmparg)
@@ -361,4 +450,5 @@
            op[stage].cop != WINED3DTOP_BUMPENVMAPLUMINANCE) continue;
 
+        fixup = op[stage].color_fixup;
         if (fixup.x_source != CHANNEL_SOURCE_X || fixup.y_source != CHANNEL_SOURCE_Y)
         {
@@ -374,10 +464,8 @@
         }
 
-        TRACE("glColorFragmentOp3ATI(GL_DOT2_ADD_ATI, GL_REG_%d_ATI, GL_RED_BIT_ATI, GL_NONE, GL_REG_%d_ATI, GL_NONE, %s, ATI_FFP_CONST_BUMPMAT(%d), GL_NONE, GL_NONE, GL_REG_%d_ATI, GL_RED, GL_NONE)\n",
-              stage + 1, stage, debug_argmod(argmodextra_x), stage, stage + 1);
-        GL_EXTCALL(glColorFragmentOp3ATI(GL_DOT2_ADD_ATI, GL_REG_0_ATI + stage + 1, GL_RED_BIT_ATI, GL_NONE,
-                                         GL_REG_0_ATI + stage, GL_NONE, argmodextra_x,
-                                         ATI_FFP_CONST_BUMPMAT(stage), GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI,
-                                         GL_REG_0_ATI + stage + 1, GL_RED, GL_NONE));
+        wrap_op3(gl_info, GL_DOT2_ADD_ATI, GL_REG_0_ATI + stage + 1, GL_RED_BIT_ATI, GL_NONE,
+                 GL_REG_0_ATI + stage, GL_NONE, argmodextra_x,
+                 ATI_FFP_CONST_BUMPMAT(stage), GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI,
+                 GL_REG_0_ATI + stage + 1, GL_RED, GL_NONE);
 
         /* FIXME: How can I make GL_DOT2_ADD_ATI read the factors from blue and alpha? It defaults to red and green,
@@ -389,16 +477,12 @@
          * constants doesn't make sense, considering their values.
          */
-        TRACE("glColorFragmentOp1ATI(GL_MOV_ATI, GL_REG_5_ATI, GL_RED_BIT_ATI, GL_NONE, ATI_FFP_CONST_BUMPMAT(%d), GL_BLUE, GL_NONE)\n", stage);
-        GL_EXTCALL(glColorFragmentOp1ATI(GL_MOV_ATI, GL_REG_5_ATI, GL_RED_BIT_ATI, GL_NONE,
-                                         ATI_FFP_CONST_BUMPMAT(stage), GL_BLUE, GL_NONE));
-        TRACE("glColorFragmentOp1ATI(GL_MOV_ATI, GL_REG_5_ATI, GL_GREEN_BIT_ATI, GL_NONE, ATI_FFP_CONST_BUMPMAT(%d), GL_ALPHA, GL_NONE)\n", stage);
-        GL_EXTCALL(glColorFragmentOp1ATI(GL_MOV_ATI, GL_REG_5_ATI, GL_GREEN_BIT_ATI, GL_NONE,
-                                        ATI_FFP_CONST_BUMPMAT(stage), GL_ALPHA, GL_NONE));
-        TRACE("glColorFragmentOp3ATI(GL_DOT2_ADD_ATI, GL_REG_%d_ATI, GL_GREEN_BIT_ATI, GL_NONE, GL_REG_%d_ATI, GL_NONE, %s, GL_REG_5_ATI, GL_NONE, GL_NONE, GL_REG_%d_ATI, GL_GREEN, GL_NONE)\n",
-              stage + 1, stage, debug_argmod(argmodextra_y), stage + 1);
-        GL_EXTCALL(glColorFragmentOp3ATI(GL_DOT2_ADD_ATI, GL_REG_0_ATI + stage + 1, GL_GREEN_BIT_ATI, GL_NONE,
-                                         GL_REG_0_ATI + stage, GL_NONE, argmodextra_y,
-                                         GL_REG_5_ATI, GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI,
-                                         GL_REG_0_ATI + stage + 1, GL_GREEN, GL_NONE));
+        wrap_op1(gl_info, GL_MOV_ATI, GL_REG_5_ATI, GL_RED_BIT_ATI, GL_NONE,
+                 ATI_FFP_CONST_BUMPMAT(stage), GL_BLUE, GL_NONE);
+        wrap_op1(gl_info, GL_MOV_ATI, GL_REG_5_ATI, GL_GREEN_BIT_ATI, GL_NONE,
+                 ATI_FFP_CONST_BUMPMAT(stage), GL_ALPHA, GL_NONE);
+        wrap_op3(gl_info, GL_DOT2_ADD_ATI, GL_REG_0_ATI + stage + 1, GL_GREEN_BIT_ATI, GL_NONE,
+                 GL_REG_0_ATI + stage, GL_NONE, argmodextra_y,
+                 GL_REG_5_ATI, GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI,
+                 GL_REG_0_ATI + stage + 1, GL_GREEN, GL_NONE);
     }
 
@@ -448,10 +532,8 @@
             if(stage == 0) {
                 /* Handle complete texture disabling gracefully */
-                TRACE("glColorFragmentOp1ATI(GL_MOV_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE, GL_PRIMARY_COLOR, GL_NONE, GL_NONE)\n");
-                GL_EXTCALL(glColorFragmentOp1ATI(GL_MOV_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE,
-                                                 GL_PRIMARY_COLOR, GL_NONE, GL_NONE));
-                TRACE("glAlphaFragmentOp1ATI(GL_MOV_ATI, GL_REG_0_ATI, GL_NONE, GL_PRIMARY_COLOR, GL_NONE, GL_NONE)\n");
-                GL_EXTCALL(glAlphaFragmentOp1ATI(GL_MOV_ATI, GL_REG_0_ATI, GL_NONE,
-                                                 GL_PRIMARY_COLOR, GL_NONE, GL_NONE));
+                wrap_op1(gl_info, GL_MOV_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE,
+                         GL_PRIMARY_COLOR, GL_NONE, GL_NONE);
+                wrap_op1(gl_info, GL_MOV_ATI, GL_REG_0_ATI, GL_ALPHA, GL_NONE,
+                         GL_PRIMARY_COLOR, GL_NONE, GL_NONE);
             }
             break;
@@ -482,8 +564,6 @@
                 rep1 = rep2;
             case WINED3DTOP_SELECTARG1:
-                TRACE("glColorFragmentOp1ATI(GL_MOV_ATI, %s, GL_NONE, GL_NONE, %s, %s, %s)\n",
-                      debug_register(dstreg), debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1));
-                GL_EXTCALL(glColorFragmentOp1ATI(GL_MOV_ATI, dstreg, GL_NONE, GL_NONE,
-                                                 arg1, rep1, argmod1));
+                wrap_op1(gl_info, GL_MOV_ATI, dstreg, GL_NONE, GL_NONE,
+                         arg1, rep1, argmod1);
                 break;
 
@@ -494,11 +574,7 @@
                 dstmod |= GL_SATURATE_BIT_ATI;
             case WINED3DTOP_MODULATE:
-                TRACE("glColorFragmentOp2ATI(GL_MUL_ATI, %s, GL_NONE, %s, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg), debug_dstmod(dstmod),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2));
-                GL_EXTCALL(glColorFragmentOp2ATI(GL_MUL_ATI, dstreg, GL_NONE, dstmod,
-                                                 arg1, rep1, argmod1,
-                                                 arg2, rep2, argmod2));
+                wrap_op2(gl_info, GL_MUL_ATI, dstreg, GL_NONE, dstmod,
+                         arg1, rep1, argmod1,
+                         arg2, rep2, argmod2);
                 break;
 
@@ -509,38 +585,25 @@
             case WINED3DTOP_ADD:
                 dstmod |= GL_SATURATE_BIT_ATI;
-                TRACE("glColorFragmentOp2ATI(GL_ADD_ATI, %s, GL_NONE, %s, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg), debug_dstmod(dstmod),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmodextra | argmod2));
-                GL_EXTCALL(glColorFragmentOp2ATI(GL_ADD_ATI, GL_REG_0_ATI, GL_NONE, dstmod,
-                                                 arg1, rep1, argmod1,
-                                                 arg2, rep2, argmodextra | argmod2));
+                wrap_op2(gl_info, GL_ADD_ATI, GL_REG_0_ATI, GL_NONE, dstmod,
+                         arg1, rep1, argmod1,
+                         arg2, rep2, argmodextra | argmod2);
                 break;
 
             case WINED3DTOP_SUBTRACT:
                 dstmod |= GL_SATURATE_BIT_ATI;
-                TRACE("glColorFragmentOp2ATI(GL_SUB_ATI, %s, GL_NONE, %s, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg), debug_dstmod(dstmod),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2));
-                GL_EXTCALL(glColorFragmentOp2ATI(GL_SUB_ATI, dstreg, GL_NONE, dstmod,
-                                                 arg1, rep1, argmod1,
-                                                 arg2, rep2, argmod2));
+                wrap_op2(gl_info, GL_SUB_ATI, dstreg, GL_NONE, dstmod,
+                         arg1, rep1, argmod1,
+                         arg2, rep2, argmod2);
                 break;
 
             case WINED3DTOP_ADDSMOOTH:
                 argmodextra = argmod1 & GL_COMP_BIT_ATI ? argmod1 & ~GL_COMP_BIT_ATI : argmod1 | GL_COMP_BIT_ATI;
-                TRACE("glColorFragmentOp3ATI(GL_MAD_ATI, %s, GL_NONE, GL_SATURATE_BIT_ATI, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmodextra),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1));
                 /* Dst = arg1 + * arg2(1 -arg 1)
                  *     = arg2 * (1 - arg1) + arg1
                  */
-                GL_EXTCALL(glColorFragmentOp3ATI(GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
-                                                 arg2, rep2, argmod2,
-                                                 arg1, rep1, argmodextra,
-                                                 arg1, rep1, argmod1));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
+                         arg2, rep2, argmod2,
+                         arg1, rep1, argmodextra,
+                         arg1, rep1, argmod1);
                 break;
 
@@ -553,26 +616,16 @@
             case WINED3DTOP_BLENDDIFFUSEALPHA:
                 if(extrarg == GL_NONE) extrarg = register_for_arg(WINED3DTA_DIFFUSE, gl_info, stage, NULL, NULL, -1);
-                TRACE("glColorFragmentOp3ATI(GL_LERP_ATI, %s, GL_NONE, GL_NONE, %s, GL_ALPHA, GL_NONE, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(extrarg),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2));
-                GL_EXTCALL(glColorFragmentOp3ATI(GL_LERP_ATI, dstreg, GL_NONE, GL_NONE,
-                                                 extrarg, GL_ALPHA, GL_NONE,
-                                                 arg1, rep1, argmod1,
-                                                 arg2, rep2, argmod2));
+                wrap_op3(gl_info, GL_LERP_ATI, dstreg, GL_NONE, GL_NONE,
+                         extrarg, GL_ALPHA, GL_NONE,
+                         arg1, rep1, argmod1,
+                         arg2, rep2, argmod2);
                 break;
 
             case WINED3DTOP_BLENDTEXTUREALPHAPM:
                 arg0 = register_for_arg(WINED3DTA_TEXTURE, gl_info, stage, NULL, NULL, -1);
-                TRACE("glColorFragmentOp3ATI(GL_MAD_ATI, %s, GL_NONE, GL_NONE, %s, %s, %s, %s, GL_ALPHA, GL_COMP_BIT_ATI, %s, %s, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2),
-                      debug_register(arg0),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1));
-                GL_EXTCALL(glColorFragmentOp3ATI(GL_MAD_ATI, dstreg, GL_NONE, GL_NONE,
-                                                 arg2, rep2,  argmod2,
-                                                 arg0, GL_ALPHA, GL_COMP_BIT_ATI,
-                                                 arg1, rep1,  argmod1));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_NONE, GL_NONE,
+                         arg2, rep2,  argmod2,
+                         arg0, GL_ALPHA, GL_COMP_BIT_ATI,
+                         arg1, rep1,  argmod1);
                 break;
 
@@ -583,12 +636,8 @@
             case WINED3DTOP_MODULATEALPHA_ADDCOLOR:
                 if(!argmodextra) argmodextra = argmod1;
-                TRACE("glColorFragmentOp3ATI(GL_MAD_ATI, %s, GL_NONE, GL_SATURATE_BIT_ATI, %s, %s, %s, %s, GL_ALPHA, %s, %s, %s, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2),
-                      debug_register(arg1), debug_argmod(argmodextra), debug_register(arg1), debug_rep(rep1), debug_argmod(arg1));
-                GL_EXTCALL(glColorFragmentOp3ATI(GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
-                                                 arg2, rep2,  argmod2,
-                                                 arg1, GL_ALPHA, argmodextra,
-                                                 arg1, rep1,  argmod1));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
+                         arg2, rep2,  argmod2,
+                         arg1, GL_ALPHA, argmodextra,
+                         arg1, rep1,  argmod1);
                 break;
 
@@ -597,47 +646,28 @@
             case WINED3DTOP_MODULATECOLOR_ADDALPHA:
                 if(!argmodextra) argmodextra = argmod1;
-                TRACE("glColorFragmentOp3ATI(GL_MAD_ATI, %s, GL_NONE, GL_SATURATE_BIT_ATI, %s, %s, %s, %s, %s, %s, %s, GL_ALPHA, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmodextra),
-                      debug_register(arg1), debug_argmod(argmod1));
-                GL_EXTCALL(glColorFragmentOp3ATI(GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
-                                                 arg2, rep2,  argmod2,
-                                                 arg1, rep1,  argmodextra,
-                                                 arg1, GL_ALPHA, argmod1));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
+                         arg2, rep2,  argmod2,
+                         arg1, rep1,  argmodextra,
+                         arg1, GL_ALPHA, argmod1);
                 break;
 
             case WINED3DTOP_DOTPRODUCT3:
-                TRACE("glColorFragmentOp2ATI(GL_DOT3_ATI, %s, GL_NONE, GL_4X_BIT_ATI | GL_SATURATE_BIT_ATI, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1 | GL_BIAS_BIT_ATI),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2 | GL_BIAS_BIT_ATI));
-                GL_EXTCALL(glColorFragmentOp2ATI(GL_DOT3_ATI, dstreg, GL_NONE, GL_4X_BIT_ATI | GL_SATURATE_BIT_ATI,
-                                                 arg1, rep1, argmod1 | GL_BIAS_BIT_ATI,
-                                                 arg2, rep2, argmod2 | GL_BIAS_BIT_ATI));
+                wrap_op2(gl_info, GL_DOT3_ATI, dstreg, GL_NONE, GL_4X_BIT_ATI | GL_SATURATE_BIT_ATI,
+                         arg1, rep1, argmod1 | GL_BIAS_BIT_ATI,
+                         arg2, rep2, argmod2 | GL_BIAS_BIT_ATI);
                 break;
 
             case WINED3DTOP_MULTIPLYADD:
-                TRACE("glColorFragmentOp3ATI(GL_MAD_ATI, %s, GL_NONE, GL_SATURATE_BIT_ATI, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2),
-                      debug_register(arg0), debug_rep(rep0), debug_argmod(argmod0));
-                GL_EXTCALL(glColorFragmentOp3ATI(GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
-                                                 arg1, rep1, argmod1,
-                                                 arg2, rep2, argmod2,
-                                                 arg0, rep0, argmod0));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_NONE, GL_SATURATE_BIT_ATI,
+                         arg1, rep1, argmod1,
+                         arg2, rep2, argmod2,
+                         arg0, rep0, argmod0);
                 break;
 
             case WINED3DTOP_LERP:
-                TRACE("glColorFragmentOp3ATI(GL_LERP_ATI, %s, GL_NONE, GL_NONE, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg1), debug_rep(rep1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_rep(rep2), debug_argmod(argmod2),
-                      debug_register(arg0), debug_rep(rep0), debug_argmod(argmod0));
-                GL_EXTCALL(glColorFragmentOp3ATI(GL_LERP_ATI, dstreg, GL_NONE, GL_NONE,
-                                                 arg0, rep0, argmod0,
-                                                 arg1, rep1, argmod1,
-                                                 arg2, rep2, argmod2));
+                wrap_op3(gl_info, GL_LERP_ATI, dstreg, GL_NONE, GL_NONE,
+                         arg0, rep0, argmod0,
+                         arg1, rep1, argmod1,
+                         arg2, rep2, argmod2);
                 break;
 
@@ -661,7 +691,6 @@
                 /* Get the primary color to the output if on stage 0, otherwise leave register 0 untouched */
                 if(stage == 0) {
-                    TRACE("glAlphaFragmentOp1ATI(GL_MOV_ATI, GL_REG_0_ATI, GL_NONE, GL_PRIMARY_COLOR, GL_NONE, GL_NONE)\n");
-                    GL_EXTCALL(glAlphaFragmentOp1ATI(GL_MOV_ATI, GL_REG_0_ATI, GL_NONE,
-                               GL_PRIMARY_COLOR, GL_NONE, GL_NONE));
+                    wrap_op1(gl_info, GL_MOV_ATI, GL_REG_0_ATI, GL_ALPHA, GL_NONE,
+                             GL_PRIMARY_COLOR, GL_NONE, GL_NONE);
                 }
                 break;
@@ -671,9 +700,6 @@
                 argmod1 = argmod2;
             case WINED3DTOP_SELECTARG1:
-                TRACE("glAlphaFragmentOp1ATI(GL_MOV_ATI, %s,          GL_NONE, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg1), debug_argmod(argmod1));
-                GL_EXTCALL(glAlphaFragmentOp1ATI(GL_MOV_ATI, dstreg, GL_NONE,
-                                                 arg1, GL_NONE, argmod1));
+                wrap_op1(gl_info, GL_MOV_ATI, dstreg, GL_ALPHA, GL_NONE,
+                         arg1, GL_NONE, argmod1);
                 break;
 
@@ -684,11 +710,7 @@
                 dstmod |= GL_SATURATE_BIT_ATI;
             case WINED3DTOP_MODULATE:
-                TRACE("glAlphaFragmentOp2ATI(GL_MUL_ATI, %s,          %s, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg), debug_dstmod(dstmod),
-                      debug_register(arg1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_argmod(argmod2));
-                GL_EXTCALL(glAlphaFragmentOp2ATI(GL_MUL_ATI, dstreg, dstmod,
-                                                 arg1, GL_NONE, argmod1,
-                                                 arg2, GL_NONE, argmod2));
+                wrap_op2(gl_info, GL_MUL_ATI, dstreg, GL_ALPHA, dstmod,
+                         arg1, GL_NONE, argmod1,
+                         arg2, GL_NONE, argmod2);
                 break;
 
@@ -699,38 +721,25 @@
             case WINED3DTOP_ADD:
                 dstmod |= GL_SATURATE_BIT_ATI;
-                TRACE("glAlphaFragmentOp2ATI(GL_ADD_ATI, %s,          %s, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg), debug_dstmod(dstmod),
-                      debug_register(arg1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_argmod(argmodextra | argmod2));
-                GL_EXTCALL(glAlphaFragmentOp2ATI(GL_ADD_ATI, dstreg, dstmod,
-                                                 arg1, GL_NONE, argmod1,
-                                                 arg2, GL_NONE, argmodextra | argmod2));
+                wrap_op2(gl_info, GL_ADD_ATI, dstreg, GL_ALPHA, dstmod,
+                         arg1, GL_NONE, argmod1,
+                         arg2, GL_NONE, argmodextra | argmod2);
                 break;
 
             case WINED3DTOP_SUBTRACT:
                 dstmod |= GL_SATURATE_BIT_ATI;
-                TRACE("glAlphaFragmentOp2ATI(GL_SUB_ATI, %s, GL_NONE, %s, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg), debug_dstmod(dstmod),
-                      debug_register(arg1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_argmod(argmod2));
-                GL_EXTCALL(glAlphaFragmentOp2ATI(GL_SUB_ATI, dstreg, dstmod,
-                                                 arg1, GL_NONE, argmod1,
-                                                 arg2, GL_NONE, argmod2));
+                wrap_op2(gl_info, GL_SUB_ATI, dstreg, GL_ALPHA, dstmod,
+                         arg1, GL_NONE, argmod1,
+                         arg2, GL_NONE, argmod2);
                 break;
 
             case WINED3DTOP_ADDSMOOTH:
                 argmodextra = argmod1 & GL_COMP_BIT_ATI ? argmod1 & ~GL_COMP_BIT_ATI : argmod1 | GL_COMP_BIT_ATI;
-                TRACE("glAlphaFragmentOp3ATI(GL_MAD_ATI, %s,          GL_SATURATE_BIT_ATI, %s, GL_NONE, %s, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg2), debug_argmod(argmod2),
-                      debug_register(arg1), debug_argmod(argmodextra),
-                      debug_register(arg1), debug_argmod(argmod1));
                 /* Dst = arg1 + * arg2(1 -arg 1)
                  *     = arg2 * (1 - arg1) + arg1
                  */
-                GL_EXTCALL(glAlphaFragmentOp3ATI(GL_MAD_ATI, dstreg, GL_SATURATE_BIT_ATI,
-                                                 arg2, GL_NONE, argmod2,
-                                                 arg1, GL_NONE, argmodextra,
-                                                 arg1, GL_NONE, argmod1));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_ALPHA, GL_SATURATE_BIT_ATI,
+                         arg2, GL_NONE, argmod2,
+                         arg1, GL_NONE, argmodextra,
+                         arg1, GL_NONE, argmod1);
                 break;
 
@@ -743,26 +752,16 @@
             case WINED3DTOP_BLENDDIFFUSEALPHA:
                 if(extrarg == GL_NONE) extrarg = register_for_arg(WINED3DTA_DIFFUSE, gl_info, stage, NULL, NULL, -1);
-                TRACE("glAlphaFragmentOp3ATI(GL_LERP_ATI, %s,          GL_NONE, %s, GL_ALPHA, GL_NONE, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(extrarg),
-                      debug_register(arg1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_argmod(argmod2));
-                GL_EXTCALL(glAlphaFragmentOp3ATI(GL_LERP_ATI, dstreg, GL_NONE,
-                                                 extrarg, GL_ALPHA, GL_NONE,
-                                                 arg1, GL_NONE, argmod1,
-                                                 arg2, GL_NONE, argmod2));
+                wrap_op3(gl_info, GL_LERP_ATI, dstreg, GL_ALPHA, GL_NONE,
+                         extrarg, GL_ALPHA, GL_NONE,
+                         arg1, GL_NONE, argmod1,
+                         arg2, GL_NONE, argmod2);
                 break;
 
             case WINED3DTOP_BLENDTEXTUREALPHAPM:
                 arg0 = register_for_arg(WINED3DTA_TEXTURE, gl_info, stage, NULL, NULL, -1);
-                TRACE("glAlphaFragmentOp3ATI(GL_MAD_ATI, %s,          GL_NONE, %s, GL_NONE, %s, %s, GL_ALPHA, GL_COMP_BIT_ATI, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg2), debug_argmod(argmod2),
-                      debug_register(arg0),
-                      debug_register(arg1), debug_argmod(argmod1));
-                GL_EXTCALL(glAlphaFragmentOp3ATI(GL_MAD_ATI, dstreg, GL_NONE,
-                                                 arg2, GL_NONE,  argmod2,
-                                                 arg0, GL_ALPHA, GL_COMP_BIT_ATI,
-                                                 arg1, GL_NONE,  argmod1));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_ALPHA, GL_NONE,
+                         arg2, GL_NONE,  argmod2,
+                         arg0, GL_ALPHA, GL_COMP_BIT_ATI,
+                         arg1, GL_NONE,  argmod1);
                 break;
 
@@ -770,35 +769,21 @@
 
             case WINED3DTOP_DOTPRODUCT3:
-                TRACE("glAlphaFragmentOp2ATI(GL_DOT3_ATI, %s,          GL_4X_BIT_ATI | GL_SATURATE_BIT_ATI, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg1), debug_argmod(argmod1 | GL_BIAS_BIT_ATI),
-                      debug_register(arg2), debug_argmod(argmod2 | GL_BIAS_BIT_ATI));
-                GL_EXTCALL(glAlphaFragmentOp2ATI(GL_DOT3_ATI, dstreg, GL_4X_BIT_ATI | GL_SATURATE_BIT_ATI,
-                                                 arg1, GL_NONE, argmod1 | GL_BIAS_BIT_ATI,
-                                                 arg2, GL_NONE, argmod2 | GL_BIAS_BIT_ATI));
+                wrap_op2(gl_info, GL_DOT3_ATI, dstreg, GL_ALPHA, GL_4X_BIT_ATI | GL_SATURATE_BIT_ATI,
+                         arg1, GL_NONE, argmod1 | GL_BIAS_BIT_ATI,
+                         arg2, GL_NONE, argmod2 | GL_BIAS_BIT_ATI);
                 break;
 
             case WINED3DTOP_MULTIPLYADD:
-                TRACE("glAlphaFragmentOp3ATI(GL_MAD_ATI, %s,          GL_SATURATE_BIT_ATI, %s, GL_NONE, %s, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_argmod(argmod2),
-                      debug_register(arg0), debug_argmod(argmod0));
-                GL_EXTCALL(glAlphaFragmentOp3ATI(GL_MAD_ATI, dstreg,          GL_SATURATE_BIT_ATI,
-                           arg1, GL_NONE, argmod1,
-                           arg2, GL_NONE, argmod2,
-                           arg0, GL_NONE, argmod0));
+                wrap_op3(gl_info, GL_MAD_ATI, dstreg, GL_ALPHA, GL_SATURATE_BIT_ATI,
+                         arg1, GL_NONE, argmod1,
+                         arg2, GL_NONE, argmod2,
+                         arg0, GL_NONE, argmod0);
                 break;
 
             case WINED3DTOP_LERP:
-                TRACE("glAlphaFragmentOp3ATI(GL_LERP_ATI, %s,          GL_SATURATE_BIT_ATI, %s, GL_NONE, %s, %s, GL_NONE, %s, %s, GL_NONE, %s)\n",
-                      debug_register(dstreg),
-                      debug_register(arg1), debug_argmod(argmod1),
-                      debug_register(arg2), debug_argmod(argmod2),
-                      debug_register(arg0), debug_argmod(argmod0));
-                GL_EXTCALL(glAlphaFragmentOp3ATI(GL_LERP_ATI, dstreg, GL_SATURATE_BIT_ATI,
-                                                 arg1, GL_NONE, argmod1,
-                                                 arg2, GL_NONE, argmod2,
-                                                 arg0, GL_NONE, argmod0));
+                wrap_op3(gl_info, GL_LERP_ATI, dstreg, GL_ALPHA, GL_SATURATE_BIT_ATI,
+                         arg1, GL_NONE, argmod1,
+                         arg2, GL_NONE, argmod2,
+                         arg0, GL_NONE, argmod0);
                 break;
 
@@ -828,5 +813,5 @@
     const struct atifs_ffp_desc *desc;
     struct ffp_frag_settings     settings;
-    struct atifs_private_data   *priv = (struct atifs_private_data *) This->fragment_priv;
+    struct atifs_private_data   *priv = This->fragment_priv;
     DWORD mapped_stage;
     unsigned int i;
@@ -859,5 +844,6 @@
     for(i = 0; i < desc->num_textures_used; i++) {
         mapped_stage = This->texUnitMap[i];
-        if(mapped_stage != -1) {
+        if (mapped_stage != WINED3D_UNMAPPED_STAGE)
+        {
             GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
             checkGLcall("glActiveTextureARB");
@@ -878,5 +864,5 @@
 
 static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     float mat[2][2];
 
@@ -906,8 +892,40 @@
 }
 
+static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+    IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
+    BOOL use_vshader = use_vs(stateblock);
+
+    context->last_was_pshader = use_ps(stateblock);
+    /* The ATIFS code does not support pixel shaders currently, but we have to provide a state handler
+     * to call shader_select to select a vertex shader if one is applied because the vertex shader state
+     * may defer calling the shader backend if the pshader state is dirty.
+     *
+     * In theory the application should not be able to mark the pixel shader dirty because it cannot
+     * create a shader, and thus has no way to set the state to something != NULL. However, a different
+     * pipeline part may link a different state to its pixelshader handler, thus a pshader state exists
+     * and can be dirtified. Also the pshader is always dirtified at startup, and blitting disables all
+     * shaders and dirtifies all shader states. If atifs can deal with this it keeps the rest of the code
+     * simpler.
+     */
+    if(!isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) {
+        device->shader_backend->shader_select((IWineD3DDevice *)stateblock->wineD3DDevice, FALSE, use_vshader);
+
+        if (!isStateDirty(context, STATE_VERTEXSHADERCONSTANT) && use_vshader) {
+            device->StateTable[STATE_VERTEXSHADERCONSTANT].apply(STATE_VERTEXSHADERCONSTANT, stateblock, context);
+        }
+    }
+}
+
 #undef GLINFO_LOCATION
 
 static const struct StateEntryTemplate atifs_fragmentstate_template[] = {
     {STATE_RENDER(WINED3DRS_TEXTUREFACTOR),               { STATE_RENDER(WINED3DRS_TEXTUREFACTOR),              state_texfactor_atifs   }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGCOLOR),                    { STATE_RENDER(WINED3DRS_FOGCOLOR),                   state_fogcolor          }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGDENSITY),                  { STATE_RENDER(WINED3DRS_FOGDENSITY),                 state_fogdensity        }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGENABLE),                   { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart      }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGTABLEMODE),                { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart      }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGVERTEXMODE),               { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart      }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGSTART),                    { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend       }, 0                               },
+    {STATE_RENDER(WINED3DRS_FOGEND),                      { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend       }, 0                               },
     {STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP),           { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP),          set_tex_op_atifs        }, 0                               },
     {STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG1),         { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP),          set_tex_op_atifs        }, 0                               },
@@ -1030,4 +1048,5 @@
     {STATE_TEXTURESTAGE(6,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(6, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform      }, 0                               },
     {STATE_TEXTURESTAGE(7,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(7, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform      }, 0                               },
+    {STATE_PIXELSHADER,                                   { STATE_PIXELSHADER,                                  atifs_apply_pixelshader }, 0                               },
     {0 /* Terminate */,                                   { 0,                                                  0                       }, 0                               },
 };
@@ -1100,5 +1119,5 @@
         return E_OUTOFMEMORY;
     }
-    priv = (struct atifs_private_data *) This->fragment_priv;
+    priv = This->fragment_priv;
     priv->fragment_shaders = hash_table_create(ffp_frag_program_key_hash, ffp_frag_program_key_compare);
     return WINED3D_OK;
@@ -1119,5 +1138,5 @@
 static void atifs_free(IWineD3DDevice *iface) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
-    struct atifs_private_data *priv = (struct atifs_private_data *) This->fragment_priv;
+    struct atifs_private_data *priv = This->fragment_priv;
 
     hash_table_destroy(priv->fragment_shaders, atifs_free_ffpshader, This);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/baseshader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/baseshader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/baseshader.c	(revision 19678)
@@ -8,4 +8,5 @@
  * Copyright 2006 Ivan Gyurdiev
  * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
+ * Copyright 2009 Henri Verbeet for CodeWeavers
  *
  * This library is free software; you can redistribute it and/or
@@ -41,7 +42,109 @@
 WINE_DECLARE_DEBUG_CHANNEL(d3d);
 
-#define GLNAME_REQUIRE_GLSL  ((const char *)1)
-
-static void shader_dump_param(const DWORD param, const DWORD addr_token, int input, DWORD shader_version);
+static const char *shader_opcode_names[] =
+{
+    /* WINED3DSIH_ABS           */ "abs",
+    /* WINED3DSIH_ADD           */ "add",
+    /* WINED3DSIH_BEM           */ "bem",
+    /* WINED3DSIH_BREAK         */ "break",
+    /* WINED3DSIH_BREAKC        */ "breakc",
+    /* WINED3DSIH_BREAKP        */ "breakp",
+    /* WINED3DSIH_CALL          */ "call",
+    /* WINED3DSIH_CALLNZ        */ "callnz",
+    /* WINED3DSIH_CMP           */ "cmp",
+    /* WINED3DSIH_CND           */ "cnd",
+    /* WINED3DSIH_CRS           */ "crs",
+    /* WINED3DSIH_DCL           */ "dcl",
+    /* WINED3DSIH_DEF           */ "def",
+    /* WINED3DSIH_DEFB          */ "defb",
+    /* WINED3DSIH_DEFI          */ "defi",
+    /* WINED3DSIH_DP2ADD        */ "dp2add",
+    /* WINED3DSIH_DP3           */ "dp3",
+    /* WINED3DSIH_DP4           */ "dp4",
+    /* WINED3DSIH_DST           */ "dst",
+    /* WINED3DSIH_DSX           */ "dsx",
+    /* WINED3DSIH_DSY           */ "dsy",
+    /* WINED3DSIH_ELSE          */ "else",
+    /* WINED3DSIH_ENDIF         */ "endif",
+    /* WINED3DSIH_ENDLOOP       */ "endloop",
+    /* WINED3DSIH_ENDREP        */ "endrep",
+    /* WINED3DSIH_EXP           */ "exp",
+    /* WINED3DSIH_EXPP          */ "expp",
+    /* WINED3DSIH_FRC           */ "frc",
+    /* WINED3DSIH_IF            */ "if",
+    /* WINED3DSIH_IFC           */ "ifc",
+    /* WINED3DSIH_LABEL         */ "label",
+    /* WINED3DSIH_LIT           */ "lit",
+    /* WINED3DSIH_LOG           */ "log",
+    /* WINED3DSIH_LOGP          */ "logp",
+    /* WINED3DSIH_LOOP          */ "loop",
+    /* WINED3DSIH_LRP           */ "lrp",
+    /* WINED3DSIH_M3x2          */ "m3x2",
+    /* WINED3DSIH_M3x3          */ "m3x3",
+    /* WINED3DSIH_M3x4          */ "m3x4",
+    /* WINED3DSIH_M4x3          */ "m4x3",
+    /* WINED3DSIH_M4x4          */ "m4x4",
+    /* WINED3DSIH_MAD           */ "mad",
+    /* WINED3DSIH_MAX           */ "max",
+    /* WINED3DSIH_MIN           */ "min",
+    /* WINED3DSIH_MOV           */ "mov",
+    /* WINED3DSIH_MOVA          */ "mova",
+    /* WINED3DSIH_MUL           */ "mul",
+    /* WINED3DSIH_NOP           */ "nop",
+    /* WINED3DSIH_NRM           */ "nrm",
+    /* WINED3DSIH_PHASE         */ "phase",
+    /* WINED3DSIH_POW           */ "pow",
+    /* WINED3DSIH_RCP           */ "rcp",
+    /* WINED3DSIH_REP           */ "rep",
+    /* WINED3DSIH_RET           */ "ret",
+    /* WINED3DSIH_RSQ           */ "rsq",
+    /* WINED3DSIH_SETP          */ "setp",
+    /* WINED3DSIH_SGE           */ "sge",
+    /* WINED3DSIH_SGN           */ "sgn",
+    /* WINED3DSIH_SINCOS        */ "sincos",
+    /* WINED3DSIH_SLT           */ "slt",
+    /* WINED3DSIH_SUB           */ "sub",
+    /* WINED3DSIH_TEX           */ "texld",
+    /* WINED3DSIH_TEXBEM        */ "texbem",
+    /* WINED3DSIH_TEXBEML       */ "texbeml",
+    /* WINED3DSIH_TEXCOORD      */ "texcrd",
+    /* WINED3DSIH_TEXDEPTH      */ "texdepth",
+    /* WINED3DSIH_TEXDP3        */ "texdp3",
+    /* WINED3DSIH_TEXDP3TEX     */ "texdp3tex",
+    /* WINED3DSIH_TEXKILL       */ "texkill",
+    /* WINED3DSIH_TEXLDD        */ "texldd",
+    /* WINED3DSIH_TEXLDL        */ "texldl",
+    /* WINED3DSIH_TEXM3x2DEPTH  */ "texm3x2depth",
+    /* WINED3DSIH_TEXM3x2PAD    */ "texm3x2pad",
+    /* WINED3DSIH_TEXM3x2TEX    */ "texm3x2tex",
+    /* WINED3DSIH_TEXM3x3       */ "texm3x3",
+    /* WINED3DSIH_TEXM3x3DIFF   */ "texm3x3diff",
+    /* WINED3DSIH_TEXM3x3PAD    */ "texm3x3pad",
+    /* WINED3DSIH_TEXM3x3SPEC   */ "texm3x3spec",
+    /* WINED3DSIH_TEXM3x3TEX    */ "texm3x3tex",
+    /* WINED3DSIH_TEXM3x3VSPEC  */ "texm3x3vspec",
+    /* WINED3DSIH_TEXREG2AR     */ "texreg2ar",
+    /* WINED3DSIH_TEXREG2GB     */ "texreg2gb",
+    /* WINED3DSIH_TEXREG2RGB    */ "texreg2rgb",
+};
+
+const struct wined3d_shader_frontend *shader_select_frontend(DWORD version_token)
+{
+    switch (version_token >> 16)
+    {
+        case WINED3D_SM1_VS:
+        case WINED3D_SM1_PS:
+            return &sm1_shader_frontend;
+
+        case WINED3D_SM4_PS:
+        case WINED3D_SM4_VS:
+        case WINED3D_SM4_GS:
+            return &sm4_shader_frontend;
+
+        default:
+            FIXME("Unrecognised version token %#x\n", version_token);
+            return NULL;
+    }
+}
 
 static inline BOOL shader_is_version_token(DWORD token) {
@@ -50,15 +153,24 @@
 }
 
-int shader_addline(
-    SHADER_BUFFER* buffer,  
-    const char *format, ...) {
-
+void shader_buffer_init(struct SHADER_BUFFER *buffer)
+{
+    buffer->buffer = HeapAlloc(GetProcessHeap(), 0, SHADER_PGMSIZE);
+    buffer->buffer[0] = '\0';
+    buffer->bsize = 0;
+    buffer->lineNo = 0;
+    buffer->newline = TRUE;
+}
+
+void shader_buffer_free(struct SHADER_BUFFER *buffer)
+{
+    HeapFree(GetProcessHeap(), 0, buffer->buffer);
+}
+
+int shader_vaddline(SHADER_BUFFER* buffer, const char *format, va_list args)
+{
     char* base = buffer->buffer + buffer->bsize;
     int rc;
 
-    va_list args;
-    va_start(args, format);
     rc = _vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args);
-    va_end(args);
 
     if (rc < 0 ||                                   /* C89 */ 
@@ -86,103 +198,37 @@
 }
 
-const SHADER_OPCODE *shader_get_opcode(const SHADER_OPCODE *opcode_table, DWORD shader_version, DWORD code)
-{
-    DWORD i = 0;
-
-    /** TODO: use dichotomic search */
-    while (opcode_table[i].name)
-    {
-        if ((code & WINED3DSI_OPCODE_MASK) == opcode_table[i].opcode
-                && shader_version >= opcode_table[i].min_version
-                && (!opcode_table[i].max_version || shader_version <= opcode_table[i].max_version))
-        {
-            return &opcode_table[i];
-        }
-        ++i;
-    }
-
-    FIXME("Unsupported opcode %#x(%d) masked %#x, shader version %#x\n",
-            code, code, code & WINED3DSI_OPCODE_MASK, shader_version);
-
-    return NULL;
-}
-
-/* Read a parameter opcode from the input stream,
- * and possibly a relative addressing token.
- * Return the number of tokens read */
-static int shader_get_param(IWineD3DBaseShader *iface, const DWORD *pToken, DWORD *param, DWORD *addr_token)
-{
-    /* PS >= 3.0 have relative addressing (with token)
-     * VS >= 2.0 have relative addressing (with token)
-     * VS >= 1.0 < 2.0 have relative addressing (without token)
-     * The version check below should work in general */
-
-    IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
-    char rel_token = WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 2 &&
-        ((*pToken & WINED3DSHADER_ADDRESSMODE_MASK) == WINED3DSHADER_ADDRMODE_RELATIVE);
-
-    *param = *pToken;
-    *addr_token = rel_token? *(pToken + 1): 0;
-    return rel_token? 2:1;
-}
-
-/* Return the number of parameters to skip for an opcode */
-static inline int shader_skip_opcode(
-    IWineD3DBaseShaderImpl* This,
-    const SHADER_OPCODE* curOpcode,
-    DWORD opcode_token) {
-
-   /* Shaders >= 2.0 may contain address tokens, but fortunately they
-    * have a useful length mask - use it here. Shaders 1.0 contain no such tokens */
-
-    return (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 2)?
-        ((opcode_token & WINED3DSI_INSTLENGTH_MASK) >> WINED3DSI_INSTLENGTH_SHIFT):
-        curOpcode->num_params;
-}
-
-/* Read the parameters of an unrecognized opcode from the input stream
- * Return the number of tokens read. 
- * 
- * Note: This function assumes source or destination token format.
- * It will not work with specially-formatted tokens like DEF or DCL, 
- * but hopefully those would be recognized */
-static int shader_skip_unrecognized(IWineD3DBaseShader *iface, const DWORD *pToken)
-{
-    DWORD shader_version = ((IWineD3DBaseShaderImpl *)iface)->baseShader.hex_version;
-    int tokens_read = 0;
-    int i = 0;
-
-    /* TODO: Think of a good name for 0x80000000 and replace it with a constant */
-    while (*pToken & 0x80000000) {
-
-        DWORD param, addr_token;
-        tokens_read += shader_get_param(iface, pToken, &param, &addr_token);
-        pToken += tokens_read;
-
-        FIXME("Unrecognized opcode param: token=0x%08x "
-            "addr_token=0x%08x name=", param, addr_token);
-        shader_dump_param(param, addr_token, i, shader_version);
-        FIXME("\n");
-        ++i;
-    }
-    return tokens_read;
+int shader_addline(SHADER_BUFFER* buffer, const char *format, ...)
+{
+    int ret;
+    va_list args;
+
+    va_start(args, format);
+    ret = shader_vaddline(buffer, format, args);
+    va_end(args);
+
+    return ret;
+}
+
+void shader_init(struct IWineD3DBaseShaderClass *shader, IWineD3DDevice *device)
+{
+    shader->ref = 1;
+    shader->device = device;
+    list_init(&shader->linked_programs);
 }
 
 /* Convert floating point offset relative
  * to a register file to an absolute offset for float constants */
-static unsigned int shader_get_float_offset(const DWORD reg)
-{
-     unsigned int regnum = reg & WINED3DSP_REGNUM_MASK;
-     int regtype = shader_get_regtype(reg);
-
-     switch (regtype) {
-        case WINED3DSPR_CONST: return regnum;
-        case WINED3DSPR_CONST2: return 2048 + regnum;
-        case WINED3DSPR_CONST3: return 4096 + regnum;
-        case WINED3DSPR_CONST4: return 6144 + regnum;
+static unsigned int shader_get_float_offset(WINED3DSHADER_PARAM_REGISTER_TYPE register_type, UINT register_idx)
+{
+    switch (register_type)
+    {
+        case WINED3DSPR_CONST: return register_idx;
+        case WINED3DSPR_CONST2: return 2048 + register_idx;
+        case WINED3DSPR_CONST3: return 4096 + register_idx;
+        case WINED3DSPR_CONST4: return 6144 + register_idx;
         default:
-            FIXME("Unsupported register type: %d\n", regtype);
-            return regnum;
-     }
+            FIXME("Unsupported register type: %d\n", register_type);
+            return register_idx;
+    }
 }
 
@@ -201,28 +247,125 @@
 }
 
+static inline void set_bitmap_bit(DWORD *bitmap, DWORD bit)
+{
+    DWORD idx, shift;
+    idx = bit >> 5;
+    shift = bit & 0x1f;
+    bitmap[idx] |= (1 << shift);
+}
+
+static void shader_record_register_usage(IWineD3DBaseShaderImpl *This, struct shader_reg_maps *reg_maps,
+        DWORD register_type, UINT register_idx, BOOL has_rel_addr, BOOL pshader)
+{
+    switch (register_type)
+    {
+        case WINED3DSPR_TEXTURE: /* WINED3DSPR_ADDR */
+            if (pshader) reg_maps->texcoord[register_idx] = 1;
+            else reg_maps->address[register_idx] = 1;
+            break;
+
+        case WINED3DSPR_TEMP:
+            reg_maps->temporary[register_idx] = 1;
+            break;
+
+        case WINED3DSPR_INPUT:
+            if (!pshader) reg_maps->attributes[register_idx] = 1;
+            else
+            {
+                if (has_rel_addr)
+                {
+                    /* If relative addressing is used, we must assume that all registers
+                     * are used. Even if it is a construct like v3[aL], we can't assume
+                     * that v0, v1 and v2 aren't read because aL can be negative */
+                    unsigned int i;
+                    for (i = 0; i < MAX_REG_INPUT; ++i)
+                    {
+                        ((IWineD3DPixelShaderImpl *)This)->input_reg_used[i] = TRUE;
+                    }
+                }
+                else
+                {
+                    ((IWineD3DPixelShaderImpl *)This)->input_reg_used[register_idx] = TRUE;
+                }
+            }
+            break;
+
+        case WINED3DSPR_RASTOUT:
+            if (register_idx == 1) reg_maps->fog = 1;
+            break;
+
+        case WINED3DSPR_MISCTYPE:
+            if (pshader && register_idx == 0) reg_maps->vpos = 1;
+            break;
+
+        case WINED3DSPR_CONST:
+            if (has_rel_addr)
+            {
+                if (!pshader)
+                {
+                    if (register_idx <= ((IWineD3DVertexShaderImpl *)This)->min_rel_offset)
+                        ((IWineD3DVertexShaderImpl *)This)->min_rel_offset = register_idx;
+                    else if (register_idx >= ((IWineD3DVertexShaderImpl *)This)->max_rel_offset)
+                        ((IWineD3DVertexShaderImpl *)This)->max_rel_offset = register_idx;
+                }
+                reg_maps->usesrelconstF = TRUE;
+            }
+            else
+            {
+                set_bitmap_bit(reg_maps->constf, register_idx);
+            }
+            break;
+
+        case WINED3DSPR_CONSTINT:
+            reg_maps->integer_constants |= (1 << register_idx);
+            break;
+
+        case WINED3DSPR_CONSTBOOL:
+            reg_maps->boolean_constants |= (1 << register_idx);
+            break;
+
+        default:
+            TRACE("Not recording register of type %#x and idx %u\n", register_type, register_idx);
+            break;
+    }
+}
+
+static unsigned char get_instr_regcount(enum WINED3D_SHADER_INSTRUCTION_HANDLER instr, int param)
+{
+    switch(instr)
+    {
+        case WINED3DSIH_M4x4:
+        case WINED3DSIH_M3x4:
+            return param == 1 ? 4 : 1;
+
+        case WINED3DSIH_M4x3:
+        case WINED3DSIH_M3x3:
+            return param == 1 ? 3 : 1;
+
+        case WINED3DSIH_M3x2:
+            return param == 1 ? 2 : 1;
+
+        default:
+            return 1;
+    }
+}
+
 /* Note that this does not count the loop register
  * as an address register. */
 
-HRESULT shader_get_registers_used(
-    IWineD3DBaseShader *iface,
-    shader_reg_maps* reg_maps,
-    semantic* semantics_in,
-    semantic* semantics_out,
-    CONST DWORD* pToken,
-    IWineD3DStateBlockImpl *stateBlock) {
-
+HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3d_shader_frontend *fe,
+        struct shader_reg_maps *reg_maps, struct wined3d_shader_semantic *semantics_in,
+        struct wined3d_shader_semantic *semantics_out, const DWORD *byte_code, DWORD constf_size)
+{
     IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
-    const SHADER_OPCODE *shader_ins = This->baseShader.shader_ins;
-    DWORD shader_version = This->baseShader.hex_version;
+    void *fe_data = This->baseShader.frontend_data;
+    struct wined3d_shader_version shader_version;
     unsigned int cur_loop_depth = 0, max_loop_depth = 0;
+    const DWORD* pToken = byte_code;
+    char pshader;
 
     /* There are some minor differences between pixel and vertex shaders */
-    char pshader = shader_is_pshader_version(This->baseShader.hex_version);
-
-    memset(reg_maps->bumpmat, 0, sizeof(reg_maps->bumpmat));
-    memset(reg_maps->luminanceparams, 0, sizeof(reg_maps->luminanceparams));
-
-    if (pToken == NULL)
-        return WINED3D_OK;
+
+    memset(reg_maps, 0, sizeof(*reg_maps));
 
     /* get_registers_used is called on every compile on some 1.x shaders, which can result
@@ -233,71 +376,87 @@
     shader_delete_constant_list(&This->baseShader.constantsI);
 
-    while (WINED3DVS_END() != *pToken) {
-        CONST SHADER_OPCODE* curOpcode;
-        DWORD opcode_token;
-
-        /* Skip version */
-        if (shader_is_version_token(*pToken)) {
-             ++pToken;
-             continue;
+    fe->shader_read_header(fe_data, &pToken, &shader_version);
+    reg_maps->shader_version = shader_version;
+    pshader = shader_is_pshader_version(shader_version.type);
+
+    reg_maps->constf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
+                                 sizeof(*reg_maps->constf) * ((constf_size + 31) / 32));
+    if(!reg_maps->constf) {
+        ERR("Out of memory\n");
+        return E_OUTOFMEMORY;
+    }
+
+    while (!fe->shader_is_end(fe_data, &pToken))
+    {
+        struct wined3d_shader_instruction ins;
+        const char *comment;
+        UINT param_size;
 
         /* Skip comments */
-        } else if (shader_is_comment(*pToken)) {
-             DWORD comment_len = (*pToken & WINED3DSI_COMMENTSIZE_MASK) >> WINED3DSI_COMMENTSIZE_SHIFT;
-             ++pToken;
-             pToken += comment_len;
-             continue;
-        }
+        fe->shader_read_comment(&pToken, &comment);
+        if (comment) continue;
 
         /* Fetch opcode */
-        opcode_token = *pToken++;
-        curOpcode = shader_get_opcode(shader_ins, shader_version, opcode_token);
+        fe->shader_read_opcode(fe_data, &pToken, &ins, &param_size);
 
         /* Unhandled opcode, and its parameters */
-        if (NULL == curOpcode) {
-           while (*pToken & 0x80000000)
-               ++pToken;
+        if (ins.handler_idx == WINED3DSIH_TABLE_SIZE)
+        {
+            TRACE("Skipping unrecognized instruction.\n");
+            pToken += param_size;
+            continue;
+        }
 
         /* Handle declarations */
-        } else if (WINED3DSIO_DCL == curOpcode->opcode) {
-
-            DWORD usage = *pToken++;
-            DWORD param = *pToken++;
-            DWORD regtype = shader_get_regtype(param);
-            unsigned int regnum = param & WINED3DSP_REGNUM_MASK;
-
-            /* Vshader: mark attributes used
-               Pshader: mark 3.0 input registers used, save token */
-            if (WINED3DSPR_INPUT == regtype) {
-
-                if (!pshader)
-                    reg_maps->attributes[regnum] = 1;
-                else
-                    reg_maps->packed_input[regnum] = 1;
-
-                semantics_in[regnum].usage = usage;
-                semantics_in[regnum].reg = param;
-
-            /* Vshader: mark 3.0 output registers used, save token */
-            } else if (WINED3DSPR_OUTPUT == regtype) {
-                reg_maps->packed_output[regnum] = 1;
-                semantics_out[regnum].usage = usage;
-                semantics_out[regnum].reg = param;
-                if (usage & (WINED3DDECLUSAGE_FOG << WINED3DSP_DCL_USAGE_SHIFT))
-                    reg_maps->fog = 1;
-
-            /* Save sampler usage token */
-            } else if (WINED3DSPR_SAMPLER == regtype)
-                reg_maps->samplers[regnum] = usage;
-
-        } else if (WINED3DSIO_DEF == curOpcode->opcode) {
+        if (ins.handler_idx == WINED3DSIH_DCL)
+        {
+            struct wined3d_shader_semantic semantic;
+
+            fe->shader_read_semantic(&pToken, &semantic);
+
+            switch (semantic.reg.reg.type)
+            {
+                /* Vshader: mark attributes used
+                 * Pshader: mark 3.0 input registers used, save token */
+                case WINED3DSPR_INPUT:
+                    if (!pshader) reg_maps->attributes[semantic.reg.reg.idx] = 1;
+                    else reg_maps->packed_input[semantic.reg.reg.idx] = 1;
+                    semantics_in[semantic.reg.reg.idx] = semantic;
+                    break;
+
+                /* Vshader: mark 3.0 output registers used, save token */
+                case WINED3DSPR_OUTPUT:
+                    reg_maps->packed_output[semantic.reg.reg.idx] = 1;
+                    semantics_out[semantic.reg.reg.idx] = semantic;
+                    if (semantic.usage == WINED3DDECLUSAGE_FOG) reg_maps->fog = 1;
+                    break;
+
+                /* Save sampler usage token */
+                case WINED3DSPR_SAMPLER:
+                    reg_maps->sampler_type[semantic.reg.reg.idx] = semantic.sampler_type;
+                    break;
+
+                default:
+                    TRACE("Not recording DCL register type %#x.\n", semantic.reg.reg.type);
+                    break;
+            }
+        }
+        else if (ins.handler_idx == WINED3DSIH_DEF)
+        {
+            struct wined3d_shader_dst_param dst;
+            struct wined3d_shader_src_param rel_addr;
 
             local_constant* lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant));
             if (!lconst) return E_OUTOFMEMORY;
-            lconst->idx = *pToken & WINED3DSP_REGNUM_MASK;
-            memcpy(lconst->value, pToken + 1, 4 * sizeof(DWORD));
+
+            fe->shader_read_dst_param(fe_data, &pToken, &dst, &rel_addr);
+            lconst->idx = dst.reg.idx;
+
+            memcpy(lconst->value, pToken, 4 * sizeof(DWORD));
+            pToken += 4;
 
             /* In pixel shader 1.X shaders, the constants are clamped between [-1;1] */
-            if(WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1 && pshader) {
+            if (shader_version.major == 1 && pshader)
+            {
                 float *value = (float *) lconst->value;
                 if(value[0] < -1.0) value[0] = -1.0;
@@ -312,185 +471,179 @@
 
             list_add_head(&This->baseShader.constantsF, &lconst->entry);
-            pToken += curOpcode->num_params;
-
-        } else if (WINED3DSIO_DEFI == curOpcode->opcode) {
+        }
+        else if (ins.handler_idx == WINED3DSIH_DEFI)
+        {
+            struct wined3d_shader_dst_param dst;
+            struct wined3d_shader_src_param rel_addr;
 
             local_constant* lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant));
             if (!lconst) return E_OUTOFMEMORY;
-            lconst->idx = *pToken & WINED3DSP_REGNUM_MASK;
-            memcpy(lconst->value, pToken + 1, 4 * sizeof(DWORD));
+
+            fe->shader_read_dst_param(fe_data, &pToken, &dst, &rel_addr);
+            lconst->idx = dst.reg.idx;
+
+            memcpy(lconst->value, pToken, 4 * sizeof(DWORD));
+            pToken += 4;
+
             list_add_head(&This->baseShader.constantsI, &lconst->entry);
-            pToken += curOpcode->num_params;
-
-        } else if (WINED3DSIO_DEFB == curOpcode->opcode) {
+        }
+        else if (ins.handler_idx == WINED3DSIH_DEFB)
+        {
+            struct wined3d_shader_dst_param dst;
+            struct wined3d_shader_src_param rel_addr;
 
             local_constant* lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant));
             if (!lconst) return E_OUTOFMEMORY;
-            lconst->idx = *pToken & WINED3DSP_REGNUM_MASK;
-            memcpy(lconst->value, pToken + 1, 1 * sizeof(DWORD));
+
+            fe->shader_read_dst_param(fe_data, &pToken, &dst, &rel_addr);
+            lconst->idx = dst.reg.idx;
+
+            memcpy(lconst->value, pToken, sizeof(DWORD));
+            ++pToken;
+
             list_add_head(&This->baseShader.constantsB, &lconst->entry);
-            pToken += curOpcode->num_params;
-
+        }
         /* If there's a loop in the shader */
-        } else if (WINED3DSIO_LOOP == curOpcode->opcode ||
-                   WINED3DSIO_REP == curOpcode->opcode) {
+        else if (ins.handler_idx == WINED3DSIH_LOOP
+                || ins.handler_idx == WINED3DSIH_REP)
+        {
+            struct wined3d_shader_src_param src, rel_addr;
+
+            fe->shader_read_src_param(fe_data, &pToken, &src, &rel_addr);
+
+            /* Rep and Loop always use an integer constant for the control parameters */
+            if (ins.handler_idx == WINED3DSIH_REP)
+            {
+                reg_maps->integer_constants |= 1 << src.reg.idx;
+            }
+            else
+            {
+                fe->shader_read_src_param(fe_data, &pToken, &src, &rel_addr);
+                reg_maps->integer_constants |= 1 << src.reg.idx;
+            }
+
             cur_loop_depth++;
             if(cur_loop_depth > max_loop_depth)
                 max_loop_depth = cur_loop_depth;
-            pToken += curOpcode->num_params;
-
-        } else if (WINED3DSIO_ENDLOOP == curOpcode->opcode ||
-                   WINED3DSIO_ENDREP == curOpcode->opcode) {
+        }
+        else if (ins.handler_idx == WINED3DSIH_ENDLOOP
+                || ins.handler_idx == WINED3DSIH_ENDREP)
+        {
             cur_loop_depth--;
-
+        }
         /* For subroutine prototypes */
-        } else if (WINED3DSIO_LABEL == curOpcode->opcode) {
-
-            DWORD snum = *pToken & WINED3DSP_REGNUM_MASK; 
-            reg_maps->labels[snum] = 1;
-            pToken += curOpcode->num_params;
-
+        else if (ins.handler_idx == WINED3DSIH_LABEL)
+        {
+            struct wined3d_shader_src_param src, rel_addr;
+
+            fe->shader_read_src_param(fe_data, &pToken, &src, &rel_addr);
+            reg_maps->labels[src.reg.idx] = 1;
+        }
         /* Set texture, address, temporary registers */
-        } else {
+        else
+        {
             int i, limit;
 
-            /* Declare 1.X samplers implicitly, based on the destination reg. number */
-            if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1 &&
-                pshader /* Filter different instructions with the same enum values in VS */ &&
-                (WINED3DSIO_TEX == curOpcode->opcode ||
-                 WINED3DSIO_TEXBEM == curOpcode->opcode ||
-                 WINED3DSIO_TEXBEML == curOpcode->opcode ||
-                 WINED3DSIO_TEXDP3TEX == curOpcode->opcode ||
-                 WINED3DSIO_TEXM3x2TEX == curOpcode->opcode ||
-                 WINED3DSIO_TEXM3x3SPEC == curOpcode->opcode ||
-                 WINED3DSIO_TEXM3x3TEX == curOpcode->opcode ||
-                 WINED3DSIO_TEXM3x3VSPEC == curOpcode->opcode ||
-                 WINED3DSIO_TEXREG2AR == curOpcode->opcode ||
-                 WINED3DSIO_TEXREG2GB == curOpcode->opcode ||
-                 WINED3DSIO_TEXREG2RGB == curOpcode->opcode)) {
-
-                /* Fake sampler usage, only set reserved bit and ttype */
-                DWORD sampler_code = *pToken & WINED3DSP_REGNUM_MASK;
-
-                if(!stateBlock->textures[sampler_code]) {
-                    ERR("No texture bound to sampler %d\n", sampler_code);
-                    reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_2D;
-                } else {
-                    int texType = IWineD3DBaseTexture_GetTextureDimensions(stateBlock->textures[sampler_code]);
-                    switch(texType) {
-                        /* We have to select between texture rectangles and 2D textures later because 2.0 and
-                         * 3.0 shaders only have WINED3DSTT_2D as well
-                         */
-                        case GL_TEXTURE_RECTANGLE_ARB:
-                        case GL_TEXTURE_2D:
-                            reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_2D;
-                            break;
-
-                        case GL_TEXTURE_3D:
-                            reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_VOLUME;
-                            break;
-
-                        case GL_TEXTURE_CUBE_MAP_ARB:
-                            reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_CUBE;
-                            break;
-
-                        default:
-                            ERR("Unexpected gl texture type found: %d\n", texType);
-                            reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_2D;
-                    }
+            /* This will loop over all the registers and try to
+             * make a bitmask of the ones we're interested in.
+             *
+             * Relative addressing tokens are ignored, but that's
+             * okay, since we'll catch any address registers when
+             * they are initialized (required by spec) */
+
+            if (ins.dst_count)
+            {
+                struct wined3d_shader_dst_param dst_param;
+                struct wined3d_shader_src_param dst_rel_addr;
+
+                fe->shader_read_dst_param(fe_data, &pToken, &dst_param, &dst_rel_addr);
+
+                /* WINED3DSPR_TEXCRDOUT is the same as WINED3DSPR_OUTPUT. _OUTPUT can be > MAX_REG_TEXCRD and
+                 * is used in >= 3.0 shaders. Filter 3.0 shaders to prevent overflows, and also filter pixel
+                 * shaders because TECRDOUT isn't used in them, but future register types might cause issues */
+                if (!pshader && shader_version.major < 3 && dst_param.reg.type == WINED3DSPR_TEXCRDOUT)
+                {
+                    reg_maps->texcoord_mask[dst_param.reg.type] |= dst_param.write_mask;
                 }
-
-                /* texbem is only valid with < 1.4 pixel shaders */
-                if(WINED3DSIO_TEXBEM  == curOpcode->opcode ||
-                    WINED3DSIO_TEXBEML == curOpcode->opcode) {
-                    reg_maps->bumpmat[sampler_code] = TRUE;
-                    if(WINED3DSIO_TEXBEML == curOpcode->opcode) {
-                        reg_maps->luminanceparams[sampler_code] = TRUE;
-                    }
+                else
+                {
+                    shader_record_register_usage(This, reg_maps, dst_param.reg.type,
+                            dst_param.reg.idx, !!dst_param.reg.rel_addr, pshader);
                 }
-            }
-            if(WINED3DSIO_NRM  == curOpcode->opcode) {
-                reg_maps->usesnrm = 1;
-            } else if(WINED3DSIO_BEM == curOpcode->opcode && pshader) {
-                DWORD regnum = *pToken & WINED3DSP_REGNUM_MASK;
-                reg_maps->bumpmat[regnum] = TRUE;
-            } else if(WINED3DSIO_DSY  == curOpcode->opcode) {
-                reg_maps->usesdsy = 1;
-            }
-
-            /* This will loop over all the registers and try to
-             * make a bitmask of the ones we're interested in. 
-             *
-             * Relative addressing tokens are ignored, but that's 
-             * okay, since we'll catch any address registers when 
-             * they are initialized (required by spec) */
-
-            limit = (opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED)?
-                curOpcode->num_params + 1: curOpcode->num_params;
-
-            for (i = 0; i < limit; ++i) {
-
-                DWORD param, addr_token, reg, regtype;
-                pToken += shader_get_param(iface, pToken, &param, &addr_token);
-
-                regtype = shader_get_regtype(param);
-                reg = param & WINED3DSP_REGNUM_MASK;
-
-                if (WINED3DSPR_TEXTURE == regtype) { /* vs: WINED3DSPR_ADDR */
-
-                    if (pshader)
-                        reg_maps->texcoord[reg] = 1;
-                    else
-                        reg_maps->address[reg] = 1;
-                }
-
-                else if (WINED3DSPR_TEMP == regtype)
-                    reg_maps->temporary[reg] = 1;
-
-                else if (WINED3DSPR_INPUT == regtype) {
-                    if( !pshader)
-                        reg_maps->attributes[reg] = 1;
-                    else {
-                        if(param & WINED3DSHADER_ADDRMODE_RELATIVE) {
-                            /* If relative addressing is used, we must assume that all registers
-                             * are used. Even if it is a construct like v3[aL], we can't assume
-                             * that v0, v1 and v2 aren't read because aL can be negative
-                             */
-                            unsigned int i;
-                            for(i = 0; i < MAX_REG_INPUT; i++) {
-                                ((IWineD3DPixelShaderImpl *) This)->input_reg_used[i] = TRUE;
-                            }
-                        } else {
-                            ((IWineD3DPixelShaderImpl *) This)->input_reg_used[reg] = TRUE;
+
+                /* Declare 1.X samplers implicitly, based on the destination reg. number */
+                if (shader_version.major == 1
+                        && pshader /* Filter different instructions with the same enum values in VS */
+                        && (ins.handler_idx == WINED3DSIH_TEX
+                            || ins.handler_idx == WINED3DSIH_TEXBEM
+                            || ins.handler_idx == WINED3DSIH_TEXBEML
+                            || ins.handler_idx == WINED3DSIH_TEXDP3TEX
+                            || ins.handler_idx == WINED3DSIH_TEXM3x2TEX
+                            || ins.handler_idx == WINED3DSIH_TEXM3x3SPEC
+                            || ins.handler_idx == WINED3DSIH_TEXM3x3TEX
+                            || ins.handler_idx == WINED3DSIH_TEXM3x3VSPEC
+                            || ins.handler_idx == WINED3DSIH_TEXREG2AR
+                            || ins.handler_idx == WINED3DSIH_TEXREG2GB
+                            || ins.handler_idx == WINED3DSIH_TEXREG2RGB))
+                {
+                    /* Fake sampler usage, only set reserved bit and ttype */
+                    DWORD sampler_code = dst_param.reg.idx;
+
+                    TRACE("Setting fake 2D sampler for 1.x pixelshader\n");
+                    reg_maps->sampler_type[sampler_code] = WINED3DSTT_2D;
+
+                    /* texbem is only valid with < 1.4 pixel shaders */
+                    if (ins.handler_idx == WINED3DSIH_TEXBEM
+                            || ins.handler_idx == WINED3DSIH_TEXBEML)
+                    {
+                        reg_maps->bumpmat[sampler_code] = TRUE;
+                        if (ins.handler_idx == WINED3DSIH_TEXBEML)
+                        {
+                            reg_maps->luminanceparams[sampler_code] = TRUE;
                         }
                     }
                 }
-
-                else if (WINED3DSPR_RASTOUT == regtype && reg == 1)
-                    reg_maps->fog = 1;
-
-                else if (WINED3DSPR_MISCTYPE == regtype && reg == 0 && pshader)
-                    reg_maps->vpos = 1;
-
-                else if(WINED3DSPR_CONST == regtype) {
-                    if(param & WINED3DSHADER_ADDRMODE_RELATIVE) {
-                        if(!pshader) {
-                            if(reg <= ((IWineD3DVertexShaderImpl *) This)->min_rel_offset) {
-                                ((IWineD3DVertexShaderImpl *) This)->min_rel_offset = reg;
-                            } else if(reg >= ((IWineD3DVertexShaderImpl *) This)->max_rel_offset) {
-                                ((IWineD3DVertexShaderImpl *) This)->max_rel_offset = reg;
-                            }
-                        }
-                        reg_maps->usesrelconstF = TRUE;
-                    }
+                else if (pshader && ins.handler_idx == WINED3DSIH_BEM)
+                {
+                    reg_maps->bumpmat[dst_param.reg.idx] = TRUE;
                 }
-
-                /* WINED3DSPR_TEXCRDOUT is the same as WINED3DSPR_OUTPUT. _OUTPUT can be > MAX_REG_TEXCRD and is used
-                 * in >= 3.0 shaders. Filter 3.0 shaders to prevent overflows, and also filter pixel shaders because TECRDOUT
-                 * isn't used in them, but future register types might cause issues
-                 */
-                else if(WINED3DSPR_TEXCRDOUT == regtype && i == 0 /* Only look at writes */ &&
-                        !pshader && WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) < 3) {
-                    reg_maps->texcoord_mask[reg] |= shader_get_writemask(param);
+            }
+
+            if (ins.handler_idx == WINED3DSIH_NRM)
+            {
+                reg_maps->usesnrm = 1;
+            }
+            else if (ins.handler_idx == WINED3DSIH_DSY)
+            {
+                reg_maps->usesdsy = 1;
+            }
+            else if(ins.handler_idx == WINED3DSIH_TEXLDD)
+            {
+                reg_maps->usestexldd = 1;
+            }
+
+            limit = ins.src_count + (ins.predicate ? 1 : 0);
+            for (i = 0; i < limit; ++i)
+            {
+                struct wined3d_shader_src_param src_param, src_rel_addr;
+
+                fe->shader_read_src_param(fe_data, &pToken, &src_param, &src_rel_addr);
+                switch(get_instr_regcount(ins.handler_idx, i))
+                {
+                    case 4:
+                        shader_record_register_usage(This, reg_maps, src_param.reg.type,
+                                src_param.reg.idx + 3, !!src_param.reg.rel_addr, pshader);
+                        /* drop through */
+                    case 3:
+                        shader_record_register_usage(This, reg_maps, src_param.reg.type,
+                                src_param.reg.idx + 2, !!src_param.reg.rel_addr, pshader);
+                        /* drop through */
+                    case 2:
+                        shader_record_register_usage(This, reg_maps, src_param.reg.type,
+                                src_param.reg.idx + 1, !!src_param.reg.rel_addr, pshader);
+                        /* drop through */
+                    case 1:
+                        shader_record_register_usage(This, reg_maps, src_param.reg.type,
+                                src_param.reg.idx, !!src_param.reg.rel_addr, pshader);
                 }
             }
@@ -499,151 +652,101 @@
     reg_maps->loop_depth = max_loop_depth;
 
+    This->baseShader.functionLength = ((char *)pToken - (char *)byte_code);
+
     return WINED3D_OK;
 }
 
-static void shader_dump_decl_usage(DWORD decl, DWORD param, DWORD shader_version)
-{
-    DWORD regtype = shader_get_regtype(param);
-
+static void shader_dump_decl_usage(const struct wined3d_shader_semantic *semantic,
+        const struct wined3d_shader_version *shader_version)
+{
     TRACE("dcl");
 
-    if (regtype == WINED3DSPR_SAMPLER) {
-        DWORD ttype = decl & WINED3DSP_TEXTURETYPE_MASK;
-
-        switch (ttype) {
+    if (semantic->reg.reg.type == WINED3DSPR_SAMPLER)
+    {
+        switch (semantic->sampler_type)
+        {
             case WINED3DSTT_2D: TRACE("_2d"); break;
             case WINED3DSTT_CUBE: TRACE("_cube"); break;
             case WINED3DSTT_VOLUME: TRACE("_volume"); break;
-            default: TRACE("_unknown_ttype(0x%08x)", ttype);
-       }
-
-    } else { 
-
-        DWORD usage = decl & WINED3DSP_DCL_USAGE_MASK;
-        DWORD idx = (decl & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-
+            default: TRACE("_unknown_ttype(0x%08x)", semantic->sampler_type);
+        }
+    }
+    else
+    {
         /* Pixel shaders 3.0 don't have usage semantics */
-        if (shader_is_pshader_version(shader_version) && shader_version < WINED3DPS_VERSION(3,0))
+        if (shader_is_pshader_version(shader_version->type) && shader_version->major < 3)
             return;
         else
             TRACE("_");
 
-        switch(usage) {
-        case WINED3DDECLUSAGE_POSITION:
-            TRACE("position%d", idx);
-            break;
-        case WINED3DDECLUSAGE_BLENDINDICES:
-            TRACE("blend");
-            break;
-        case WINED3DDECLUSAGE_BLENDWEIGHT:
-            TRACE("weight");
-            break;
-        case WINED3DDECLUSAGE_NORMAL:
-            TRACE("normal%d", idx);
-            break;
-        case WINED3DDECLUSAGE_PSIZE:
-            TRACE("psize");
-            break;
-        case WINED3DDECLUSAGE_COLOR:
-            if(idx == 0)  {
-                TRACE("color");
-            } else {
-                TRACE("specular%d", (idx - 1));
-            }
-            break;
-        case WINED3DDECLUSAGE_TEXCOORD:
-            TRACE("texture%d", idx);
-            break;
-        case WINED3DDECLUSAGE_TANGENT:
-            TRACE("tangent");
-            break;
-        case WINED3DDECLUSAGE_BINORMAL:
-            TRACE("binormal");
-            break;
-        case WINED3DDECLUSAGE_TESSFACTOR:
-            TRACE("tessfactor");
-            break;
-        case WINED3DDECLUSAGE_POSITIONT:
-            TRACE("positionT%d", idx);
-            break;
-        case WINED3DDECLUSAGE_FOG:
-            TRACE("fog");
-            break;
-        case WINED3DDECLUSAGE_DEPTH:
-            TRACE("depth");
-            break;
-        case WINED3DDECLUSAGE_SAMPLE:
-            TRACE("sample");
-            break;
-        default:
-            FIXME("unknown_semantics(0x%08x)", usage);
-        }
-    }
-}
-
-static void shader_dump_arr_entry(const DWORD param, const DWORD addr_token,
-        unsigned int reg, int input, DWORD shader_version)
-{
-    char relative =
-        ((param & WINED3DSHADER_ADDRESSMODE_MASK) == WINED3DSHADER_ADDRMODE_RELATIVE);
-
-    if (relative) {
-        TRACE("[");
-        if (addr_token)
-            shader_dump_param(addr_token, 0, input, shader_version);
-        else
-            TRACE("a0.x");
-        TRACE(" + ");
-     }
-     TRACE("%u", reg);
-     if (relative)
-         TRACE("]");
-}
-
-static void shader_dump_param(const DWORD param, const DWORD addr_token, int input, DWORD shader_version)
-{
-    static const char * const rastout_reg_names[] = { "oPos", "oFog", "oPts" };
-    static const char * const misctype_reg_names[] = { "vPos", "vFace"};
-    char swizzle_reg_chars[4];
-
-    DWORD reg = param & WINED3DSP_REGNUM_MASK;
-    DWORD regtype = shader_get_regtype(param);
-    DWORD modifier = param & WINED3DSP_SRCMOD_MASK;
-
-    /* There are some minor differences between pixel and vertex shaders */
-    char pshader = shader_is_pshader_version(shader_version);
-
-    /* For one, we'd prefer color components to be shown for pshaders.
-     * FIXME: use the swizzle function for this */
-
-    swizzle_reg_chars[0] = pshader? 'r': 'x';
-    swizzle_reg_chars[1] = pshader? 'g': 'y';
-    swizzle_reg_chars[2] = pshader? 'b': 'z';
-    swizzle_reg_chars[3] = pshader? 'a': 'w';
-
-    if (input) {
-        if ( (modifier == WINED3DSPSM_NEG) ||
-             (modifier == WINED3DSPSM_BIASNEG) ||
-             (modifier == WINED3DSPSM_SIGNNEG) ||
-             (modifier == WINED3DSPSM_X2NEG) ||
-             (modifier == WINED3DSPSM_ABSNEG) )
-            TRACE("-");
-        else if (modifier == WINED3DSPSM_COMP)
-            TRACE("1-");
-        else if (modifier == WINED3DSPSM_NOT)
-            TRACE("!");
-
-        if (modifier == WINED3DSPSM_ABS || modifier == WINED3DSPSM_ABSNEG) 
-            TRACE("abs(");
-    }
-
-    switch (regtype) {
+        switch (semantic->usage)
+        {
+            case WINED3DDECLUSAGE_POSITION:
+                TRACE("position%d", semantic->usage_idx);
+                break;
+            case WINED3DDECLUSAGE_BLENDINDICES:
+                TRACE("blend");
+                break;
+            case WINED3DDECLUSAGE_BLENDWEIGHT:
+                TRACE("weight");
+                break;
+            case WINED3DDECLUSAGE_NORMAL:
+                TRACE("normal%d", semantic->usage_idx);
+                break;
+            case WINED3DDECLUSAGE_PSIZE:
+                TRACE("psize");
+                break;
+            case WINED3DDECLUSAGE_COLOR:
+                if (semantic->usage_idx == 0) TRACE("color");
+                else TRACE("specular%d", (semantic->usage_idx - 1));
+                break;
+            case WINED3DDECLUSAGE_TEXCOORD:
+                TRACE("texture%d", semantic->usage_idx);
+                break;
+            case WINED3DDECLUSAGE_TANGENT:
+                TRACE("tangent");
+                break;
+            case WINED3DDECLUSAGE_BINORMAL:
+                TRACE("binormal");
+                break;
+            case WINED3DDECLUSAGE_TESSFACTOR:
+                TRACE("tessfactor");
+                break;
+            case WINED3DDECLUSAGE_POSITIONT:
+                TRACE("positionT%d", semantic->usage_idx);
+                break;
+            case WINED3DDECLUSAGE_FOG:
+                TRACE("fog");
+                break;
+            case WINED3DDECLUSAGE_DEPTH:
+                TRACE("depth");
+                break;
+            case WINED3DDECLUSAGE_SAMPLE:
+                TRACE("sample");
+                break;
+            default:
+                FIXME("unknown_semantics(0x%08x)", semantic->usage);
+        }
+    }
+}
+
+static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type, UINT register_idx,
+        enum wined3d_immconst_type immconst_type, const DWORD *immconst_data,
+        const struct wined3d_shader_src_param *rel_addr, const struct wined3d_shader_version *shader_version)
+{
+    static const char * const rastout_reg_names[] = {"oPos", "oFog", "oPts"};
+    static const char * const misctype_reg_names[] = {"vPos", "vFace"};
+    UINT offset = register_idx;
+
+    switch (register_type)
+    {
         case WINED3DSPR_TEMP:
-            TRACE("r%u", reg);
-            break;
+            TRACE("r");
+            break;
+
         case WINED3DSPR_INPUT:
             TRACE("v");
-            shader_dump_arr_entry(param, addr_token, reg, input, shader_version);
-            break;
+            break;
+
         case WINED3DSPR_CONST:
         case WINED3DSPR_CONST2:
@@ -651,312 +754,296 @@
         case WINED3DSPR_CONST4:
             TRACE("c");
-            shader_dump_arr_entry(param, addr_token, shader_get_float_offset(param), input, shader_version);
-            break;
-        case WINED3DSPR_TEXTURE: /* vs: case D3DSPR_ADDR */
-            TRACE("%c%u", (pshader? 't':'a'), reg);
-            break;        
+            offset = shader_get_float_offset(register_type, register_idx);
+            break;
+
+        case WINED3DSPR_TEXTURE: /* vs: case WINED3DSPR_ADDR */
+            TRACE("%c", shader_is_pshader_version(shader_version->type) ? 't' : 'a');
+            break;
+
         case WINED3DSPR_RASTOUT:
-            TRACE("%s", rastout_reg_names[reg]);
-            break;
+            TRACE("%s", rastout_reg_names[register_idx]);
+            break;
+
         case WINED3DSPR_COLOROUT:
-            TRACE("oC%u", reg);
-            break;
+            TRACE("oC");
+            break;
+
         case WINED3DSPR_DEPTHOUT:
             TRACE("oDepth");
             break;
+
         case WINED3DSPR_ATTROUT:
-            TRACE("oD%u", reg);
-            break;
-        case WINED3DSPR_TEXCRDOUT: 
-
+            TRACE("oD");
+            break;
+
+        case WINED3DSPR_TEXCRDOUT:
             /* Vertex shaders >= 3.0 use general purpose output registers
              * (WINED3DSPR_OUTPUT), which can include an address token */
-
-            if (WINED3DSHADER_VERSION_MAJOR(shader_version) >= 3) {
-                TRACE("o");
-                shader_dump_arr_entry(param, addr_token, reg, input, shader_version);
-            }
-            else 
-               TRACE("oT%u", reg);
-            break;
+            if (shader_version->major >= 3) TRACE("o");
+            else TRACE("oT");
+            break;
+
         case WINED3DSPR_CONSTINT:
             TRACE("i");
-            shader_dump_arr_entry(param, addr_token, reg, input, shader_version);
-            break;
+            break;
+
         case WINED3DSPR_CONSTBOOL:
             TRACE("b");
-            shader_dump_arr_entry(param, addr_token, reg, input, shader_version);
-            break;
+            break;
+
         case WINED3DSPR_LABEL:
-            TRACE("l%u", reg);
-            break;
+            TRACE("l");
+            break;
+
         case WINED3DSPR_LOOP:
             TRACE("aL");
             break;
+
         case WINED3DSPR_SAMPLER:
-            TRACE("s%u", reg);
-            break;
+            TRACE("s");
+            break;
+
         case WINED3DSPR_MISCTYPE:
-            if (reg > 1) {
-                FIXME("Unhandled misctype register %d\n", reg);
-            } else {
-                TRACE("%s", misctype_reg_names[reg]);
-            }
-            break;
+            if (register_idx > 1) FIXME("Unhandled misctype register %d\n", register_idx);
+            else TRACE("%s", misctype_reg_names[register_idx]);
+            break;
+
         case WINED3DSPR_PREDICATE:
-            TRACE("p%u", reg);
-            break;
+            TRACE("p");
+            break;
+
+        case WINED3DSPR_IMMCONST:
+            TRACE("l");
+            break;
+
         default:
-            TRACE("unhandled_rtype(%#x)", regtype);
-            break;
-   }
-
-   if (!input) {
-       /* operand output (for modifiers and shift, see dump_ins_modifiers) */
-
-       if ((param & WINED3DSP_WRITEMASK_ALL) != WINED3DSP_WRITEMASK_ALL) {
-           TRACE(".");
-           if (param & WINED3DSP_WRITEMASK_0) TRACE("%c", swizzle_reg_chars[0]);
-           if (param & WINED3DSP_WRITEMASK_1) TRACE("%c", swizzle_reg_chars[1]);
-           if (param & WINED3DSP_WRITEMASK_2) TRACE("%c", swizzle_reg_chars[2]);
-           if (param & WINED3DSP_WRITEMASK_3) TRACE("%c", swizzle_reg_chars[3]);
-       }
-
-   } else {
-        /** operand input */
-        DWORD swizzle = (param & WINED3DSP_SWIZZLE_MASK) >> WINED3DSP_SWIZZLE_SHIFT;
-        DWORD swizzle_r = swizzle & 0x03;
-        DWORD swizzle_g = (swizzle >> 2) & 0x03;
-        DWORD swizzle_b = (swizzle >> 4) & 0x03;
-        DWORD swizzle_a = (swizzle >> 6) & 0x03;
-
-        if (0 != modifier) {
-            switch (modifier) {
-                case WINED3DSPSM_NONE:    break;
-                case WINED3DSPSM_NEG:     break;
-                case WINED3DSPSM_NOT:     break;
-                case WINED3DSPSM_BIAS:    TRACE("_bias"); break;
-                case WINED3DSPSM_BIASNEG: TRACE("_bias"); break;
-                case WINED3DSPSM_SIGN:    TRACE("_bx2"); break;
-                case WINED3DSPSM_SIGNNEG: TRACE("_bx2"); break;
-                case WINED3DSPSM_COMP:    break;
-                case WINED3DSPSM_X2:      TRACE("_x2"); break;
-                case WINED3DSPSM_X2NEG:   TRACE("_x2"); break;
-                case WINED3DSPSM_DZ:      TRACE("_dz"); break;
-                case WINED3DSPSM_DW:      TRACE("_dw"); break;
-                case WINED3DSPSM_ABSNEG:  TRACE(")"); break;
-                case WINED3DSPSM_ABS:     TRACE(")"); break;
-                default:
-                    TRACE("_unknown_modifier(%#x)", modifier >> WINED3DSP_SRCMOD_SHIFT);
-            }
-        }
-
-        /**
-        * swizzle bits fields:
-        *  RRGGBBAA
-        */
-        if ((WINED3DVS_NOSWIZZLE >> WINED3DVS_SWIZZLE_SHIFT) != swizzle) {
-            if (swizzle_r == swizzle_g &&
-                swizzle_r == swizzle_b &&
-                swizzle_r == swizzle_a) {
-                    TRACE(".%c", swizzle_reg_chars[swizzle_r]);
-            } else {
-                TRACE(".%c%c%c%c",
-                swizzle_reg_chars[swizzle_r],
-                swizzle_reg_chars[swizzle_g],
-                swizzle_reg_chars[swizzle_b],
-                swizzle_reg_chars[swizzle_a]);
-            }
-        }
-    }
-}
-
-static void shader_color_correction(IWineD3DBaseShaderImpl *shader,
-        IWineD3DDeviceImpl *device, const struct SHADER_OPCODE_ARG *arg)
-{
-    DWORD hex_version = shader->baseShader.hex_version;
-    IWineD3DBaseTextureImpl *texture;
-    struct color_fixup_desc fixup;
-    BOOL recorded = FALSE;
-    DWORD sampler_idx;
-    UINT i;
-
-    switch(arg->opcode->opcode)
-    {
-        case WINED3DSIO_TEX:
-            if (hex_version < WINED3DPS_VERSION(2,0)) sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
-            else sampler_idx = arg->src[1] & WINED3DSP_REGNUM_MASK;
-            break;
-
-        case WINED3DSIO_TEXLDL:
-            FIXME("Add color fixup for vertex texture WINED3DSIO_TEXLDL\n");
-            return;
-
-        case WINED3DSIO_TEXDP3TEX:
-        case WINED3DSIO_TEXM3x3TEX:
-        case WINED3DSIO_TEXM3x3SPEC:
-        case WINED3DSIO_TEXM3x3VSPEC:
-        case WINED3DSIO_TEXBEM:
-        case WINED3DSIO_TEXREG2AR:
-        case WINED3DSIO_TEXREG2GB:
-        case WINED3DSIO_TEXREG2RGB:
-            sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
-            break;
-
-        default:
-            /* Not a texture sampling instruction, nothing to do */
-            return;
-    };
-
-    texture = (IWineD3DBaseTextureImpl *)device->stateBlock->textures[sampler_idx];
-    if (texture) fixup = texture->baseTexture.shader_color_fixup;
-    else fixup = COLOR_FIXUP_IDENTITY;
-
-    /* before doing anything, record the sampler with the format in the format conversion list,
-     * but check if it's not there already */
-    for (i = 0; i < shader->baseShader.num_sampled_samplers; ++i)
-    {
-        if (shader->baseShader.sampled_samplers[i] == sampler_idx)
-        {
-            recorded = TRUE;
-            break;
-        }
-    }
-
-    if (!recorded)
-    {
-        shader->baseShader.sampled_samplers[shader->baseShader.num_sampled_samplers] = sampler_idx;
-        ++shader->baseShader.num_sampled_samplers;
-    }
-
-    device->shader_backend->shader_color_correction(arg, fixup);
-}
-
-/** Shared code in order to generate the bulk of the shader string.
-    Use the shader_header_fct & shader_footer_fct to add strings
-    that are specific to pixel or vertex functions
-    NOTE: A description of how to parse tokens can be found on msdn */
-void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
-        const shader_reg_maps* reg_maps, CONST DWORD* pFunction)
+            TRACE("unhandled_rtype(%#x)", register_type);
+            break;
+    }
+
+    if (register_type == WINED3DSPR_IMMCONST)
+    {
+        TRACE("(");
+        switch (immconst_type)
+        {
+            case WINED3D_IMMCONST_FLOAT:
+                TRACE("%.8e", *(float *)immconst_data);
+                break;
+
+            case WINED3D_IMMCONST_FLOAT4:
+                TRACE("%.8e, %.8e, %.8e, %.8e",
+                        *(float *)&immconst_data[0], *(float *)&immconst_data[1],
+                        *(float *)&immconst_data[2], *(float *)&immconst_data[3]);
+                break;
+
+            default:
+                TRACE("<unhandled immconst_type %#x>", immconst_type);
+                break;
+        }
+        TRACE(")");
+    }
+    else if (register_type != WINED3DSPR_RASTOUT && register_type != WINED3DSPR_MISCTYPE)
+    {
+        if (rel_addr)
+        {
+            TRACE("[");
+            shader_dump_src_param(rel_addr, shader_version);
+            TRACE(" + ");
+        }
+        TRACE("%u", offset);
+        if (rel_addr) TRACE("]");
+    }
+}
+
+void shader_dump_dst_param(const struct wined3d_shader_dst_param *param,
+        const struct wined3d_shader_version *shader_version)
+{
+    DWORD write_mask = param->write_mask;
+
+    shader_dump_register(param->reg.type, param->reg.idx, 0, NULL, param->reg.rel_addr, shader_version);
+
+    if (write_mask != WINED3DSP_WRITEMASK_ALL)
+    {
+        static const char *write_mask_chars = "xyzw";
+
+        TRACE(".");
+        if (write_mask & WINED3DSP_WRITEMASK_0) TRACE("%c", write_mask_chars[0]);
+        if (write_mask & WINED3DSP_WRITEMASK_1) TRACE("%c", write_mask_chars[1]);
+        if (write_mask & WINED3DSP_WRITEMASK_2) TRACE("%c", write_mask_chars[2]);
+        if (write_mask & WINED3DSP_WRITEMASK_3) TRACE("%c", write_mask_chars[3]);
+    }
+}
+
+void shader_dump_src_param(const struct wined3d_shader_src_param *param,
+        const struct wined3d_shader_version *shader_version)
+{
+    DWORD src_modifier = param->modifiers;
+    DWORD swizzle = param->swizzle;
+
+    if (src_modifier == WINED3DSPSM_NEG
+            || src_modifier == WINED3DSPSM_BIASNEG
+            || src_modifier == WINED3DSPSM_SIGNNEG
+            || src_modifier == WINED3DSPSM_X2NEG
+            || src_modifier == WINED3DSPSM_ABSNEG)
+        TRACE("-");
+    else if (src_modifier == WINED3DSPSM_COMP)
+        TRACE("1-");
+    else if (src_modifier == WINED3DSPSM_NOT)
+        TRACE("!");
+
+    if (src_modifier == WINED3DSPSM_ABS || src_modifier == WINED3DSPSM_ABSNEG)
+        TRACE("abs(");
+
+    shader_dump_register(param->reg.type, param->reg.idx, param->reg.immconst_type,
+            param->reg.immconst_data, param->reg.rel_addr, shader_version);
+
+    if (src_modifier)
+    {
+        switch (src_modifier)
+        {
+            case WINED3DSPSM_NONE:    break;
+            case WINED3DSPSM_NEG:     break;
+            case WINED3DSPSM_NOT:     break;
+            case WINED3DSPSM_BIAS:    TRACE("_bias"); break;
+            case WINED3DSPSM_BIASNEG: TRACE("_bias"); break;
+            case WINED3DSPSM_SIGN:    TRACE("_bx2"); break;
+            case WINED3DSPSM_SIGNNEG: TRACE("_bx2"); break;
+            case WINED3DSPSM_COMP:    break;
+            case WINED3DSPSM_X2:      TRACE("_x2"); break;
+            case WINED3DSPSM_X2NEG:   TRACE("_x2"); break;
+            case WINED3DSPSM_DZ:      TRACE("_dz"); break;
+            case WINED3DSPSM_DW:      TRACE("_dw"); break;
+            case WINED3DSPSM_ABSNEG:  TRACE(")"); break;
+            case WINED3DSPSM_ABS:     TRACE(")"); break;
+            default:
+                                      TRACE("_unknown_modifier(%#x)", src_modifier);
+        }
+    }
+
+    if (swizzle != WINED3DSP_NOSWIZZLE)
+    {
+        static const char *swizzle_chars = "xyzw";
+        DWORD swizzle_x = swizzle & 0x03;
+        DWORD swizzle_y = (swizzle >> 2) & 0x03;
+        DWORD swizzle_z = (swizzle >> 4) & 0x03;
+        DWORD swizzle_w = (swizzle >> 6) & 0x03;
+
+        if (swizzle_x == swizzle_y
+                && swizzle_x == swizzle_z
+                && swizzle_x == swizzle_w)
+        {
+            TRACE(".%c", swizzle_chars[swizzle_x]);
+        }
+        else
+        {
+            TRACE(".%c%c%c%c", swizzle_chars[swizzle_x], swizzle_chars[swizzle_y],
+                    swizzle_chars[swizzle_z], swizzle_chars[swizzle_w]);
+        }
+    }
+}
+
+/* Shared code in order to generate the bulk of the shader string.
+ * NOTE: A description of how to parse tokens can be found on msdn */
+void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER *buffer,
+        const shader_reg_maps *reg_maps, const DWORD *pFunction)
 {
     IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
     IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device; /* To access shader backend callbacks */
-    const SHADER_OPCODE *opcode_table = This->baseShader.shader_ins;
     const SHADER_HANDLER *handler_table = device->shader_backend->shader_instruction_handler_table;
-    DWORD shader_version = This->baseShader.hex_version;
+    const struct wined3d_shader_frontend *fe = This->baseShader.frontend;
+    void *fe_data = This->baseShader.frontend_data;
+    struct wined3d_shader_src_param src_rel_addr[4];
+    struct wined3d_shader_src_param src_param[4];
+    struct wined3d_shader_version shader_version;
+    struct wined3d_shader_src_param dst_rel_addr;
+    struct wined3d_shader_dst_param dst_param;
+    struct wined3d_shader_instruction ins;
+    struct wined3d_shader_context ctx;
     const DWORD *pToken = pFunction;
-    const SHADER_OPCODE *curOpcode = NULL;
-    SHADER_HANDLER hw_fct = NULL;
+    SHADER_HANDLER hw_fct;
     DWORD i;
-    SHADER_OPCODE_ARG hw_arg;
 
     /* Initialize current parsing state */
-    hw_arg.shader = iface;
-    hw_arg.buffer = buffer;
-    hw_arg.reg_maps = reg_maps;
+    ctx.shader = iface;
+    ctx.reg_maps = reg_maps;
+    ctx.buffer = buffer;
+
+    ins.ctx = &ctx;
+    ins.dst = &dst_param;
+    ins.src = src_param;
     This->baseShader.parse_state.current_row = 0;
 
-    /* Second pass, process opcodes */
-    if (NULL != pToken) {
-        while (WINED3DPS_END() != *pToken) {
-
-            /* Skip version token */
-            if (shader_is_version_token(*pToken)) {
-                ++pToken;
-                continue;
-            }
-
-            /* Skip comment tokens */
-            if (shader_is_comment(*pToken)) {
-                DWORD comment_len = (*pToken & WINED3DSI_COMMENTSIZE_MASK) >> WINED3DSI_COMMENTSIZE_SHIFT;
-                ++pToken;
-                TRACE("#%s\n", (const char*)pToken);
-                pToken += comment_len;
-                continue;
-            }
-
-            /* Read opcode */
-            hw_arg.opcode_token = *pToken++;
-            curOpcode = shader_get_opcode(opcode_table, shader_version, hw_arg.opcode_token);
-
-            /* Select handler */
-            if (curOpcode == NULL)
-                hw_fct = NULL;
-            else
-                hw_fct = handler_table[curOpcode->handler_idx];
-
-            /* Unknown opcode and its parameters */
-            if (NULL == curOpcode) {
-                FIXME("Unrecognized opcode: token=0x%08x\n", hw_arg.opcode_token);
-                pToken += shader_skip_unrecognized(iface, pToken); 
-
-            /* Nothing to do */
-            } else if (WINED3DSIO_DCL == curOpcode->opcode ||
-                       WINED3DSIO_NOP == curOpcode->opcode ||
-                       WINED3DSIO_DEF == curOpcode->opcode ||
-                       WINED3DSIO_DEFI == curOpcode->opcode ||
-                       WINED3DSIO_DEFB == curOpcode->opcode ||
-                       WINED3DSIO_PHASE == curOpcode->opcode ||
-                       WINED3DSIO_RET == curOpcode->opcode) {
-
-                pToken += shader_skip_opcode(This, curOpcode, hw_arg.opcode_token);
-
-            /* If a generator function is set for current shader target, use it */
-            } else if (hw_fct != NULL) {
-
-                hw_arg.opcode = curOpcode;
-
-                /* Destination token */
-                if (curOpcode->dst_token) {
-
-                    DWORD param, addr_token = 0;
-                    pToken += shader_get_param(iface, pToken, &param, &addr_token);
-                    hw_arg.dst = param;
-                    hw_arg.dst_addr = addr_token;
-                }
-
-                /* Predication token */
-                if (hw_arg.opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED) 
-                    hw_arg.predicate = *pToken++;
-
-                /* Other source tokens */
-                for (i = 0; i < (curOpcode->num_params - curOpcode->dst_token); i++) {
-
-                    DWORD param, addr_token = 0; 
-                    pToken += shader_get_param(iface, pToken, &param, &addr_token);
-                    hw_arg.src[i] = param;
-                    hw_arg.src_addr[i] = addr_token;
-                }
-
-                /* Call appropriate function for output target */
-                hw_fct(&hw_arg);
-
-                /* Add color correction if needed */
-                shader_color_correction(This, device, &hw_arg);
-
-                /* Process instruction modifiers for GLSL apps ( _sat, etc. ) */
-                /* FIXME: This should be internal to the shader backend.
-                 * Also, right now this is the only reason "shader_mode" exists. */
-                if (This->baseShader.shader_mode == SHADER_GLSL)
-                    shader_glsl_add_instruction_modifiers(&hw_arg);
-
-            /* Unhandled opcode */
-            } else {
-
-                FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name);
-                pToken += shader_skip_opcode(This, curOpcode, hw_arg.opcode_token);
-            }
-        }
-        /* TODO: What about result.depth? */
-
-    }
-}
-
-static void shader_dump_ins_modifiers(const DWORD output)
-{
-    DWORD shift = (output & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
-    DWORD mmask = output & WINED3DSP_DSTMOD_MASK;
-
-    switch (shift) {
+    fe->shader_read_header(fe_data, &pToken, &shader_version);
+
+    while (!fe->shader_is_end(fe_data, &pToken))
+    {
+        const char *comment;
+        UINT param_size;
+
+        /* Skip comment tokens */
+        fe->shader_read_comment(&pToken, &comment);
+        if (comment) continue;
+
+        /* Read opcode */
+        fe->shader_read_opcode(fe_data, &pToken, &ins, &param_size);
+
+        /* Unknown opcode and its parameters */
+        if (ins.handler_idx == WINED3DSIH_TABLE_SIZE)
+        {
+            TRACE("Skipping unrecognized instruction.\n");
+            pToken += param_size;
+            continue;
+        }
+
+        /* Nothing to do */
+        if (ins.handler_idx == WINED3DSIH_DCL
+                || ins.handler_idx == WINED3DSIH_NOP
+                || ins.handler_idx == WINED3DSIH_DEF
+                || ins.handler_idx == WINED3DSIH_DEFI
+                || ins.handler_idx == WINED3DSIH_DEFB
+                || ins.handler_idx == WINED3DSIH_PHASE
+                || ins.handler_idx == WINED3DSIH_RET)
+        {
+            pToken += param_size;
+            continue;
+        }
+
+        /* Select handler */
+        hw_fct = handler_table[ins.handler_idx];
+
+        /* Unhandled opcode */
+        if (!hw_fct)
+        {
+            FIXME("Backend can't handle opcode %#x\n", ins.handler_idx);
+            pToken += param_size;
+            continue;
+        }
+
+        /* Destination token */
+        if (ins.dst_count) fe->shader_read_dst_param(fe_data, &pToken, &dst_param, &dst_rel_addr);
+
+        /* Predication token */
+        if (ins.predicate) ins.predicate = *pToken++;
+
+        /* Other source tokens */
+        for (i = 0; i < ins.src_count; ++i)
+        {
+            fe->shader_read_src_param(fe_data, &pToken, &src_param[i], &src_rel_addr[i]);
+        }
+
+        /* Call appropriate function for output target */
+        hw_fct(&ins);
+
+        /* Process instruction modifiers for GLSL apps ( _sat, etc. ) */
+        device->shader_backend->shader_add_instruction_modifiers(&ins);
+    }
+}
+
+static void shader_dump_ins_modifiers(const struct wined3d_shader_dst_param *dst)
+{
+    DWORD mmask = dst->modifiers;
+
+    switch (dst->shift)
+    {
         case 0: break;
         case 13: TRACE("_d8"); break;
@@ -966,5 +1053,5 @@
         case 2: TRACE("_x4"); break;
         case 3: TRACE("_x8"); break;
-        default: TRACE("_unhandled_shift(%d)", shift); break;
+        default: TRACE("_unhandled_shift(%d)", dst->shift); break;
     }
 
@@ -975,170 +1062,173 @@
     mmask &= ~(WINED3DSPDM_SATURATE | WINED3DSPDM_PARTIALPRECISION | WINED3DSPDM_MSAMPCENTROID);
     if (mmask)
-        FIXME("_unrecognized_modifier(%#x)", mmask >> WINED3DSP_DSTMOD_SHIFT);
-}
-
-/* First pass: trace shader, initialize length and version */
-void shader_trace_init(
-    IWineD3DBaseShader *iface,
-    const DWORD* pFunction) {
-
-    IWineD3DBaseShaderImpl *This =(IWineD3DBaseShaderImpl *)iface;
-
+        FIXME("_unrecognized_modifier(%#x)", mmask);
+}
+
+void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe_data, const DWORD *pFunction)
+{
+    struct wined3d_shader_version shader_version;
     const DWORD* pToken = pFunction;
-    const SHADER_OPCODE* curOpcode = NULL;
-    DWORD opcode_token;
-    unsigned int len = 0;
     DWORD i;
 
-    TRACE("(%p) : Parsing program\n", This);
-
-    if (NULL != pToken) {
-        while (WINED3DVS_END() != *pToken) {
-            if (shader_is_version_token(*pToken)) { /** version */
-                This->baseShader.hex_version = *pToken;
-                TRACE("%s_%u_%u\n", shader_is_pshader_version(This->baseShader.hex_version)? "ps": "vs",
-                    WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version),
-                    WINED3DSHADER_VERSION_MINOR(This->baseShader.hex_version));
-                ++pToken;
-                ++len;
-                continue;
-            }
-            if (shader_is_comment(*pToken)) { /** comment */
-                DWORD comment_len = (*pToken & WINED3DSI_COMMENTSIZE_MASK) >> WINED3DSI_COMMENTSIZE_SHIFT;
-                ++pToken;
-                TRACE("//%s\n", (const char*)pToken);
-                pToken += comment_len;
-                len += comment_len + 1;
-                continue;
-            }
-            opcode_token = *pToken++;
-            curOpcode = shader_get_opcode(This->baseShader.shader_ins, This->baseShader.hex_version, opcode_token);
-            len++;
-
-            if (NULL == curOpcode) {
-                int tokens_read;
-                FIXME("Unrecognized opcode: token=0x%08x\n", opcode_token);
-                tokens_read = shader_skip_unrecognized(iface, pToken);
-                pToken += tokens_read;
-                len += tokens_read;
-
-            } else {
-                if (curOpcode->opcode == WINED3DSIO_DCL) {
-
-                    DWORD usage = *pToken;
-                    DWORD param = *(pToken + 1);
-
-                    shader_dump_decl_usage(usage, param, This->baseShader.hex_version);
-                    shader_dump_ins_modifiers(param);
-                    TRACE(" ");
-                    shader_dump_param(param, 0, 0, This->baseShader.hex_version);
-                    pToken += 2;
-                    len += 2;
-
-                } else if (curOpcode->opcode == WINED3DSIO_DEF) {
-
-                        unsigned int offset = shader_get_float_offset(*pToken);
-
-                        TRACE("def c%u = %f, %f, %f, %f", offset,
-                            *(const float *)(pToken + 1),
-                            *(const float *)(pToken + 2),
-                            *(const float *)(pToken + 3),
-                            *(const float *)(pToken + 4));
-
-                        pToken += 5;
-                        len += 5;
-                } else if (curOpcode->opcode == WINED3DSIO_DEFI) {
-
-                        TRACE("defi i%u = %d, %d, %d, %d", *pToken & WINED3DSP_REGNUM_MASK,
-                            *(pToken + 1),
-                            *(pToken + 2),
-                            *(pToken + 3),
-                            *(pToken + 4));
-
-                        pToken += 5;
-                        len += 5;
-
-                } else if (curOpcode->opcode == WINED3DSIO_DEFB) {
-
-                        TRACE("defb b%u = %s", *pToken & WINED3DSP_REGNUM_MASK,
-                            *(pToken + 1)? "true": "false");
-
-                        pToken += 2;
-                        len += 2;
-
-                } else {
-
-                    DWORD param, addr_token;
-                    int tokens_read;
-
-                    /* Print out predication source token first - it follows
-                     * the destination token. */
-                    if (opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED) {
-                        TRACE("(");
-                        shader_dump_param(*(pToken + 2), 0, 1, This->baseShader.hex_version);
-                        TRACE(") ");
-                    }
-                    if (opcode_token & WINED3DSI_COISSUE) {
-                        /* PixWin marks instructions with the coissue flag with a '+' */
-                        TRACE("+");
-                    }
-
-                    TRACE("%s", curOpcode->name);
-
-                    if (curOpcode->opcode == WINED3DSIO_IFC ||
-                        curOpcode->opcode == WINED3DSIO_BREAKC) {
-
-                        DWORD op = (opcode_token & INST_CONTROLS_MASK) >> INST_CONTROLS_SHIFT;
-                        switch (op) {
-                            case COMPARISON_GT: TRACE("_gt"); break;
-                            case COMPARISON_EQ: TRACE("_eq"); break;
-                            case COMPARISON_GE: TRACE("_ge"); break;
-                            case COMPARISON_LT: TRACE("_lt"); break;
-                            case COMPARISON_NE: TRACE("_ne"); break;
-                            case COMPARISON_LE: TRACE("_le"); break;
-                            default:
-                                TRACE("_(%u)", op);
-                        }
-                    } else if (curOpcode->opcode == WINED3DSIO_TEX &&
-                               This->baseShader.hex_version >= WINED3DPS_VERSION(2,0)) {
-                        if(opcode_token & WINED3DSI_TEXLD_PROJECT) TRACE("p");
-                    }
-
-                    /* Destination token */
-                    if (curOpcode->dst_token) {
-
-                        /* Destination token */
-                        tokens_read = shader_get_param(iface, pToken, &param, &addr_token);
-                        pToken += tokens_read;
-                        len += tokens_read;
-
-                        shader_dump_ins_modifiers(param);
-                        TRACE(" ");
-                        shader_dump_param(param, addr_token, 0, This->baseShader.hex_version);
-                    }
-
-                    /* Predication token - already printed out, just skip it */
-                    if (opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED) {
-                        pToken++;
-                        len++;
-                    }
-
-                    /* Other source tokens */
-                    for (i = curOpcode->dst_token; i < curOpcode->num_params; ++i) {
-
-                        tokens_read = shader_get_param(iface, pToken, &param, &addr_token);
-                        pToken += tokens_read;
-                        len += tokens_read;
-
-                        TRACE((i == 0)? " " : ", ");
-                        shader_dump_param(param, addr_token, 1, This->baseShader.hex_version);
-                    }
+    TRACE("Parsing %p\n", pFunction);
+
+    fe->shader_read_header(fe_data, &pToken, &shader_version);
+
+    TRACE("%s_%u_%u\n", shader_is_pshader_version(shader_version.type) ? "ps": "vs",
+            shader_version.major, shader_version.minor);
+
+    while (!fe->shader_is_end(fe_data, &pToken))
+    {
+        struct wined3d_shader_instruction ins;
+        const char *comment;
+        UINT param_size;
+
+        /* comment */
+        fe->shader_read_comment(&pToken, &comment);
+        if (comment)
+        {
+            TRACE("//%s\n", comment);
+            continue;
+        }
+
+        fe->shader_read_opcode(fe_data, &pToken, &ins, &param_size);
+        if (ins.handler_idx == WINED3DSIH_TABLE_SIZE)
+        {
+            TRACE("Skipping unrecognized instruction.\n");
+            pToken += param_size;
+            continue;
+        }
+
+        if (ins.handler_idx == WINED3DSIH_DCL)
+        {
+            struct wined3d_shader_semantic semantic;
+
+            fe->shader_read_semantic(&pToken, &semantic);
+
+            shader_dump_decl_usage(&semantic, &shader_version);
+            shader_dump_ins_modifiers(&semantic.reg);
+            TRACE(" ");
+            shader_dump_dst_param(&semantic.reg, &shader_version);
+        }
+        else if (ins.handler_idx == WINED3DSIH_DEF)
+        {
+            struct wined3d_shader_dst_param dst;
+            struct wined3d_shader_src_param rel_addr;
+
+            fe->shader_read_dst_param(fe_data, &pToken, &dst, &rel_addr);
+
+            TRACE("def c%u = %f, %f, %f, %f", shader_get_float_offset(dst.reg.type, dst.reg.idx),
+                    *(const float *)(pToken),
+                    *(const float *)(pToken + 1),
+                    *(const float *)(pToken + 2),
+                    *(const float *)(pToken + 3));
+            pToken += 4;
+        }
+        else if (ins.handler_idx == WINED3DSIH_DEFI)
+        {
+            struct wined3d_shader_dst_param dst;
+            struct wined3d_shader_src_param rel_addr;
+
+            fe->shader_read_dst_param(fe_data, &pToken, &dst, &rel_addr);
+
+            TRACE("defi i%u = %d, %d, %d, %d", dst.reg.idx,
+                    *(pToken),
+                    *(pToken + 1),
+                    *(pToken + 2),
+                    *(pToken + 3));
+            pToken += 4;
+        }
+        else if (ins.handler_idx == WINED3DSIH_DEFB)
+        {
+            struct wined3d_shader_dst_param dst;
+            struct wined3d_shader_src_param rel_addr;
+
+            fe->shader_read_dst_param(fe_data, &pToken, &dst, &rel_addr);
+
+            TRACE("defb b%u = %s", dst.reg.idx, *pToken ? "true" : "false");
+            ++pToken;
+        }
+        else
+        {
+            struct wined3d_shader_src_param dst_rel_addr, src_rel_addr;
+            struct wined3d_shader_dst_param dst_param;
+            struct wined3d_shader_src_param src_param;
+
+            if (ins.dst_count)
+            {
+                fe->shader_read_dst_param(fe_data, &pToken, &dst_param, &dst_rel_addr);
+            }
+
+            /* Print out predication source token first - it follows
+             * the destination token. */
+            if (ins.predicate)
+            {
+                fe->shader_read_src_param(fe_data, &pToken, &src_param, &src_rel_addr);
+                TRACE("(");
+                shader_dump_src_param(&src_param, &shader_version);
+                TRACE(") ");
+            }
+
+            /* PixWin marks instructions with the coissue flag with a '+' */
+            if (ins.coissue) TRACE("+");
+
+            TRACE("%s", shader_opcode_names[ins.handler_idx]);
+
+            if (ins.handler_idx == WINED3DSIH_IFC
+                    || ins.handler_idx == WINED3DSIH_BREAKC)
+            {
+                switch (ins.flags)
+                {
+                    case COMPARISON_GT: TRACE("_gt"); break;
+                    case COMPARISON_EQ: TRACE("_eq"); break;
+                    case COMPARISON_GE: TRACE("_ge"); break;
+                    case COMPARISON_LT: TRACE("_lt"); break;
+                    case COMPARISON_NE: TRACE("_ne"); break;
+                    case COMPARISON_LE: TRACE("_le"); break;
+                    default: TRACE("_(%u)", ins.flags);
                 }
-                TRACE("\n");
-            }
-        }
-        This->baseShader.functionLength = (len + 1) * sizeof(DWORD);
-    } else {
-        This->baseShader.functionLength = 1; /* no Function defined use fixed function vertex processing */
+            }
+            else if (ins.handler_idx == WINED3DSIH_TEX
+                    && shader_version.major >= 2
+                    && (ins.flags & WINED3DSI_TEXLD_PROJECT))
+            {
+                TRACE("p");
+            }
+
+            /* We already read the destination token, print it. */
+            if (ins.dst_count)
+            {
+                shader_dump_ins_modifiers(&dst_param);
+                TRACE(" ");
+                shader_dump_dst_param(&dst_param, &shader_version);
+            }
+
+            /* Other source tokens */
+            for (i = ins.dst_count; i < (ins.dst_count + ins.src_count); ++i)
+            {
+                fe->shader_read_src_param(fe_data, &pToken, &src_param, &src_rel_addr);
+                TRACE(!i ? " " : ", ");
+                shader_dump_src_param(&src_param, &shader_version);
+            }
+        }
+        TRACE("\n");
+    }
+}
+
+void shader_cleanup(IWineD3DBaseShader *iface)
+{
+    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)iface;
+
+    ((IWineD3DDeviceImpl *)This->baseShader.device)->shader_backend->shader_destroy(iface);
+    HeapFree(GetProcessHeap(), 0, This->baseShader.reg_maps.constf);
+    HeapFree(GetProcessHeap(), 0, This->baseShader.function);
+    shader_delete_constant_list(&This->baseShader.constantsF);
+    shader_delete_constant_list(&This->baseShader.constantsB);
+    shader_delete_constant_list(&This->baseShader.constantsI);
+    list_remove(&This->baseShader.shader_list_entry);
+
+    if (This->baseShader.frontend && This->baseShader.frontend_data)
+    {
+        This->baseShader.frontend->shader_free(This->baseShader.frontend_data);
     }
 }
@@ -1148,18 +1238,25 @@
 static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type) {}
 static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {}
+static void shader_none_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count) {}
+static void shader_none_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) {}
 static void shader_none_load_constants(IWineD3DDevice *iface, char usePS, char useVS) {}
-static void shader_none_cleanup(IWineD3DDevice *iface) {}
-static void shader_none_color_correction(const struct SHADER_OPCODE_ARG *arg, struct color_fixup_desc fixup) {}
+static void shader_none_load_np2fixup_constants(IWineD3DDevice *iface, char usePS, char useVS) {}
 static void shader_none_destroy(IWineD3DBaseShader *iface) {}
 static HRESULT shader_none_alloc(IWineD3DDevice *iface) {return WINED3D_OK;}
 static void shader_none_free(IWineD3DDevice *iface) {}
 static BOOL shader_none_dirty_const(IWineD3DDevice *iface) {return FALSE;}
-static GLuint shader_none_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer) {
+static GLuint shader_none_generate_pshader(IWineD3DPixelShader *iface,
+        SHADER_BUFFER *buffer, const struct ps_compile_args *args)
+{
     FIXME("NONE shader backend asked to generate a pixel shader\n");
     return 0;
 }
-static void shader_none_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer) {
+static GLuint shader_none_generate_vshader(IWineD3DVertexShader *iface,
+        SHADER_BUFFER *buffer, const struct vs_compile_args *args)
+{
     FIXME("NONE shader backend asked to generate a vertex shader\n");
-}
+    return 0;
+}
+static void shader_none_add_instruction_modifiers(const struct wined3d_shader_instruction *ins) {}
 
 #define GLINFO_LOCATION      (*gl_info)
@@ -1196,7 +1293,8 @@
     shader_none_select_depth_blt,
     shader_none_deselect_depth_blt,
+    shader_none_update_float_vertex_constants,
+    shader_none_update_float_pixel_constants,
     shader_none_load_constants,
-    shader_none_cleanup,
-    shader_none_color_correction,
+    shader_none_load_np2fixup_constants,
     shader_none_destroy,
     shader_none_alloc,
@@ -1207,46 +1305,4 @@
     shader_none_get_caps,
     shader_none_color_fixup_supported,
+    shader_none_add_instruction_modifiers,
 };
-
-/* *******************************************
-   IWineD3DPixelShader IUnknown parts follow
-   ******************************************* */
-HRESULT  WINAPI IWineD3DBaseShaderImpl_QueryInterface(IWineD3DBaseShader *iface, REFIID riid, LPVOID *ppobj)
-{
-    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)iface;
-    TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
-    if (IsEqualGUID(riid, &IID_IUnknown)
-        || IsEqualGUID(riid, &IID_IWineD3DBase)
-        || IsEqualGUID(riid, &IID_IWineD3DBaseShader)
-        || IsEqualGUID(riid, &IID_IWineD3DPixelShader)) {
-        IUnknown_AddRef(iface);
-        *ppobj = This;
-        return S_OK;
-    }
-    *ppobj = NULL;
-    return E_NOINTERFACE;
-}
-
-ULONG  WINAPI IWineD3DBaseShaderImpl_AddRef(IWineD3DBaseShader *iface) {
-    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
-    TRACE("(%p) : AddRef increasing from %d\n", This, This->baseShader.ref);
-    return InterlockedIncrement(&This->baseShader.ref);
-}
-
-ULONG  WINAPI IWineD3DBaseShaderImpl_Release(IWineD3DBaseShader *iface) {
-    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)iface;
-    IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *) This->baseShader.device;
-    ULONG ref;
-    TRACE("(%p) : Releasing from %d\n", This, This->baseShader.ref);
-    ref = InterlockedDecrement(&This->baseShader.ref);
-    if (ref == 0) {
-        deviceImpl->shader_backend->shader_destroy(iface);
-        HeapFree(GetProcessHeap(), 0, This->baseShader.function);
-        shader_delete_constant_list(&This->baseShader.constantsF);
-        shader_delete_constant_list(&This->baseShader.constantsB);
-        shader_delete_constant_list(&This->baseShader.constantsI);
-        list_remove(&This->baseShader.shader_list_entry);
-        HeapFree(GetProcessHeap(), 0, This);
-    }
-    return ref;
-}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c	(revision 19678)
@@ -37,4 +37,15 @@
 #define GLINFO_LOCATION This->resource.wineD3DDevice->adapter->gl_info
 
+void basetexture_init(struct IWineD3DBaseTextureClass *texture, UINT levels, DWORD usage)
+{
+    texture->levels = levels;
+    texture->filterType = (usage & WINED3DUSAGE_AUTOGENMIPMAP) ? WINED3DTEXF_LINEAR : WINED3DTEXF_NONE;
+    texture->LOD = 0;
+    texture->dirty = TRUE;
+    texture->srgbDirty = TRUE;
+    texture->is_srgb = FALSE;
+    texture->pow2Matrix_identity = TRUE;
+}
+
 void basetexture_cleanup(IWineD3DBaseTexture *iface)
 {
@@ -48,4 +59,5 @@
         TRACE("(%p) : Deleting texture %d\n", This, This->baseTexture.textureName);
         glDeleteTextures(1, &This->baseTexture.textureName);
+        glDeleteTextures(1, &This->baseTexture.srgbTextureName);
         LEAVE_GL();
     }
@@ -63,8 +75,11 @@
         ENTER_GL();
         glDeleteTextures(1, &This->baseTexture.textureName);
+        glDeleteTextures(1, &This->baseTexture.srgbTextureName);
         This->baseTexture.textureName = 0;
+        This->baseTexture.srgbTextureName = 0;
         LEAVE_GL();
     }
     This->baseTexture.dirty = TRUE;
+    This->baseTexture.srgbDirty = TRUE;
 }
 
@@ -173,6 +188,7 @@
     BOOL old;
     IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
-    old = This->baseTexture.dirty;
+    old = This->baseTexture.dirty || This->baseTexture.srgbDirty;
     This->baseTexture.dirty = dirty;
+    This->baseTexture.srgbDirty = dirty;
     return old;
 }
@@ -181,8 +197,8 @@
 {
     IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
-    return This->baseTexture.dirty;
-}
-
-HRESULT basetexture_bind(IWineD3DBaseTexture *iface)
+    return This->baseTexture.dirty || This->baseTexture.srgbDirty;
+}
+
+HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surface_desc)
 {
     IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
@@ -190,35 +206,47 @@
     UINT textureDimensions;
     BOOL isNewTexture = FALSE;
+    GLuint *texture;
+    DWORD *states;
     TRACE("(%p) : About to bind texture\n", This);
+
+    This->baseTexture.is_srgb = srgb; /* SRGB mode cache for PreLoad calls outside drawprim */
+    if(srgb) {
+        texture = &This->baseTexture.srgbTextureName;
+        states = This->baseTexture.srgbstates;
+    } else {
+        texture = &This->baseTexture.textureName;
+        states = This->baseTexture.states;
+    }
 
     textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(iface);
     ENTER_GL();
     /* Generate a texture name if we don't already have one */
-    if (This->baseTexture.textureName == 0) {
-        glGenTextures(1, &This->baseTexture.textureName);
+    if (*texture == 0) {
+        *set_surface_desc = TRUE;
+        glGenTextures(1, texture);
         checkGLcall("glGenTextures");
-        TRACE("Generated texture %d\n", This->baseTexture.textureName);
+        TRACE("Generated texture %d\n", *texture);
         if (This->resource.pool == WINED3DPOOL_DEFAULT) {
             /* Tell opengl to try and keep this texture in video ram (well mostly) */
             GLclampf tmp;
             tmp = 0.9f;
-            glPrioritizeTextures(1, &This->baseTexture.textureName, &tmp);
+            glPrioritizeTextures(1, texture, &tmp);
 
         }
         /* Initialise the state of the texture object
         to the openGL defaults, not the directx defaults */
-        This->baseTexture.states[WINED3DTEXSTA_ADDRESSU]      = WINED3DTADDRESS_WRAP;
-        This->baseTexture.states[WINED3DTEXSTA_ADDRESSV]      = WINED3DTADDRESS_WRAP;
-        This->baseTexture.states[WINED3DTEXSTA_ADDRESSW]      = WINED3DTADDRESS_WRAP;
-        This->baseTexture.states[WINED3DTEXSTA_BORDERCOLOR]   = 0;
-        This->baseTexture.states[WINED3DTEXSTA_MAGFILTER]     = WINED3DTEXF_LINEAR;
-        This->baseTexture.states[WINED3DTEXSTA_MINFILTER]     = WINED3DTEXF_POINT; /* GL_NEAREST_MIPMAP_LINEAR */
-        This->baseTexture.states[WINED3DTEXSTA_MIPFILTER]     = WINED3DTEXF_LINEAR; /* GL_NEAREST_MIPMAP_LINEAR */
-        This->baseTexture.states[WINED3DTEXSTA_MAXMIPLEVEL]   = 0;
-        This->baseTexture.states[WINED3DTEXSTA_MAXANISOTROPY] = 0;
-        This->baseTexture.states[WINED3DTEXSTA_SRGBTEXTURE]   = 0;
-        This->baseTexture.states[WINED3DTEXSTA_ELEMENTINDEX]  = 0;
-        This->baseTexture.states[WINED3DTEXSTA_DMAPOFFSET]    = 0;
-        This->baseTexture.states[WINED3DTEXSTA_TSSADDRESSW]   = WINED3DTADDRESS_WRAP;
+        states[WINED3DTEXSTA_ADDRESSU]      = WINED3DTADDRESS_WRAP;
+        states[WINED3DTEXSTA_ADDRESSV]      = WINED3DTADDRESS_WRAP;
+        states[WINED3DTEXSTA_ADDRESSW]      = WINED3DTADDRESS_WRAP;
+        states[WINED3DTEXSTA_BORDERCOLOR]   = 0;
+        states[WINED3DTEXSTA_MAGFILTER]     = WINED3DTEXF_LINEAR;
+        states[WINED3DTEXSTA_MINFILTER]     = WINED3DTEXF_POINT; /* GL_NEAREST_MIPMAP_LINEAR */
+        states[WINED3DTEXSTA_MIPFILTER]     = WINED3DTEXF_LINEAR; /* GL_NEAREST_MIPMAP_LINEAR */
+        states[WINED3DTEXSTA_MAXMIPLEVEL]   = 0;
+        states[WINED3DTEXSTA_MAXANISOTROPY] = 0;
+        states[WINED3DTEXSTA_SRGBTEXTURE]   = 0;
+        states[WINED3DTEXSTA_ELEMENTINDEX]  = 0;
+        states[WINED3DTEXSTA_DMAPOFFSET]    = 0;
+        states[WINED3DTEXSTA_TSSADDRESSW]   = WINED3DTADDRESS_WRAP;
         IWineD3DBaseTexture_SetDirty(iface, TRUE);
         isNewTexture = TRUE;
@@ -228,14 +256,16 @@
              * in all, and the run-time path free from additional checks
              */
-            glBindTexture(textureDimensions, This->baseTexture.textureName);
+            glBindTexture(textureDimensions, *texture);
             checkGLcall("glBindTexture");
             glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
             checkGLcall("glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_SGIS, GL_TRUE)");
         }
+    } else {
+        *set_surface_desc = FALSE;
     }
 
     /* Bind the texture */
-    if (This->baseTexture.textureName != 0) {
-        glBindTexture(textureDimensions, This->baseTexture.textureName);
+    if (*texture != 0) {
+        glBindTexture(textureDimensions, *texture);
         checkGLcall("glBindTexture");
         if (isNewTexture) {
@@ -259,5 +289,4 @@
             }
         }
-		
     } else { /* this only happened if we've run out of openGL textures */
         WARN("This texture doesn't have an openGL texture assigned to it\n");
@@ -299,29 +328,35 @@
 {
     IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
-    DWORD state;
+    DWORD state, *states;
     GLint textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(iface);
     BOOL cond_np2 = IWineD3DBaseTexture_IsCondNP2(iface);
 
+    if(This->baseTexture.is_srgb) {
+        states = This->baseTexture.srgbstates;
+    } else {
+        states = This->baseTexture.states;
+    }
+
     /* ApplyStateChanges relies on the correct texture being bound and loaded. */
 
-    if(samplerStates[WINED3DSAMP_ADDRESSU]      != This->baseTexture.states[WINED3DTEXSTA_ADDRESSU]) {
+    if(samplerStates[WINED3DSAMP_ADDRESSU]      != states[WINED3DTEXSTA_ADDRESSU]) {
         state = samplerStates[WINED3DSAMP_ADDRESSU];
         apply_wrap(textureDimensions, state, GL_TEXTURE_WRAP_S, cond_np2);
-        This->baseTexture.states[WINED3DTEXSTA_ADDRESSU] = state;
-    }
-
-    if(samplerStates[WINED3DSAMP_ADDRESSV]      != This->baseTexture.states[WINED3DTEXSTA_ADDRESSV]) {
+        states[WINED3DTEXSTA_ADDRESSU] = state;
+    }
+
+    if(samplerStates[WINED3DSAMP_ADDRESSV]      != states[WINED3DTEXSTA_ADDRESSV]) {
         state = samplerStates[WINED3DSAMP_ADDRESSV];
         apply_wrap(textureDimensions, state, GL_TEXTURE_WRAP_T, cond_np2);
-        This->baseTexture.states[WINED3DTEXSTA_ADDRESSV] = state;
-    }
-
-    if(samplerStates[WINED3DSAMP_ADDRESSW]      != This->baseTexture.states[WINED3DTEXSTA_ADDRESSW]) {
+        states[WINED3DTEXSTA_ADDRESSV] = state;
+    }
+
+    if(samplerStates[WINED3DSAMP_ADDRESSW]      != states[WINED3DTEXSTA_ADDRESSW]) {
         state = samplerStates[WINED3DSAMP_ADDRESSW];
         apply_wrap(textureDimensions, state, GL_TEXTURE_WRAP_R, cond_np2);
-        This->baseTexture.states[WINED3DTEXSTA_ADDRESSW] = state;
-    }
-
-    if(samplerStates[WINED3DSAMP_BORDERCOLOR]   != This->baseTexture.states[WINED3DTEXSTA_BORDERCOLOR]) {
+        states[WINED3DTEXSTA_ADDRESSW] = state;
+    }
+
+    if(samplerStates[WINED3DSAMP_BORDERCOLOR]   != states[WINED3DTEXSTA_BORDERCOLOR]) {
         float col[4];
 
@@ -331,8 +366,8 @@
         glTexParameterfv(textureDimensions, GL_TEXTURE_BORDER_COLOR, &col[0]);
         checkGLcall("glTexParameteri(..., GL_TEXTURE_BORDER_COLOR, ...)");
-        This->baseTexture.states[WINED3DTEXSTA_BORDERCOLOR] = state;
-    }
-
-    if(samplerStates[WINED3DSAMP_MAGFILTER]     != This->baseTexture.states[WINED3DTEXSTA_MAGFILTER]) {
+        states[WINED3DTEXSTA_BORDERCOLOR] = state;
+    }
+
+    if(samplerStates[WINED3DSAMP_MAGFILTER]     != states[WINED3DTEXSTA_MAGFILTER]) {
         GLint glValue;
         state = samplerStates[WINED3DSAMP_MAGFILTER];
@@ -348,24 +383,24 @@
                 glTexParameteri(textureDimensions, GL_TEXTURE_MAX_ANISOTROPY_EXT, samplerStates[WINED3DSAMP_MAXANISOTROPY]);
             }
-            This->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = state;
-        }
-    }
-
-    if((samplerStates[WINED3DSAMP_MINFILTER]     != This->baseTexture.states[WINED3DTEXSTA_MINFILTER] ||
-        samplerStates[WINED3DSAMP_MIPFILTER]     != This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] ||
-        samplerStates[WINED3DSAMP_MAXMIPLEVEL]   != This->baseTexture.states[WINED3DTEXSTA_MAXMIPLEVEL])) {
+            states[WINED3DTEXSTA_MAGFILTER] = state;
+        }
+    }
+
+    if((samplerStates[WINED3DSAMP_MINFILTER]     != states[WINED3DTEXSTA_MINFILTER] ||
+        samplerStates[WINED3DSAMP_MIPFILTER]     != states[WINED3DTEXSTA_MIPFILTER] ||
+        samplerStates[WINED3DSAMP_MAXMIPLEVEL]   != states[WINED3DTEXSTA_MAXMIPLEVEL])) {
         GLint glValue;
 
-        This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] = samplerStates[WINED3DSAMP_MIPFILTER];
-        This->baseTexture.states[WINED3DTEXSTA_MINFILTER] = samplerStates[WINED3DSAMP_MINFILTER];
-        This->baseTexture.states[WINED3DTEXSTA_MAXMIPLEVEL] = samplerStates[WINED3DSAMP_MAXMIPLEVEL];
-
-        if (This->baseTexture.states[WINED3DTEXSTA_MINFILTER] > WINED3DTEXF_ANISOTROPIC ||
-            This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_LINEAR)
+        states[WINED3DTEXSTA_MIPFILTER] = samplerStates[WINED3DSAMP_MIPFILTER];
+        states[WINED3DTEXSTA_MINFILTER] = samplerStates[WINED3DSAMP_MINFILTER];
+        states[WINED3DTEXSTA_MAXMIPLEVEL] = samplerStates[WINED3DSAMP_MAXMIPLEVEL];
+
+        if (states[WINED3DTEXSTA_MINFILTER] > WINED3DTEXF_ANISOTROPIC ||
+            states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_LINEAR)
         {
 
             FIXME("Unrecognized or unsupported D3DSAMP_MINFILTER value %d D3DSAMP_MIPFILTER value %d\n",
-                  This->baseTexture.states[WINED3DTEXSTA_MINFILTER],
-                  This->baseTexture.states[WINED3DTEXSTA_MIPFILTER]);
+                  states[WINED3DTEXSTA_MINFILTER],
+                  states[WINED3DTEXSTA_MIPFILTER]);
         }
         glValue = This->baseTexture.minMipLookup
@@ -380,10 +415,10 @@
 
         if(!cond_np2) {
-            if(This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] == WINED3DTEXF_NONE) {
+            if(states[WINED3DTEXSTA_MIPFILTER] == WINED3DTEXF_NONE) {
                 glValue = 0;
-            } else if(This->baseTexture.states[WINED3DTEXSTA_MAXMIPLEVEL] >= This->baseTexture.levels) {
+            } else if(states[WINED3DTEXSTA_MAXMIPLEVEL] >= This->baseTexture.levels) {
                 glValue = This->baseTexture.levels - 1;
             } else {
-                glValue = This->baseTexture.states[WINED3DTEXSTA_MAXMIPLEVEL];
+                glValue = states[WINED3DTEXSTA_MAXMIPLEVEL];
             }
             glTexParameteri(textureDimensions, GL_TEXTURE_BASE_LEVEL, glValue);
@@ -391,5 +426,5 @@
     }
 
-    if(samplerStates[WINED3DSAMP_MAXANISOTROPY] != This->baseTexture.states[WINED3DTEXSTA_MAXANISOTROPY]) {
+    if(samplerStates[WINED3DSAMP_MAXANISOTROPY] != states[WINED3DTEXSTA_MAXANISOTROPY]) {
         if (GL_SUPPORT(EXT_TEXTURE_FILTER_ANISOTROPIC) && !cond_np2) {
             glTexParameteri(textureDimensions, GL_TEXTURE_MAX_ANISOTROPY_EXT, samplerStates[WINED3DSAMP_MAXANISOTROPY]);
@@ -398,5 +433,5 @@
             WARN("Unsupported in local OpenGL implementation: glTexParameteri GL_TEXTURE_MAX_ANISOTROPY_EXT\n");
         }
-        This->baseTexture.states[WINED3DTEXSTA_MAXANISOTROPY] = samplerStates[WINED3DSAMP_MAXANISOTROPY];
-    }
-}
+        states[WINED3DTEXSTA_MAXANISOTROPY] = samplerStates[WINED3DSAMP_MAXANISOTROPY];
+    }
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/buffer.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/buffer.c	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/buffer.c	(revision 19678)
@@ -0,0 +1,1065 @@
+/*
+ * Copyright 2002-2005 Jason Edmeades
+ * Copyright 2002-2005 Raphael Junqueira
+ * Copyright 2004 Christian Costa
+ * Copyright 2005 Oliver Stieber
+ * Copyright 2007 Stefan Dösinger for CodeWeavers
+ * Copyright 2009 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include "wined3d_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3d);
+
+#define GLINFO_LOCATION This->resource.wineD3DDevice->adapter->gl_info
+
+#define VB_MAXDECLCHANGES     100     /* After that number we stop converting */
+#define VB_RESETDECLCHANGE    1000    /* Reset the changecount after that number of draws */
+
+static void buffer_create_buffer_object(struct wined3d_buffer *This)
+{
+    GLenum error, gl_usage;
+    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+
+    TRACE("Creating an OpenGL vertex buffer object for IWineD3DVertexBuffer %p Usage(%s)\n",
+            This, debug_d3dusage(This->resource.usage));
+
+    /* Make sure that a context is there. Needed in a multithreaded environment. Otherwise this call is a nop */
+    ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
+    ENTER_GL();
+
+    /* Make sure that the gl error is cleared. Do not use checkGLcall
+    * here because checkGLcall just prints a fixme and continues. However,
+    * if an error during VBO creation occurs we can fall back to non-vbo operation
+    * with full functionality(but performance loss)
+    */
+    while (glGetError() != GL_NO_ERROR);
+
+    /* Basically the FVF parameter passed to CreateVertexBuffer is no good
+     * It is the FVF set with IWineD3DDevice::SetFVF or the Vertex Declaration set with
+     * IWineD3DDevice::SetVertexDeclaration that decides how the vertices in the buffer
+     * look like. This means that on each DrawPrimitive call the vertex buffer has to be verified
+     * to check if the rhw and color values are in the correct format.
+     */
+
+    GL_EXTCALL(glGenBuffersARB(1, &This->buffer_object));
+    error = glGetError();
+    if (!This->buffer_object || error != GL_NO_ERROR)
+    {
+        ERR("Failed to create a VBO with error %s (%#x)\n", debug_glerror(error), error);
+        goto fail;
+    }
+
+    if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
+    {
+        IWineD3DDeviceImpl_MarkStateDirty(This->resource.wineD3DDevice, STATE_INDEXBUFFER);
+    }
+    GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+    error = glGetError();
+    if (error != GL_NO_ERROR)
+    {
+        ERR("Failed to bind the VBO with error %s (%#x)\n", debug_glerror(error), error);
+        goto fail;
+    }
+
+    /* Don't use static, because dx apps tend to update the buffer
+    * quite often even if they specify 0 usage. Because we always keep the local copy
+    * we never read from the vbo and can create a write only opengl buffer.
+    */
+    switch(This->resource.usage & (WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_DYNAMIC))
+    {
+        case WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_DYNAMIC:
+        case WINED3DUSAGE_DYNAMIC:
+            TRACE("Gl usage = GL_STREAM_DRAW\n");
+            gl_usage = GL_STREAM_DRAW_ARB;
+            break;
+
+        case WINED3DUSAGE_WRITEONLY:
+        default:
+            TRACE("Gl usage = GL_DYNAMIC_DRAW\n");
+            gl_usage = GL_DYNAMIC_DRAW_ARB;
+            break;
+    }
+
+    /* Reserve memory for the buffer. The amount of data won't change
+     * so we are safe with calling glBufferData once and
+     * calling glBufferSubData on updates. Upload the actual data in case
+     * we're not double buffering, so we can release the heap mem afterwards
+     */
+    GL_EXTCALL(glBufferDataARB(This->buffer_type_hint, This->resource.size, This->resource.allocatedMemory, gl_usage));
+    error = glGetError();
+    if (error != GL_NO_ERROR)
+    {
+        ERR("glBufferDataARB failed with error %s (%#x)\n", debug_glerror(error), error);
+        goto fail;
+    }
+
+    LEAVE_GL();
+
+    This->buffer_object_size = This->resource.size;
+    This->buffer_object_usage = gl_usage;
+    This->dirty_start = 0;
+    This->dirty_end = This->resource.size;
+
+    if(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)
+    {
+        This->flags |= WINED3D_BUFFER_DIRTY;
+    }
+    else
+    {
+        HeapFree(GetProcessHeap(), 0, This->resource.heapMemory);
+        This->resource.allocatedMemory = NULL;
+        This->resource.heapMemory = NULL;
+        This->flags &= ~WINED3D_BUFFER_DIRTY;
+    }
+
+    return;
+
+fail:
+    /* Clean up all vbo init, but continue because we can work without a vbo :-) */
+    ERR("Failed to create a vertex buffer object. Continuing, but performance issues may occur\n");
+    if (This->buffer_object) GL_EXTCALL(glDeleteBuffersARB(1, &This->buffer_object));
+    This->buffer_object = 0;
+    LEAVE_GL();
+
+    return;
+}
+
+static BOOL buffer_process_converted_attribute(struct wined3d_buffer *This,
+        const enum wined3d_buffer_conversion_type conversion_type,
+        const struct wined3d_stream_info_element *attrib, DWORD *stride_this_run)
+{
+    DWORD attrib_size;
+    BOOL ret = FALSE;
+    unsigned int i;
+    DWORD offset = This->resource.wineD3DDevice->stateBlock->streamOffset[attrib->stream_idx];
+    DWORD_PTR data;
+
+    /* Check for some valid situations which cause us pain. One is if the buffer is used for
+     * constant attributes(stride = 0), the other one is if the buffer is used on two streams
+     * with different strides. In the 2nd case we might have to drop conversion entirely,
+     * it is possible that the same bytes are once read as FLOAT2 and once as UBYTE4N.
+     */
+    if (!attrib->stride)
+    {
+        FIXME("%s used with stride 0, let's hope we get the vertex stride from somewhere else\n",
+                debug_d3dformat(attrib->format_desc->format));
+    }
+    else if(attrib->stride != *stride_this_run && *stride_this_run)
+    {
+        FIXME("Got two concurrent strides, %d and %d\n", attrib->stride, *stride_this_run);
+    }
+    else
+    {
+        *stride_this_run = attrib->stride;
+        if (This->stride != *stride_this_run)
+        {
+            /* We rely that this happens only on the first converted attribute that is found,
+             * if at all. See above check
+             */
+            TRACE("Reconverting because converted attributes occur, and the stride changed\n");
+            This->stride = *stride_this_run;
+            HeapFree(GetProcessHeap(), HEAP_ZERO_MEMORY, This->conversion_map);
+            This->conversion_map = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
+                    sizeof(*This->conversion_map) * This->stride);
+            ret = TRUE;
+        }
+    }
+
+    data = (((DWORD_PTR)attrib->data) + offset) % This->stride;
+    attrib_size = attrib->format_desc->component_count * attrib->format_desc->component_size;
+    for (i = 0; i < attrib_size; ++i)
+    {
+        if (This->conversion_map[data + i] != conversion_type)
+        {
+            TRACE("Byte %ld in vertex changed\n", i + data);
+            TRACE("It was type %d, is %d now\n", This->conversion_map[data + i], conversion_type);
+            ret = TRUE;
+            This->conversion_map[data + i] = conversion_type;
+        }
+    }
+
+    return ret;
+}
+
+static BOOL buffer_check_attribute(struct wined3d_buffer *This,
+        const struct wined3d_stream_info_element *attrib, const BOOL check_d3dcolor, const BOOL is_ffp_position,
+        const BOOL is_ffp_color, DWORD *stride_this_run, BOOL *float16_used)
+{
+    BOOL ret = FALSE;
+    WINED3DFORMAT format;
+
+    /* Ignore attributes that do not have our vbo. After that check we can be sure that the attribute is
+     * there, on nonexistent attribs the vbo is 0.
+     */
+    if (attrib->buffer_object != This->buffer_object) return FALSE;
+
+    format = attrib->format_desc->format;
+    /* Look for newly appeared conversion */
+    if (!GL_SUPPORT(ARB_HALF_FLOAT_VERTEX) && (format == WINED3DFMT_R16G16_FLOAT || format == WINED3DFMT_R16G16B16A16_FLOAT))
+    {
+        ret = buffer_process_converted_attribute(This, CONV_FLOAT16_2, attrib, stride_this_run);
+
+        if (is_ffp_position) FIXME("Test FLOAT16 fixed function processing positions\n");
+        else if (is_ffp_color) FIXME("test FLOAT16 fixed function processing colors\n");
+        *float16_used = TRUE;
+    }
+    else if (check_d3dcolor && format == WINED3DFMT_A8R8G8B8)
+    {
+        ret = buffer_process_converted_attribute(This, CONV_D3DCOLOR, attrib, stride_this_run);
+
+        if (!is_ffp_color) FIXME("Test for non-color fixed function WINED3DFMT_A8R8G8B8 format\n");
+    }
+    else if (is_ffp_position && format == WINED3DFMT_R32G32B32A32_FLOAT)
+    {
+        ret = buffer_process_converted_attribute(This, CONV_POSITIONT, attrib, stride_this_run);
+    }
+    else if (This->conversion_map)
+    {
+        ret = buffer_process_converted_attribute(This, CONV_NONE, attrib, stride_this_run);
+    }
+
+    return ret;
+}
+
+static UINT *find_conversion_shift(struct wined3d_buffer *This,
+        const struct wined3d_stream_info *strided, UINT stride)
+{
+    UINT *ret, i, j, shift, orig_type_size;
+
+    if (!stride)
+    {
+        TRACE("No shift\n");
+        return NULL;
+    }
+
+    This->conversion_stride = stride;
+    ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DWORD) * stride);
+    for (i = 0; i < MAX_ATTRIBS; ++i)
+    {
+        WINED3DFORMAT format;
+
+        if (strided->elements[i].buffer_object != This->buffer_object) continue;
+
+        format = strided->elements[i].format_desc->format;
+        if (format == WINED3DFMT_R16G16_FLOAT)
+        {
+            shift = 4;
+        }
+        else if (format == WINED3DFMT_R16G16B16A16_FLOAT)
+        {
+            shift = 8;
+            /* Pre-shift the last 4 bytes in the FLOAT16_4 by 4 bytes - this makes FLOAT16_2 and FLOAT16_4 conversions
+             * compatible
+             */
+            for (j = 4; j < 8; ++j)
+            {
+                ret[(DWORD_PTR)strided->elements[i].data + j] += 4;
+            }
+        }
+        else
+        {
+            shift = 0;
+        }
+        This->conversion_stride += shift;
+
+        if (shift)
+        {
+            orig_type_size = strided->elements[i].format_desc->component_count
+                    * strided->elements[i].format_desc->component_size;
+            for (j = (DWORD_PTR)strided->elements[i].data + orig_type_size; j < stride; ++j)
+            {
+                ret[j] += shift;
+            }
+        }
+    }
+
+    if (TRACE_ON(d3d))
+    {
+        TRACE("Dumping conversion shift:\n");
+        for (i = 0; i < stride; ++i)
+        {
+            TRACE("[%d]", ret[i]);
+        }
+        TRACE("\n");
+    }
+
+    return ret;
+}
+
+static BOOL buffer_find_decl(struct wined3d_buffer *This)
+{
+    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+    UINT stride_this_run = 0;
+    BOOL float16_used = FALSE;
+    BOOL ret = FALSE;
+    unsigned int i;
+
+    /* In d3d7 the vertex buffer declaration NEVER changes because it is stored in the d3d7 vertex buffer.
+     * Once we have our declaration there is no need to look it up again. Index buffers also never need
+     * conversion, so once the (empty) conversion structure is created don't bother checking again
+     */
+    if (This->flags & WINED3D_BUFFER_HASDESC)
+    {
+        if(((IWineD3DImpl *)device->wineD3D)->dxVersion == 7 ||
+             This->resource.format_desc->format != WINED3DFMT_VERTEXDATA) return FALSE;
+    }
+
+    TRACE("Finding vertex buffer conversion information\n");
+    /* Certain declaration types need some fixups before we can pass them to
+     * opengl. This means D3DCOLOR attributes with fixed function vertex
+     * processing, FLOAT4 POSITIONT with fixed function, and FLOAT16 if
+     * GL_ARB_half_float_vertex is not supported.
+     *
+     * Note for d3d8 and d3d9:
+     * The vertex buffer FVF doesn't help with finding them, we have to use
+     * the decoded vertex declaration and pick the things that concern the
+     * current buffer. A problem with this is that this can change between
+     * draws, so we have to validate the information and reprocess the buffer
+     * if it changes, and avoid false positives for performance reasons.
+     * WineD3D doesn't even know the vertex buffer any more, it is managed
+     * by the client libraries and passed to SetStreamSource and ProcessVertices
+     * as needed.
+     *
+     * We have to distinguish between vertex shaders and fixed function to
+     * pick the way we access the strided vertex information.
+     *
+     * This code sets up a per-byte array with the size of the detected
+     * stride of the arrays in the buffer. For each byte we have a field
+     * that marks the conversion needed on this byte. For example, the
+     * following declaration with fixed function vertex processing:
+     *
+     *      POSITIONT, FLOAT4
+     *      NORMAL, FLOAT3
+     *      DIFFUSE, FLOAT16_4
+     *      SPECULAR, D3DCOLOR
+     *
+     * Will result in
+     * {                 POSITIONT                    }{             NORMAL                }{    DIFFUSE          }{SPECULAR }
+     * [P][P][P][P][P][P][P][P][P][P][P][P][P][P][P][P][0][0][0][0][0][0][0][0][0][0][0][0][F][F][F][F][F][F][F][F][C][C][C][C]
+     *
+     * Where in this example map P means 4 component position conversion, 0
+     * means no conversion, F means FLOAT16_2 conversion and C means D3DCOLOR
+     * conversion (red / blue swizzle).
+     *
+     * If we're doing conversion and the stride changes we have to reconvert
+     * the whole buffer. Note that we do not mind if the semantic changes,
+     * we only care for the conversion type. So if the NORMAL is replaced
+     * with a TEXCOORD, nothing has to be done, or if the DIFFUSE is replaced
+     * with a D3DCOLOR BLENDWEIGHT we can happily dismiss the change. Some
+     * conversion types depend on the semantic as well, for example a FLOAT4
+     * texcoord needs no conversion while a FLOAT4 positiont needs one
+     */
+    if (use_vs(device->stateBlock))
+    {
+        TRACE("vshader\n");
+        /* If the current vertex declaration is marked for no half float conversion don't bother to
+         * analyse the strided streams in depth, just set them up for no conversion. Return decl changed
+         * if we used conversion before
+         */
+        if (!((IWineD3DVertexDeclarationImpl *) device->stateBlock->vertexDecl)->half_float_conv_needed)
+        {
+            if (This->conversion_map)
+            {
+                TRACE("Now using shaders without conversion, but conversion used before\n");
+                HeapFree(GetProcessHeap(), 0, This->conversion_map);
+                HeapFree(GetProcessHeap(), 0, This->conversion_shift);
+                This->conversion_map = NULL;
+                This->stride = 0;
+                This->conversion_shift = NULL;
+                This->conversion_stride = 0;
+                return TRUE;
+            }
+            else
+            {
+                return FALSE;
+            }
+        }
+        for (i = 0; i < MAX_ATTRIBS; ++i)
+        {
+            ret = buffer_check_attribute(This, &device->strided_streams.elements[i],
+                    FALSE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        }
+
+        /* Recalculate the conversion shift map if the declaration has changed,
+         * and we're using float16 conversion or used it on the last run
+         */
+        if (ret && (float16_used || This->conversion_map))
+        {
+            HeapFree(GetProcessHeap(), 0, This->conversion_shift);
+            This->conversion_shift = find_conversion_shift(This, &device->strided_streams, This->stride);
+        }
+    }
+    else
+    {
+        /* Fixed function is a bit trickier. We have to take care for D3DCOLOR types, FLOAT4 positions and of course
+         * FLOAT16s if not supported. Also, we can't iterate over the array, so use macros to generate code for all
+         * the attributes that our current fixed function pipeline implementation cares for.
+         */
+        BOOL support_d3dcolor = GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA);
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_POSITION],
+                TRUE, TRUE,  FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_NORMAL],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_DIFFUSE],
+                !support_d3dcolor, FALSE, TRUE,  &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_SPECULAR],
+                !support_d3dcolor, FALSE, TRUE,  &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD0],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD1],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD2],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD3],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD4],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD5],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD6],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+        ret = buffer_check_attribute(This, &device->strided_streams.elements[WINED3D_FFP_TEXCOORD7],
+                TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
+
+        if (float16_used) FIXME("Float16 conversion used with fixed function vertex processing\n");
+    }
+
+    if (stride_this_run == 0 && This->conversion_map)
+    {
+        /* Sanity test */
+        if (!ret) ERR("no converted attributes found, old conversion map exists, and no declaration change?\n");
+        HeapFree(GetProcessHeap(), 0, This->conversion_map);
+        This->conversion_map = NULL;
+        This->stride = 0;
+    }
+
+    if (ret) TRACE("Conversion information changed\n");
+
+    return ret;
+}
+
+static void buffer_check_buffer_object_size(struct wined3d_buffer *This)
+{
+    UINT size = This->conversion_stride ?
+            This->conversion_stride * (This->resource.size / This->stride) : This->resource.size;
+    if (This->buffer_object_size != size)
+    {
+        TRACE("Old size %u, creating new size %u\n", This->buffer_object_size, size);
+
+        if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
+        {
+            IWineD3DDeviceImpl_MarkStateDirty(This->resource.wineD3DDevice, STATE_INDEXBUFFER);
+        }
+
+        /* Rescue the data before resizing the buffer object if we do not have our backup copy */
+        if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER))
+        {
+            buffer_get_sysmem(This);
+        }
+
+        ENTER_GL();
+        GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+        checkGLcall("glBindBufferARB");
+        GL_EXTCALL(glBufferDataARB(This->buffer_type_hint, size, NULL, This->buffer_object_usage));
+        This->buffer_object_size = size;
+        checkGLcall("glBufferDataARB");
+        LEAVE_GL();
+    }
+}
+
+static inline void fixup_d3dcolor(DWORD *dst_color)
+{
+    DWORD src_color = *dst_color;
+
+    /* Color conversion like in drawStridedSlow. watch out for little endianity
+     * If we want that stuff to work on big endian machines too we have to consider more things
+     *
+     * 0xff000000: Alpha mask
+     * 0x00ff0000: Blue mask
+     * 0x0000ff00: Green mask
+     * 0x000000ff: Red mask
+     */
+    *dst_color = 0;
+    *dst_color |= (src_color & 0xff00ff00);         /* Alpha Green */
+    *dst_color |= (src_color & 0x00ff0000) >> 16;   /* Red */
+    *dst_color |= (src_color & 0x000000ff) << 16;   /* Blue */
+}
+
+static inline void fixup_transformed_pos(float *p)
+{
+    float x, y, z, w;
+
+    /* rhw conversion like in drawStridedSlow */
+    if (p[3] == 1.0 || ((p[3] < eps) && (p[3] > -eps)))
+    {
+        x = p[0];
+        y = p[1];
+        z = p[2];
+        w = 1.0;
+    }
+    else
+    {
+        w = 1.0 / p[3];
+        x = p[0] * w;
+        y = p[1] * w;
+        z = p[2] * w;
+    }
+    p[0] = x;
+    p[1] = y;
+    p[2] = z;
+    p[3] = w;
+}
+
+const BYTE *buffer_get_memory(IWineD3DBuffer *iface, UINT offset, GLuint *buffer_object)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+
+    *buffer_object = This->buffer_object;
+    if (!This->buffer_object)
+    {
+        if (This->flags & WINED3D_BUFFER_CREATEBO)
+        {
+            buffer_create_buffer_object(This);
+            This->flags &= ~WINED3D_BUFFER_CREATEBO;
+            if (This->buffer_object)
+            {
+                *buffer_object = This->buffer_object;
+                return (const BYTE *)offset;
+            }
+        }
+        return This->resource.allocatedMemory + offset;
+    }
+    else
+    {
+        return (const BYTE *)offset;
+    }
+}
+
+/* IUnknown methods */
+
+static HRESULT STDMETHODCALLTYPE buffer_QueryInterface(IWineD3DBuffer *iface,
+        REFIID riid, void **object)
+{
+    TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
+
+    if (IsEqualGUID(riid, &IID_IWineD3DBuffer)
+            || IsEqualGUID(riid, &IID_IWineD3DResource)
+            || IsEqualGUID(riid, &IID_IWineD3DBase)
+            || IsEqualGUID(riid, &IID_IUnknown))
+    {
+        IUnknown_AddRef(iface);
+        *object = iface;
+        return S_OK;
+    }
+
+    WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
+
+    *object = NULL;
+
+    return E_NOINTERFACE;
+}
+
+static ULONG STDMETHODCALLTYPE buffer_AddRef(IWineD3DBuffer *iface)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+    ULONG refcount = InterlockedIncrement(&This->resource.ref);
+
+    TRACE("%p increasing refcount to %u\n", This, refcount);
+
+    return refcount;
+}
+
+const BYTE *buffer_get_sysmem(struct wined3d_buffer *This)
+{
+    /* AllocatedMemory exists if the buffer is double buffered or has no buffer object at all */
+    if(This->resource.allocatedMemory) return This->resource.allocatedMemory;
+
+    This->resource.heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->resource.size + RESOURCE_ALIGNMENT);
+    This->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1));
+    ENTER_GL();
+    GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+    GL_EXTCALL(glGetBufferSubDataARB(This->buffer_type_hint, 0, This->resource.size, This->resource.allocatedMemory));
+    LEAVE_GL();
+    This->flags |= WINED3D_BUFFER_DOUBLEBUFFER;
+
+    return This->resource.allocatedMemory;
+}
+
+static void STDMETHODCALLTYPE buffer_UnLoad(IWineD3DBuffer *iface)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+
+    TRACE("iface %p\n", iface);
+
+    if (This->buffer_object)
+    {
+        IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+
+        ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
+
+        /* Download the buffer, but don't permanently enable double buffering */
+        if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER))
+        {
+            buffer_get_sysmem(This);
+            This->flags &= ~WINED3D_BUFFER_DOUBLEBUFFER;
+        }
+
+        ENTER_GL();
+        GL_EXTCALL(glDeleteBuffersARB(1, &This->buffer_object));
+        checkGLcall("glDeleteBuffersARB");
+        LEAVE_GL();
+        This->buffer_object = 0;
+        This->flags |= WINED3D_BUFFER_CREATEBO; /* Recreate the buffer object next load */
+    }
+}
+
+static ULONG STDMETHODCALLTYPE buffer_Release(IWineD3DBuffer *iface)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+    ULONG refcount = InterlockedDecrement(&This->resource.ref);
+
+    TRACE("%p decreasing refcount to %u\n", This, refcount);
+
+    if (!refcount)
+    {
+        buffer_UnLoad(iface);
+        resource_cleanup((IWineD3DResource *)iface);
+        HeapFree(GetProcessHeap(), 0, This);
+    }
+
+    return refcount;
+}
+
+/* IWineD3DBase methods */
+
+static HRESULT STDMETHODCALLTYPE buffer_GetParent(IWineD3DBuffer *iface, IUnknown **parent)
+{
+    return resource_get_parent((IWineD3DResource *)iface, parent);
+}
+
+/* IWineD3DResource methods */
+
+static HRESULT STDMETHODCALLTYPE buffer_GetDevice(IWineD3DBuffer *iface, IWineD3DDevice **device)
+{
+    return resource_get_device((IWineD3DResource *)iface, device);
+}
+
+static HRESULT STDMETHODCALLTYPE buffer_SetPrivateData(IWineD3DBuffer *iface,
+        REFGUID guid, const void *data, DWORD data_size, DWORD flags)
+{
+    return resource_set_private_data((IWineD3DResource *)iface, guid, data, data_size, flags);
+}
+
+static HRESULT STDMETHODCALLTYPE buffer_GetPrivateData(IWineD3DBuffer *iface,
+        REFGUID guid, void *data, DWORD *data_size)
+{
+    return resource_get_private_data((IWineD3DResource *)iface, guid, data, data_size);
+}
+
+static HRESULT STDMETHODCALLTYPE buffer_FreePrivateData(IWineD3DBuffer *iface, REFGUID guid)
+{
+    return resource_free_private_data((IWineD3DResource *)iface, guid);
+}
+
+static DWORD STDMETHODCALLTYPE buffer_SetPriority(IWineD3DBuffer *iface, DWORD priority)
+{
+    return resource_set_priority((IWineD3DResource *)iface, priority);
+}
+
+static DWORD STDMETHODCALLTYPE buffer_GetPriority(IWineD3DBuffer *iface)
+{
+    return resource_get_priority((IWineD3DResource *)iface);
+}
+
+static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+    UINT start = 0, end = 0, vertices;
+    BOOL decl_changed = FALSE;
+    unsigned int i, j;
+    BYTE *data;
+
+    TRACE("iface %p\n", iface);
+
+    if (!This->buffer_object)
+    {
+        /* TODO: Make converting independent from VBOs */
+        if (This->flags & WINED3D_BUFFER_CREATEBO)
+        {
+            buffer_create_buffer_object(This);
+            This->flags &= ~WINED3D_BUFFER_CREATEBO;
+        }
+        else
+        {
+            return; /* Not doing any conversion */
+        }
+    }
+
+    /* Reading the declaration makes only sense if the stateblock is finalized and the buffer bound to a stream */
+    if (device->isInDraw && This->bind_count > 0)
+    {
+        decl_changed = buffer_find_decl(This);
+        This->flags |= WINED3D_BUFFER_HASDESC;
+    }
+
+    if (!decl_changed && !(This->flags & WINED3D_BUFFER_HASDESC && This->flags & WINED3D_BUFFER_DIRTY)) return;
+
+    /* If applications change the declaration over and over, reconverting all the time is a huge
+     * performance hit. So count the declaration changes and release the VBO if there are too many
+     * of them (and thus stop converting)
+     */
+    if (decl_changed)
+    {
+        ++This->conversion_count;
+        This->draw_count = 0;
+
+        if (This->conversion_count > VB_MAXDECLCHANGES)
+        {
+            FIXME("Too many declaration changes, stopping converting\n");
+            ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
+            ENTER_GL();
+            GL_EXTCALL(glDeleteBuffersARB(1, &This->buffer_object));
+            checkGLcall("glDeleteBuffersARB");
+            LEAVE_GL();
+            This->buffer_object = 0;
+            HeapFree(GetProcessHeap(), 0, This->conversion_shift);
+
+            /* The stream source state handler might have read the memory of the vertex buffer already
+             * and got the memory in the vbo which is not valid any longer. Dirtify the stream source
+             * to force a reload. This happens only once per changed vertexbuffer and should occur rather
+             * rarely
+             */
+            IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC);
+
+            return;
+        }
+        buffer_check_buffer_object_size(This);
+    }
+    else
+    {
+        /* However, it is perfectly fine to change the declaration every now and then. We don't want a game that
+         * changes it every minute drop the VBO after VB_MAX_DECL_CHANGES minutes. So count draws without
+         * decl changes and reset the decl change count after a specific number of them
+         */
+        ++This->draw_count;
+        if (This->draw_count > VB_RESETDECLCHANGE) This->conversion_count = 0;
+    }
+
+    if (decl_changed)
+    {
+        /* The declaration changed, reload the whole buffer */
+        WARN("Reloading buffer because of decl change\n");
+        start = 0;
+        end = This->resource.size;
+    }
+    else
+    {
+        /* No decl change, but dirty data, reload the changed stuff */
+        if (This->conversion_shift)
+        {
+            if (This->dirty_start != 0 || This->dirty_end != 0)
+            {
+                FIXME("Implement partial buffer loading with shifted conversion\n");
+            }
+        }
+        start = This->dirty_start;
+        end = This->dirty_end;
+    }
+
+    /* Mark the buffer clean */
+    This->flags &= ~WINED3D_BUFFER_DIRTY;
+    This->dirty_start = 0;
+    This->dirty_end = 0;
+
+    if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
+    {
+        IWineD3DDeviceImpl_MarkStateDirty(This->resource.wineD3DDevice, STATE_INDEXBUFFER);
+    }
+
+    if (!This->conversion_map)
+    {
+        /* That means that there is nothing to fixup. Just upload from This->resource.allocatedMemory
+         * directly into the vbo. Do not free the system memory copy because drawPrimitive may need it if
+         * the stride is 0, for instancing emulation, vertex blending emulation or shader emulation.
+         */
+        TRACE("No conversion needed\n");
+
+        /* Nothing to do because we locked directly into the vbo */
+        if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)) return;
+
+        if (!device->isInDraw)
+        {
+            ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
+        }
+        ENTER_GL();
+        GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+        checkGLcall("glBindBufferARB");
+        GL_EXTCALL(glBufferSubDataARB(This->buffer_type_hint, start, end-start, This->resource.allocatedMemory + start));
+        checkGLcall("glBufferSubDataARB");
+        LEAVE_GL();
+        return;
+    }
+
+    if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER))
+    {
+        buffer_get_sysmem(This);
+    }
+
+    /* Now for each vertex in the buffer that needs conversion */
+    vertices = This->resource.size / This->stride;
+
+    if (This->conversion_shift)
+    {
+        TRACE("Shifted conversion\n");
+        data = HeapAlloc(GetProcessHeap(), 0, vertices * This->conversion_stride);
+
+        for (i = start / This->stride; i < min((end / This->stride) + 1, vertices); ++i)
+        {
+            for (j = 0; j < This->stride; ++j)
+            {
+                switch(This->conversion_map[j])
+                {
+                    case CONV_NONE:
+                        data[This->conversion_stride * i + j + This->conversion_shift[j]]
+                                = This->resource.allocatedMemory[This->stride * i + j];
+                        break;
+
+                    case CONV_FLOAT16_2:
+                    {
+                        float *out = (float *)(&data[This->conversion_stride * i + j + This->conversion_shift[j]]);
+                        const WORD *in = (WORD *)(&This->resource.allocatedMemory[i * This->stride + j]);
+
+                        out[1] = float_16_to_32(in + 1);
+                        out[0] = float_16_to_32(in + 0);
+                        j += 3;    /* Skip 3 additional bytes,as a FLOAT16_2 has 4 bytes */
+                        break;
+                    }
+
+                    default:
+                        FIXME("Unimplemented conversion %d in shifted conversion\n", This->conversion_map[j]);
+                        break;
+                }
+            }
+        }
+
+        ENTER_GL();
+        GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+        checkGLcall("glBindBufferARB");
+        GL_EXTCALL(glBufferSubDataARB(This->buffer_type_hint, 0, vertices * This->conversion_stride, data));
+        checkGLcall("glBufferSubDataARB");
+        LEAVE_GL();
+    }
+    else
+    {
+        data = HeapAlloc(GetProcessHeap(), 0, This->resource.size);
+        memcpy(data + start, This->resource.allocatedMemory + start, end - start);
+        for (i = start / This->stride; i < min((end / This->stride) + 1, vertices); ++i)
+        {
+            for (j = 0; j < This->stride; ++j)
+            {
+                switch(This->conversion_map[j])
+                {
+                    case CONV_NONE:
+                        /* Done already */
+                        j += 3;
+                        break;
+                    case CONV_D3DCOLOR:
+                        fixup_d3dcolor((DWORD *) (data + i * This->stride + j));
+                        j += 3;
+                        break;
+
+                    case CONV_POSITIONT:
+                        fixup_transformed_pos((float *) (data + i * This->stride + j));
+                        j += 15;
+                        break;
+
+                    case CONV_FLOAT16_2:
+                        ERR("Did not expect FLOAT16 conversion in unshifted conversion\n");
+                    default:
+                        FIXME("Unimplemented conversion %d in shifted conversion\n", This->conversion_map[j]);
+                }
+            }
+        }
+
+        ENTER_GL();
+        GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+        checkGLcall("glBindBufferARB");
+        GL_EXTCALL(glBufferSubDataARB(This->buffer_type_hint, start, end - start, data + start));
+        checkGLcall("glBufferSubDataARB");
+        LEAVE_GL();
+    }
+
+    HeapFree(GetProcessHeap(), 0, data);
+}
+
+static WINED3DRESOURCETYPE STDMETHODCALLTYPE buffer_GetType(IWineD3DBuffer *iface)
+{
+    return resource_get_type((IWineD3DResource *)iface);
+}
+
+/* IWineD3DBuffer methods */
+
+static HRESULT STDMETHODCALLTYPE buffer_Map(IWineD3DBuffer *iface, UINT offset, UINT size, BYTE **data, DWORD flags)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+    LONG count;
+
+    TRACE("iface %p, offset %u, size %u, data %p, flags %#x\n", iface, offset, size, data, flags);
+
+    count = InterlockedIncrement(&This->lock_count);
+
+    if (This->flags & WINED3D_BUFFER_DIRTY)
+    {
+        if (This->dirty_start > offset) This->dirty_start = offset;
+
+        if (size)
+        {
+            if (This->dirty_end < offset + size) This->dirty_end = offset + size;
+        }
+        else
+        {
+            This->dirty_end = This->resource.size;
+        }
+    }
+    else
+    {
+        This->dirty_start = offset;
+        if (size) This->dirty_end = offset + size;
+        else This->dirty_end = This->resource.size;
+    }
+
+    if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER) && This->buffer_object)
+    {
+        if(count == 1)
+        {
+            IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+
+            if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
+            {
+                IWineD3DDeviceImpl_MarkStateDirty(This->resource.wineD3DDevice, STATE_INDEXBUFFER);
+            }
+
+            ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
+            ENTER_GL();
+            GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+            This->resource.allocatedMemory = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_READ_WRITE_ARB));
+            LEAVE_GL();
+        }
+    }
+    else
+    {
+        This->flags |= WINED3D_BUFFER_DIRTY;
+    }
+
+    *data = This->resource.allocatedMemory + offset;
+
+    TRACE("Returning memory at %p (base %p, offset %u)\n", *data, This->resource.allocatedMemory, offset);
+    /* TODO: check Flags compatibility with This->currentDesc.Usage (see MSDN) */
+
+    return WINED3D_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE buffer_Unmap(IWineD3DBuffer *iface)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+
+    TRACE("(%p)\n", This);
+
+    if (InterlockedDecrement(&This->lock_count))
+    {
+        /* Delay loading the buffer until everything is unlocked */
+        TRACE("Ignoring unlock\n");
+        return WINED3D_OK;
+    }
+
+    if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER) && This->buffer_object)
+    {
+        IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+
+        if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
+        {
+            IWineD3DDeviceImpl_MarkStateDirty(This->resource.wineD3DDevice, STATE_INDEXBUFFER);
+        }
+
+        ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
+        ENTER_GL();
+        GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
+        GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint));
+        LEAVE_GL();
+
+        This->resource.allocatedMemory = NULL;
+    }
+    else if (This->flags & WINED3D_BUFFER_HASDESC)
+    {
+        buffer_PreLoad(iface);
+    }
+
+    return WINED3D_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE buffer_GetDesc(IWineD3DBuffer *iface, WINED3DBUFFER_DESC *desc)
+{
+    struct wined3d_buffer *This = (struct wined3d_buffer *)iface;
+
+    TRACE("(%p)\n", This);
+
+    desc->Type = This->resource.resourceType;
+    desc->Usage = This->resource.usage;
+    desc->Pool = This->resource.pool;
+    desc->Size = This->resource.size;
+
+    return WINED3D_OK;
+}
+
+const struct IWineD3DBufferVtbl wined3d_buffer_vtbl =
+{
+    /* IUnknown methods */
+    buffer_QueryInterface,
+    buffer_AddRef,
+    buffer_Release,
+    /* IWineD3DBase methods */
+    buffer_GetParent,
+    /* IWineD3DResource methods */
+    buffer_GetDevice,
+    buffer_SetPrivateData,
+    buffer_GetPrivateData,
+    buffer_FreePrivateData,
+    buffer_SetPriority,
+    buffer_GetPriority,
+    buffer_PreLoad,
+    buffer_UnLoad,
+    buffer_GetType,
+    /* IWineD3DBuffer methods */
+    buffer_Map,
+    buffer_Unmap,
+    buffer_GetDesc,
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/config.log
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/config.log	(revision 19677)
+++ 	(revision )
@@ -1,12232 +1,0 @@
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by Wine configure 1.1.10, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  $ ../../configure --without-glu --without-x --disable-tests
-
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = llp
-uname -m = i686
-uname -r = 1.5.24(0.156/4/2)
-uname -s = CYGWIN_NT-5.1
-uname -v = 2007-01-31 10:57
-
-/usr/bin/uname -p = unknown
-/bin/uname -X     = unknown
-
-/bin/arch              = i686
-/usr/bin/arch -k       = unknown
-/usr/convex/getsysinfo = unknown
-/usr/bin/hostinfo      = unknown
-/bin/machine           = unknown
-/usr/bin/oslevel       = unknown
-/bin/universe          = unknown
-
-PATH: /usr/local/bin
-PATH: /usr/bin
-PATH: /bin
-PATH: /usr/X11R6/bin
-PATH: /cygdrive/c/Sun/vbox/kBuild/bin/win.x86/
-PATH: $PATH
-PATH: /cygdrive/c/Sun/Python25
-PATH: /cygdrive/c/Sun/vbox/tools/win.x86/vcc/v7/bin
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-configure:2285: checking build system type
-configure:2303: result: i686-pc-cygwin
-configure:2325: checking host system type
-configure:2340: result: i686-pc-cygwin
-configure:2419: checking whether make sets $(MAKE)
-configure:2441: result: yes
-configure:2498: checking for gcc
-configure:2528: result: no
-configure:2591: checking for cc
-configure:2638: result: no
-configure:2694: checking for cl.exe
-configure:2710: found /cygdrive/c/Sun/vbox/tools/win.x86/vcc/v7/bin/cl.exe
-configure:2721: result: cl.exe
-configure:2757: checking for C compiler version
-configure:2765: cl.exe --version >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '--version'
-cl : Command line error D2003 : missing source filename
-configure:2769: $? = 2
-configure:2776: cl.exe -v >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-v'
-cl : Command line error D2003 : missing source filename
-configure:2780: $? = 2
-configure:2787: cl.exe -V >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line error D2004 : '/V' requires an argument
-configure:2791: $? = 2
-configure:2814: checking for C compiler default output file name
-configure:2836: cl.exe    conftest.c  >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-Microsoft (R) Incremental Linker Version 7.10.3077
-Copyright (C) Microsoft Corporation.  All rights reserved.
-
-/out:conftest.exe 
-conftest.obj 
-configure:2840: $? = 0
-configure:2878: result: conftest.exe
-configure:2897: checking whether the C compiler works
-configure:2907: ./conftest.exe
-configure:2911: $? = 0
-configure:2930: result: yes
-configure:2937: checking whether we are cross compiling
-configure:2939: result: no
-configure:2942: checking for suffix of executables
-configure:2949: cl.exe -o conftest.exe    conftest.c  >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-Microsoft (R) Incremental Linker Version 7.10.3077
-Copyright (C) Microsoft Corporation.  All rights reserved.
-
-/out:conftest.exe 
-/out:conftest.exe 
-conftest.obj 
-configure:2953: $? = 0
-configure:2979: result: .exe
-configure:2985: checking for suffix of object files
-configure:3011: cl.exe -c   conftest.c >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:3015: $? = 0
-configure:3040: result: obj
-configure:3044: checking whether we are using the GNU C compiler
-configure:3073: cl.exe -c   conftest.c >&5
-conftest.c
-conftest.c(13) : error C2065: 'choke' : undeclared identifier
-conftest.c(13) : error C2146: syntax error : missing ';' before identifier 'me'
-conftest.c(13) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
-conftest.c(13) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
-conftest.c(13) : error C2143: syntax error : missing ';' before 'identifier'
-conftest.c(16) : error C2065: 'me' : undeclared identifier
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-configure:3080: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| 
-| int
-| main ()
-| {
-| #ifndef __GNUC__
-|        choke me
-| #endif
-| 
-|   ;
-|   return 0;
-| }
-configure:3097: result: no
-configure:3106: checking whether cl.exe accepts -g
-configure:3136: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:3143: $? = 0
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| 
-| int
-| main ()
-| {
-| 
-|   ;
-|   return 0;
-| }
-configure:3175: cl.exe -c   conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-configure:3182: $? = 0
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| 
-| int
-| main ()
-| {
-| 
-|   ;
-|   return 0;
-| }
-configure:3215: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:3222: $? = 0
-configure:3244: result: yes
-configure:3261: checking for cl.exe option to accept ISO C89
-configure:3335: cl.exe  -c -g  conftest.c >&5
-conftest.c
-conftest.c(54) : warning C4113: 'char *(__cdecl *)()' differs in parameter lists from 'char *(__cdecl *)(char ** ,int)'
-conftest.c(54) : warning C4113: 'char *(__cdecl *)()' differs in parameter lists from 'char *(__cdecl *)(char ** ,int)'
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:3342: $? = 0
-configure:3365: result: none needed
-configure:3441: checking for g++
-configure:3471: result: no
-configure:3441: checking for c++
-configure:3471: result: no
-configure:3441: checking for gpp
-configure:3471: result: no
-configure:3441: checking for aCC
-configure:3471: result: no
-configure:3441: checking for CC
-configure:3471: result: no
-configure:3441: checking for cxx
-configure:3471: result: no
-configure:3441: checking for cc++
-configure:3471: result: no
-configure:3441: checking for cl.exe
-configure:3457: found /cygdrive/c/Sun/vbox/tools/win.x86/vcc/v7/bin/cl.exe
-configure:3468: result: cl.exe
-configure:3495: checking for C++ compiler version
-configure:3503: cl.exe --version >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '--version'
-cl : Command line error D2003 : missing source filename
-configure:3507: $? = 2
-configure:3514: cl.exe -v >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-v'
-cl : Command line error D2003 : missing source filename
-configure:3518: $? = 2
-configure:3525: cl.exe -V >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line error D2004 : '/V' requires an argument
-configure:3529: $? = 2
-configure:3532: checking whether we are using the GNU C++ compiler
-configure:3561: cl.exe -c   conftest.cpp >&5
-conftest.cpp
-conftest.cpp(16) : error C2065: 'choke' : undeclared identifier
-conftest.cpp(16) : error C2146: syntax error : missing ';' before identifier 'me'
-conftest.cpp(16) : error C2065: 'me' : undeclared identifier
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-configure:3568: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| 
-| int
-| main ()
-| {
-| #ifndef __GNUC__
-|        choke me
-| #endif
-| 
-|   ;
-|   return 0;
-| }
-configure:3585: result: no
-configure:3594: checking whether cl.exe accepts -g
-configure:3624: cl.exe -c -g  conftest.cpp >&5
-conftest.cpp
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:3631: $? = 0
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| 
-| int
-| main ()
-| {
-| 
-|   ;
-|   return 0;
-| }
-configure:3663: cl.exe -c   conftest.cpp >&5
-conftest.cpp
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-configure:3670: $? = 0
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| 
-| int
-| main ()
-| {
-| 
-|   ;
-|   return 0;
-| }
-configure:3703: cl.exe -c -g  conftest.cpp >&5
-conftest.cpp
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:3710: $? = 0
-configure:3732: result: yes
-configure:3798: checking for cpp
-configure:3828: result: no
-configure:3848: checking for the directory containing the Wine tools
-configure:3872: result: $(TOPOBJDIR)
-configure:3883: checking how to run the C preprocessor
-configure:3923: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:3930: $? = 0
-configure:3961: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(8) : fatal error C1083: Cannot open include file: 'ac_nonexistent.h': No such file or directory
-configure:3968: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| #include <ac_nonexistent.h>
-configure:4001: result: cl.exe -E
-configure:4030: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:4037: $? = 0
-configure:4068: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(8) : fatal error C1083: Cannot open include file: 'ac_nonexistent.h': No such file or directory
-configure:4075: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| /* end confdefs.h.  */
-| #include <ac_nonexistent.h>
-configure:4115: checking for X
-configure:4344: result: disabled
-configure:5499: checking for flex
-configure:5515: found /usr/bin/flex
-configure:5526: result: flex
-configure:5549: checking for bison
-configure:5565: found /usr/bin/bison
-configure:5576: result: bison
-configure:5644: checking for gas
-configure:5674: result: no
-configure:5644: checking for as
-configure:5674: result: no
-configure:5744: checking for ld
-configure:5774: result: no
-configure:5744: checking for gld
-configure:5774: result: no
-configure:5844: checking for nm
-configure:5874: result: no
-configure:5844: checking for gnm
-configure:5874: result: no
-configure:5944: checking for ar
-configure:5974: result: no
-configure:5944: checking for gar
-configure:5974: result: no
-configure:6040: checking for ranlib
-configure:6070: result: no
-configure:6132: checking for strip
-configure:6162: result: no
-configure:6224: checking for windres
-configure:6254: result: no
-configure:6273: checking whether ln -s works
-configure:6277: result: yes
-configure:6284: checking whether ln works
-configure:6291: result: yes
-configure:6300: checking for grep that handles long lines and -e
-configure:6360: result: /usr/bin/grep
-configure:6365: checking for egrep
-configure:6429: result: /usr/bin/grep -E
-configure:6436: checking for ldconfig
-configure:6467: result: true
-configure:6489: checking for a BSD-compatible install
-configure:6557: result: /usr/bin/install -c
-configure:6577: checking for lclint
-configure:6607: result: no
-configure:6577: checking for lint
-configure:6607: result: no
-configure:6626: checking for fontforge
-configure:6656: result: no
-configure:6669: checking for pkg-config
-configure:6699: result: no
-configure:6712: checking for rsvg
-configure:6742: result: no
-configure:6755: checking for icotool
-configure:6785: result: no
-configure:6806: checking for prelink
-configure:6837: result: false
-configure:6850: checking for i386_set_ldt in -li386
-configure:6885: cl.exe -o conftest.exe -g   conftest.c -li386   >&5
-conftest.c
-Microsoft (R) Incremental Linker Version 7.10.3077
-Copyright (C) Microsoft Corporation.  All rights reserved.
-
-/out:conftest.exe 
-/out:conftest.exe 
-conftest.obj 
-conftest.obj : error LNK2019: unresolved external symbol _i386_set_ldt referenced in function _main
-conftest.exe : fatal error LNK1120: 1 unresolved externals
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-cl : Command line warning D4002 : ignoring unknown option '-li386'
-configure:6892: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| /* end confdefs.h.  */
-| 
-| /* Override any GCC internal prototype to avoid an error.
-|    Use char because int might match the return type of a GCC
-|    builtin and then its argument prototype would still apply.  */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char i386_set_ldt ();
-| int
-| main ()
-| {
-| return i386_set_ldt ();
-|   ;
-|   return 0;
-| }
-configure:6913: result: no
-configure:6925: checking for _oss_ioctl in -lossaudio
-configure:6960: cl.exe -o conftest.exe -g   conftest.c -lossaudio   >&5
-conftest.c
-Microsoft (R) Incremental Linker Version 7.10.3077
-Copyright (C) Microsoft Corporation.  All rights reserved.
-
-/out:conftest.exe 
-/out:conftest.exe 
-conftest.obj 
-conftest.obj : error LNK2019: unresolved external symbol __oss_ioctl referenced in function _main
-conftest.exe : fatal error LNK1120: 1 unresolved externals
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-cl : Command line warning D4002 : ignoring unknown option '-lossaudio'
-configure:6967: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| /* end confdefs.h.  */
-| 
-| /* Override any GCC internal prototype to avoid an error.
-|    Use char because int might match the return type of a GCC
-|    builtin and then its argument prototype would still apply.  */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char _oss_ioctl ();
-| int
-| main ()
-| {
-| return _oss_ioctl ();
-|   ;
-|   return 0;
-| }
-configure:6988: result: no
-configure:6999: checking for pthread_create in -lpthread
-configure:7034: cl.exe -o conftest.exe -g   conftest.c -lpthread   >&5
-conftest.c
-Microsoft (R) Incremental Linker Version 7.10.3077
-Copyright (C) Microsoft Corporation.  All rights reserved.
-
-/out:conftest.exe 
-/out:conftest.exe 
-conftest.obj 
-conftest.obj : error LNK2019: unresolved external symbol _pthread_create referenced in function _main
-conftest.exe : fatal error LNK1120: 1 unresolved externals
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-cl : Command line warning D4002 : ignoring unknown option '-lpthread'
-configure:7041: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| /* end confdefs.h.  */
-| 
-| /* Override any GCC internal prototype to avoid an error.
-|    Use char because int might match the return type of a GCC
-|    builtin and then its argument prototype would still apply.  */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char pthread_create ();
-| int
-| main ()
-| {
-| return pthread_create ();
-|   ;
-|   return 0;
-| }
-configure:7062: result: no
-configure:7076: checking for ANSI C header files
-configure:7106: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7113: $? = 0
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:7212: cl.exe -o conftest.exe -g   conftest.c  >&5
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-conftest.c
-Microsoft (R) Incremental Linker Version 7.10.3077
-Copyright (C) Microsoft Corporation.  All rights reserved.
-
-/out:conftest.exe 
-/out:conftest.exe 
-conftest.obj 
-configure:7216: $? = 0
-configure:7222: ./conftest.exe
-configure:7226: $? = 0
-configure:7244: result: yes
-configure:7268: checking for sys/types.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 0
-configure:7313: result: yes
-configure:7268: checking for sys/stat.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 0
-configure:7313: result: yes
-configure:7268: checking for stdlib.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 0
-configure:7313: result: yes
-configure:7268: checking for string.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 0
-configure:7313: result: yes
-configure:7268: checking for memory.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 0
-configure:7313: result: yes
-configure:7268: checking for strings.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(49) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| 
-| #include <strings.h>
-configure:7313: result: no
-configure:7268: checking for inttypes.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(49) : fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| 
-| #include <inttypes.h>
-configure:7313: result: no
-configure:7268: checking for stdint.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(49) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| 
-| #include <stdint.h>
-configure:7313: result: no
-configure:7268: checking for unistd.h
-configure:7289: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(49) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7296: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| 
-| #include <unistd.h>
-configure:7313: result: no
-configure:7567: checking AudioUnit/AudioUnit.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'AudioUnit/AudioUnit.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <AudioUnit/AudioUnit.h>
-configure:7605: result: no
-configure:7609: checking AudioUnit/AudioUnit.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'AudioUnit/AudioUnit.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <AudioUnit/AudioUnit.h>
-configure:7645: result: no
-configure:7678: checking for AudioUnit/AudioUnit.h
-configure:7687: result: no
-configure:7567: checking Carbon/Carbon.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'Carbon/Carbon.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <Carbon/Carbon.h>
-configure:7605: result: no
-configure:7609: checking Carbon/Carbon.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'Carbon/Carbon.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <Carbon/Carbon.h>
-configure:7645: result: no
-configure:7678: checking for Carbon/Carbon.h
-configure:7687: result: no
-configure:7567: checking CoreAudio/CoreAudio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'CoreAudio/CoreAudio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <CoreAudio/CoreAudio.h>
-configure:7605: result: no
-configure:7609: checking CoreAudio/CoreAudio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'CoreAudio/CoreAudio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <CoreAudio/CoreAudio.h>
-configure:7645: result: no
-configure:7678: checking for CoreAudio/CoreAudio.h
-configure:7687: result: no
-configure:7567: checking DiskArbitration/DiskArbitration.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'DiskArbitration/DiskArbitration.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <DiskArbitration/DiskArbitration.h>
-configure:7605: result: no
-configure:7609: checking DiskArbitration/DiskArbitration.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'DiskArbitration/DiskArbitration.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <DiskArbitration/DiskArbitration.h>
-configure:7645: result: no
-configure:7678: checking for DiskArbitration/DiskArbitration.h
-configure:7687: result: no
-configure:7567: checking IOKit/IOKitLib.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'IOKit/IOKitLib.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <IOKit/IOKitLib.h>
-configure:7605: result: no
-configure:7609: checking IOKit/IOKitLib.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'IOKit/IOKitLib.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <IOKit/IOKitLib.h>
-configure:7645: result: no
-configure:7678: checking for IOKit/IOKitLib.h
-configure:7687: result: no
-configure:7567: checking alias.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'alias.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <alias.h>
-configure:7605: result: no
-configure:7609: checking alias.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'alias.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <alias.h>
-configure:7645: result: no
-configure:7678: checking for alias.h
-configure:7687: result: no
-configure:7567: checking alsa/asoundlib.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'alsa/asoundlib.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <alsa/asoundlib.h>
-configure:7605: result: no
-configure:7609: checking alsa/asoundlib.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'alsa/asoundlib.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <alsa/asoundlib.h>
-configure:7645: result: no
-configure:7678: checking for alsa/asoundlib.h
-configure:7687: result: no
-configure:7567: checking arpa/inet.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <arpa/inet.h>
-configure:7605: result: no
-configure:7609: checking arpa/inet.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <arpa/inet.h>
-configure:7645: result: no
-configure:7678: checking for arpa/inet.h
-configure:7687: result: no
-configure:7567: checking arpa/nameser.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'arpa/nameser.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <arpa/nameser.h>
-configure:7605: result: no
-configure:7609: checking arpa/nameser.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'arpa/nameser.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <arpa/nameser.h>
-configure:7645: result: no
-configure:7678: checking for arpa/nameser.h
-configure:7687: result: no
-configure:7567: checking asm/types.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'asm/types.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <asm/types.h>
-configure:7605: result: no
-configure:7609: checking asm/types.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'asm/types.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <asm/types.h>
-configure:7645: result: no
-configure:7678: checking for asm/types.h
-configure:7687: result: no
-configure:7567: checking capi20.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'capi20.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <capi20.h>
-configure:7605: result: no
-configure:7609: checking capi20.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'capi20.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <capi20.h>
-configure:7645: result: no
-configure:7678: checking for capi20.h
-configure:7687: result: no
-configure:7567: checking curses.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'curses.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <curses.h>
-configure:7605: result: no
-configure:7609: checking curses.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(15) : fatal error C1083: Cannot open include file: 'curses.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| /* end confdefs.h.  */
-| #include <curses.h>
-configure:7645: result: no
-configure:7678: checking for curses.h
-configure:7687: result: no
-configure:7567: checking direct.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 0
-configure:7605: result: yes
-configure:7609: checking direct.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:7631: $? = 0
-configure:7645: result: yes
-configure:7678: checking for direct.h
-configure:7687: result: yes
-configure:7567: checking dirent.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(49) : fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <dirent.h>
-configure:7605: result: no
-configure:7609: checking dirent.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(16) : fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| /* end confdefs.h.  */
-| #include <dirent.h>
-configure:7645: result: no
-configure:7678: checking for dirent.h
-configure:7687: result: no
-configure:7567: checking dlfcn.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(49) : fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <dlfcn.h>
-configure:7605: result: no
-configure:7609: checking dlfcn.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(16) : fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| /* end confdefs.h.  */
-| #include <dlfcn.h>
-configure:7645: result: no
-configure:7678: checking for dlfcn.h
-configure:7687: result: no
-configure:7567: checking elf.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(49) : fatal error C1083: Cannot open include file: 'elf.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <elf.h>
-configure:7605: result: no
-configure:7609: checking elf.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(16) : fatal error C1083: Cannot open include file: 'elf.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| /* end confdefs.h.  */
-| #include <elf.h>
-configure:7645: result: no
-configure:7678: checking for elf.h
-configure:7687: result: no
-configure:7567: checking float.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 0
-configure:7605: result: yes
-configure:7609: checking float.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:7631: $? = 0
-configure:7645: result: yes
-configure:7678: checking for float.h
-configure:7687: result: yes
-configure:7567: checking fontconfig/fontconfig.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(50) : fatal error C1083: Cannot open include file: 'fontconfig/fontconfig.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <fontconfig/fontconfig.h>
-configure:7605: result: no
-configure:7609: checking fontconfig/fontconfig.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(17) : fatal error C1083: Cannot open include file: 'fontconfig/fontconfig.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| /* end confdefs.h.  */
-| #include <fontconfig/fontconfig.h>
-configure:7645: result: no
-configure:7678: checking for fontconfig/fontconfig.h
-configure:7687: result: no
-configure:7567: checking getopt.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(50) : fatal error C1083: Cannot open include file: 'getopt.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <getopt.h>
-configure:7605: result: no
-configure:7609: checking getopt.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(17) : fatal error C1083: Cannot open include file: 'getopt.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| /* end confdefs.h.  */
-| #include <getopt.h>
-configure:7645: result: no
-configure:7678: checking for getopt.h
-configure:7687: result: no
-configure:7567: checking ieeefp.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(50) : fatal error C1083: Cannot open include file: 'ieeefp.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <ieeefp.h>
-configure:7605: result: no
-configure:7609: checking ieeefp.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(17) : fatal error C1083: Cannot open include file: 'ieeefp.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| /* end confdefs.h.  */
-| #include <ieeefp.h>
-configure:7645: result: no
-configure:7678: checking for ieeefp.h
-configure:7687: result: no
-configure:7567: checking io.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 0
-configure:7605: result: yes
-configure:7609: checking io.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:7631: $? = 0
-configure:7645: result: yes
-configure:7678: checking for io.h
-configure:7687: result: yes
-configure:7567: checking jack/jack.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'jack/jack.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <jack/jack.h>
-configure:7605: result: no
-configure:7609: checking jack/jack.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'jack/jack.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <jack/jack.h>
-configure:7645: result: no
-configure:7678: checking for jack/jack.h
-configure:7687: result: no
-configure:7567: checking jpeglib.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <jpeglib.h>
-configure:7605: result: no
-configure:7609: checking jpeglib.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <jpeglib.h>
-configure:7645: result: no
-configure:7678: checking for jpeglib.h
-configure:7687: result: no
-configure:7567: checking lber.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <lber.h>
-configure:7605: result: no
-configure:7609: checking lber.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <lber.h>
-configure:7645: result: no
-configure:7678: checking for lber.h
-configure:7687: result: no
-configure:7567: checking lcms.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'lcms.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <lcms.h>
-configure:7605: result: no
-configure:7609: checking lcms.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'lcms.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <lcms.h>
-configure:7645: result: no
-configure:7678: checking for lcms.h
-configure:7687: result: no
-configure:7567: checking lcms/lcms.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'lcms/lcms.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <lcms/lcms.h>
-configure:7605: result: no
-configure:7609: checking lcms/lcms.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'lcms/lcms.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <lcms/lcms.h>
-configure:7645: result: no
-configure:7678: checking for lcms/lcms.h
-configure:7687: result: no
-configure:7567: checking ldap.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'ldap.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <ldap.h>
-configure:7605: result: no
-configure:7609: checking ldap.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'ldap.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <ldap.h>
-configure:7645: result: no
-configure:7678: checking for ldap.h
-configure:7687: result: no
-configure:7567: checking libaudioio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'libaudioio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <libaudioio.h>
-configure:7605: result: no
-configure:7609: checking libaudioio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'libaudioio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <libaudioio.h>
-configure:7645: result: no
-configure:7678: checking for libaudioio.h
-configure:7687: result: no
-configure:7567: checking link.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'link.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <link.h>
-configure:7605: result: no
-configure:7609: checking link.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'link.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <link.h>
-configure:7645: result: no
-configure:7678: checking for link.h
-configure:7687: result: no
-configure:7567: checking linux/cdrom.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/cdrom.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/cdrom.h>
-configure:7605: result: no
-configure:7609: checking linux/cdrom.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/cdrom.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/cdrom.h>
-configure:7645: result: no
-configure:7678: checking for linux/cdrom.h
-configure:7687: result: no
-configure:7567: checking linux/compiler.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/compiler.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/compiler.h>
-configure:7605: result: no
-configure:7609: checking linux/compiler.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/compiler.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/compiler.h>
-configure:7645: result: no
-configure:7678: checking for linux/compiler.h
-configure:7687: result: no
-configure:7567: checking linux/hdreg.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/hdreg.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/hdreg.h>
-configure:7605: result: no
-configure:7609: checking linux/hdreg.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/hdreg.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/hdreg.h>
-configure:7645: result: no
-configure:7678: checking for linux/hdreg.h
-configure:7687: result: no
-configure:7567: checking linux/input.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/input.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/input.h>
-configure:7605: result: no
-configure:7609: checking linux/input.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/input.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/input.h>
-configure:7645: result: no
-configure:7678: checking for linux/input.h
-configure:7687: result: no
-configure:7567: checking linux/ioctl.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/ioctl.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/ioctl.h>
-configure:7605: result: no
-configure:7609: checking linux/ioctl.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/ioctl.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/ioctl.h>
-configure:7645: result: no
-configure:7678: checking for linux/ioctl.h
-configure:7687: result: no
-configure:7567: checking linux/joystick.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/joystick.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/joystick.h>
-configure:7605: result: no
-configure:7609: checking linux/joystick.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/joystick.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/joystick.h>
-configure:7645: result: no
-configure:7678: checking for linux/joystick.h
-configure:7687: result: no
-configure:7567: checking linux/major.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/major.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/major.h>
-configure:7605: result: no
-configure:7609: checking linux/major.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/major.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/major.h>
-configure:7645: result: no
-configure:7678: checking for linux/major.h
-configure:7687: result: no
-configure:7567: checking linux/param.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/param.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/param.h>
-configure:7605: result: no
-configure:7609: checking linux/param.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/param.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/param.h>
-configure:7645: result: no
-configure:7678: checking for linux/param.h
-configure:7687: result: no
-configure:7567: checking linux/serial.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/serial.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/serial.h>
-configure:7605: result: no
-configure:7609: checking linux/serial.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/serial.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/serial.h>
-configure:7645: result: no
-configure:7678: checking for linux/serial.h
-configure:7687: result: no
-configure:7567: checking linux/ucdrom.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'linux/ucdrom.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linux/ucdrom.h>
-configure:7605: result: no
-configure:7609: checking linux/ucdrom.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'linux/ucdrom.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <linux/ucdrom.h>
-configure:7645: result: no
-configure:7678: checking for linux/ucdrom.h
-configure:7687: result: no
-configure:7567: checking mach/mach.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'mach/mach.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <mach/mach.h>
-configure:7605: result: no
-configure:7609: checking mach/mach.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'mach/mach.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <mach/mach.h>
-configure:7645: result: no
-configure:7678: checking for mach/mach.h
-configure:7687: result: no
-configure:7567: checking mach/machine.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'mach/machine.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <mach/machine.h>
-configure:7605: result: no
-configure:7609: checking mach/machine.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'mach/machine.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <mach/machine.h>
-configure:7645: result: no
-configure:7678: checking for mach/machine.h
-configure:7687: result: no
-configure:7567: checking machine/cpu.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'machine/cpu.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <machine/cpu.h>
-configure:7605: result: no
-configure:7609: checking machine/cpu.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'machine/cpu.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <machine/cpu.h>
-configure:7645: result: no
-configure:7678: checking for machine/cpu.h
-configure:7687: result: no
-configure:7567: checking machine/limits.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'machine/limits.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <machine/limits.h>
-configure:7605: result: no
-configure:7609: checking machine/limits.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'machine/limits.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <machine/limits.h>
-configure:7645: result: no
-configure:7678: checking for machine/limits.h
-configure:7687: result: no
-configure:7567: checking machine/soundcard.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'machine/soundcard.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <machine/soundcard.h>
-configure:7605: result: no
-configure:7609: checking machine/soundcard.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'machine/soundcard.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <machine/soundcard.h>
-configure:7645: result: no
-configure:7678: checking for machine/soundcard.h
-configure:7687: result: no
-configure:7567: checking mntent.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'mntent.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <mntent.h>
-configure:7605: result: no
-configure:7609: checking mntent.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'mntent.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <mntent.h>
-configure:7645: result: no
-configure:7678: checking for mntent.h
-configure:7687: result: no
-configure:7567: checking ncurses.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'ncurses.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <ncurses.h>
-configure:7605: result: no
-configure:7609: checking ncurses.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'ncurses.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <ncurses.h>
-configure:7645: result: no
-configure:7678: checking for ncurses.h
-configure:7687: result: no
-configure:7567: checking netdb.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'netdb.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <netdb.h>
-configure:7605: result: no
-configure:7609: checking netdb.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'netdb.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <netdb.h>
-configure:7645: result: no
-configure:7678: checking for netdb.h
-configure:7687: result: no
-configure:7567: checking netinet/in.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'netinet/in.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <netinet/in.h>
-configure:7605: result: no
-configure:7609: checking netinet/in.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'netinet/in.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <netinet/in.h>
-configure:7645: result: no
-configure:7678: checking for netinet/in.h
-configure:7687: result: no
-configure:7567: checking netinet/in_systm.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'netinet/in_systm.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <netinet/in_systm.h>
-configure:7605: result: no
-configure:7609: checking netinet/in_systm.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'netinet/in_systm.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <netinet/in_systm.h>
-configure:7645: result: no
-configure:7678: checking for netinet/in_systm.h
-configure:7687: result: no
-configure:7567: checking netinet/tcp.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'netinet/tcp.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <netinet/tcp.h>
-configure:7605: result: no
-configure:7609: checking netinet/tcp.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'netinet/tcp.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <netinet/tcp.h>
-configure:7645: result: no
-configure:7678: checking for netinet/tcp.h
-configure:7687: result: no
-configure:7567: checking netinet/tcp_fsm.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'netinet/tcp_fsm.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <netinet/tcp_fsm.h>
-configure:7605: result: no
-configure:7609: checking netinet/tcp_fsm.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'netinet/tcp_fsm.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <netinet/tcp_fsm.h>
-configure:7645: result: no
-configure:7678: checking for netinet/tcp_fsm.h
-configure:7687: result: no
-configure:7567: checking openssl/err.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'openssl/err.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <openssl/err.h>
-configure:7605: result: no
-configure:7609: checking openssl/err.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'openssl/err.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <openssl/err.h>
-configure:7645: result: no
-configure:7678: checking for openssl/err.h
-configure:7687: result: no
-configure:7567: checking openssl/ssl.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'openssl/ssl.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <openssl/ssl.h>
-configure:7605: result: no
-configure:7609: checking openssl/ssl.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'openssl/ssl.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <openssl/ssl.h>
-configure:7645: result: no
-configure:7678: checking for openssl/ssl.h
-configure:7687: result: no
-configure:7567: checking png.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'png.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <png.h>
-configure:7605: result: no
-configure:7609: checking png.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'png.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <png.h>
-configure:7645: result: no
-configure:7678: checking for png.h
-configure:7687: result: no
-configure:7567: checking poll.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(51) : fatal error C1083: Cannot open include file: 'poll.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <poll.h>
-configure:7605: result: no
-configure:7609: checking poll.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(18) : fatal error C1083: Cannot open include file: 'poll.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| /* end confdefs.h.  */
-| #include <poll.h>
-configure:7645: result: no
-configure:7678: checking for poll.h
-configure:7687: result: no
-configure:7567: checking process.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 0
-configure:7605: result: yes
-configure:7609: checking process.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-configure:7631: $? = 0
-configure:7645: result: yes
-configure:7678: checking for process.h
-configure:7687: result: yes
-configure:7567: checking pthread.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <pthread.h>
-configure:7605: result: no
-configure:7609: checking pthread.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <pthread.h>
-configure:7645: result: no
-configure:7678: checking for pthread.h
-configure:7687: result: no
-configure:7567: checking pwd.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'pwd.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <pwd.h>
-configure:7605: result: no
-configure:7609: checking pwd.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'pwd.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <pwd.h>
-configure:7645: result: no
-configure:7678: checking for pwd.h
-configure:7687: result: no
-configure:7567: checking regex.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'regex.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <regex.h>
-configure:7605: result: no
-configure:7609: checking regex.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'regex.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <regex.h>
-configure:7645: result: no
-configure:7678: checking for regex.h
-configure:7687: result: no
-configure:7567: checking sched.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sched.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sched.h>
-configure:7605: result: no
-configure:7609: checking sched.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sched.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sched.h>
-configure:7645: result: no
-configure:7678: checking for sched.h
-configure:7687: result: no
-configure:7567: checking scsi/scsi.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'scsi/scsi.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <scsi/scsi.h>
-configure:7605: result: no
-configure:7609: checking scsi/scsi.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'scsi/scsi.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <scsi/scsi.h>
-configure:7645: result: no
-configure:7678: checking for scsi/scsi.h
-configure:7687: result: no
-configure:7567: checking scsi/scsi_ioctl.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'scsi/scsi_ioctl.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <scsi/scsi_ioctl.h>
-configure:7605: result: no
-configure:7609: checking scsi/scsi_ioctl.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'scsi/scsi_ioctl.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <scsi/scsi_ioctl.h>
-configure:7645: result: no
-configure:7678: checking for scsi/scsi_ioctl.h
-configure:7687: result: no
-configure:7567: checking scsi/sg.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'scsi/sg.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <scsi/sg.h>
-configure:7605: result: no
-configure:7609: checking scsi/sg.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'scsi/sg.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <scsi/sg.h>
-configure:7645: result: no
-configure:7678: checking for scsi/sg.h
-configure:7687: result: no
-configure:7567: checking soundcard.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'soundcard.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <soundcard.h>
-configure:7605: result: no
-configure:7609: checking soundcard.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'soundcard.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <soundcard.h>
-configure:7645: result: no
-configure:7678: checking for soundcard.h
-configure:7687: result: no
-configure:7556: checking for stdint.h
-configure:7563: result: no
-configure:7556: checking for strings.h
-configure:7563: result: no
-configure:7567: checking sys/asoundlib.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/asoundlib.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/asoundlib.h>
-configure:7605: result: no
-configure:7609: checking sys/asoundlib.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/asoundlib.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/asoundlib.h>
-configure:7645: result: no
-configure:7678: checking for sys/asoundlib.h
-configure:7687: result: no
-configure:7567: checking sys/cdio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/cdio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/cdio.h>
-configure:7605: result: no
-configure:7609: checking sys/cdio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/cdio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/cdio.h>
-configure:7645: result: no
-configure:7678: checking for sys/cdio.h
-configure:7687: result: no
-configure:7567: checking sys/elf32.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/elf32.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/elf32.h>
-configure:7605: result: no
-configure:7609: checking sys/elf32.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/elf32.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/elf32.h>
-configure:7645: result: no
-configure:7678: checking for sys/elf32.h
-configure:7687: result: no
-configure:7567: checking sys/epoll.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/epoll.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/epoll.h>
-configure:7605: result: no
-configure:7609: checking sys/epoll.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/epoll.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/epoll.h>
-configure:7645: result: no
-configure:7678: checking for sys/epoll.h
-configure:7687: result: no
-configure:7567: checking sys/errno.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/errno.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/errno.h>
-configure:7605: result: no
-configure:7609: checking sys/errno.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/errno.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/errno.h>
-configure:7645: result: no
-configure:7678: checking for sys/errno.h
-configure:7687: result: no
-configure:7567: checking sys/event.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/event.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/event.h>
-configure:7605: result: no
-configure:7609: checking sys/event.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/event.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/event.h>
-configure:7645: result: no
-configure:7678: checking for sys/event.h
-configure:7687: result: no
-configure:7567: checking sys/exec_elf.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/exec_elf.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/exec_elf.h>
-configure:7605: result: no
-configure:7609: checking sys/exec_elf.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/exec_elf.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/exec_elf.h>
-configure:7645: result: no
-configure:7678: checking for sys/exec_elf.h
-configure:7687: result: no
-configure:7567: checking sys/filio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/filio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/filio.h>
-configure:7605: result: no
-configure:7609: checking sys/filio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/filio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/filio.h>
-configure:7645: result: no
-configure:7678: checking for sys/filio.h
-configure:7687: result: no
-configure:7567: checking sys/ioctl.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/ioctl.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/ioctl.h>
-configure:7605: result: no
-configure:7609: checking sys/ioctl.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/ioctl.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/ioctl.h>
-configure:7645: result: no
-configure:7678: checking for sys/ioctl.h
-configure:7687: result: no
-configure:7567: checking sys/ipc.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/ipc.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/ipc.h>
-configure:7605: result: no
-configure:7609: checking sys/ipc.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/ipc.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/ipc.h>
-configure:7645: result: no
-configure:7678: checking for sys/ipc.h
-configure:7687: result: no
-configure:7567: checking sys/limits.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/limits.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/limits.h>
-configure:7605: result: no
-configure:7609: checking sys/limits.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/limits.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/limits.h>
-configure:7645: result: no
-configure:7678: checking for sys/limits.h
-configure:7687: result: no
-configure:7567: checking sys/link.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/link.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/link.h>
-configure:7605: result: no
-configure:7609: checking sys/link.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/link.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/link.h>
-configure:7645: result: no
-configure:7678: checking for sys/link.h
-configure:7687: result: no
-configure:7567: checking sys/lwp.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/lwp.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/lwp.h>
-configure:7605: result: no
-configure:7609: checking sys/lwp.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/lwp.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/lwp.h>
-configure:7645: result: no
-configure:7678: checking for sys/lwp.h
-configure:7687: result: no
-configure:7567: checking sys/mman.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/mman.h>
-configure:7605: result: no
-configure:7609: checking sys/mman.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/mman.h>
-configure:7645: result: no
-configure:7678: checking for sys/mman.h
-configure:7687: result: no
-configure:7567: checking sys/modem.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/modem.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/modem.h>
-configure:7605: result: no
-configure:7609: checking sys/modem.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/modem.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/modem.h>
-configure:7645: result: no
-configure:7678: checking for sys/modem.h
-configure:7687: result: no
-configure:7567: checking sys/msg.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/msg.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/msg.h>
-configure:7605: result: no
-configure:7609: checking sys/msg.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/msg.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/msg.h>
-configure:7645: result: no
-configure:7678: checking for sys/msg.h
-configure:7687: result: no
-configure:7567: checking sys/mtio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/mtio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/mtio.h>
-configure:7605: result: no
-configure:7609: checking sys/mtio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/mtio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/mtio.h>
-configure:7645: result: no
-configure:7678: checking for sys/mtio.h
-configure:7687: result: no
-configure:7567: checking sys/param.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/param.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/param.h>
-configure:7605: result: no
-configure:7609: checking sys/param.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/param.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/param.h>
-configure:7645: result: no
-configure:7678: checking for sys/param.h
-configure:7687: result: no
-configure:7567: checking sys/poll.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/poll.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/poll.h>
-configure:7605: result: no
-configure:7609: checking sys/poll.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/poll.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/poll.h>
-configure:7645: result: no
-configure:7678: checking for sys/poll.h
-configure:7687: result: no
-configure:7567: checking sys/prctl.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/prctl.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/prctl.h>
-configure:7605: result: no
-configure:7609: checking sys/prctl.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/prctl.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/prctl.h>
-configure:7645: result: no
-configure:7678: checking for sys/prctl.h
-configure:7687: result: no
-configure:7567: checking sys/ptrace.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/ptrace.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/ptrace.h>
-configure:7605: result: no
-configure:7609: checking sys/ptrace.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/ptrace.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/ptrace.h>
-configure:7645: result: no
-configure:7678: checking for sys/ptrace.h
-configure:7687: result: no
-configure:7567: checking sys/reg.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/reg.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/reg.h>
-configure:7605: result: no
-configure:7609: checking sys/reg.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/reg.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/reg.h>
-configure:7645: result: no
-configure:7678: checking for sys/reg.h
-configure:7687: result: no
-configure:7567: checking sys/resource.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/resource.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/resource.h>
-configure:7605: result: no
-configure:7609: checking sys/resource.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/resource.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/resource.h>
-configure:7645: result: no
-configure:7678: checking for sys/resource.h
-configure:7687: result: no
-configure:7567: checking sys/scsiio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/scsiio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/scsiio.h>
-configure:7605: result: no
-configure:7609: checking sys/scsiio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/scsiio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/scsiio.h>
-configure:7645: result: no
-configure:7678: checking for sys/scsiio.h
-configure:7687: result: no
-configure:7567: checking sys/shm.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/shm.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/shm.h>
-configure:7605: result: no
-configure:7609: checking sys/shm.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/shm.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/shm.h>
-configure:7645: result: no
-configure:7678: checking for sys/shm.h
-configure:7687: result: no
-configure:7567: checking sys/signal.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/signal.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/signal.h>
-configure:7605: result: no
-configure:7609: checking sys/signal.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/signal.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/signal.h>
-configure:7645: result: no
-configure:7678: checking for sys/signal.h
-configure:7687: result: no
-configure:7567: checking sys/socket.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/socket.h>
-configure:7605: result: no
-configure:7609: checking sys/socket.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/socket.h>
-configure:7645: result: no
-configure:7678: checking for sys/socket.h
-configure:7687: result: no
-configure:7567: checking sys/socketvar.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/socketvar.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/socketvar.h>
-configure:7605: result: no
-configure:7609: checking sys/socketvar.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/socketvar.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/socketvar.h>
-configure:7645: result: no
-configure:7678: checking for sys/socketvar.h
-configure:7687: result: no
-configure:7567: checking sys/sockio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/sockio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/sockio.h>
-configure:7605: result: no
-configure:7609: checking sys/sockio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/sockio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/sockio.h>
-configure:7645: result: no
-configure:7678: checking for sys/sockio.h
-configure:7687: result: no
-configure:7567: checking sys/soundcard.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/soundcard.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/soundcard.h>
-configure:7605: result: no
-configure:7609: checking sys/soundcard.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/soundcard.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/soundcard.h>
-configure:7645: result: no
-configure:7678: checking for sys/soundcard.h
-configure:7687: result: no
-configure:7567: checking sys/statvfs.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/statvfs.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/statvfs.h>
-configure:7605: result: no
-configure:7609: checking sys/statvfs.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/statvfs.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/statvfs.h>
-configure:7645: result: no
-configure:7678: checking for sys/statvfs.h
-configure:7687: result: no
-configure:7567: checking sys/strtio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/strtio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/strtio.h>
-configure:7605: result: no
-configure:7609: checking sys/strtio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/strtio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/strtio.h>
-configure:7645: result: no
-configure:7678: checking for sys/strtio.h
-configure:7687: result: no
-configure:7567: checking sys/syscall.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/syscall.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/syscall.h>
-configure:7605: result: no
-configure:7609: checking sys/syscall.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/syscall.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/syscall.h>
-configure:7645: result: no
-configure:7678: checking for sys/syscall.h
-configure:7687: result: no
-configure:7567: checking sys/sysctl.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/sysctl.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/sysctl.h>
-configure:7605: result: no
-configure:7609: checking sys/sysctl.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/sysctl.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/sysctl.h>
-configure:7645: result: no
-configure:7678: checking for sys/sysctl.h
-configure:7687: result: no
-configure:7567: checking sys/time.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/time.h>
-configure:7605: result: no
-configure:7609: checking sys/time.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/time.h>
-configure:7645: result: no
-configure:7678: checking for sys/time.h
-configure:7687: result: no
-configure:7567: checking sys/times.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/times.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/times.h>
-configure:7605: result: no
-configure:7609: checking sys/times.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/times.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/times.h>
-configure:7645: result: no
-configure:7678: checking for sys/times.h
-configure:7687: result: no
-configure:7567: checking sys/uio.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/uio.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/uio.h>
-configure:7605: result: no
-configure:7609: checking sys/uio.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/uio.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/uio.h>
-configure:7645: result: no
-configure:7678: checking for sys/uio.h
-configure:7687: result: no
-configure:7567: checking sys/un.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/un.h>
-configure:7605: result: no
-configure:7609: checking sys/un.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/un.h>
-configure:7645: result: no
-configure:7678: checking for sys/un.h
-configure:7687: result: no
-configure:7567: checking sys/vm86.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/vm86.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/vm86.h>
-configure:7605: result: no
-configure:7609: checking sys/vm86.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/vm86.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/vm86.h>
-configure:7645: result: no
-configure:7678: checking for sys/vm86.h
-configure:7687: result: no
-configure:7567: checking sys/wait.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'sys/wait.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/wait.h>
-configure:7605: result: no
-configure:7609: checking sys/wait.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'sys/wait.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/wait.h>
-configure:7645: result: no
-configure:7678: checking for sys/wait.h
-configure:7687: result: no
-configure:7567: checking syscall.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'syscall.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <syscall.h>
-configure:7605: result: no
-configure:7609: checking syscall.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'syscall.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <syscall.h>
-configure:7645: result: no
-configure:7678: checking for syscall.h
-configure:7687: result: no
-configure:7567: checking termios.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'termios.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <termios.h>
-configure:7605: result: no
-configure:7609: checking termios.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'termios.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <termios.h>
-configure:7645: result: no
-configure:7678: checking for termios.h
-configure:7687: result: no
-configure:7556: checking for unistd.h
-configure:7563: result: no
-configure:7567: checking utime.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'utime.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <utime.h>
-configure:7605: result: no
-configure:7609: checking utime.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'utime.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <utime.h>
-configure:7645: result: no
-configure:7678: checking for utime.h
-configure:7687: result: no
-configure:7567: checking valgrind/memcheck.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'valgrind/memcheck.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <valgrind/memcheck.h>
-configure:7605: result: no
-configure:7609: checking valgrind/memcheck.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'valgrind/memcheck.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <valgrind/memcheck.h>
-configure:7645: result: no
-configure:7678: checking for valgrind/memcheck.h
-configure:7687: result: no
-configure:7567: checking valgrind/valgrind.h usability
-configure:7584: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(52) : fatal error C1083: Cannot open include file: 'valgrind/valgrind.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7591: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <valgrind/valgrind.h>
-configure:7605: result: no
-configure:7609: checking valgrind/valgrind.h presence
-configure:7624: cl.exe -E  conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-conftest.c
-conftest.c(19) : fatal error C1083: Cannot open include file: 'valgrind/valgrind.h': No such file or directory
-configure:7631: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <valgrind/valgrind.h>
-configure:7645: result: no
-configure:7678: checking for valgrind/valgrind.h
-configure:7687: result: no
-configure:7702: checking whether stat file-mode macros are broken
-configure:7739: cl.exe -c -g  conftest.c >&5
-conftest.c
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7746: $? = 0
-configure:7761: result: no
-configure:7780: checking for sys/mount.h
-configure:7804: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(24) : fatal error C1083: Cannot open include file: 'sys/mount.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7811: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_PARAM_H
-|      # include <sys/param.h>
-|      #endif
-| 
-| #include <sys/mount.h>
-configure:7828: result: no
-configure:7780: checking for sys/statfs.h
-configure:7804: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(24) : fatal error C1083: Cannot open include file: 'sys/statfs.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7811: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_PARAM_H
-|      # include <sys/param.h>
-|      #endif
-| 
-| #include <sys/statfs.h>
-configure:7828: result: no
-configure:7780: checking for sys/user.h
-configure:7804: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(24) : fatal error C1083: Cannot open include file: 'sys/user.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7811: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_PARAM_H
-|      # include <sys/param.h>
-|      #endif
-| 
-| #include <sys/user.h>
-configure:7828: result: no
-configure:7780: checking for sys/vfs.h
-configure:7804: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(24) : fatal error C1083: Cannot open include file: 'sys/vfs.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7811: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_PARAM_H
-|      # include <sys/param.h>
-|      #endif
-| 
-| #include <sys/vfs.h>
-configure:7828: result: no
-configure:7870: checking for netinet/ip.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'netinet/ip.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <netinet/ip.h>
-configure:7927: result: no
-configure:7870: checking for net/if.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'net/if.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <net/if.h>
-configure:7927: result: no
-configure:7870: checking for net/if_arp.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'net/if_arp.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <net/if_arp.h>
-configure:7927: result: no
-configure:7870: checking for net/if_dl.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'net/if_dl.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <net/if_dl.h>
-configure:7927: result: no
-configure:7870: checking for net/if_types.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'net/if_types.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <net/if_types.h>
-configure:7927: result: no
-configure:7870: checking for net/route.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'net/route.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <net/route.h>
-configure:7927: result: no
-configure:7870: checking for netinet/if_ether.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'netinet/if_ether.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <netinet/if_ether.h>
-configure:7927: result: no
-configure:7870: checking for netinet/in_pcb.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'netinet/in_pcb.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <netinet/in_pcb.h>
-configure:7927: result: no
-configure:7870: checking for netinet/ip_icmp.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'netinet/ip_icmp.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <netinet/ip_icmp.h>
-configure:7927: result: no
-configure:7870: checking for netinet/ip_var.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'netinet/ip_var.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <netinet/ip_var.h>
-configure:7927: result: no
-configure:7870: checking for netinet/udp.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'netinet/udp.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <netinet/udp.h>
-configure:7927: result: no
-configure:7870: checking for netipx/ipx.h
-configure:7903: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(33) : fatal error C1083: Cannot open include file: 'netipx/ipx.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:7910: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-| 
-| #include <netipx/ipx.h>
-configure:7927: result: no
-configure:7948: checking for netinet/tcp_var.h
-configure:7996: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'netinet/tcp_var.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8003: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_ALIAS_H
-|      # include <alias.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_VAR_H
-|      # include <netinet/ip_var.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_ICMP_H
-|      # include <netinet/ip_icmp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_UDP_H
-|      # include <netinet/udp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_TCP_H
-|      # include <netinet/tcp.h>
-|      #endif
-| 
-| #include <netinet/tcp_var.h>
-configure:8020: result: no
-configure:7948: checking for netinet/udp_var.h
-configure:7996: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'netinet/udp_var.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8003: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_ALIAS_H
-|      # include <alias.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_VAR_H
-|      # include <netinet/ip_var.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_ICMP_H
-|      # include <netinet/ip_icmp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_UDP_H
-|      # include <netinet/udp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_TCP_H
-|      # include <netinet/tcp.h>
-|      #endif
-| 
-| #include <netinet/udp_var.h>
-configure:8020: result: no
-configure:7948: checking for netinet/icmp_var.h
-configure:7996: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'netinet/icmp_var.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8003: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_ALIAS_H
-|      # include <alias.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_VAR_H
-|      # include <netinet/ip_var.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_ICMP_H
-|      # include <netinet/ip_icmp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_UDP_H
-|      # include <netinet/udp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_TCP_H
-|      # include <netinet/tcp.h>
-|      #endif
-| 
-| #include <netinet/icmp_var.h>
-configure:8020: result: no
-configure:7948: checking for netinet/tcp_timer.h
-configure:7996: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(48) : fatal error C1083: Cannot open include file: 'netinet/tcp_timer.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8003: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_ALIAS_H
-|      # include <alias.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKETVAR_H
-|      # include <sys/socketvar.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_H
-|      # include <netinet/ip.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_VAR_H
-|      # include <netinet/ip_var.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IP_ICMP_H
-|      # include <netinet/ip_icmp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_UDP_H
-|      # include <netinet/udp.h>
-|      #endif
-|      #ifdef HAVE_NETINET_TCP_H
-|      # include <netinet/tcp.h>
-|      #endif
-| 
-| #include <netinet/tcp_timer.h>
-configure:8020: result: no
-configure:8038: checking for linux/ipx.h
-configure:8065: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(27) : fatal error C1083: Cannot open include file: 'linux/ipx.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8072: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_ASM_TYPES_H
-|      # include <asm/types.h>
-|      #endif
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-| 
-| #include <linux/ipx.h>
-configure:8089: result: no
-configure:8107: checking for resolv.h
-configure:8137: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(30) : fatal error C1083: Cannot open include file: 'resolv.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8144: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-|      #ifdef HAVE_SYS_SOCKET_H
-|      # include <sys/socket.h>
-|      #endif
-|      #ifdef HAVE_NETINET_IN_H
-|      # include <netinet/in.h>
-|      #endif
-|      #ifdef HAVE_ARPA_NAMESER_H
-|      # include <arpa/nameser.h>
-|      #endif
-| 
-| #include <resolv.h>
-configure:8161: result: no
-configure:8179: checking for ucontext.h
-configure:8200: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(21) : fatal error C1083: Cannot open include file: 'ucontext.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8207: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <signal.h>
-| 
-| #include <ucontext.h>
-configure:8224: result: no
-configure:8242: checking for sys/thr.h
-configure:8266: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(24) : fatal error C1083: Cannot open include file: 'sys/thr.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8273: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-| #ifdef HAVE_UCONTEXT_H
-| #include <ucontext.h>
-| #endif
-| 
-| #include <sys/thr.h>
-configure:8290: result: no
-configure:8308: checking for pthread_np.h
-configure:8331: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(23) : fatal error C1083: Cannot open include file: 'pthread_np.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8338: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #ifdef HAVE_PTHREAD_H
-| #include <pthread.h>
-| #endif
-| 
-| #include <pthread_np.h>
-configure:8355: result: no
-configure:8373: checking for linux/videodev.h
-configure:8400: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(27) : fatal error C1083: Cannot open include file: 'linux/videodev.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8407: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #ifdef HAVE_SYS_TIME_H
-| #include <sys/time.h>
-| #endif
-| #include <sys/types.h>
-| #ifdef HAVE_ASM_TYPES_H
-| #include <asm/types.h>
-| #endif
-| 
-| #include <linux/videodev.h>
-configure:8424: result: no
-configure:8442: checking for linux/capi.h
-configure:8463: cl.exe -c -g  conftest.c >&5
-conftest.c
-conftest.c(21) : fatal error C1083: Cannot open include file: 'linux/capi.h': No such file or directory
-Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
-Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
-
-cl : Command line warning D4002 : ignoring unknown option '-g'
-configure:8470: $? = 2
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "Wine"
-| #define PACKAGE_TARNAME "wine"
-| #define PACKAGE_VERSION "1.1.10"
-| #define PACKAGE_STRING "Wine 1.1.10"
-| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-| #define X_DISPLAY_MISSING 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_DIRECT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_IO_H 1
-| #define HAVE_PROCESS_H 1
-| /* end confdefs.h.  */
-| #define __user
-| 
-| #include <linux/capi.h>
-configure:8487: result: no
-configure:8520: checking for ldd
-configure:8552: result: true
-configure:8606: checking for dlltool
-configure:8636: result: no
-configure:8698: checking for dllwrap
-configure:8728: result: no
-configure:8790: checking for ar
-configure:8820: result: no
-configure:9711: error: could not find a way to build shared libraries.
-It is currently not possible to build Wine without shared library
-(.so) support to allow transparent switch between .so and .dll files.
-If you are using Linux, you will need a newer binutils.
-
-
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-
-ac_cv_build=i686-pc-cygwin
-ac_cv_c_compiler_gnu=no
-ac_cv_cxx_compiler_gnu=no
-ac_cv_env_CCC_set=
-ac_cv_env_CCC_value=
-ac_cv_env_CC_set=
-ac_cv_env_CC_value=
-ac_cv_env_CFLAGS_set=
-ac_cv_env_CFLAGS_value=
-ac_cv_env_CPPFLAGS_set=
-ac_cv_env_CPPFLAGS_value=
-ac_cv_env_CPP_set=
-ac_cv_env_CPP_value=
-ac_cv_env_CXXFLAGS_set=
-ac_cv_env_CXXFLAGS_value=
-ac_cv_env_CXX_set=
-ac_cv_env_CXX_value=
-ac_cv_env_LDFLAGS_set=
-ac_cv_env_LDFLAGS_value=
-ac_cv_env_LIBS_set=
-ac_cv_env_LIBS_value=
-ac_cv_env_XMKMF_set=
-ac_cv_env_XMKMF_value=
-ac_cv_env_build_alias_set=
-ac_cv_env_build_alias_value=
-ac_cv_env_host_alias_set=
-ac_cv_env_host_alias_value=
-ac_cv_env_target_alias_set=
-ac_cv_env_target_alias_value=
-ac_cv_exeext=.exe
-ac_cv_header_AudioUnit_AudioUnit_h=no
-ac_cv_header_Carbon_Carbon_h=no
-ac_cv_header_CoreAudio_CoreAudio_h=no
-ac_cv_header_DiskArbitration_DiskArbitration_h=no
-ac_cv_header_GL_glu_h=no
-ac_cv_header_IOKit_IOKitLib_h=no
-ac_cv_header_alias_h=no
-ac_cv_header_alsa_asoundlib_h=no
-ac_cv_header_arpa_inet_h=no
-ac_cv_header_arpa_nameser_h=no
-ac_cv_header_asm_types_h=no
-ac_cv_header_capi20_h=no
-ac_cv_header_curses_h=no
-ac_cv_header_direct_h=yes
-ac_cv_header_dirent_h=no
-ac_cv_header_dlfcn_h=no
-ac_cv_header_elf_h=no
-ac_cv_header_float_h=yes
-ac_cv_header_fontconfig_fontconfig_h=no
-ac_cv_header_getopt_h=no
-ac_cv_header_ieeefp_h=no
-ac_cv_header_inttypes_h=no
-ac_cv_header_io_h=yes
-ac_cv_header_jack_jack_h=no
-ac_cv_header_jpeglib_h=no
-ac_cv_header_lber_h=no
-ac_cv_header_lcms_h=no
-ac_cv_header_lcms_lcms_h=no
-ac_cv_header_ldap_h=no
-ac_cv_header_libaudioio_h=no
-ac_cv_header_link_h=no
-ac_cv_header_linux_capi_h=no
-ac_cv_header_linux_cdrom_h=no
-ac_cv_header_linux_compiler_h=no
-ac_cv_header_linux_hdreg_h=no
-ac_cv_header_linux_input_h=no
-ac_cv_header_linux_ioctl_h=no
-ac_cv_header_linux_ipx_h=no
-ac_cv_header_linux_joystick_h=no
-ac_cv_header_linux_major_h=no
-ac_cv_header_linux_param_h=no
-ac_cv_header_linux_serial_h=no
-ac_cv_header_linux_ucdrom_h=no
-ac_cv_header_linux_videodev_h=no
-ac_cv_header_mach_mach_h=no
-ac_cv_header_mach_machine_h=no
-ac_cv_header_machine_cpu_h=no
-ac_cv_header_machine_limits_h=no
-ac_cv_header_machine_soundcard_h=no
-ac_cv_header_memory_h=yes
-ac_cv_header_mntent_h=no
-ac_cv_header_ncurses_h=no
-ac_cv_header_net_if_arp_h=no
-ac_cv_header_net_if_dl_h=no
-ac_cv_header_net_if_h=no
-ac_cv_header_net_if_types_h=no
-ac_cv_header_net_route_h=no
-ac_cv_header_netdb_h=no
-ac_cv_header_netinet_icmp_var_h=no
-ac_cv_header_netinet_if_ether_h=no
-ac_cv_header_netinet_in_h=no
-ac_cv_header_netinet_in_pcb_h=no
-ac_cv_header_netinet_in_systm_h=no
-ac_cv_header_netinet_ip_h=no
-ac_cv_header_netinet_ip_icmp_h=no
-ac_cv_header_netinet_ip_var_h=no
-ac_cv_header_netinet_tcp_fsm_h=no
-ac_cv_header_netinet_tcp_h=no
-ac_cv_header_netinet_tcp_timer_h=no
-ac_cv_header_netinet_tcp_var_h=no
-ac_cv_header_netinet_udp_h=no
-ac_cv_header_netinet_udp_var_h=no
-ac_cv_header_netipx_ipx_h=no
-ac_cv_header_openssl_err_h=no
-ac_cv_header_openssl_ssl_h=no
-ac_cv_header_png_h=no
-ac_cv_header_poll_h=no
-ac_cv_header_process_h=yes
-ac_cv_header_pthread_h=no
-ac_cv_header_pthread_np_h=no
-ac_cv_header_pwd_h=no
-ac_cv_header_regex_h=no
-ac_cv_header_resolv_h=no
-ac_cv_header_sched_h=no
-ac_cv_header_scsi_scsi_h=no
-ac_cv_header_scsi_scsi_ioctl_h=no
-ac_cv_header_scsi_sg_h=no
-ac_cv_header_soundcard_h=no
-ac_cv_header_stat_broken=no
-ac_cv_header_stdc=yes
-ac_cv_header_stdint_h=no
-ac_cv_header_stdlib_h=yes
-ac_cv_header_string_h=yes
-ac_cv_header_strings_h=no
-ac_cv_header_sys_asoundlib_h=no
-ac_cv_header_sys_cdio_h=no
-ac_cv_header_sys_elf32_h=no
-ac_cv_header_sys_epoll_h=no
-ac_cv_header_sys_errno_h=no
-ac_cv_header_sys_event_h=no
-ac_cv_header_sys_exec_elf_h=no
-ac_cv_header_sys_filio_h=no
-ac_cv_header_sys_ioctl_h=no
-ac_cv_header_sys_ipc_h=no
-ac_cv_header_sys_limits_h=no
-ac_cv_header_sys_link_h=no
-ac_cv_header_sys_lwp_h=no
-ac_cv_header_sys_mman_h=no
-ac_cv_header_sys_modem_h=no
-ac_cv_header_sys_mount_h=no
-ac_cv_header_sys_msg_h=no
-ac_cv_header_sys_mtio_h=no
-ac_cv_header_sys_param_h=no
-ac_cv_header_sys_poll_h=no
-ac_cv_header_sys_prctl_h=no
-ac_cv_header_sys_ptrace_h=no
-ac_cv_header_sys_reg_h=no
-ac_cv_header_sys_resource_h=no
-ac_cv_header_sys_scsiio_h=no
-ac_cv_header_sys_shm_h=no
-ac_cv_header_sys_signal_h=no
-ac_cv_header_sys_socket_h=no
-ac_cv_header_sys_socketvar_h=no
-ac_cv_header_sys_sockio_h=no
-ac_cv_header_sys_soundcard_h=no
-ac_cv_header_sys_stat_h=yes
-ac_cv_header_sys_statfs_h=no
-ac_cv_header_sys_statvfs_h=no
-ac_cv_header_sys_strtio_h=no
-ac_cv_header_sys_syscall_h=no
-ac_cv_header_sys_sysctl_h=no
-ac_cv_header_sys_thr_h=no
-ac_cv_header_sys_time_h=no
-ac_cv_header_sys_times_h=no
-ac_cv_header_sys_types_h=yes
-ac_cv_header_sys_uio_h=no
-ac_cv_header_sys_un_h=no
-ac_cv_header_sys_user_h=no
-ac_cv_header_sys_vfs_h=no
-ac_cv_header_sys_vm86_h=no
-ac_cv_header_sys_wait_h=no
-ac_cv_header_syscall_h=no
-ac_cv_header_termios_h=no
-ac_cv_header_ucontext_h=no
-ac_cv_header_unistd_h=no
-ac_cv_header_utime_h=no
-ac_cv_header_valgrind_memcheck_h=no
-ac_cv_header_valgrind_valgrind_h=no
-ac_cv_host=i686-pc-cygwin
-ac_cv_lib_i386_i386_set_ldt=no
-ac_cv_lib_ossaudio__oss_ioctl=no
-ac_cv_lib_pthread_pthread_create=no
-ac_cv_objext=obj
-ac_cv_path_EGREP='/usr/bin/grep -E'
-ac_cv_path_GREP=/usr/bin/grep
-ac_cv_path_LDCONFIG=true
-ac_cv_path_LDD=true
-ac_cv_path_PRELINK=false
-ac_cv_path_install='/usr/bin/install -c'
-ac_cv_prog_BISON=bison
-ac_cv_prog_CPP='cl.exe -E'
-ac_cv_prog_FLEX=flex
-ac_cv_prog_ac_ct_CC=cl.exe
-ac_cv_prog_ac_ct_CXX=cl.exe
-ac_cv_prog_cc_c89=
-ac_cv_prog_cc_g=yes
-ac_cv_prog_cxx_g=yes
-ac_cv_prog_make_make_set=yes
-wine_cv_toolsdir='$(TOPOBJDIR)'
-
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-
-ALL_DLL_DIRS=''
-ALL_IMPLIB_DIRS=''
-ALL_MAKEFILES=''
-ALL_MAKEFILE_DEPENDS=''
-ALL_MAKERULES=''
-ALL_PROGRAM_BIN_INSTALL_DIRS=''
-ALL_PROGRAM_DIRS=''
-ALL_PROGRAM_INSTALL_DIRS=''
-ALL_TEST_DIRS=''
-ALL_TOP_DIRS=''
-ALL_WINETEST_DEPENDS=''
-ALSALIBS=''
-AR='ar'
-ARFLAGS='rc'
-AS='as'
-AUDIOIOLIBS=''
-BISON='bison'
-BUILTINFLAG=''
-CARBONLIB=''
-CC='cl.exe'
-CFLAGS='-g'
-COREAUDIO=''
-COREFOUNDATIONLIB=''
-CPP='cl.exe -E'
-CPPBIN='cpp'
-CPPFLAGS=''
-CROSSCC=''
-CROSSTEST=''
-CROSSWINDRES=''
-CRTLIBS=''
-CUPSINCL=''
-CXX='cl.exe'
-CXXFLAGS='-g'
-DEFS=''
-DEPENDENCIES=''
-DISKARBITRATIONLIB=''
-DLLEXT=''
-DLLFLAGS='-D_REENTRANT'
-DLLTOOL='false'
-DLLWRAP='false'
-ECHO_C=''
-ECHO_N='-n'
-ECHO_T=''
-EGREP='/usr/bin/grep -E'
-ESDCONFIG=''
-ESDINCL=''
-ESDLIBS=''
-EXEEXT='.exe'
-EXTRACFLAGS=''
-EXTRA_BINARIES=''
-FLEX='flex'
-FONTCONFIGINCL=''
-FONTFORGE='false'
-FREETYPEINCL=''
-FREETYPELIBS=''
-GNUTLSINCL=''
-GPHOTO2INCL=''
-GPHOTO2LIBS=''
-GREP='/usr/bin/grep'
-HALINCL=''
-ICOTOOL='false'
-IMPLIBEXT='a'
-INSTALL_DATA='${INSTALL} -m 644'
-INSTALL_PROGRAM='${INSTALL}'
-INSTALL_SCRIPT='${INSTALL}'
-IOKITLIB=''
-LCMSLIBS=''
-LD='ld'
-LDAPLIBS=''
-LDCONFIG='true'
-LDD='true'
-LDDLLFLAGS=''
-LDEXECFLAGS=''
-LDFLAGS=''
-LDPATH=''
-LDRPATH_INSTALL=''
-LDRPATH_LOCAL=''
-LDSHARED=''
-LIBDL=''
-LIBEXT='a'
-LIBOBJS=''
-LIBPOLL=''
-LIBPTHREAD=''
-LIBS=''
-LINT=''
-LINTFLAGS=''
-LN='ln'
-LN_S='ln -s'
-LTLIBOBJS=''
-MAINTAINER_MODE='#'
-MAIN_BINARY=''
-MINGWAR='false'
-NASLIBS=''
-NM='nm'
-OBJEXT='obj'
-OPENGL_LIBS=''
-PACKAGE_BUGREPORT='wine-devel@winehq.org'
-PACKAGE_NAME='Wine'
-PACKAGE_STRING='Wine 1.1.10'
-PACKAGE_TARNAME='wine'
-PACKAGE_VERSION='1.1.10'
-PATH_SEPARATOR=':'
-PKG_CONFIG='false'
-PRELINK='false'
-RANLIB=':'
-RESOLVLIBS=''
-RSVG='false'
-SANEINCL=''
-SECURITYLIB=''
-SET_MAKE=''
-SHELL='/bin/sh'
-SOCKETLIBS=''
-STRIP='strip'
-TOOLSDIR='$(TOPOBJDIR)'
-WIN16_FILES=''
-WIN16_INSTALL=''
-WINDRES='false'
-XLIB=''
-XMKMF=''
-XML2INCL=''
-XML2LIBS=''
-XSLTINCL=''
-X_CFLAGS=''
-X_EXTRA_LIBS=''
-X_LIBS=''
-X_PRE_LIBS=''
-ac_ct_AR=''
-ac_ct_AS=''
-ac_ct_CC='cl.exe'
-ac_ct_CXX='cl.exe'
-ac_ct_LD=''
-ac_ct_NM=''
-bindir='${exec_prefix}/bin'
-build='i686-pc-cygwin'
-build_alias=''
-build_cpu='i686'
-build_os='cygwin'
-build_vendor='pc'
-datadir='${datarootdir}'
-datarootdir='${prefix}/share'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-dvidir='${docdir}'
-exec_prefix='NONE'
-ft_devel=''
-gphoto2_devel=''
-gphoto2port_devel=''
-host='i686-pc-cygwin'
-host_alias=''
-host_cpu='i686'
-host_os='cygwin'
-host_vendor='pc'
-htmldir='${docdir}'
-includedir='${prefix}/include'
-infodir='${datarootdir}/info'
-libdir='${exec_prefix}/lib'
-libexecdir='${exec_prefix}/libexec'
-localedir='${datarootdir}/locale'
-localstatedir='${prefix}/var'
-mandir='${datarootdir}/man'
-oldincludedir='/usr/include'
-pdfdir='${docdir}'
-prefix='NONE'
-program_transform_name='s,x,x,'
-psdir='${docdir}'
-sane_devel=''
-sbindir='${exec_prefix}/sbin'
-sharedstatedir='${prefix}/com'
-sysconfdir='${prefix}/etc'
-target_alias=''
-
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-
-MAKE_DLL_RULES=''
-MAKE_IMPLIB_RULES=''
-MAKE_PROG_RULES=''
-MAKE_RULES=''
-MAKE_TEST_RULES=''
-
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-
-#define PACKAGE_NAME "Wine"
-#define PACKAGE_TARNAME "wine"
-#define PACKAGE_VERSION "1.1.10"
-#define PACKAGE_STRING "Wine 1.1.10"
-#define PACKAGE_BUGREPORT "wine-devel@winehq.org"
-#define X_DISPLAY_MISSING 1
-#define STDC_HEADERS 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_DIRECT_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_IO_H 1
-#define HAVE_PROCESS_H 1
-
-configure: exit 1
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c	(revision 19678)
@@ -65,5 +65,5 @@
 static void context_destroy_fbo(IWineD3DDeviceImpl *This, const GLuint *fbo)
 {
-    int i = 0;
+    unsigned int i;
 
     GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, *fbo));
@@ -134,5 +134,5 @@
         }
 
-        IWineD3DSurface_PreLoad(surface);
+        surface_internal_preload(surface, SRGB_RGB);
 
         glBindTexture(bind_target, surface_impl->glDescription.textureName);
@@ -210,5 +210,6 @@
             if (attachment)
             {
-                FIXME("\tColor attachment %d: (%p) %s %ux%u\n", i, attachment, debug_d3dformat(attachment->resource.format),
+                FIXME("\tColor attachment %d: (%p) %s %ux%u\n",
+                        i, attachment, debug_d3dformat(attachment->resource.format_desc->format),
                         attachment->pow2Width, attachment->pow2Height);
             }
@@ -217,5 +218,6 @@
         if (attachment)
         {
-            FIXME("\tDepth attachment: (%p) %s %ux%u\n", attachment, debug_d3dformat(attachment->resource.format),
+            FIXME("\tDepth attachment: (%p) %s %ux%u\n",
+                    attachment, debug_d3dformat(attachment->resource.format_desc->format),
                     attachment->pow2Width, attachment->pow2Height);
         }
@@ -454,5 +456,7 @@
 
 /* This function takes care of WineD3D pixel format selection. */
-static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DFORMAT ColorFormat, WINED3DFORMAT DepthStencilFormat, BOOL auxBuffers, int numSamples, BOOL pbuffer, BOOL findCompatible)
+static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
+        const struct GlPixelFormatDesc *color_format_desc, const struct GlPixelFormatDesc *ds_format_desc,
+        BOOL auxBuffers, int numSamples, BOOL pbuffer, BOOL findCompatible)
 {
     int iPixelFormat=0;
@@ -485,8 +489,11 @@
 
     TRACE("ColorFormat=%s, DepthStencilFormat=%s, auxBuffers=%d, numSamples=%d, pbuffer=%d, findCompatible=%d\n",
-          debug_d3dformat(ColorFormat), debug_d3dformat(DepthStencilFormat), auxBuffers, numSamples, pbuffer, findCompatible);
-
-    if(!getColorBits(ColorFormat, &redBits, &greenBits, &blueBits, &alphaBits, &colorBits)) {
-        ERR("Unable to get color bits for format %s (%#x)!\n", debug_d3dformat(ColorFormat), ColorFormat);
+          debug_d3dformat(color_format_desc->format), debug_d3dformat(ds_format_desc->format),
+          auxBuffers, numSamples, pbuffer, findCompatible);
+
+    if (!getColorBits(color_format_desc, &redBits, &greenBits, &blueBits, &alphaBits, &colorBits))
+    {
+        ERR("Unable to get color bits for format %s (%#x)!\n",
+                debug_d3dformat(color_format_desc->format), color_format_desc->format);
         return 0;
     }
@@ -503,12 +510,11 @@
      * time. It can cause a slight performance hit but fixes a lot of regressions. A fixme reminds of that this
      * issue needs to be fixed. */
-    if(DepthStencilFormat != WINED3DFMT_D24S8)
+    if (ds_format_desc->format != WINED3DFMT_D24S8)
+    {
         FIXME("Add OpenGL context recreation support to SetDepthStencilSurface\n");
-
-    DepthStencilFormat = WINED3DFMT_D24S8;
-
-    if(DepthStencilFormat) {
-        getDepthStencilBits(DepthStencilFormat, &depthBits, &stencilBits);
-    }
+        ds_format_desc = getFormatDescEntry(WINED3DFMT_D24S8, &This->adapter->gl_info);
+    }
+
+    getDepthStencilBits(ds_format_desc, &depthBits, &stencilBits);
 
     for(matchtry = 0; matchtry < (sizeof(matches) / sizeof(matches[0])) && !iPixelFormat; matchtry++) {
@@ -622,5 +628,6 @@
     }
 
-    TRACE("Found iPixelFormat=%d for ColorFormat=%s, DepthStencilFormat=%s\n", iPixelFormat, debug_d3dformat(ColorFormat), debug_d3dformat(DepthStencilFormat));
+    TRACE("Found iPixelFormat=%d for ColorFormat=%s, DepthStencilFormat=%s\n",
+            iPixelFormat, debug_d3dformat(color_format_desc->format), debug_d3dformat(ds_format_desc->format));
     return iPixelFormat;
 }
@@ -644,5 +651,5 @@
     HGLRC ctx = NULL, oldCtx;
     WineD3DContext *ret = NULL;
-    int s;
+    unsigned int s;
 
     TRACE("(%p): Creating a %s context for render target %p\n", This, create_pbuffer ? "offscreen" : "onscreen", target);
@@ -653,8 +660,12 @@
 
         IWineD3DSurface *StencilSurface = This->stencilBufferTarget;
-        WINED3DFORMAT StencilBufferFormat = (NULL != StencilSurface) ? ((IWineD3DSurfaceImpl *) StencilSurface)->resource.format : 0;
+        const struct GlPixelFormatDesc *ds_format_desc = StencilSurface
+                ? ((IWineD3DSurfaceImpl *)StencilSurface)->resource.format_desc
+                : getFormatDescEntry(WINED3DFMT_UNKNOWN, &This->adapter->gl_info);
 
         /* Try to find a pixel format with pbuffer support. */
-        iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc_parent, target->resource.format, StencilBufferFormat, FALSE /* auxBuffers */, 0 /* numSamples */, TRUE /* PBUFFER */, FALSE /* findCompatible */);
+        iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc_parent, target->resource.format_desc,
+                ds_format_desc, FALSE /* auxBuffers */, 0 /* numSamples */, TRUE /* PBUFFER */,
+                FALSE /* findCompatible */);
         if(!iPixelFormat) {
             TRACE("Trying to locate a compatible pixel format because an exact match failed.\n");
@@ -662,5 +673,7 @@
             /* For some reason we weren't able to find a format, try to find something instead of crashing.
              * A reason for failure could have been wglChoosePixelFormatARB strictness. */
-            iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc_parent, target->resource.format, StencilBufferFormat, FALSE /* auxBuffer */, 0 /* numSamples */, TRUE /* PBUFFER */, TRUE /* findCompatible */);
+            iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc_parent, target->resource.format_desc,
+                    ds_format_desc, FALSE /* auxBuffer */, 0 /* numSamples */, TRUE /* PBUFFER */,
+                    TRUE /* findCompatible */);
         }
 
@@ -693,6 +706,7 @@
         int iPixelFormat;
         int res;
-        WINED3DFORMAT ColorFormat = target->resource.format;
-        WINED3DFORMAT DepthStencilFormat = 0;
+        const struct GlPixelFormatDesc *color_format_desc = target->resource.format_desc;
+        const struct GlPixelFormatDesc *ds_format_desc = getFormatDescEntry(WINED3DFMT_UNKNOWN,
+                &This->adapter->gl_info);
         BOOL auxBuffers = FALSE;
         int numSamples = 0;
@@ -708,8 +722,8 @@
             auxBuffers = TRUE;
 
-            if(target->resource.format == WINED3DFMT_X4R4G4B4)
-                ColorFormat = WINED3DFMT_A4R4G4B4;
-            else if(target->resource.format == WINED3DFMT_X8R8G8B8)
-                ColorFormat = WINED3DFMT_A8R8G8B8;
+            if (color_format_desc->format == WINED3DFMT_X4R4G4B4)
+                color_format_desc = getFormatDescEntry(WINED3DFMT_A4R4G4B4, &This->adapter->gl_info);
+            else if (color_format_desc->format == WINED3DFMT_X8R8G8B8)
+                color_format_desc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &This->adapter->gl_info);
         }
 
@@ -718,6 +732,6 @@
          * The conversion (ab)uses the alpha component for storing the palette index. For this reason we require
          * a format with 8bit alpha, so request A8R8G8B8. */
-        if(ColorFormat == WINED3DFMT_P8)
-            ColorFormat = WINED3DFMT_A8R8G8B8;
+        if (color_format_desc->format == WINED3DFMT_P8)
+            color_format_desc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &This->adapter->gl_info);
 
         /* Retrieve the depth stencil format from the present parameters.
@@ -726,5 +740,5 @@
         if(pPresentParms->EnableAutoDepthStencil) {
             TRACE("pPresentParms->EnableAutoDepthStencil=enabled; using AutoDepthStencilFormat=%s\n", debug_d3dformat(pPresentParms->AutoDepthStencilFormat));
-            DepthStencilFormat = pPresentParms->AutoDepthStencilFormat;
+            ds_format_desc = getFormatDescEntry(pPresentParms->AutoDepthStencilFormat, &This->adapter->gl_info);
         }
 
@@ -740,10 +754,12 @@
 
         /* Try to find a pixel format which matches our requirements */
-        iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc, ColorFormat, DepthStencilFormat, auxBuffers, numSamples, FALSE /* PBUFFER */, FALSE /* findCompatible */);
+        iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc, color_format_desc, ds_format_desc,
+                auxBuffers, numSamples, FALSE /* PBUFFER */, FALSE /* findCompatible */);
 
         /* Try to locate a compatible format if we weren't able to find anything */
         if(!iPixelFormat) {
             TRACE("Trying to locate a compatible pixel format because an exact match failed.\n");
-            iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc, ColorFormat, DepthStencilFormat, auxBuffers, 0 /* numSamples */, FALSE /* PBUFFER */, TRUE /* findCompatible */ );
+            iPixelFormat = WineD3D_ChoosePixelFormat(This, hdc, color_format_desc, ds_format_desc,
+                    auxBuffers, 0 /* numSamples */, FALSE /* PBUFFER */, TRUE /* findCompatible */ );
         }
 
@@ -849,10 +865,4 @@
     checkGLcall("glClear");
 
-    glColor3f(1.0, 1.0, 1.0);
-    checkGLcall("glColor3f");
-
-    glEnable(GL_LIGHTING);
-    checkGLcall("glEnable");
-
     glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
     checkGLcall("glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);");
@@ -895,10 +905,8 @@
     }
 
-    if(GL_SUPPORT(ARB_POINT_SPRITE)) {
-        for(s = 0; s < GL_LIMITS(textures); s++) {
-            GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + s));
-            glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
-            checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n");
-        }
+    for(s = 0; s < GL_LIMITS(point_sprite_units); s++) {
+        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + s));
+        glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
+        checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n");
     }
     LEAVE_GL();
@@ -935,29 +943,48 @@
  *****************************************************************************/
 static void RemoveContextFromArray(IWineD3DDeviceImpl *This, WineD3DContext *context) {
-    UINT t, s;
-    WineD3DContext **oldArray = This->contexts;
+    WineD3DContext **new_array;
+    BOOL found = FALSE;
+    UINT i;
 
     TRACE("Removing ctx %p\n", context);
 
-    This->numContexts--;
-
-    if(This->numContexts) {
-        This->contexts = HeapAlloc(GetProcessHeap(), 0, sizeof(*This->contexts) * This->numContexts);
-        if(!This->contexts) {
-            ERR("Cannot allocate a new context array, PANIC!!!\n");
-        }
-        t = 0;
-        /* Note that we decreased numContexts a few lines up, so use '<=' instead of '<' */
-        for(s = 0; s <= This->numContexts; s++) {
-            if(oldArray[s] == context) continue;
-            This->contexts[t] = oldArray[s];
-            t++;
-        }
-    } else {
+    for (i = 0; i < This->numContexts; ++i)
+    {
+        if (This->contexts[i] == context)
+        {
+            HeapFree(GetProcessHeap(), 0, context);
+            found = TRUE;
+            break;
+        }
+    }
+
+    if (!found)
+    {
+        ERR("Context %p doesn't exist in context array\n", context);
+        return;
+    }
+
+    while (i < This->numContexts - 1)
+    {
+        This->contexts[i] = This->contexts[i + 1];
+        ++i;
+    }
+
+    --This->numContexts;
+    if (!This->numContexts)
+    {
+        HeapFree(GetProcessHeap(), 0, This->contexts);
         This->contexts = NULL;
-    }
-
-    HeapFree(GetProcessHeap(), 0, context);
-    HeapFree(GetProcessHeap(), 0, oldArray);
+        return;
+    }
+
+    new_array = HeapReAlloc(GetProcessHeap(), 0, This->contexts, This->numContexts * sizeof(*This->contexts));
+    if (!new_array)
+    {
+        ERR("Failed to shrink context array. Oh well.\n");
+        return;
+    }
+
+    This->contexts = new_array;
 }
 
@@ -998,4 +1025,10 @@
 
     LEAVE_GL();
+
+    if (This->activeContext == context)
+    {
+        This->activeContext = NULL;
+        TRACE("Destroying the active context.\n");
+    }
 
     /* Cleanup the GL context */
@@ -1063,5 +1096,5 @@
 
     /* Disable shaders */
-    This->shader_backend->shader_cleanup((IWineD3DDevice *) This);
+    This->shader_backend->shader_select((IWineD3DDevice *)This, FALSE, FALSE);
     Context_MarkStateDirty(context, STATE_VSHADER, StateTable);
     Context_MarkStateDirty(context, STATE_PIXELSHADER, StateTable);
@@ -1076,40 +1109,38 @@
     /* Disable all textures. The caller can then bind a texture it wants to blit
      * from
+     *
+     * The blitting code uses (for now) the fixed function pipeline, so make sure to reset all fixed
+     * function texture unit. No need to care for higher samplers
      */
-    if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-        /* The blitting code uses (for now) the fixed function pipeline, so make sure to reset all fixed
-         * function texture unit. No need to care for higher samplers
-         */
-        for(i = GL_LIMITS(textures) - 1; i > 0 ; i--) {
-            sampler = This->rev_tex_unit_map[i];
-            GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
-            checkGLcall("glActiveTextureARB");
-
-            if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
-                glDisable(GL_TEXTURE_CUBE_MAP_ARB);
-                checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB");
-            }
-            glDisable(GL_TEXTURE_3D);
-            checkGLcall("glDisable GL_TEXTURE_3D");
-            if(GL_SUPPORT(ARB_TEXTURE_RECTANGLE)) {
-                glDisable(GL_TEXTURE_RECTANGLE_ARB);
-                checkGLcall("glDisable GL_TEXTURE_RECTANGLE_ARB");
-            }
-            glDisable(GL_TEXTURE_2D);
-            checkGLcall("glDisable GL_TEXTURE_2D");
-
-            glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-            checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);");
-
-            if (sampler != -1) {
-                if (sampler < MAX_TEXTURES) {
-                    Context_MarkStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP), StateTable);
-                }
-                Context_MarkStateDirty(context, STATE_SAMPLER(sampler), StateTable);
-            }
-        }
-        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
+    for(i = GL_LIMITS(textures) - 1; i > 0 ; i--) {
+        sampler = This->rev_tex_unit_map[i];
+        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
         checkGLcall("glActiveTextureARB");
-    }
+
+        if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
+            glDisable(GL_TEXTURE_CUBE_MAP_ARB);
+            checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB");
+        }
+        glDisable(GL_TEXTURE_3D);
+        checkGLcall("glDisable GL_TEXTURE_3D");
+        if(GL_SUPPORT(ARB_TEXTURE_RECTANGLE)) {
+            glDisable(GL_TEXTURE_RECTANGLE_ARB);
+            checkGLcall("glDisable GL_TEXTURE_RECTANGLE_ARB");
+        }
+        glDisable(GL_TEXTURE_2D);
+        checkGLcall("glDisable GL_TEXTURE_2D");
+
+        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);");
+
+        if (sampler != -1) {
+            if (sampler < MAX_TEXTURES) {
+                Context_MarkStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP), StateTable);
+            }
+            Context_MarkStateDirty(context, STATE_SAMPLER(sampler), StateTable);
+        }
+    }
+    GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
+    checkGLcall("glActiveTextureARB");
 
     sampler = This->rev_tex_unit_map[0];
@@ -1160,5 +1191,5 @@
     checkGLcall("glDisable GL_DEPTH_TEST");
     Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_ZENABLE), StateTable);
-    glDisable(GL_FOG);
+    glDisableWINE(GL_FOG);
     checkGLcall("glDisable GL_FOG");
     Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_FOGENABLE), StateTable);
@@ -1255,6 +1286,6 @@
     WineD3DContext *context = This->activeContext;
     BOOL oldRenderOffscreen = This->render_offscreen;
-    const WINED3DFORMAT oldFmt = ((IWineD3DSurfaceImpl *) This->lastActiveRenderTarget)->resource.format;
-    const WINED3DFORMAT newFmt = ((IWineD3DSurfaceImpl *) target)->resource.format;
+    const struct GlPixelFormatDesc *old = ((IWineD3DSurfaceImpl *)This->lastActiveRenderTarget)->resource.format_desc;
+    const struct GlPixelFormatDesc *new = ((IWineD3DSurfaceImpl *)target)->resource.format_desc;
     const struct StateEntry *StateTable = This->StateTable;
 
@@ -1262,11 +1293,10 @@
      * the alpha blend state changes with different render target formats
      */
-    if(oldFmt != newFmt) {
-        const struct GlPixelFormatDesc *glDesc;
-        const StaticPixelFormatDesc *old = getFormatDescEntry(oldFmt, NULL, NULL);
-        const StaticPixelFormatDesc *new = getFormatDescEntry(newFmt, &GLINFO_LOCATION, &glDesc);
-
-        /* Disable blending when the alphaMask has changed and when a format doesn't support blending */
-        if((old->alphaMask && !new->alphaMask) || (!old->alphaMask && new->alphaMask) || !(glDesc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) {
+    if (old->format != new->format)
+    {
+        /* Disable blending when the alpha mask has changed and when a format doesn't support blending */
+        if ((old->alpha_mask && !new->alpha_mask) || (!old->alpha_mask && new->alpha_mask)
+                || !(new->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING))
+        {
             Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), StateTable);
         }
@@ -1417,5 +1447,9 @@
          * Read the back buffer of the old drawable into the destination texture
          */
-        IWineD3DSurface_PreLoad(This->lastActiveRenderTarget);
+        if(((IWineD3DSurfaceImpl *)This->lastActiveRenderTarget)->glDescription.srgbTextureName) {
+            surface_internal_preload(This->lastActiveRenderTarget, SRGB_BOTH);
+        } else {
+            surface_internal_preload(This->lastActiveRenderTarget, SRGB_RGB);
+        }
 
         /* Assume that the drawable will be modified by some other things now */
@@ -1633,2 +1667,6 @@
     }
 }
+
+WineD3DContext *getActiveContext(void) {
+    return last_device->activeContext;
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/cubetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/cubetexture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/cubetexture.c	(revision 19678)
@@ -101,13 +101,22 @@
 }
 
-static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
+void cubetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb) {
     /* Override the IWineD3DResource Preload method */
     unsigned int i,j;
     IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    BOOL srgb_mode = This->baseTexture.is_srgb;
-    BOOL srgb_was_toggled = FALSE;
-
-    TRACE("(%p) : About to load texture: dirtified(%d)\n", This, This->baseTexture.dirty);
+    BOOL srgb_mode;
+    BOOL *dirty;
+
+    switch(srgb) {
+        case SRGB_RGB:      srgb_mode = FALSE; break;
+        case SRGB_BOTH:     cubetexture_internal_preload(iface, SRGB_RGB);
+        case SRGB_SRGB:     srgb_mode = TRUE; break;
+        /* DONTKNOW, and shut up the compiler */
+        default:            srgb_mode = This->baseTexture.is_srgb; break;
+    }
+    dirty = srgb_mode ? &This->baseTexture.srgbDirty : &This->baseTexture.dirty;
+
+    TRACE("(%p) : About to load texture: dirtified(%d)\n", This, *dirty);
 
     /* We only have to activate a context for gl when we're not drawing. In most cases PreLoad will be called during draw
@@ -119,11 +128,8 @@
          */
         ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-    } else if (GL_SUPPORT(EXT_TEXTURE_SRGB) && This->baseTexture.bindCount > 0) {
-        srgb_mode = device->stateBlock->samplerState[This->baseTexture.sampler][WINED3DSAMP_SRGBTEXTURE];
-        srgb_was_toggled = (This->baseTexture.is_srgb != srgb_mode);
-        This->baseTexture.is_srgb = srgb_mode;
-    }
-
-    if (This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8) {
+    }
+
+    if (This->resource.format_desc->format == WINED3DFMT_P8 || This->resource.format_desc->format == WINED3DFMT_A8P8)
+    {
         for (i = 0; i < This->baseTexture.levels; i++) {
             for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z ; j++) {
@@ -139,5 +145,5 @@
     }
     /* If the texture is marked dirty or the srgb sampler setting has changed since the last load then reload the surfaces */
-    if (This->baseTexture.dirty) {
+    if (*dirty) {
         for (i = 0; i < This->baseTexture.levels; i++) {
             for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z ; j++) {
@@ -145,20 +151,4 @@
             }
         }
-    } else if (srgb_was_toggled) {
-        /* Loop is repeated in the else block with the extra AddDirtyRect line to avoid the alternative of
-         * checking srgb_was_toggled in every iteration, even when the texture is just dirty
-         */
-        if (This->baseTexture.srgb_mode_change_count < 20)
-            ++This->baseTexture.srgb_mode_change_count;
-        else
-            FIXME("Cubetexture (%p) has been reloaded at least 20 times due to WINED3DSAMP_SRGBTEXTURE changes on it\'s sampler\n", This);
-
-        for (i = 0; i < This->baseTexture.levels; i++) {
-            for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z ; j++) {
-                IWineD3DSurface_AddDirtyRect(This->surfaces[j][i], NULL);
-                surface_force_reload(This->surfaces[j][i]);
-                IWineD3DSurface_LoadTexture(This->surfaces[j][i], srgb_mode);
-            }
-        }
     } else {
         TRACE("(%p) Texture not dirty, nothing to do\n" , iface);
@@ -166,6 +156,10 @@
 
     /* No longer dirty */
-    This->baseTexture.dirty = FALSE;
-    return ;
+    *dirty = FALSE;
+    return;
+}
+
+static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
+    cubetexture_internal_preload((IWineD3DBaseTexture *) iface, SRGB_ANY);
 }
 
@@ -182,5 +176,6 @@
         for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z ; j++) {
             IWineD3DSurface_UnLoad(This->surfaces[j][i]);
-            surface_set_texture_name(This->surfaces[j][i], 0);
+            surface_set_texture_name(This->surfaces[j][i], 0, TRUE);
+            surface_set_texture_name(This->surfaces[j][i], 0, FALSE);
         }
     }
@@ -234,17 +229,21 @@
 }
 
-static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *iface) {
-    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
-    BOOL set_gl_texture_desc = This->baseTexture.textureName == 0;
+static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *iface, BOOL srgb) {
+    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
+    BOOL set_gl_texture_desc;
     HRESULT hr;
 
     TRACE("(%p) : relay to BaseTexture\n", This);
 
-    hr = basetexture_bind((IWineD3DBaseTexture *)iface);
+    hr = basetexture_bind((IWineD3DBaseTexture *)iface, srgb, &set_gl_texture_desc);
     if (set_gl_texture_desc && SUCCEEDED(hr)) {
         UINT i, j;
         for (i = 0; i < This->baseTexture.levels; ++i) {
             for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z; ++j) {
-                surface_set_texture_name(This->surfaces[j][i], This->baseTexture.textureName);
+                if(This->baseTexture.is_srgb) {
+                    surface_set_texture_name(This->surfaces[j][i], This->baseTexture.srgbTextureName, TRUE);
+                } else {
+                    surface_set_texture_name(This->surfaces[j][i], This->baseTexture.textureName, FALSE);
+                }
             }
         }
@@ -288,5 +287,6 @@
                 IWineD3DSurface *surface = This->surfaces[j][i];
                 /* Clean out the texture name we gave to the surface so that the surface doesn't try and release it */
-                surface_set_texture_name(surface, 0);
+                surface_set_texture_name(surface, 0, TRUE);
+                surface_set_texture_name(surface, 0, FALSE);
                 surface_set_texture_target(surface, 0);
                 /* Cleanup the container */
@@ -308,5 +308,5 @@
         return IWineD3DSurface_GetDesc(This->surfaces[0][Level], pDesc);
     }
-    FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
+    WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
     return WINED3DERR_INVALIDCALL;
 }
@@ -368,7 +368,9 @@
     IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
     This->baseTexture.dirty = TRUE;
+    This->baseTexture.srgbDirty = TRUE;
     TRACE("(%p) : dirtyfication of faceType(%d) Level (0)\n", This, FaceType);
     if (FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) {
-        hr = IWineD3DSurface_AddDirtyRect(This->surfaces[FaceType][0], pDirtyRect);
+        surface_add_dirty_rect(This->surfaces[FaceType][0], pDirtyRect);
+        hr = WINED3D_OK;
     } else {
         WARN("(%p) overflow FaceType(%d)\n", This, FaceType);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c	(revision 19678)
@@ -64,78 +64,311 @@
 static void IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3DResource *resource);
 
-/* helper macros */
-#define D3DMEMCHECK(object, ppResult) if(NULL == object) { *ppResult = NULL; WARN("Out of memory\n"); return WINED3DERR_OUTOFVIDEOMEMORY;}
-
-#define D3DCREATEOBJECTINSTANCE(object, type) { \
-    object=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3D##type##Impl)); \
-    D3DMEMCHECK(object, pp##type); \
-    object->lpVtbl = &IWineD3D##type##_Vtbl;  \
-    object->wineD3DDevice = This; \
-    object->parent       = parent; \
-    object->ref          = 1; \
-    *pp##type = (IWineD3D##type *) object; \
-}
-
-#define D3DCREATESHADEROBJECTINSTANCE(object, type) { \
-    object=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3D##type##Impl)); \
-    D3DMEMCHECK(object, pp##type); \
-    object->lpVtbl = &IWineD3D##type##_Vtbl;  \
-    object->parent          = parent; \
-    object->baseShader.ref  = 1; \
-    object->baseShader.device = (IWineD3DDevice*) This; \
-    list_init(&object->baseShader.linked_programs); \
-    *pp##type = (IWineD3D##type *) object; \
-}
-
-#define  D3DCREATERESOURCEOBJECTINSTANCE(object, type, d3dtype, _size){ \
-    object=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3D##type##Impl)); \
-    D3DMEMCHECK(object, pp##type); \
-    object->lpVtbl = &IWineD3D##type##_Vtbl;  \
-    object->resource.wineD3DDevice   = This; \
-    object->resource.parent          = parent; \
-    object->resource.resourceType    = d3dtype; \
-    object->resource.ref             = 1; \
-    object->resource.pool            = Pool; \
-    object->resource.format          = Format; \
-    object->resource.usage           = Usage; \
-    object->resource.size            = _size; \
-    object->resource.priority        = 0; \
-    list_init(&object->resource.privateData); \
-    /* Check that we have enough video ram left */ \
-    if (Pool == WINED3DPOOL_DEFAULT) { \
-        if (IWineD3DDevice_GetAvailableTextureMem(iface) <= _size) { \
-            WARN("Out of 'bogus' video memory\n"); \
-            HeapFree(GetProcessHeap(), 0, object); \
-            *pp##type = NULL; \
-            return WINED3DERR_OUTOFVIDEOMEMORY; \
-        } \
-        WineD3DAdapterChangeGLRam(This, _size); \
-    } \
-    object->resource.heapMemory = (0 == _size ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size + RESOURCE_ALIGNMENT)); \
-    if (object->resource.heapMemory == NULL && _size != 0) { \
-        FIXME("Out of memory!\n"); \
-        HeapFree(GetProcessHeap(), 0, object); \
-        *pp##type = NULL; \
-        return WINED3DERR_OUTOFVIDEOMEMORY; \
-    } \
-    object->resource.allocatedMemory = (BYTE *)(((ULONG_PTR) object->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); \
-    *pp##type = (IWineD3D##type *) object; \
-    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object) ;\
-    TRACE("(%p) : Created resource %p\n", This, object); \
-}
-
-#define D3DINITIALIZEBASETEXTURE(_basetexture) { \
-    _basetexture.levels     = Levels; \
-    _basetexture.filterType = (Usage & WINED3DUSAGE_AUTOGENMIPMAP) ? WINED3DTEXF_LINEAR : WINED3DTEXF_NONE; \
-    _basetexture.LOD        = 0; \
-    _basetexture.dirty      = TRUE; \
-    _basetexture.is_srgb = FALSE; \
-    _basetexture.srgb_mode_change_count = 0; \
-}
-
 /**********************************************************
  * Global variable / Constants follow
  **********************************************************/
 const float identity[16] = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1};  /* When needed for comparisons */
+
+/* Note that except for WINED3DPT_POINTLIST and WINED3DPT_LINELIST these
+ * actually have the same values in GL and D3D. */
+static GLenum gl_primitive_type_from_d3d(WINED3DPRIMITIVETYPE primitive_type)
+{
+    switch(primitive_type)
+    {
+        case WINED3DPT_POINTLIST:
+            return GL_POINTS;
+
+        case WINED3DPT_LINELIST:
+            return GL_LINES;
+
+        case WINED3DPT_LINESTRIP:
+            return GL_LINE_STRIP;
+
+        case WINED3DPT_TRIANGLELIST:
+            return GL_TRIANGLES;
+
+        case WINED3DPT_TRIANGLESTRIP:
+            return GL_TRIANGLE_STRIP;
+
+        case WINED3DPT_TRIANGLEFAN:
+            return GL_TRIANGLE_FAN;
+
+        case WINED3DPT_LINELIST_ADJ:
+            return GL_LINES_ADJACENCY_ARB;
+
+        case WINED3DPT_LINESTRIP_ADJ:
+            return GL_LINE_STRIP_ADJACENCY_ARB;
+
+        case WINED3DPT_TRIANGLELIST_ADJ:
+            return GL_TRIANGLES_ADJACENCY_ARB;
+
+        case WINED3DPT_TRIANGLESTRIP_ADJ:
+            return GL_TRIANGLE_STRIP_ADJACENCY_ARB;
+
+        default:
+            FIXME("Unhandled primitive type %s\n", debug_d3dprimitivetype(primitive_type));
+            return GL_NONE;
+    }
+}
+
+static WINED3DPRIMITIVETYPE d3d_primitive_type_from_gl(GLenum primitive_type)
+{
+    switch(primitive_type)
+    {
+        case GL_POINTS:
+            return WINED3DPT_POINTLIST;
+
+        case GL_LINES:
+            return WINED3DPT_LINELIST;
+
+        case GL_LINE_STRIP:
+            return WINED3DPT_LINESTRIP;
+
+        case GL_TRIANGLES:
+            return WINED3DPT_TRIANGLELIST;
+
+        case GL_TRIANGLE_STRIP:
+            return WINED3DPT_TRIANGLESTRIP;
+
+        case GL_TRIANGLE_FAN:
+            return WINED3DPT_TRIANGLEFAN;
+
+        case GL_LINES_ADJACENCY_ARB:
+            return WINED3DPT_LINELIST_ADJ;
+
+        case GL_LINE_STRIP_ADJACENCY_ARB:
+            return WINED3DPT_LINESTRIP_ADJ;
+
+        case GL_TRIANGLES_ADJACENCY_ARB:
+            return WINED3DPT_TRIANGLELIST_ADJ;
+
+        case GL_TRIANGLE_STRIP_ADJACENCY_ARB:
+            return WINED3DPT_TRIANGLESTRIP_ADJ;
+
+        default:
+            FIXME("Unhandled primitive type %s\n", debug_d3dprimitivetype(primitive_type));
+            return WINED3DPT_UNDEFINED;
+    }
+}
+
+static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
+{
+    if ((usage == WINED3DDECLUSAGE_POSITION || usage == WINED3DDECLUSAGE_POSITIONT) && usage_idx == 0)
+        *regnum = WINED3D_FFP_POSITION;
+    else if (usage == WINED3DDECLUSAGE_BLENDWEIGHT && usage_idx == 0)
+        *regnum = WINED3D_FFP_BLENDWEIGHT;
+    else if (usage == WINED3DDECLUSAGE_BLENDINDICES && usage_idx == 0)
+        *regnum = WINED3D_FFP_BLENDINDICES;
+    else if (usage == WINED3DDECLUSAGE_NORMAL && usage_idx == 0)
+        *regnum = WINED3D_FFP_NORMAL;
+    else if (usage == WINED3DDECLUSAGE_PSIZE && usage_idx == 0)
+        *regnum = WINED3D_FFP_PSIZE;
+    else if (usage == WINED3DDECLUSAGE_COLOR && usage_idx == 0)
+        *regnum = WINED3D_FFP_DIFFUSE;
+    else if (usage == WINED3DDECLUSAGE_COLOR && usage_idx == 1)
+        *regnum = WINED3D_FFP_SPECULAR;
+    else if (usage == WINED3DDECLUSAGE_TEXCOORD && usage_idx < WINED3DDP_MAXTEXCOORD)
+        *regnum = WINED3D_FFP_TEXCOORD0 + usage_idx;
+    else
+    {
+        FIXME("Unsupported input stream [usage=%s, usage_idx=%u]\n", debug_d3ddeclusage(usage), usage_idx);
+        *regnum = ~0U;
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
+        BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup)
+{
+    /* We need to deal with frequency data! */
+    IWineD3DVertexDeclarationImpl *declaration = (IWineD3DVertexDeclarationImpl *)This->stateBlock->vertexDecl;
+    UINT stream_count = This->stateBlock->streamIsUP ? 0 : declaration->num_streams;
+    const DWORD *streams = declaration->streams;
+    unsigned int i;
+
+    memset(stream_info, 0, sizeof(*stream_info));
+
+    /* Check for transformed vertices, disable vertex shader if present. */
+    stream_info->position_transformed = declaration->position_transformed;
+    if (declaration->position_transformed) use_vshader = FALSE;
+
+    /* Translate the declaration into strided data. */
+    for (i = 0; i < declaration->element_count; ++i)
+    {
+        const struct wined3d_vertex_declaration_element *element = &declaration->elements[i];
+        GLuint buffer_object = 0;
+        const BYTE *data = NULL;
+        BOOL stride_used;
+        unsigned int idx;
+        DWORD stride;
+
+        TRACE("%p Element %p (%u of %u)\n", declaration->elements,
+                element, i + 1, declaration->element_count);
+
+        if (!This->stateBlock->streamSource[element->input_slot]) continue;
+
+        stride = This->stateBlock->streamStride[element->input_slot];
+        if (This->stateBlock->streamIsUP)
+        {
+            TRACE("Stream %u is UP, %p\n", element->input_slot, This->stateBlock->streamSource[element->input_slot]);
+            buffer_object = 0;
+            data = (BYTE *)This->stateBlock->streamSource[element->input_slot];
+        }
+        else
+        {
+            TRACE("Stream %u isn't UP, %p\n", element->input_slot, This->stateBlock->streamSource[element->input_slot]);
+            data = buffer_get_memory(This->stateBlock->streamSource[element->input_slot], 0, &buffer_object);
+
+            /* Can't use vbo's if the base vertex index is negative. OpenGL doesn't accept negative offsets
+             * (or rather offsets bigger than the vbo, because the pointer is unsigned), so use system memory
+             * sources. In most sane cases the pointer - offset will still be > 0, otherwise it will wrap
+             * around to some big value. Hope that with the indices, the driver wraps it back internally. If
+             * not, drawStridedSlow is needed, including a vertex buffer path. */
+            if (This->stateBlock->loadBaseVertexIndex < 0)
+            {
+                WARN("loadBaseVertexIndex is < 0 (%d), not using vbos\n", This->stateBlock->loadBaseVertexIndex);
+                buffer_object = 0;
+                data = buffer_get_sysmem((struct wined3d_buffer *)This->stateBlock->streamSource[element->input_slot]);
+                if ((UINT_PTR)data < -This->stateBlock->loadBaseVertexIndex * stride)
+                {
+                    FIXME("System memory vertex data load offset is negative!\n");
+                }
+            }
+
+            if (fixup)
+            {
+                if (buffer_object) *fixup = TRUE;
+                else if (*fixup && !use_vshader
+                        && (element->usage == WINED3DDECLUSAGE_COLOR
+                        || element->usage == WINED3DDECLUSAGE_POSITIONT))
+                {
+                    static BOOL warned = FALSE;
+                    if (!warned)
+                    {
+                        /* This may be bad with the fixed function pipeline. */
+                        FIXME("Missing vbo streams with unfixed colors or transformed position, expect problems\n");
+                        warned = TRUE;
+                    }
+                }
+            }
+        }
+        data += element->offset;
+
+        TRACE("offset %u input_slot %u usage_idx %d\n", element->offset, element->input_slot, element->usage_idx);
+
+        if (use_vshader)
+        {
+            if (element->output_slot == ~0U)
+            {
+                /* TODO: Assuming vertexdeclarations are usually used with the
+                 * same or a similar shader, it might be worth it to store the
+                 * last used output slot and try that one first. */
+                stride_used = vshader_get_input(This->stateBlock->vertexShader,
+                        element->usage, element->usage_idx, &idx);
+            }
+            else
+            {
+                idx = element->output_slot;
+                stride_used = TRUE;
+            }
+        }
+        else
+        {
+            if (!element->ffp_valid)
+            {
+                WARN("Skipping unsupported fixed function element of format %s and usage %s\n",
+                        debug_d3dformat(element->format_desc->format), debug_d3ddeclusage(element->usage));
+                stride_used = FALSE;
+            }
+            else
+            {
+                stride_used = fixed_get_input(element->usage, element->usage_idx, &idx);
+            }
+        }
+
+        if (stride_used)
+        {
+            TRACE("Load %s array %u [usage %s, usage_idx %u, "
+                    "input_slot %u, offset %u, stride %u, format %s, buffer_object %u]\n",
+                    use_vshader ? "shader": "fixed function", idx,
+                    debug_d3ddeclusage(element->usage), element->usage_idx, element->input_slot,
+                    element->offset, stride, debug_d3dformat(element->format_desc->format), buffer_object);
+
+            stream_info->elements[idx].format_desc = element->format_desc;
+            stream_info->elements[idx].stride = stride;
+            stream_info->elements[idx].data = data;
+            stream_info->elements[idx].stream_idx = element->input_slot;
+            stream_info->elements[idx].buffer_object = buffer_object;
+
+            if (!GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA) && element->format_desc->format == WINED3DFMT_A8R8G8B8)
+            {
+                stream_info->swizzle_map |= 1 << idx;
+            }
+            stream_info->use_map |= 1 << idx;
+        }
+    }
+
+    /* Now call PreLoad on all the vertex buffers. In the very rare case
+     * that the buffers stopps converting PreLoad will dirtify the VDECL again.
+     * The vertex buffer can now use the strided structure in the device instead of finding its
+     * own again.
+     *
+     * NULL streams won't be recorded in the array, UP streams won't be either. A stream is only
+     * once in there. */
+    for (i = 0; i < stream_count; ++i)
+    {
+        IWineD3DBuffer *vb = This->stateBlock->streamSource[streams[i]];
+        if (vb) IWineD3DBuffer_PreLoad(vb);
+    }
+}
+
+static void stream_info_element_from_strided(IWineD3DDeviceImpl *This,
+        const struct WineDirect3DStridedData *strided, struct wined3d_stream_info_element *e)
+{
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(strided->format, &This->adapter->gl_info);
+    e->format_desc = format_desc;
+    e->stride = strided->dwStride;
+    e->data = strided->lpData;
+    e->stream_idx = 0;
+    e->buffer_object = 0;
+}
+
+void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
+        const struct WineDirect3DVertexStridedData *strided, struct wined3d_stream_info *stream_info)
+{
+    unsigned int i;
+
+    memset(stream_info, 0, sizeof(*stream_info));
+
+    if (strided->position.lpData)
+        stream_info_element_from_strided(This, &strided->position, &stream_info->elements[WINED3D_FFP_POSITION]);
+    if (strided->normal.lpData)
+        stream_info_element_from_strided(This, &strided->normal, &stream_info->elements[WINED3D_FFP_NORMAL]);
+    if (strided->diffuse.lpData)
+        stream_info_element_from_strided(This, &strided->diffuse, &stream_info->elements[WINED3D_FFP_DIFFUSE]);
+    if (strided->specular.lpData)
+        stream_info_element_from_strided(This, &strided->specular, &stream_info->elements[WINED3D_FFP_SPECULAR]);
+
+    for (i = 0; i < WINED3DDP_MAXTEXCOORD; ++i)
+    {
+        if (strided->texCoords[i].lpData)
+            stream_info_element_from_strided(This, &strided->texCoords[i],
+                    &stream_info->elements[WINED3D_FFP_TEXCOORD0 + i]);
+    }
+
+    stream_info->position_transformed = strided->position_transformed;
+
+    for (i = 0; i < sizeof(stream_info->elements) / sizeof(*stream_info->elements); ++i)
+    {
+        if (!stream_info->elements[i].format_desc) continue;
+
+        if (!GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA) && stream_info->elements[i].format_desc->format == WINED3DFMT_A8R8G8B8)
+        {
+            stream_info->swizzle_map |= 1 << i;
+        }
+        stream_info->use_map |= 1 << i;
+    }
+}
 
 /**********************************************************
@@ -174,4 +407,11 @@
 
     if (!refCount) {
+        UINT i;
+
+        for (i = 0; i < sizeof(This->multistate_funcs)/sizeof(This->multistate_funcs[0]); ++i) {
+            HeapFree(GetProcessHeap(), 0, This->multistate_funcs[i]);
+            This->multistate_funcs[i] = NULL;
+        }
+
         /* TODO: Clean up all the surfaces and textures! */
         /* NOTE: You must release the parent if the object was created via a callback
@@ -206,11 +446,79 @@
 }
 
-static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT Size, DWORD Usage, 
-                             DWORD FVF, WINED3DPOOL Pool, IWineD3DVertexBuffer** ppVertexBuffer, HANDLE *sharedHandle,
-                             IUnknown *parent) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DVertexBufferImpl *object;
-    WINED3DFORMAT Format = WINED3DFMT_VERTEXDATA; /* Dummy format for now */
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateBuffer(IWineD3DDevice *iface,
+        struct wined3d_buffer_desc *desc, const void *data, IUnknown *parent, IWineD3DBuffer **buffer)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    struct wined3d_buffer *object;
+    HRESULT hr;
+
+    TRACE("iface %p, desc %p, data %p, parent %p, buffer %p\n", iface, desc, data, parent, buffer);
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Failed to allocate memory\n");
+        return E_OUTOFMEMORY;
+    }
+
+    object->vtbl = &wined3d_buffer_vtbl;
+    object->desc = *desc;
+
+    FIXME("Ignoring access flags (pool)\n");
+
+    hr = resource_init(&object->resource, WINED3DRTYPE_BUFFER, This, desc->byte_width,
+            desc->usage, WINED3DFMT_UNKNOWN, WINED3DPOOL_MANAGED, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        return hr;
+    }
+    object->buffer_type_hint = GL_ARRAY_BUFFER_ARB;
+
+    TRACE("Created resource %p\n", object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
+
+    TRACE("size %#x, usage=%#x, format %s, memory @ %p, iface @ %p\n", object->resource.size, object->resource.usage,
+            debug_d3dformat(object->resource.format_desc->format), object->resource.allocatedMemory, object);
+
+    if (data)
+    {
+        BYTE *ptr;
+
+        hr = IWineD3DBuffer_Map((IWineD3DBuffer *)object, 0, desc->byte_width, &ptr, 0);
+        if (FAILED(hr))
+        {
+            ERR("Failed to map buffer, hr %#x\n", hr);
+            IWineD3DBuffer_Release((IWineD3DBuffer *)object);
+            return hr;
+        }
+
+        memcpy(ptr, data, desc->byte_width);
+
+        hr = IWineD3DBuffer_Unmap((IWineD3DBuffer *)object);
+        if (FAILED(hr))
+        {
+            ERR("Failed to unmap buffer, hr %#x\n", hr);
+            IWineD3DBuffer_Release((IWineD3DBuffer *)object);
+            return hr;
+        }
+    }
+
+    *buffer = (IWineD3DBuffer *)object;
+
+    return WINED3D_OK;
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT Size, DWORD Usage,
+        DWORD FVF, WINED3DPOOL Pool, IWineD3DBuffer **ppVertexBuffer, IUnknown *parent)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    /* Dummy format for now */
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(WINED3DFMT_VERTEXDATA, &This->adapter->gl_info);
+    struct wined3d_buffer *object;
     int dxVersion = ( (IWineD3DImpl *) This->wineD3D)->dxVersion;
+    HRESULT hr;
     BOOL conv;
 
@@ -228,10 +536,29 @@
     }
 
-    D3DCREATERESOURCEOBJECTINSTANCE(object, VertexBuffer, WINED3DRTYPE_VERTEXBUFFER, Size)
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppVertexBuffer = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->vtbl = &wined3d_buffer_vtbl;
+    hr = resource_init(&object->resource, WINED3DRTYPE_BUFFER, This, Size, Usage, format_desc, Pool, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *ppVertexBuffer = NULL;
+        return hr;
+    }
+    object->buffer_type_hint = GL_ARRAY_BUFFER_ARB;
+
+    TRACE("(%p) : Created resource %p\n", This, object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
 
     TRACE("(%p) : Size=%d, Usage=0x%08x, FVF=%x, Pool=%d - Memory@%p, Iface@%p\n", This, Size, Usage, FVF, Pool, object->resource.allocatedMemory, object);
-    *ppVertexBuffer = (IWineD3DVertexBuffer *)object;
-
-    object->fvf = FVF;
+    *ppVertexBuffer = (IWineD3DBuffer *)object;
 
     /* Observations show that drawStridedSlow is faster on dynamic VBs than converting +
@@ -260,76 +587,50 @@
         TRACE("Not creating a vbo because dxVersion is 7 and the fvf needs conversion\n");
     } else {
-        object->Flags |= VBFLAG_CREATEVBO;
-    }
-    return WINED3D_OK;
-}
-
-static void CreateIndexBufferVBO(IWineD3DDeviceImpl *This, IWineD3DIndexBufferImpl *object) {
-    GLenum error, glUsage;
-    TRACE("Creating VBO for Index Buffer %p\n", object);
-
-    /* The following code will modify the ELEMENT_ARRAY_BUFFER binding, make sure it is
-     * restored on the next draw
-     */
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER);
-
-    /* Make sure that a context is there. Needed in a multithreaded environment. Otherwise this call is a nop */
-    ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-    ENTER_GL();
-
-    while(glGetError());
-
-    GL_EXTCALL(glGenBuffersARB(1, &object->vbo));
-    error = glGetError();
-    if(error != GL_NO_ERROR || object->vbo == 0) {
-        ERR("Creating a vbo failed with error %s (%#x), continuing without vbo for this buffer\n", debug_glerror(error), error);
-        goto out;
-    }
-
-    GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, object->vbo));
-    error = glGetError();
-    if(error != GL_NO_ERROR) {
-        ERR("Failed to bind index buffer with error %s (%#x), continuing without vbo for this buffer\n", debug_glerror(error), error);
-        goto out;
-    }
-
-    /* Use static write only usage for now. Dynamic index buffers stay in sysmem, and due to the sysmem
-        * copy no readback will be needed
-        */
-    glUsage = GL_STATIC_DRAW_ARB;
-    GL_EXTCALL(glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, object->resource.size, NULL, glUsage));
-    error = glGetError();
-    if(error != GL_NO_ERROR) {
-        ERR("Failed to initialize the index buffer with error %s (%#x)\n", debug_glerror(error), error);
-        goto out;
-    }
-    LEAVE_GL();
-    TRACE("Successfully created vbo %d for index buffer %p\n", object->vbo, object);
-    return;
-
-out:
-    GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0));
-    GL_EXTCALL(glDeleteBuffersARB(1, &object->vbo));
-    LEAVE_GL();
-    object->vbo = 0;
-}
-
-static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT Length, DWORD Usage, 
-                                                    WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DIndexBuffer** ppIndexBuffer,
-                                                    HANDLE *sharedHandle, IUnknown *parent) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DIndexBufferImpl *object;
+        object->flags |= WINED3D_BUFFER_CREATEBO;
+    }
+    return WINED3D_OK;
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface,
+        UINT Length, DWORD Usage, WINED3DPOOL Pool, IWineD3DBuffer **ppIndexBuffer, IUnknown *parent)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(WINED3DFMT_UNKNOWN, &This->adapter->gl_info);
+    struct wined3d_buffer *object;
+    HRESULT hr;
+
     TRACE("(%p) Creating index buffer\n", This);
 
     /* Allocate the storage for the device */
-    D3DCREATERESOURCEOBJECTINSTANCE(object,IndexBuffer,WINED3DRTYPE_INDEXBUFFER, Length)
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppIndexBuffer = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->vtbl = &wined3d_buffer_vtbl;
+    hr = resource_init(&object->resource, WINED3DRTYPE_BUFFER, This, Length, Usage, format_desc, Pool, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *ppIndexBuffer = NULL;
+        return hr;
+    }
+    object->buffer_type_hint = GL_ELEMENT_ARRAY_BUFFER_ARB;
+
+    TRACE("(%p) : Created resource %p\n", This, object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
 
     if(Pool != WINED3DPOOL_SYSTEMMEM && !(Usage & WINED3DUSAGE_DYNAMIC) && GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT)) {
-        CreateIndexBufferVBO(This, object);
-    }
-
-    TRACE("(%p) : Len=%d, Use=%x, Format=(%u,%s), Pool=%d - Memory@%p, Iface@%p\n", This, Length, Usage, Format, 
-                           debug_d3dformat(Format), Pool, object, object->resource.allocatedMemory);
-    *ppIndexBuffer = (IWineD3DIndexBuffer *) object;
+        object->flags |= WINED3D_BUFFER_CREATEBO;
+    }
+
+    TRACE("(%p) : Len=%d, Use=%x, Pool=%d - Memory@%p, Iface@%p\n", This, Length, Usage,
+            Pool, object, object->resource.allocatedMemory);
+    *ppIndexBuffer = (IWineD3DBuffer *) object;
 
     return WINED3D_OK;
@@ -340,9 +641,22 @@
     IWineD3DDeviceImpl     *This = (IWineD3DDeviceImpl *)iface;
     IWineD3DStateBlockImpl *object;
-    int i, j;
+    unsigned int i, j;
     HRESULT temp_result;
 
-    D3DCREATEOBJECTINSTANCE(object, StateBlock)
-    object->blockType     = Type;
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if(!object)
+    {
+        ERR("Out of memory\n");
+        *ppStateBlock = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DStateBlock_Vtbl;
+    object->wineD3DDevice = This;
+    object->parent = parent;
+    object->ref = 1;
+    object->blockType = Type;
+
+    *ppStateBlock = (IWineD3DStateBlock *)object;
 
     for(i = 0; i < LIGHTMAP_SIZE; i++) {
@@ -350,15 +664,19 @@
     }
 
+    temp_result = allocate_shader_constants(object);
+    if (FAILED(temp_result))
+    {
+        HeapFree(GetProcessHeap(), 0, object);
+        return temp_result;
+    }
+
     /* Special case - Used during initialization to produce a placeholder stateblock
           so other functions called can update a state block                         */
-    if (Type == WINED3DSBT_INIT) {
+    if (Type == WINED3DSBT_INIT || Type == WINED3DSBT_RECORDED)
+    {
         /* Don't bother increasing the reference count otherwise a device will never
            be freed due to circular dependencies                                   */
         return WINED3D_OK;
     }
-    
-    temp_result = allocate_shader_constants(object);
-    if (WINED3D_OK != temp_result)
-        return temp_result;
 
     /* Otherwise, might as well set the whole state block to the appropriate values  */
@@ -423,5 +741,6 @@
         object->num_contained_ps_consts_b = MAX_CONST_B;
         for(i = 0; i < MAX_TEXTURES; i++) {
-            for(j = 1; j <= WINED3D_HIGHEST_TEXTURE_STATE; j++) {
+            for (j = 0; j <= WINED3D_HIGHEST_TEXTURE_STATE; ++j)
+            {
                 object->contained_tss_states[object->num_contained_tss_states].stage = i;
                 object->contained_tss_states[object->num_contained_tss_states].state = j;
@@ -439,9 +758,9 @@
         for(i = 0; i < MAX_STREAMS; i++) {
             if(object->streamSource[i]) {
-                IWineD3DVertexBuffer_AddRef(object->streamSource[i]);
+                IWineD3DBuffer_AddRef(object->streamSource[i]);
             }
         }
         if(object->pIndexData) {
-            IWineD3DIndexBuffer_AddRef(object->pIndexData);
+            IWineD3DBuffer_AddRef(object->pIndexData);
         }
         if(object->vertexShader) {
@@ -477,13 +796,15 @@
 
         for (i = 0; i < NUM_SAVEDPIXELSTATES_R; i++) {
-            object->changed.renderState[SavedPixelStates_R[i]] = TRUE;
-            object->contained_render_states[i] = SavedPixelStates_R[i];
+            DWORD rs = SavedPixelStates_R[i];
+            object->changed.renderState[rs >> 5] |= 1 << (rs & 0x1f);
+            object->contained_render_states[i] = rs;
         }
         object->num_contained_render_states = NUM_SAVEDPIXELSTATES_R;
         for (j = 0; j < MAX_TEXTURES; j++) {
             for (i = 0; i < NUM_SAVEDPIXELSTATES_T; i++) {
-                object->changed.textureState[j][SavedPixelStates_T[i]] = TRUE;
+                DWORD state = SavedPixelStates_T[i];
+                object->changed.textureState[j] |= 1 << state;
                 object->contained_tss_states[object->num_contained_tss_states].stage = j;
-                object->contained_tss_states[object->num_contained_tss_states].state = SavedPixelStates_T[i];
+                object->contained_tss_states[object->num_contained_tss_states].state = state;
                 object->num_contained_tss_states++;
             }
@@ -491,7 +812,8 @@
         for (j = 0 ; j < MAX_COMBINED_SAMPLERS; j++) {
             for (i =0; i < NUM_SAVEDPIXELSTATES_S;i++) {
-                object->changed.samplerState[j][SavedPixelStates_S[i]] = TRUE;
+                DWORD state = SavedPixelStates_S[i];
+                object->changed.samplerState[j] |= 1 << state;
                 object->contained_sampler_states[object->num_contained_sampler_states].stage = j;
-                object->contained_sampler_states[object->num_contained_sampler_states].state = SavedPixelStates_S[i];
+                object->contained_sampler_states[object->num_contained_sampler_states].state = state;
                 object->num_contained_sampler_states++;
             }
@@ -534,13 +856,15 @@
         object->num_contained_vs_consts_i = MAX_CONST_I;
         for (i = 0; i < NUM_SAVEDVERTEXSTATES_R; i++) {
-            object->changed.renderState[SavedVertexStates_R[i]] = TRUE;
-            object->contained_render_states[i] = SavedVertexStates_R[i];
+            DWORD rs = SavedVertexStates_R[i];
+            object->changed.renderState[rs >> 5] |= 1 << (rs & 0x1f);
+            object->contained_render_states[i] = rs;
         }
         object->num_contained_render_states = NUM_SAVEDVERTEXSTATES_R;
         for (j = 0; j < MAX_TEXTURES; j++) {
             for (i = 0; i < NUM_SAVEDVERTEXSTATES_T; i++) {
-                object->changed.textureState[j][SavedVertexStates_T[i]] = TRUE;
+                DWORD state = SavedVertexStates_T[i];
+                object->changed.textureState[j] |= 1 << state;
                 object->contained_tss_states[object->num_contained_tss_states].stage = j;
-                object->contained_tss_states[object->num_contained_tss_states].state = SavedVertexStates_T[i];
+                object->contained_tss_states[object->num_contained_tss_states].state = state;
                 object->num_contained_tss_states++;
             }
@@ -548,7 +872,8 @@
         for (j = 0 ; j < MAX_COMBINED_SAMPLERS; j++){
             for (i =0; i < NUM_SAVEDVERTEXSTATES_S;i++) {
-                object->changed.samplerState[j][SavedVertexStates_S[i]] = TRUE;
+                DWORD state = SavedVertexStates_S[i];
+                object->changed.samplerState[j] |= 1 << state;
                 object->contained_sampler_states[object->num_contained_sampler_states].stage = j;
-                object->contained_sampler_states[object->num_contained_sampler_states].state = SavedVertexStates_S[i];
+                object->contained_sampler_states[object->num_contained_sampler_states].state = state;
                 object->num_contained_sampler_states++;
             }
@@ -566,5 +891,5 @@
         for(i = 0; i < MAX_STREAMS; i++) {
             if(object->streamSource[i]) {
-                IWineD3DVertexBuffer_AddRef(object->streamSource[i]);
+                IWineD3DBuffer_AddRef(object->streamSource[i]);
             }
         }
@@ -582,45 +907,17 @@
 }
 
-/* ************************************
-MSDN:
-[in] Render targets are not lockable unless the application specifies TRUE for Lockable. Note that lockable render targets reduce performance on some graphics hardware.
-
-Discard
- [in] Set this flag to TRUE to enable z-buffer discarding, and FALSE otherwise. 
-
-If this flag is set, the contents of the depth stencil buffer will be invalid after calling either IDirect3DDevice9::Present or IDirect3DDevice9::SetDepthStencilSurface with a different depth surface.
-
-******************************** */
- 
-static HRESULT  WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IWineD3DSurface **ppSurface,WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, WINED3DSURFTYPE Impl, IUnknown *parent) {
-    IWineD3DDeviceImpl  *This = (IWineD3DDeviceImpl *)iface;    
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface,
+        UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level,
+        IWineD3DSurface **ppSurface, WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool,
+        WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, WINED3DSURFTYPE Impl, IUnknown *parent)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */
     unsigned int Size       = 1;
-    const struct GlPixelFormatDesc *glDesc;
-    const StaticPixelFormatDesc *tableEntry = getFormatDescEntry(Format, &GLINFO_LOCATION, &glDesc);
+    const struct GlPixelFormatDesc *glDesc = getFormatDescEntry(Format, &GLINFO_LOCATION);
     UINT mul_4w, mul_4h;
+    HRESULT hr;
+
     TRACE("(%p) Create surface\n",This);
-    
-    /** FIXME: Check ranges on the inputs are valid 
-     * MSDN
-     *   MultisampleQuality
-     *    [in] Quality level. The valid range is between zero and one less than the level
-     *    returned by pQualityLevels used by IDirect3D9::CheckDeviceMultiSampleType. 
-     *    Passing a larger value returns the error WINED3DERR_INVALIDCALL. The MultisampleQuality
-     *    values of paired render targets, depth stencil surfaces, and the MultiSample type
-     *    must all match.
-      *******************************/
-
-
-    /**
-    * TODO: Discard MSDN
-    * [in] Set this flag to TRUE to enable z-buffer discarding, and FALSE otherwise.
-    *
-    * If this flag is set, the contents of the depth stencil buffer will be
-    * invalid after calling either IDirect3DDevice9::Present or  * IDirect3DDevice9::SetDepthStencilSurface
-    * with a different depth surface.
-    *
-    *This flag has the same behavior as the constant, D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL, in D3DPRESENTFLAG.
-    ***************************/
 
     if(MultisampleQuality > 0) {
@@ -643,13 +940,13 @@
     } else if (Format == WINED3DFMT_DXT1) {
         /* DXT1 is half byte per pixel */
-        Size = (mul_4w * tableEntry->bpp * mul_4h) >> 1;
+        Size = (mul_4w * glDesc->byte_count * mul_4h) >> 1;
 
     } else if (Format == WINED3DFMT_DXT2 || Format == WINED3DFMT_DXT3 ||
                Format == WINED3DFMT_DXT4 || Format == WINED3DFMT_DXT5 ||
                Format == WINED3DFMT_ATI2N) {
-        Size = (mul_4w * tableEntry->bpp * mul_4h);
+        Size = (mul_4w * glDesc->byte_count * mul_4h);
     } else {
        /* The pitch is a multiple of 4 bytes */
-        Size = ((Width * tableEntry->bpp) + This->surface_alignment - 1) & ~(This->surface_alignment - 1);
+        Size = ((Width * glDesc->byte_count) + This->surface_alignment - 1) & ~(This->surface_alignment - 1);
         Size *= Height;
     }
@@ -658,5 +955,52 @@
 
     /** Create and initialise the surface resource **/
-    D3DCREATERESOURCEOBJECTINSTANCE(object,Surface,WINED3DRTYPE_SURFACE, Size)
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppSurface = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    /* Look at the implementation and set the correct Vtable */
+    switch(Impl)
+    {
+        case SURFACE_OPENGL:
+            /* Check if a 3D adapter is available when creating gl surfaces */
+            if (!This->adapter)
+            {
+                ERR("OpenGL surfaces are not available without opengl\n");
+                HeapFree(GetProcessHeap(), 0, object);
+                return WINED3DERR_NOTAVAILABLE;
+            }
+            object->lpVtbl = &IWineD3DSurface_Vtbl;
+            break;
+
+        case SURFACE_GDI:
+            object->lpVtbl = &IWineGDISurface_Vtbl;
+            break;
+
+        default:
+            /* To be sure to catch this */
+            ERR("Unknown requested surface implementation %d!\n", Impl);
+            HeapFree(GetProcessHeap(), 0, object);
+            return WINED3DERR_INVALIDCALL;
+    }
+
+    hr = resource_init(&object->resource, WINED3DRTYPE_SURFACE, This, Size, Usage, glDesc, Pool, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *ppSurface = NULL;
+        return hr;
+    }
+
+    TRACE("(%p) : Created resource %p\n", This, object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
+
+    *ppSurface = (IWineD3DSurface *)object;
+
     /* "Standalone" surface */
     IWineD3DSurface_SetContainer((IWineD3DSurface *)object, NULL);
@@ -667,5 +1011,4 @@
     object->currentDesc.MultiSampleQuality = MultisampleQuality;
     object->glDescription.level            = Level;
-    object->heightscale                    = glDesc->heightscale != 0.0 ? glDesc->heightscale : 1.0;
     list_init(&object->overlays);
 
@@ -675,13 +1018,4 @@
     object->Flags     |= (WINED3DFMT_D16_LOCKABLE == Format) ? SFLAG_LOCKABLE : 0;
     object->Flags     |= Lockable ? SFLAG_LOCKABLE : 0;
-
-
-    if (WINED3DFMT_UNKNOWN != Format) {
-        object->bytesPerPixel = tableEntry->bpp;
-    } else {
-        object->bytesPerPixel = 0;
-    }
-
-    /** TODO: change this into a texture transform matrix so that it's processed in hardware **/
 
     TRACE("Pool %d %d %d %d\n",Pool, WINED3DPOOL_DEFAULT, WINED3DPOOL_MANAGED, WINED3DPOOL_SYSTEMMEM);
@@ -721,45 +1055,53 @@
 
     /* mark the texture as dirty so that it gets loaded first time around*/
-    IWineD3DSurface_AddDirtyRect(*ppSurface, NULL);
+    surface_add_dirty_rect(*ppSurface, NULL);
     TRACE("(%p) : w(%d) h(%d) fmt(%d,%s) lockable(%d) surf@%p, surfmem@%p, %d bytes\n",
            This, Width, Height, Format, debug_d3dformat(Format),
            (WINED3DFMT_D16_LOCKABLE == Format), *ppSurface, object->resource.allocatedMemory, object->resource.size);
 
-    /* Look at the implementation and set the correct Vtable */
-    switch(Impl) {
-        case SURFACE_OPENGL:
-            /* Check if a 3D adapter is available when creating gl surfaces */
-            if(!This->adapter) {
-                ERR("OpenGL surfaces are not available without opengl\n");
-                HeapFree(GetProcessHeap(), 0, object->resource.allocatedMemory);
-                HeapFree(GetProcessHeap(), 0, object);
-                return WINED3DERR_NOTAVAILABLE;
-            }
-            break;
-
-        case SURFACE_GDI:
-            object->lpVtbl = &IWineGDISurface_Vtbl;
-            break;
-
-        default:
-            /* To be sure to catch this */
-            ERR("Unknown requested surface implementation %d!\n", Impl);
-            IWineD3DSurface_Release((IWineD3DSurface *) object);
-            return WINED3DERR_INVALIDCALL;
-    }
-
     list_init(&object->renderbuffers);
 
     /* Call the private setup routine */
-    return IWineD3DSurface_PrivateSetup( (IWineD3DSurface *) object );
-
-}
-
-static HRESULT  WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Width, UINT Height, UINT Levels,
-                                                 DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool,
-                                                 IWineD3DTexture** ppTexture, HANDLE* pSharedHandle, IUnknown *parent,
-                                                 D3DCB_CREATESURFACEFN D3DCB_CreateSurface) {
-
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    hr = IWineD3DSurface_PrivateSetup((IWineD3DSurface *)object);
+    if (FAILED(hr))
+    {
+        ERR("Private setup failed, returning %#x\n", hr);
+        IWineD3DSurface_Release(*ppSurface);
+        *ppSurface = NULL;
+        return hr;
+    }
+
+    return hr;
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateRendertargetView(IWineD3DDevice *iface,
+        IWineD3DResource *resource, IUnknown *parent, IWineD3DRendertargetView **rendertarget_view)
+{
+    struct wined3d_rendertarget_view *object;
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Failed to allocate memory\n");
+        return E_OUTOFMEMORY;
+    }
+
+    object->vtbl = &wined3d_rendertarget_view_vtbl;
+    object->refcount = 1;
+    IWineD3DResource_AddRef(resource);
+    object->resource = resource;
+    object->parent = parent;
+
+    *rendertarget_view = (IWineD3DRendertargetView *)object;
+
+    return WINED3D_OK;
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface,
+        UINT Width, UINT Height, UINT Levels, DWORD Usage, WINED3DFORMAT Format,
+        WINED3DPOOL Pool, IWineD3DTexture **ppTexture, IUnknown *parent)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(Format, &This->adapter->gl_info);
     IWineD3DTextureImpl *object;
     unsigned int i;
@@ -769,10 +1111,8 @@
     unsigned int pow2Width;
     unsigned int pow2Height;
-    const struct GlPixelFormatDesc *glDesc;
-    getFormatDescEntry(Format, &GLINFO_LOCATION, &glDesc);
 
     TRACE("(%p) : Width %d, Height %d, Levels %d, Usage %#x\n", This, Width, Height, Levels, Usage);
-    TRACE("Format %#x (%s), Pool %#x, ppTexture %p, pSharedHandle %p, parent %p\n",
-            Format, debug_d3dformat(Format), Pool, ppTexture, pSharedHandle, parent);
+    TRACE("Format %#x (%s), Pool %#x, ppTexture %p, parent %p\n",
+            Format, debug_d3dformat(Format), Pool, ppTexture, parent);
 
     /* TODO: It should only be possible to create textures for formats
@@ -783,10 +1123,79 @@
     }
 
-    D3DCREATERESOURCEOBJECTINSTANCE(object, Texture, WINED3DRTYPE_TEXTURE, 0);
-    D3DINITIALIZEBASETEXTURE(object->baseTexture);    
-    object->width  = Width;
-    object->height = Height;
-
-    if(glDesc->Flags & WINED3DFMT_FLAG_FILTERING) {
+    /* Non-power2 support */
+    if (GL_SUPPORT(ARB_TEXTURE_NON_POWER_OF_TWO))
+    {
+        pow2Width = Width;
+        pow2Height = Height;
+    }
+    else
+    {
+        /* Find the nearest pow2 match */
+        pow2Width = pow2Height = 1;
+        while (pow2Width < Width) pow2Width <<= 1;
+        while (pow2Height < Height) pow2Height <<= 1;
+
+        if (pow2Width != Width || pow2Height != Height)
+        {
+            if (Levels > 1)
+            {
+                WARN("Attempted to create a mipmapped np2 texture without unconditional np2 support\n");
+                return WINED3DERR_INVALIDCALL;
+            }
+            Levels = 1;
+        }
+    }
+
+    /* Calculate levels for mip mapping */
+    if (Usage & WINED3DUSAGE_AUTOGENMIPMAP)
+    {
+        if (!GL_SUPPORT(SGIS_GENERATE_MIPMAP))
+        {
+            WARN("No mipmap generation support, returning D3DERR_INVALIDCALL\n");
+            return WINED3DERR_INVALIDCALL;
+        }
+
+        if (Levels > 1)
+        {
+            WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL\n");
+            return WINED3DERR_INVALIDCALL;
+        }
+
+        Levels = 1;
+    }
+    else if (!Levels)
+    {
+        Levels = wined3d_log2i(max(Width, Height)) + 1;
+        TRACE("Calculated levels = %d\n", Levels);
+    }
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppTexture = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DTexture_Vtbl;
+    hr = resource_init(&object->resource, WINED3DRTYPE_TEXTURE, This, 0, Usage, format_desc, Pool, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *ppTexture = NULL;
+        return hr;
+    }
+
+    TRACE("(%p) : Created resource %p\n", This, object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
+
+    *ppTexture = (IWineD3DTexture *)object;
+
+    basetexture_init(&object->baseTexture, Levels, Usage);
+
+    if (object->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
+    {
         object->baseTexture.minMipLookup = minMipLookup;
         object->baseTexture.magLookup    = magLookup;
@@ -794,26 +1203,4 @@
         object->baseTexture.minMipLookup = minMipLookup_noFilter;
         object->baseTexture.magLookup    = magLookup_noFilter;
-    }
-
-    /** Non-power2 support **/
-    if (GL_SUPPORT(ARB_TEXTURE_NON_POWER_OF_TWO)) {
-        pow2Width = Width;
-        pow2Height = Height;
-    } else {
-        /* Find the nearest pow2 match */
-        pow2Width = pow2Height = 1;
-        while (pow2Width < Width) pow2Width <<= 1;
-        while (pow2Height < Height) pow2Height <<= 1;
-
-        if(pow2Width != Width || pow2Height != Height) {
-            if(Levels > 1) {
-                WARN("Attempted to create a mipmapped np2 texture without unconditional np2 support\n");
-                HeapFree(GetProcessHeap(), 0, object);
-                *ppTexture = NULL;
-                return WINED3DERR_INVALIDCALL;
-            } else {
-                Levels = 1;
-            }
-        }
     }
 
@@ -836,4 +1223,8 @@
        !((Format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE) && (wined3d_settings.rendertargetlock_mode == RTL_READTEX || wined3d_settings.rendertargetlock_mode == RTL_TEXTEX)))
     {
+        if ((Width != 1) || (Height != 1)) {
+            object->baseTexture.pow2Matrix_identity = FALSE;
+        }
+
         object->baseTexture.pow2Matrix[0] =  (float)Width;
         object->baseTexture.pow2Matrix[5] =  (float)Height;
@@ -844,6 +1235,13 @@
         object->baseTexture.minMipLookup = minMipLookup_noFilter;
     } else {
-        object->baseTexture.pow2Matrix[0] =  (((float)Width)  / ((float)pow2Width));
-        object->baseTexture.pow2Matrix[5] =  (((float)Height) / ((float)pow2Height));
+        if ((Width != pow2Width) || (Height != pow2Height)) {
+            object->baseTexture.pow2Matrix_identity = FALSE;
+            object->baseTexture.pow2Matrix[0] =  (((float)Width)  / ((float)pow2Width));
+            object->baseTexture.pow2Matrix[5] =  (((float)Height) / ((float)pow2Height));
+        } else {
+            object->baseTexture.pow2Matrix[0] =  1.0;
+            object->baseTexture.pow2Matrix[5] =  1.0;
+        }
+
         object->baseTexture.pow2Matrix[10] = 1.0;
         object->baseTexture.pow2Matrix[15] = 1.0;
@@ -852,28 +1250,4 @@
     }
     TRACE(" xf(%f) yf(%f)\n", object->baseTexture.pow2Matrix[0], object->baseTexture.pow2Matrix[5]);
-
-    /* Calculate levels for mip mapping */
-    if (Usage & WINED3DUSAGE_AUTOGENMIPMAP) {
-        if(!GL_SUPPORT(SGIS_GENERATE_MIPMAP)) {
-            WARN("No mipmap generation support, returning D3DERR_INVALIDCALL\n");
-            return WINED3DERR_INVALIDCALL;
-        }
-        if(Levels > 1) {
-            WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL\n");
-            return WINED3DERR_INVALIDCALL;
-        }
-        object->baseTexture.levels = 1;
-    } else if (Levels == 0) {
-        TRACE("calculating levels %d\n", object->baseTexture.levels);
-        object->baseTexture.levels++;
-        tmpW = Width;
-        tmpH = Height;
-        while (tmpW > 1 || tmpH > 1) {
-            tmpW = max(1, tmpW >> 1);
-            tmpH = max(1, tmpH >> 1);
-            object->baseTexture.levels++;
-        }
-        TRACE("Calculated levels = %d\n", object->baseTexture.levels);
-    }
 
     /* Generate all the surfaces */
@@ -883,5 +1257,6 @@
     {
         /* use the callback to create the texture surface */
-        hr = D3DCB_CreateSurface(This->parent, parent, tmpW, tmpH, Format, Usage, Pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &object->surfaces[i],NULL);
+        hr = IWineD3DDeviceParent_CreateSurface(This->device_parent, parent, tmpW, tmpH, Format,
+                Usage, Pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &object->surfaces[i]);
         if (hr!= WINED3D_OK || ( (IWineD3DSurfaceImpl *) object->surfaces[i])->Flags & SFLAG_OVERSIZE) {
             FIXME("Failed to create surface  %p\n", object);
@@ -901,5 +1276,5 @@
         tmpH = max(1, tmpH >> 1);
     }
-    object->baseTexture.shader_color_fixup = glDesc->color_fixup;
+    object->baseTexture.internal_preload = texture_internal_preload;
 
     TRACE("(%p) : Created  texture %p\n", This, object);
@@ -908,12 +1283,9 @@
 
 static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
-                                                      UINT Width, UINT Height, UINT Depth,
-                                                      UINT Levels, DWORD Usage,
-                                                      WINED3DFORMAT Format, WINED3DPOOL Pool,
-                                                      IWineD3DVolumeTexture **ppVolumeTexture,
-                                                      HANDLE *pSharedHandle, IUnknown *parent,
-                                                      D3DCB_CREATEVOLUMEFN D3DCB_CreateVolume) {
-
+        UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, WINED3DFORMAT Format,
+        WINED3DPOOL Pool, IWineD3DVolumeTexture **ppVolumeTexture, IUnknown *parent)
+{
     IWineD3DDeviceImpl        *This = (IWineD3DDeviceImpl *)iface;
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(Format, &This->adapter->gl_info);
     IWineD3DVolumeTextureImpl *object;
     unsigned int               i;
@@ -921,7 +1293,5 @@
     UINT                       tmpH;
     UINT                       tmpD;
-    const struct GlPixelFormatDesc *glDesc;
-
-    getFormatDescEntry(Format, &GLINFO_LOCATION, &glDesc);
+    HRESULT hr;
 
     /* TODO: It should only be possible to create textures for formats 
@@ -936,6 +1306,50 @@
     }
 
-    D3DCREATERESOURCEOBJECTINSTANCE(object, VolumeTexture, WINED3DRTYPE_VOLUMETEXTURE, 0);
-    D3DINITIALIZEBASETEXTURE(object->baseTexture);
+    /* Calculate levels for mip mapping */
+    if (Usage & WINED3DUSAGE_AUTOGENMIPMAP)
+    {
+        if (!GL_SUPPORT(SGIS_GENERATE_MIPMAP))
+        {
+            WARN("No mipmap generation support, returning D3DERR_INVALIDCALL\n");
+            return WINED3DERR_INVALIDCALL;
+        }
+
+        if (Levels > 1)
+        {
+            WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL\n");
+            return WINED3DERR_INVALIDCALL;
+        }
+
+        Levels = 1;
+    }
+    else if (!Levels)
+    {
+        Levels = wined3d_log2i(max(max(Width, Height), Depth)) + 1;
+        TRACE("Calculated levels = %d\n", Levels);
+    }
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppVolumeTexture = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DVolumeTexture_Vtbl;
+    hr = resource_init(&object->resource, WINED3DRTYPE_VOLUMETEXTURE, This, 0, Usage, format_desc, Pool, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *ppVolumeTexture = NULL;
+        return hr;
+    }
+
+    TRACE("(%p) : Created resource %p\n", This, object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
+
+    basetexture_init(&object->baseTexture, Levels, Usage);
 
     TRACE("(%p) : W(%d) H(%d) D(%d), Lvl(%d) Usage(%d), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
@@ -948,5 +1362,6 @@
     object->baseTexture.pow2Matrix[15] = 1.0;
 
-    if(glDesc->Flags & WINED3DFMT_FLAG_FILTERING) {
+    if (object->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
+    {
         object->baseTexture.minMipLookup = minMipLookup;
         object->baseTexture.magLookup    = magLookup;
@@ -956,29 +1371,4 @@
     }
 
-    /* Calculate levels for mip mapping */
-    if (Usage & WINED3DUSAGE_AUTOGENMIPMAP) {
-        if(!GL_SUPPORT(SGIS_GENERATE_MIPMAP)) {
-            WARN("No mipmap generation support, returning D3DERR_INVALIDCALL\n");
-            return WINED3DERR_INVALIDCALL;
-        }
-        if(Levels > 1) {
-            WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL\n");
-            return WINED3DERR_INVALIDCALL;
-        }
-        object->baseTexture.levels = 1;
-    } else if (Levels == 0) {
-        object->baseTexture.levels++;
-        tmpW = Width;
-        tmpH = Height;
-        tmpD = Depth;
-        while (tmpW > 1 || tmpH > 1 || tmpD > 1) {
-            tmpW = max(1, tmpW >> 1);
-            tmpH = max(1, tmpH >> 1);
-            tmpD = max(1, tmpD >> 1);
-            object->baseTexture.levels++;
-        }
-        TRACE("Calculated levels = %d\n", object->baseTexture.levels);
-    }
-
     /* Generate all the surfaces */
     tmpW = Width;
@@ -990,7 +1380,6 @@
         HRESULT hr;
         /* Create the volume */
-        hr = D3DCB_CreateVolume(This->parent, parent, tmpW, tmpH, tmpD, Format, Pool, Usage,
-                                &object->volumes[i], pSharedHandle);
-
+        hr = IWineD3DDeviceParent_CreateVolume(This->device_parent, parent,
+                tmpW, tmpH, tmpD, Format, Pool, Usage, &object->volumes[i]);
         if(FAILED(hr)) {
             ERR("Creating a volume for the volume texture failed(%08x)\n", hr);
@@ -1008,5 +1397,5 @@
         tmpD = max(1, tmpD >> 1);
     }
-    object->baseTexture.shader_color_fixup = glDesc->color_fixup;
+    object->baseTexture.internal_preload = volumetexture_internal_preload;
 
     *ppVolumeTexture = (IWineD3DVolumeTexture *) object;
@@ -1016,13 +1405,11 @@
 
 static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
-                                               UINT Width, UINT Height, UINT Depth,
-                                               DWORD Usage,
-                                               WINED3DFORMAT Format, WINED3DPOOL Pool,
-                                               IWineD3DVolume** ppVolume,
-                                               HANDLE* pSharedHandle, IUnknown *parent) {
-
+        UINT Width, UINT Height, UINT Depth, DWORD Usage, WINED3DFORMAT Format,
+        WINED3DPOOL Pool, IWineD3DVolume **ppVolume, IUnknown *parent)
+{
     IWineD3DDeviceImpl        *This = (IWineD3DDeviceImpl *)iface;
     IWineD3DVolumeImpl        *object; /** NOTE: impl ref allowed since this is a create function **/
-    const StaticPixelFormatDesc *formatDesc  = getFormatDescEntry(Format, NULL, NULL);
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(Format, &GLINFO_LOCATION);
+    HRESULT hr;
 
     if(!GL_SUPPORT(EXT_TEXTURE3D)) {
@@ -1031,5 +1418,28 @@
     }
 
-    D3DCREATERESOURCEOBJECTINSTANCE(object, Volume, WINED3DRTYPE_VOLUME, ((Width * formatDesc->bpp) * Height * Depth))
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppVolume = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DVolume_Vtbl;
+    hr = resource_init(&object->resource, WINED3DRTYPE_VOLUME, This,
+            Width * Height * Depth * format_desc->byte_count, Usage, format_desc, Pool, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *ppVolume = NULL;
+        return hr;
+    }
+
+    TRACE("(%p) : Created resource %p\n", This, object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
+
+    *ppVolume = (IWineD3DVolume *)object;
 
     TRACE("(%p) : W(%d) H(%d) D(%d), Usage(%d), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
@@ -1039,5 +1449,4 @@
     object->currentDesc.Height  = Height;
     object->currentDesc.Depth   = Depth;
-    object->bytesPerPixel       = formatDesc->bpp;
 
     /** Note: Volume textures cannot be dxtn, hence no need to check here **/
@@ -1047,15 +1456,15 @@
     object->dirty               = TRUE;
 
-    return IWineD3DVolume_AddDirtyBox((IWineD3DVolume *) object, NULL);
-}
-
-static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT EdgeLength,
-                                                    UINT Levels, DWORD Usage,
-                                                    WINED3DFORMAT Format, WINED3DPOOL Pool,
-                                                    IWineD3DCubeTexture **ppCubeTexture,
-                                                    HANDLE *pSharedHandle, IUnknown *parent,
-                                                    D3DCB_CREATESURFACEFN D3DCB_CreateSurface) {
-
+    volume_add_dirty_box((IWineD3DVolume *)object, NULL);
+
+    return WINED3D_OK;
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface,
+        UINT EdgeLength, UINT Levels, DWORD Usage, WINED3DFORMAT Format,
+        WINED3DPOOL Pool, IWineD3DCubeTexture **ppCubeTexture, IUnknown *parent)
+{
     IWineD3DDeviceImpl      *This = (IWineD3DDeviceImpl *)iface;
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(Format, &This->adapter->gl_info);
     IWineD3DCubeTextureImpl *object; /** NOTE: impl ref allowed since this is a create function **/
     unsigned int             i, j;
@@ -1063,6 +1472,4 @@
     HRESULT                  hr;
     unsigned int pow2EdgeLength;
-    const struct GlPixelFormatDesc *glDesc;
-    getFormatDescEntry(Format, &GLINFO_LOCATION, &glDesc);
 
     /* TODO: It should only be possible to create textures for formats 
@@ -1078,6 +1485,50 @@
     }
 
-    D3DCREATERESOURCEOBJECTINSTANCE(object, CubeTexture, WINED3DRTYPE_CUBETEXTURE, 0);
-    D3DINITIALIZEBASETEXTURE(object->baseTexture);
+    /* Calculate levels for mip mapping */
+    if (Usage & WINED3DUSAGE_AUTOGENMIPMAP)
+    {
+        if (!GL_SUPPORT(SGIS_GENERATE_MIPMAP))
+        {
+            WARN("No mipmap generation support, returning D3DERR_INVALIDCALL\n");
+            return WINED3DERR_INVALIDCALL;
+        }
+
+        if (Levels > 1)
+        {
+            WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL\n");
+            return WINED3DERR_INVALIDCALL;
+        }
+
+        Levels = 1;
+    }
+    else if (!Levels)
+    {
+        Levels = wined3d_log2i(EdgeLength) + 1;
+        TRACE("Calculated levels = %d\n", Levels);
+    }
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppCubeTexture = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DCubeTexture_Vtbl;
+    hr = resource_init(&object->resource, WINED3DRTYPE_CUBETEXTURE, This, 0, Usage, format_desc, Pool, parent);
+    if (FAILED(hr))
+    {
+        WARN("Failed to initialize resource, returning %#x\n", hr);
+        HeapFree(GetProcessHeap(), 0, object);
+        *ppCubeTexture = NULL;
+        return hr;
+    }
+
+    TRACE("(%p) : Created resource %p\n", This, object);
+
+    IWineD3DDeviceImpl_AddResource(iface, (IWineD3DResource *)object);
+
+    basetexture_init(&object->baseTexture, Levels, Usage);
 
     TRACE("(%p) Create Cube Texture\n", This);
@@ -1087,5 +1538,5 @@
     while (pow2EdgeLength < EdgeLength) pow2EdgeLength <<= 1;
 
-    if (GL_SUPPORT(ARB_TEXTURE_NON_POWER_OF_TWO)) {
+    if (GL_SUPPORT(ARB_TEXTURE_NON_POWER_OF_TWO) || (EdgeLength == pow2EdgeLength)) {
         /* Precalculated scaling for 'faked' non power of two texture coords */
         object->baseTexture.pow2Matrix[ 0] = 1.0;
@@ -1099,7 +1550,9 @@
         object->baseTexture.pow2Matrix[10] = ((float)EdgeLength) / ((float)pow2EdgeLength);
         object->baseTexture.pow2Matrix[15] = 1.0;
-    }
-
-    if(glDesc->Flags & WINED3DFMT_FLAG_FILTERING) {
+        object->baseTexture.pow2Matrix_identity = FALSE;
+    }
+
+    if (object->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
+    {
         object->baseTexture.minMipLookup = minMipLookup;
         object->baseTexture.magLookup    = magLookup;
@@ -1107,31 +1560,4 @@
         object->baseTexture.minMipLookup = minMipLookup_noFilter;
         object->baseTexture.magLookup    = magLookup_noFilter;
-    }
-
-    /* Calculate levels for mip mapping */
-    if (Usage & WINED3DUSAGE_AUTOGENMIPMAP) {
-        if(!GL_SUPPORT(SGIS_GENERATE_MIPMAP)) {
-            WARN("No mipmap generation support, returning D3DERR_INVALIDCALL\n");
-            HeapFree(GetProcessHeap(), 0, object);
-            *ppCubeTexture = NULL;
-
-            return WINED3DERR_INVALIDCALL;
-        }
-        if(Levels > 1) {
-            WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL\n");
-            HeapFree(GetProcessHeap(), 0, object);
-            *ppCubeTexture = NULL;
-
-            return WINED3DERR_INVALIDCALL;
-        }
-        object->baseTexture.levels = 1;
-    } else if (Levels == 0) {
-        object->baseTexture.levels++;
-        tmpW = EdgeLength;
-        while (tmpW > 1) {
-            tmpW = max(1, tmpW >> 1);
-            object->baseTexture.levels++;
-        }
-        TRACE("Calculated levels = %d\n", object->baseTexture.levels);
     }
 
@@ -1151,22 +1577,10 @@
             };
 
-            hr=D3DCB_CreateSurface(This->parent, parent, tmpW, tmpW, Format, Usage, Pool,
-                                   i /* Level */, j, &object->surfaces[j][i],pSharedHandle);
-
-            if(hr!= WINED3D_OK) {
-                /* clean up */
-                unsigned int k;
-                unsigned int l;
-                for (l = 0; l < j; l++) {
-                    IWineD3DSurface_Release(object->surfaces[l][i]);
-                }
-                for (k = 0; k < i; k++) {
-                    for (l = 0; l < 6; l++) {
-                        IWineD3DSurface_Release(object->surfaces[l][k]);
-                    }
-                }
-
+            hr = IWineD3DDeviceParent_CreateSurface(This->device_parent, parent, tmpW, tmpW,
+                    Format, Usage, Pool, i /* Level */, j, &object->surfaces[j][i]);
+            if (FAILED(hr))
+            {
                 FIXME("(%p) Failed to create surface\n",object);
-                HeapFree(GetProcessHeap(),0,object);
+                IWineD3DCubeTexture_Release((IWineD3DCubeTexture *)object);
                 *ppCubeTexture = NULL;
                 return hr;
@@ -1178,5 +1592,5 @@
         tmpW = max(1, tmpW >> 1);
     }
-    object->baseTexture.shader_color_fixup = glDesc->color_fixup;
+    object->baseTexture.internal_preload = cubetexture_internal_preload;
 
     TRACE("(%p) : Created Cube Texture %p\n", This, object);
@@ -1235,8 +1649,21 @@
     }
 
-    D3DCREATEOBJECTINSTANCE(object, Query)
-    object->lpVtbl       = vtable;
-    object->type         = Type;
-    object->state        = QUERY_CREATED;
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if(!object)
+    {
+        ERR("Out of memory\n");
+        *ppQuery = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = vtable;
+    object->type = Type;
+    object->state = QUERY_CREATED;
+    object->wineD3DDevice = This;
+    object->parent = parent;
+    object->ref = 1;
+
+    *ppQuery = (IWineD3DQuery *)object;
+
     /* allocated the 'extended' data based on the type of query requested */
     switch(Type){
@@ -1402,8 +1829,7 @@
 
 /* example at http://www.fairyengine.com/articles/dxmultiviews.htm */
-static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice* iface,
-        WINED3DPRESENT_PARAMETERS* pPresentationParameters, IWineD3DSwapChain** ppSwapChain,
-        IUnknown* parent, D3DCB_CREATERENDERTARGETFN D3DCB_CreateRenderTarget,
-        D3DCB_CREATEDEPTHSTENCILSURFACEFN D3DCB_CreateDepthStencil, WINED3DSURFTYPE surface_type)
+static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface,
+        WINED3DPRESENT_PARAMETERS *pPresentationParameters, IWineD3DSwapChain **ppSwapChain,
+        IUnknown *parent, WINED3DSURFTYPE surface_type)
 {
     IWineD3DDeviceImpl      *This = (IWineD3DDeviceImpl *)iface;
@@ -1415,5 +1841,5 @@
     BOOL                    displaymode_set = FALSE;
     WINED3DDISPLAYMODE      Mode;
-    const StaticPixelFormatDesc *formatDesc;
+    const struct GlPixelFormatDesc *format_desc;
 
     TRACE("(%p) : Created Additional Swap Chain\n", This);
@@ -1432,5 +1858,12 @@
     }
 
-    D3DCREATEOBJECTINSTANCE(object, SwapChain)
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if(!object)
+    {
+        ERR("Out of memory\n");
+        *ppSwapChain = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
     switch(surface_type) {
         case SURFACE_GDI:
@@ -1442,6 +1875,12 @@
         case SURFACE_UNKNOWN:
             FIXME("Caller tried to create a SURFACE_UNKNOWN swapchain\n");
+            HeapFree(GetProcessHeap(), 0, object);
             return WINED3DERR_INVALIDCALL;
     }
+    object->wineD3DDevice = This;
+    object->parent = parent;
+    object->ref = 1;
+
+    *ppSwapChain = (IWineD3DSwapChain *)object;
 
     /*********************
@@ -1473,10 +1912,5 @@
     object->orig_height = Mode.Height;
     object->orig_fmt = Mode.Format;
-    formatDesc  = getFormatDescEntry(Mode.Format, NULL, NULL);
-
-    /** MSDN: If Windowed is TRUE and either of the BackBufferWidth/Height values is zero,
-     *  then the corresponding dimension of the client area of the hDeviceWindow
-     *  (or the focus window, if hDeviceWindow is NULL) is taken.
-      **********************/
+    format_desc = getFormatDescEntry(Mode.Format, &GLINFO_LOCATION);
 
     if (pPresentationParameters->Windowed &&
@@ -1507,16 +1941,11 @@
 
     TRACE("calling rendertarget CB\n");
-    hr = D3DCB_CreateRenderTarget(This->parent,
-                             parent,
-                             object->presentParms.BackBufferWidth,
-                             object->presentParms.BackBufferHeight,
-                             object->presentParms.BackBufferFormat,
-                             object->presentParms.MultiSampleType,
-                             object->presentParms.MultiSampleQuality,
-                             TRUE /* Lockable */,
-                             &object->frontBuffer,
-                             NULL /* pShared (always null)*/);
+    hr = IWineD3DDeviceParent_CreateRenderTarget(This->device_parent, parent,
+            object->presentParms.BackBufferWidth, object->presentParms.BackBufferHeight,
+            object->presentParms.BackBufferFormat, object->presentParms.MultiSampleType,
+            object->presentParms.MultiSampleQuality, TRUE /* Lockable */, &object->frontBuffer);
     if (SUCCEEDED(hr)) {
         IWineD3DSurface_SetContainer(object->frontBuffer, (IWineD3DBase *)object);
+        ((IWineD3DSurfaceImpl *)object->frontBuffer)->Flags |= SFLAG_SWAPCHAIN;
         if(surface_type == SURFACE_OPENGL) {
             IWineD3DSurface_ModifyLocation(object->frontBuffer, SFLAG_INDRAWABLE, TRUE);
@@ -1595,16 +2024,11 @@
         for(i = 0; i < object->presentParms.BackBufferCount; i++) {
             TRACE("calling rendertarget CB\n");
-            hr = D3DCB_CreateRenderTarget(This->parent,
-                                    parent,
-                                    object->presentParms.BackBufferWidth,
-                                    object->presentParms.BackBufferHeight,
-                                    object->presentParms.BackBufferFormat,
-                                    object->presentParms.MultiSampleType,
-                                    object->presentParms.MultiSampleQuality,
-                                    TRUE /* Lockable */,
-                                    &object->backBuffer[i],
-                                    NULL /* pShared (always null)*/);
+            hr = IWineD3DDeviceParent_CreateRenderTarget(This->device_parent, parent,
+                    object->presentParms.BackBufferWidth, object->presentParms.BackBufferHeight,
+                    object->presentParms.BackBufferFormat, object->presentParms.MultiSampleType,
+                    object->presentParms.MultiSampleQuality, TRUE /* Lockable */, &object->backBuffer[i]);
             if(SUCCEEDED(hr)) {
                 IWineD3DSurface_SetContainer(object->backBuffer[i], (IWineD3DBase *)object);
+                ((IWineD3DSurfaceImpl *)object->backBuffer[i])->Flags |= SFLAG_SWAPCHAIN;
             } else {
                 ERR("Cannot create new back buffer\n");
@@ -1634,14 +2058,9 @@
         TRACE("Creating depth stencil buffer\n");
         if (This->auto_depth_stencil_buffer == NULL ) {
-            hr = D3DCB_CreateDepthStencil(This->parent,
-                                    parent,
-                                    object->presentParms.BackBufferWidth,
-                                    object->presentParms.BackBufferHeight,
-                                    object->presentParms.AutoDepthStencilFormat,
-                                    object->presentParms.MultiSampleType,
-                                    object->presentParms.MultiSampleQuality,
-                                    FALSE /* FIXME: Discard */,
-                                    &This->auto_depth_stencil_buffer,
-                                    NULL /* pShared (always null)*/  );
+            hr = IWineD3DDeviceParent_CreateDepthStencilSurface(This->device_parent, parent,
+                    object->presentParms.BackBufferWidth, object->presentParms.BackBufferHeight,
+                    object->presentParms.AutoDepthStencilFormat, object->presentParms.MultiSampleType,
+                    object->presentParms.MultiSampleQuality, FALSE /* FIXME: Discard */,
+                    &This->auto_depth_stencil_buffer);
             if (SUCCEEDED(hr)) {
                 IWineD3DSurface_SetContainer(This->auto_depth_stencil_buffer, 0);
@@ -1671,5 +2090,5 @@
         devmode.dmSize       = sizeof(devmode);
         devmode.dmFields     = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
-        devmode.dmBitsPerPel = formatDesc->bpp * 8;
+        devmode.dmBitsPerPel = format_desc->byte_count * 8;
         devmode.dmPelsWidth  = object->orig_width;
         devmode.dmPelsHeight = object->orig_height;
@@ -1740,7 +2159,21 @@
             This, ((IWineD3DImpl *)This->wineD3D)->dxVersion, elements, element_count, ppVertexDeclaration);
 
-    D3DCREATEOBJECTINSTANCE(object, VertexDeclaration)
-
-    hr = IWineD3DVertexDeclaration_SetDeclaration((IWineD3DVertexDeclaration *)object, elements, element_count);
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if(!object)
+    {
+        ERR("Out of memory\n");
+        *ppVertexDeclaration = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DVertexDeclaration_Vtbl;
+    object->wineD3DDevice = This;
+    object->parent = parent;
+    object->ref = 1;
+
+    *ppVertexDeclaration = (IWineD3DVertexDeclaration *)object;
+
+    hr = vertexdeclaration_init(object, elements, element_count);
+
     if(FAILED(hr)) {
         IWineD3DVertexDeclaration_Release((IWineD3DVertexDeclaration *)object);
@@ -1769,6 +2202,4 @@
     DWORD num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT;
     DWORD texcoords = (fvf & 0xFFFF0000) >> 16;
-
-    WINED3DVERTEXELEMENT end_element = WINED3DDECL_END();
     WINED3DVERTEXELEMENT *elements = NULL;
 
@@ -1779,40 +2210,42 @@
     /* Compute declaration size */
     size = has_pos + (has_blend && num_blends > 0) + has_blend_idx + has_normal +
-           has_psize + has_diffuse + has_specular + num_textures + 1;
+           has_psize + has_diffuse + has_specular + num_textures;
 
     /* convert the declaration */
     elements = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WINED3DVERTEXELEMENT));
-    if (!elements)
-        return 0;
-
-    elements[size-1] = end_element;
+    if (!elements) return ~0U;
+
     idx = 0;
     if (has_pos) {
         if (!has_blend && (fvf & WINED3DFVF_XYZRHW)) {
-            elements[idx].Type = WINED3DDECLTYPE_FLOAT4;
-            elements[idx].Usage = WINED3DDECLUSAGE_POSITIONT;
+            elements[idx].format = WINED3DFMT_R32G32B32A32_FLOAT;
+            elements[idx].usage = WINED3DDECLUSAGE_POSITIONT;
+        }
+        else if ((fvf & WINED3DFVF_XYZW) == WINED3DFVF_XYZW) {
+            elements[idx].format = WINED3DFMT_R32G32B32A32_FLOAT;
+            elements[idx].usage = WINED3DDECLUSAGE_POSITION;
         }
         else {
-            elements[idx].Type = WINED3DDECLTYPE_FLOAT3;
-            elements[idx].Usage = WINED3DDECLUSAGE_POSITION;
-        }
-        elements[idx].UsageIndex = 0;
+            elements[idx].format = WINED3DFMT_R32G32B32_FLOAT;
+            elements[idx].usage = WINED3DDECLUSAGE_POSITION;
+        }
+        elements[idx].usage_idx = 0;
         idx++;
     }
     if (has_blend && (num_blends > 0)) {
         if (((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2) && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR))
-            elements[idx].Type = WINED3DDECLTYPE_D3DCOLOR;
+            elements[idx].format = WINED3DFMT_A8R8G8B8;
         else {
             switch(num_blends) {
-                case 1: elements[idx].Type = WINED3DDECLTYPE_FLOAT1; break;
-                case 2: elements[idx].Type = WINED3DDECLTYPE_FLOAT2; break;
-                case 3: elements[idx].Type = WINED3DDECLTYPE_FLOAT3; break;
-                case 4: elements[idx].Type = WINED3DDECLTYPE_FLOAT4; break;
+                case 1: elements[idx].format = WINED3DFMT_R32_FLOAT; break;
+                case 2: elements[idx].format = WINED3DFMT_R32G32_FLOAT; break;
+                case 3: elements[idx].format = WINED3DFMT_R32G32B32_FLOAT; break;
+                case 4: elements[idx].format = WINED3DFMT_R32G32B32A32_FLOAT; break;
                 default:
                     ERR("Unexpected amount of blend values: %u\n", num_blends);
             }
         }
-        elements[idx].Usage = WINED3DDECLUSAGE_BLENDWEIGHT;
-        elements[idx].UsageIndex = 0;
+        elements[idx].usage = WINED3DDECLUSAGE_BLENDWEIGHT;
+        elements[idx].usage_idx = 0;
         idx++;
     }
@@ -1820,35 +2253,35 @@
         if (fvf & WINED3DFVF_LASTBETA_UBYTE4 ||
             (((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2) && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR)))
-            elements[idx].Type = WINED3DDECLTYPE_UBYTE4;
+            elements[idx].format = WINED3DFMT_R8G8B8A8_UINT;
         else if (fvf & WINED3DFVF_LASTBETA_D3DCOLOR)
-            elements[idx].Type = WINED3DDECLTYPE_D3DCOLOR;
+            elements[idx].format = WINED3DFMT_A8R8G8B8;
         else
-            elements[idx].Type = WINED3DDECLTYPE_FLOAT1;
-        elements[idx].Usage = WINED3DDECLUSAGE_BLENDINDICES;
-        elements[idx].UsageIndex = 0;
+            elements[idx].format = WINED3DFMT_R32_FLOAT;
+        elements[idx].usage = WINED3DDECLUSAGE_BLENDINDICES;
+        elements[idx].usage_idx = 0;
         idx++;
     }
     if (has_normal) {
-        elements[idx].Type = WINED3DDECLTYPE_FLOAT3;
-        elements[idx].Usage = WINED3DDECLUSAGE_NORMAL;
-        elements[idx].UsageIndex = 0;
+        elements[idx].format = WINED3DFMT_R32G32B32_FLOAT;
+        elements[idx].usage = WINED3DDECLUSAGE_NORMAL;
+        elements[idx].usage_idx = 0;
         idx++;
     }
     if (has_psize) {
-        elements[idx].Type = WINED3DDECLTYPE_FLOAT1;
-        elements[idx].Usage = WINED3DDECLUSAGE_PSIZE;
-        elements[idx].UsageIndex = 0;
+        elements[idx].format = WINED3DFMT_R32_FLOAT;
+        elements[idx].usage = WINED3DDECLUSAGE_PSIZE;
+        elements[idx].usage_idx = 0;
         idx++;
     }
     if (has_diffuse) {
-        elements[idx].Type = WINED3DDECLTYPE_D3DCOLOR;
-        elements[idx].Usage = WINED3DDECLUSAGE_COLOR;
-        elements[idx].UsageIndex = 0;
+        elements[idx].format = WINED3DFMT_A8R8G8B8;
+        elements[idx].usage = WINED3DDECLUSAGE_COLOR;
+        elements[idx].usage_idx = 0;
         idx++;
     }
     if (has_specular) {
-        elements[idx].Type = WINED3DDECLTYPE_D3DCOLOR;
-        elements[idx].Usage = WINED3DDECLUSAGE_COLOR;
-        elements[idx].UsageIndex = 1;
+        elements[idx].format = WINED3DFMT_A8R8G8B8;
+        elements[idx].usage = WINED3DDECLUSAGE_COLOR;
+        elements[idx].usage_idx = 1;
         idx++;
     }
@@ -1857,27 +2290,29 @@
         switch (numcoords) {
             case WINED3DFVF_TEXTUREFORMAT1:
-                elements[idx].Type = WINED3DDECLTYPE_FLOAT1;
+                elements[idx].format = WINED3DFMT_R32_FLOAT;
                 break;
             case WINED3DFVF_TEXTUREFORMAT2:
-                elements[idx].Type = WINED3DDECLTYPE_FLOAT2;
+                elements[idx].format = WINED3DFMT_R32G32_FLOAT;
                 break;
             case WINED3DFVF_TEXTUREFORMAT3:
-                elements[idx].Type = WINED3DDECLTYPE_FLOAT3;
+                elements[idx].format = WINED3DFMT_R32G32B32_FLOAT;
                 break;
             case WINED3DFVF_TEXTUREFORMAT4:
-                elements[idx].Type = WINED3DDECLTYPE_FLOAT4;
+                elements[idx].format = WINED3DFMT_R32G32B32A32_FLOAT;
                 break;
         }
-        elements[idx].Usage = WINED3DDECLUSAGE_TEXCOORD;
-        elements[idx].UsageIndex = idx2;
+        elements[idx].usage = WINED3DDECLUSAGE_TEXCOORD;
+        elements[idx].usage_idx = idx2;
         idx++;
     }
 
     /* Now compute offsets, and initialize the rest of the fields */
-    for (idx = 0, offset = 0; idx < size-1; idx++) {
-        elements[idx].Stream = 0;
-        elements[idx].Method = WINED3DDECLMETHOD_DEFAULT;
-        elements[idx].Offset = offset;
-        offset += WINED3D_ATR_SIZE(elements[idx].Type) * WINED3D_ATR_TYPESIZE(elements[idx].Type);
+    for (idx = 0, offset = 0; idx < size; ++idx)
+    {
+        const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(elements[idx].format, &This->adapter->gl_info);
+        elements[idx].input_slot = 0;
+        elements[idx].method = WINED3DDECLMETHOD_DEFAULT;
+        elements[idx].offset = offset;
+        offset += format_desc->component_count * format_desc->component_size;
     }
 
@@ -1893,5 +2328,5 @@
 
     size = ConvertFvfToDeclaration(This, Fvf, &elements);
-    if (size == 0) return WINED3DERR_OUTOFVIDEOMEMORY;
+    if (size == ~0U) return WINED3DERR_OUTOFVIDEOMEMORY;
 
     hr = IWineD3DDevice_CreateVertexDeclaration(iface, ppVertexDeclaration, Parent, elements, size);
@@ -1906,8 +2341,22 @@
     IWineD3DVertexShaderImpl *object;  /* NOTE: impl usage is ok, this is a create */
     HRESULT hr = WINED3D_OK;
-    D3DCREATESHADEROBJECTINSTANCE(object, VertexShader)
-    object->baseShader.shader_ins = IWineD3DVertexShaderImpl_shader_ins;
-
-    TRACE("(%p) : Created Vertex shader %p\n", This, *ppVertexShader);
+
+    if (!pFunction) return WINED3DERR_INVALIDCALL;
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppVertexShader = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DVertexShader_Vtbl;
+    object->parent = parent;
+    shader_init(&object->baseShader, iface);
+    list_add_head(&This->shaders, &object->baseShader.shader_list_entry);
+    *ppVertexShader = (IWineD3DVertexShader *)object;
+
+    TRACE("(%p) : Created vertex shader %p\n", This, *ppVertexShader);
 
     if (vertex_declaration) {
@@ -1916,13 +2365,13 @@
 
     hr = IWineD3DVertexShader_SetFunction(*ppVertexShader, pFunction);
-
-    if (WINED3D_OK != hr) {
-        FIXME("(%p) : Failed to set the function, returning WINED3DERR_INVALIDCALL\n", iface);
+    if (FAILED(hr))
+    {
+        WARN("(%p) : Failed to set function, returning %#x\n", iface, hr);
         IWineD3DVertexShader_Release(*ppVertexShader);
-        return WINED3DERR_INVALIDCALL;
-    }
-    list_add_head(&This->shaders, &object->baseShader.shader_list_entry);
-
-    return WINED3D_OK;
+        *ppVertexShader = NULL;
+        return hr;
+    }
+
+    return hr;
 }
 
@@ -1932,12 +2381,29 @@
     HRESULT hr = WINED3D_OK;
 
-    D3DCREATESHADEROBJECTINSTANCE(object, PixelShader)
-    object->baseShader.shader_ins = IWineD3DPixelShaderImpl_shader_ins;
+    if (!pFunction) return WINED3DERR_INVALIDCALL;
+
+    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+    if (!object)
+    {
+        ERR("Out of memory\n");
+        *ppPixelShader = NULL;
+        return WINED3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    object->lpVtbl = &IWineD3DPixelShader_Vtbl;
+    object->parent = parent;
+    shader_init(&object->baseShader, iface);
+    list_add_head(&This->shaders, &object->baseShader.shader_list_entry);
+    *ppPixelShader = (IWineD3DPixelShader *)object;
+
+    TRACE("(%p) : Created pixel shader %p\n", This, *ppPixelShader);
+
     hr = IWineD3DPixelShader_SetFunction(*ppPixelShader, pFunction);
-    if (WINED3D_OK == hr) {
-        TRACE("(%p) : Created Pixel shader %p\n", This, *ppPixelShader);
-        list_add_head(&This->shaders, &object->baseShader.shader_list_entry);
-    } else {
-        WARN("(%p) : Failed to create pixel shader\n", This);
+    if (FAILED(hr))
+    {
+        WARN("(%p) : Failed to set function, returning %#x\n", iface, hr);
+        IWineD3DPixelShader_Release(*ppPixelShader);
+        *ppPixelShader = NULL;
+        return hr;
     }
 
@@ -1966,5 +2432,4 @@
     object->wineD3DDevice = This;
     object->palNumEntries = IWineD3DPaletteImpl_Size(Flags);
-	
     object->hpal = CreatePalette((const LOGPALETTE*)&(object->palVersion));
 
@@ -1992,5 +2457,5 @@
     WINEDDCOLORKEY colorkey;
 
-    hbm = (HBITMAP) LoadImageA(NULL, filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION);
+    hbm = LoadImageA(NULL, filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION);
     if(hbm)
     {
@@ -2012,5 +2477,5 @@
     hr = IWineD3DDevice_CreateSurface((IWineD3DDevice *) This, bm.bmWidth, bm.bmHeight, WINED3DFMT_R5G6B5,
                                       TRUE, FALSE, 0, &This->logo_surface, WINED3DRTYPE_SURFACE, 0,
-                                      WINED3DPOOL_DEFAULT, WINED3DMULTISAMPLE_NONE, 0, NULL, SURFACE_OPENGL, NULL);
+                                      WINED3DPOOL_DEFAULT, WINED3DMULTISAMPLE_NONE, 0, SURFACE_OPENGL, NULL);
     if(FAILED(hr)) {
         ERR("Wine logo requested, but failed to create surface\n");
@@ -2060,10 +2525,6 @@
 
         /* Make appropriate texture active */
-        if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-            GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
-            checkGLcall("glActiveTextureARB");
-        } else if (i > 0) {
-            FIXME("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
-        }
+        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
+        checkGLcall("glActiveTextureARB");
 
         /* Generate an opengl texture name */
@@ -2074,5 +2535,4 @@
         /* Generate a dummy 2d texture (not using 1d because they cause many
         * DRI drivers fall back to sw) */
-        This->stateBlock->textureDimensions[i] = GL_TEXTURE_2D;
         glBindTexture(GL_TEXTURE_2D, This->dummyTextureName[i]);
         checkGLcall("glBindTexture");
@@ -2090,5 +2550,7 @@
 }
 
-static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPRESENT_PARAMETERS* pPresentationParameters, D3DCB_CREATESWAPCHAIN D3DCB_CreateSwapChain) {
+static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
+        WINED3DPRESENT_PARAMETERS *pPresentationParameters)
+{
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
     IWineD3DSwapChainImpl *swapchain = NULL;
@@ -2097,5 +2559,6 @@
     unsigned int i;
 
-    TRACE("(%p)->(%p,%p)\n", This, pPresentationParameters, D3DCB_CreateSwapChain);
+    TRACE("(%p)->(%p)\n", This, pPresentationParameters);
+
     if(This->d3d_initialized) return WINED3DERR_INVALIDCALL;
     if(!This->adapter->opengl) return WINED3DERR_INVALIDCALL;
@@ -2117,9 +2580,4 @@
     IWineD3DStateBlock_AddRef((IWineD3DStateBlock*)This->updateStateBlock);
 
-    hr = allocate_shader_constants(This->updateStateBlock);
-    if (WINED3D_OK != hr) {
-        goto err_out;
-    }
-
     This->render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DSurface *) * GL_LIMITS(buffers));
     This->draw_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GLenum) * GL_LIMITS(buffers));
@@ -2157,6 +2615,8 @@
     /* Setup the implicit swapchain */
     TRACE("Creating implicit swapchain\n");
-    hr=D3DCB_CreateSwapChain(This->parent, pPresentationParameters, (IWineD3DSwapChain **)&swapchain);
-    if (FAILED(hr) || !swapchain) {
+    hr = IWineD3DDeviceParent_CreateSwapChain(This->device_parent,
+            pPresentationParameters, (IWineD3DSwapChain **)&swapchain);
+    if (FAILED(hr))
+    {
         WARN("Failed to create implicit swapchain\n");
         goto err_out;
@@ -2214,15 +2674,4 @@
 
     ENTER_GL();
-
-    { /* Set a default viewport */
-        WINED3DVIEWPORT vp;
-        vp.X      = 0;
-        vp.Y      = 0;
-        vp.Width  = pPresentationParameters->BackBufferWidth;
-        vp.Height = pPresentationParameters->BackBufferHeight;
-        vp.MinZ   = 0.0f;
-        vp.MaxZ   = 1.0f;
-        IWineD3DDevice_SetViewport((IWineD3DDevice *)This, &vp);
-    }
 
     /* Initialize the current view state */
@@ -2296,5 +2745,7 @@
 }
 
-static HRESULT WINAPI IWineD3DDeviceImpl_InitGDI(IWineD3DDevice *iface, WINED3DPRESENT_PARAMETERS* pPresentationParameters, D3DCB_CREATESWAPCHAIN D3DCB_CreateSwapChain) {
+static HRESULT WINAPI IWineD3DDeviceImpl_InitGDI(IWineD3DDevice *iface,
+        WINED3DPRESENT_PARAMETERS *pPresentationParameters)
+{
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
     IWineD3DSwapChainImpl *swapchain = NULL;
@@ -2303,6 +2754,8 @@
     /* Setup the implicit swapchain */
     TRACE("Creating implicit swapchain\n");
-    hr=D3DCB_CreateSwapChain(This->parent, pPresentationParameters, (IWineD3DSwapChain **)&swapchain);
-    if (FAILED(hr) || !swapchain) {
+    hr = IWineD3DDeviceParent_CreateSwapChain(This->device_parent,
+            pPresentationParameters, (IWineD3DSwapChain **)&swapchain);
+    if (FAILED(hr))
+    {
         WARN("Failed to create implicit swapchain\n");
         goto err_out;
@@ -2323,4 +2776,11 @@
 }
 
+static HRESULT WINAPI device_unload_resource(IWineD3DResource *resource, void *ctx)
+{
+    IWineD3DResource_UnLoad(resource);
+    IWineD3DResource_Release(resource);
+    return WINED3D_OK;
+}
+
 static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroyDepthStencilSurface, D3DCB_DESTROYSWAPCHAINFN D3DCB_DestroySwapChain) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
@@ -2337,4 +2797,7 @@
 
     if(This->logo_surface) IWineD3DSurface_Release(This->logo_surface);
+
+    /* Unload resources */
+    IWineD3DDevice_EnumResources(iface, device_unload_resource, NULL);
 
     TRACE("Deleting high order patches\n");
@@ -2496,5 +2959,5 @@
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     LONG ret;
-    const StaticPixelFormatDesc *formatDesc  = getFormatDescEntry(pMode->Format, NULL, NULL);
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(pMode->Format, &GLINFO_LOCATION);
     RECT clip_rc;
 
@@ -2510,5 +2973,5 @@
     devmode.dmSize = sizeof(devmode);
     devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
-    devmode.dmBitsPerPel = formatDesc->bpp * 8;
+    devmode.dmBitsPerPel = format_desc->byte_count * 8;
     devmode.dmPelsWidth  = pMode->Width;
     devmode.dmPelsHeight = pMode->Height;
@@ -2570,40 +3033,12 @@
 }
 
-
-
-/*****
- * Get / Set FVF
- *****/
-static HRESULT WINAPI IWineD3DDeviceImpl_SetFVF(IWineD3DDevice *iface, DWORD fvf) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-
-    /* Update the current state block */
-    This->updateStateBlock->changed.fvf      = TRUE;
-
-    if(This->updateStateBlock->fvf == fvf) {
-        TRACE("Application is setting the old fvf over, nothing to do\n");
-        return WINED3D_OK;
-    }
-
-    This->updateStateBlock->fvf              = fvf;
-    TRACE("(%p) : FVF Shader FVF set to %x\n", This, fvf);
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL);
-    return WINED3D_OK;
-}
-
-
-static HRESULT WINAPI IWineD3DDeviceImpl_GetFVF(IWineD3DDevice *iface, DWORD *pfvf) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    TRACE("(%p) : GetFVF returning %x\n", This, This->stateBlock->fvf);
-    *pfvf = This->stateBlock->fvf;
-    return WINED3D_OK;
-}
-
 /*****
  * Get / Set Stream Source
  *****/
-static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, UINT StreamNumber,IWineD3DVertexBuffer* pStreamData, UINT OffsetInBytes, UINT Stride) {
-        IWineD3DDeviceImpl       *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DVertexBuffer     *oldSrc;
+static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, UINT StreamNumber,
+        IWineD3DBuffer *pStreamData, UINT OffsetInBytes, UINT Stride)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    IWineD3DBuffer *oldSrc;
 
     if (StreamNumber >= MAX_STREAMS) {
@@ -2618,5 +3053,5 @@
     TRACE("(%p) : StreamNo: %u, OldStream (%p), NewStream (%p), OffsetInBytes %u, NewStride %u\n", This, StreamNumber, oldSrc, pStreamData, OffsetInBytes, Stride);
 
-    This->updateStateBlock->changed.streamSource[StreamNumber] = TRUE;
+    This->updateStateBlock->changed.streamSource |= 1 << StreamNumber;
 
     if(oldSrc == pStreamData &&
@@ -2636,21 +3071,16 @@
     if (This->isRecordingState) {
         TRACE("Recording... not performing anything\n");
-        if(pStreamData) IWineD3DVertexBuffer_AddRef(pStreamData);
-        if(oldSrc) IWineD3DVertexBuffer_Release(oldSrc);
+        if (pStreamData) IWineD3DBuffer_AddRef(pStreamData);
+        if (oldSrc) IWineD3DBuffer_Release(oldSrc);
         return WINED3D_OK;
     }
 
-    /* Need to do a getParent and pass the references up */
-    /* MSDN says ..... When an application no longer holds a reference to this interface, the interface will automatically be freed.
-    which suggests that we shouldn't be ref counting? and do need a _release on the stream source to reset the stream source
-    so for now, just count internally   */
     if (pStreamData != NULL) {
-        IWineD3DVertexBufferImpl *vbImpl = (IWineD3DVertexBufferImpl *) pStreamData;
-        InterlockedIncrement(&vbImpl->bindCount);
-        IWineD3DVertexBuffer_AddRef(pStreamData);
+        InterlockedIncrement(&((struct wined3d_buffer *)pStreamData)->bind_count);
+        IWineD3DBuffer_AddRef(pStreamData);
     }
     if (oldSrc != NULL) {
-        InterlockedDecrement(&((IWineD3DVertexBufferImpl *) oldSrc)->bindCount);
-        IWineD3DVertexBuffer_Release(oldSrc);
+        InterlockedDecrement(&((struct wined3d_buffer *)oldSrc)->bind_count);
+        IWineD3DBuffer_Release(oldSrc);
     }
 
@@ -2660,5 +3090,7 @@
 }
 
-static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface, UINT StreamNumber,IWineD3DVertexBuffer** pStream, UINT *pOffset, UINT* pStride) {
+static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface,
+        UINT StreamNumber, IWineD3DBuffer **pStream, UINT *pOffset, UINT *pStride)
+{
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
 
@@ -2679,5 +3111,5 @@
 
     if (*pStream != NULL) {
-        IWineD3DVertexBuffer_AddRef(*pStream); /* We have created a new reference to the VB */
+        IWineD3DBuffer_AddRef(*pStream); /* We have created a new reference to the VB */
     }
     return WINED3D_OK;
@@ -2706,5 +3138,5 @@
     This->updateStateBlock->streamFlags[StreamNumber] = Divider & (WINED3DSTREAMSOURCE_INSTANCEDATA  | WINED3DSTREAMSOURCE_INDEXEDDATA );
 
-    This->updateStateBlock->changed.streamFreq[StreamNumber]  = TRUE;
+    This->updateStateBlock->changed.streamFreq |= 1 << StreamNumber;
     This->updateStateBlock->streamFreq[StreamNumber]          = Divider & 0x7FFFFF;
 
@@ -2740,5 +3172,5 @@
     if (This->isRecordingState) {
         TRACE("Recording... not performing anything\n");
-        This->updateStateBlock->changed.transform[d3dts] = TRUE;
+        This->updateStateBlock->changed.transform[d3dts >> 5] |= 1 << (d3dts & 0x1f);
         This->updateStateBlock->transforms[d3dts] = *lpmatrix;
         return WINED3D_OK;
@@ -2797,5 +3229,5 @@
     TRACE("(%p) : For state %s\n", This, debug_d3dtstype(State));
 
-    if (State < HIGHEST_TRANSFORMSTATE)
+    if (State <= HIGHEST_TRANSFORMSTATE)
     {
         mat = &This->updateStateBlock->transforms[State];
@@ -2943,7 +3375,7 @@
             object->exponent = -0.3/log(cos(rho/2));
         }
-	if (object->exponent > 128.0) {
-		object->exponent = 128.0;
-	}
+        if (object->exponent > 128.0) {
+            object->exponent = 128.0;
+        }
         object->cutoff = pLight->Phi*90/M_PI;
 
@@ -3059,5 +3491,5 @@
                  * TODO: Test how this affects rendering
                  */
-                FIXME("Too many concurrently active lights\n");
+                WARN("Too many concurrently active lights\n");
                 return WINED3D_OK;
             }
@@ -3109,5 +3541,5 @@
     }
 
-    This->updateStateBlock->changed.clipplane[Index] = TRUE;
+    This->updateStateBlock->changed.clipplane |= 1 << Index;
 
     if(This->updateStateBlock->clipplane[Index][0] == pPlane[0] &&
@@ -3216,7 +3648,7 @@
  * Get / Set Indices
  *****/
-static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWineD3DIndexBuffer* pIndexData) {
+static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWineD3DBuffer* pIndexData, WINED3DFORMAT fmt) {
     IWineD3DDeviceImpl  *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DIndexBuffer *oldIdxs;
+    IWineD3DBuffer *oldIdxs;
 
     TRACE("(%p) : Setting to %p\n", This, pIndexData);
@@ -3225,10 +3657,11 @@
     This->updateStateBlock->changed.indices = TRUE;
     This->updateStateBlock->pIndexData = pIndexData;
+    This->updateStateBlock->IndexFmt = fmt;
 
     /* Handle recording of state blocks */
     if (This->isRecordingState) {
         TRACE("Recording... not performing anything\n");
-        if(pIndexData) IWineD3DIndexBuffer_AddRef(pIndexData);
-        if(oldIdxs) IWineD3DIndexBuffer_Release(oldIdxs);
+        if(pIndexData) IWineD3DBuffer_AddRef(pIndexData);
+        if(oldIdxs) IWineD3DBuffer_Release(oldIdxs);
         return WINED3D_OK;
     }
@@ -3236,11 +3669,18 @@
     if(oldIdxs != pIndexData) {
         IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER);
-        if(pIndexData) IWineD3DIndexBuffer_AddRef(pIndexData);
-        if(oldIdxs) IWineD3DIndexBuffer_Release(oldIdxs);
-    }
-    return WINED3D_OK;
-}
-
-static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWineD3DIndexBuffer** ppIndexData) {
+        if(pIndexData) {
+            InterlockedIncrement(&((struct wined3d_buffer *)pIndexData)->bind_count);
+            IWineD3DBuffer_AddRef(pIndexData);
+        }
+        if(oldIdxs) {
+            InterlockedDecrement(&((struct wined3d_buffer *)oldIdxs)->bind_count);
+            IWineD3DBuffer_Release(oldIdxs);
+        }
+    }
+
+    return WINED3D_OK;
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWineD3DBuffer** ppIndexData) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
 
@@ -3249,5 +3689,5 @@
     /* up ref count on ppindexdata */
     if (*ppIndexData) {
-        IWineD3DIndexBuffer_AddRef(*ppIndexData);
+        IWineD3DBuffer_AddRef(*ppIndexData);
         TRACE("(%p) index data set to %p\n", This, ppIndexData);
     }else{
@@ -3333,5 +3773,5 @@
     TRACE("(%p)->state = %s(%d), value = %d\n", This, debug_d3drenderstate(State), State, Value);
 
-    This->updateStateBlock->changed.renderState[State] = TRUE;
+    This->updateStateBlock->changed.renderState[State >> 5] |= 1 << (State & 0x1f);
     This->updateStateBlock->renderState[State] = Value;
 
@@ -3396,5 +3836,5 @@
     oldValue = This->stateBlock->samplerState[Sampler][Type];
     This->updateStateBlock->samplerState[Sampler][Type]         = Value;
-    This->updateStateBlock->changed.samplerState[Sampler][Type] = Value;
+    This->updateStateBlock->changed.samplerState[Sampler] |= 1 << Type;
 
     /* Handle recording of state blocks */
@@ -3542,11 +3982,10 @@
 
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    int i, cnt = min(count, MAX_CONST_B - start);
+    unsigned int i, cnt = min(count, MAX_CONST_B - start);
 
     TRACE("(iface %p, srcData %p, start %d, count %d)\n",
             iface, srcData, start, count);
 
-    if (srcData == NULL || cnt < 0)
-        return WINED3DERR_INVALIDCALL;
+    if (!srcData || start >= MAX_CONST_B) return WINED3DERR_INVALIDCALL;
 
     memcpy(&This->updateStateBlock->vertexShaderConstantB[start], srcData, cnt * sizeof(BOOL));
@@ -3558,5 +3997,5 @@
     }
 
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT);
+    if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT);
 
     return WINED3D_OK;
@@ -3589,11 +4028,10 @@
 
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    int i, cnt = min(count, MAX_CONST_I - start);
+    unsigned int i, cnt = min(count, MAX_CONST_I - start);
 
     TRACE("(iface %p, srcData %p, start %d, count %d)\n",
             iface, srcData, start, count);
 
-    if (srcData == NULL || cnt < 0)
-        return WINED3DERR_INVALIDCALL;
+    if (!srcData || start >= MAX_CONST_I) return WINED3DERR_INVALIDCALL;
 
     memcpy(&This->updateStateBlock->vertexShaderConstantI[start * 4], srcData, cnt * sizeof(int) * 4);
@@ -3606,5 +4044,5 @@
     }
 
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT);
+    if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT);
 
     return WINED3D_OK;
@@ -3643,5 +4081,5 @@
 
     /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */
-    if (srcData == NULL || start + count > GL_LIMITS(vshader_constantsF) || start > GL_LIMITS(vshader_constantsF))
+    if (srcData == NULL || start + count > This->d3d_vshader_constantF || start > This->d3d_vshader_constantF)
         return WINED3DERR_INVALIDCALL;
 
@@ -3653,52 +4091,12 @@
     }
 
-    for (i = start; i < count + start; ++i) {
-        if (!This->updateStateBlock->changed.vertexShaderConstantsF[i]) {
-            constants_entry *ptr = LIST_ENTRY(list_head(&This->updateStateBlock->set_vconstantsF), constants_entry, entry);
-            if (!ptr || ptr->count >= sizeof(ptr->idx) / sizeof(*ptr->idx)) {
-                ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(constants_entry));
-                list_add_head(&This->updateStateBlock->set_vconstantsF, &ptr->entry);
-            }
-            ptr->idx[ptr->count++] = i;
-            This->updateStateBlock->changed.vertexShaderConstantsF[i] = TRUE;
-        }
-    }
-
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT);
-
-    return WINED3D_OK;
-}
-
-static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantF_DirtyConst(
-IWineD3DDevice *iface,
-UINT start,
-CONST float *srcData,
-UINT count) {
-
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    UINT i;
-
-    TRACE("(iface %p, srcData %p, start %d, count %d)\n",
-            iface, srcData, start, count);
-
-    /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */
-    if (srcData == NULL || start + count > GL_LIMITS(vshader_constantsF) || start > GL_LIMITS(vshader_constantsF))
-        return WINED3DERR_INVALIDCALL;
-
-    memcpy(&This->updateStateBlock->vertexShaderConstantF[start * 4], srcData, count * sizeof(float) * 4);
-    if(TRACE_ON(d3d)) {
-        for (i = 0; i < count; i++)
-            TRACE("Set FLOAT constant %u to { %f, %f, %f, %f }\n", start + i,
-                    srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]);
-    }
-
-    /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
-     * context. On a context switch the old context will be fully dirtified
-     */
-    memset(This->activeContext->vshader_const_dirty + start, 1,
-           sizeof(*This->activeContext->vshader_const_dirty) * count);
-    This->highest_dirty_vs_const = max(This->highest_dirty_vs_const, start+count+1);
-
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT);
+    if (!This->isRecordingState)
+    {
+        This->shader_backend->shader_update_float_vertex_constants(iface, start, count);
+        IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT);
+    }
+
+    memset(This->updateStateBlock->changed.vertexShaderConstantsF + start, 1,
+            sizeof(*This->updateStateBlock->changed.vertexShaderConstantsF) * count);
 
     return WINED3D_OK;
@@ -3712,5 +4110,5 @@
 
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    int cnt = min(count, GL_LIMITS(vshader_constantsF) - start);
+    int cnt = min(count, This->d3d_vshader_constantF - start);
 
     TRACE("(iface %p, dstData %p, start %d, count %d)\n",
@@ -3726,5 +4124,6 @@
 static inline void markTextureStagesDirty(IWineD3DDeviceImpl *This, DWORD stage) {
     DWORD i;
-    for(i = 0; i < WINED3D_HIGHEST_TEXTURE_STATE; i++) {
+    for(i = 0; i <= WINED3D_HIGHEST_TEXTURE_STATE; ++i)
+    {
         IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(stage, i));
     }
@@ -3749,4 +4148,5 @@
     int i;
 
+    This->fixed_function_usage_map = 0;
     for (i = 0; i < MAX_TEXTURES; ++i) {
         WINED3DTEXTUREOP color_op = This->stateBlock->textureState[i][WINED3DTSS_COLOROP];
@@ -3761,8 +4161,4 @@
         if (color_op == WINED3DTOP_DISABLE) {
             /* Not used, and disable higher stages */
-            while (i < MAX_TEXTURES) {
-                This->fixed_function_usage_map[i] = FALSE;
-                ++i;
-            }
             break;
         }
@@ -3774,11 +4170,9 @@
                 || ((alpha_arg2 == WINED3DTA_TEXTURE) && alpha_op != WINED3DTOP_SELECTARG1)
                 || ((alpha_arg3 == WINED3DTA_TEXTURE) && (alpha_op == WINED3DTOP_MULTIPLYADD || alpha_op == WINED3DTOP_LERP))) {
-            This->fixed_function_usage_map[i] = TRUE;
-        } else {
-            This->fixed_function_usage_map[i] = FALSE;
+            This->fixed_function_usage_map |= (1 << i);
         }
 
         if ((color_op == WINED3DTOP_BUMPENVMAP || color_op == WINED3DTOP_BUMPENVMAPLUMINANCE) && i < MAX_TEXTURES - 1) {
-            This->fixed_function_usage_map[i+1] = TRUE;
+            This->fixed_function_usage_map |= (1 << (i + 1));
         }
     }
@@ -3786,12 +4180,15 @@
 
 static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
-    int i, tex;
+    unsigned int i, tex;
+    WORD ffu_map;
 
     device_update_fixed_function_usage_map(This);
+    ffu_map = This->fixed_function_usage_map;
 
     if (This->max_ffp_textures == This->max_ffp_texture_stages ||
-        This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) {
-        for (i = 0; i < This->stateBlock->lowest_disabled_stage; ++i) {
-            if (!This->fixed_function_usage_map[i]) continue;
+            This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) {
+        for (i = 0; ffu_map; ffu_map >>= 1, ++i)
+        {
+            if (!(ffu_map & 1)) continue;
 
             if (This->texUnitMap[i] != i) {
@@ -3806,6 +4203,7 @@
     /* Now work out the mapping */
     tex = 0;
-    for (i = 0; i < This->stateBlock->lowest_disabled_stage; ++i) {
-        if (!This->fixed_function_usage_map[i]) continue;
+    for (i = 0; ffu_map; ffu_map >>= 1, ++i)
+    {
+        if (!(ffu_map & 1)) continue;
 
         if (This->texUnitMap[i] != tex) {
@@ -3820,10 +4218,11 @@
 
 static void device_map_psamplers(IWineD3DDeviceImpl *This) {
-    const DWORD *sampler_tokens =
-            ((IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader)->baseShader.reg_maps.samplers;
-    int i;
+    const WINED3DSAMPLER_TEXTURE_TYPE *sampler_type =
+            ((IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader)->baseShader.reg_maps.sampler_type;
+    unsigned int i;
 
     for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) {
-        if (sampler_tokens[i] && This->texUnitMap[i] != i) {
+        if (sampler_type[i] && This->texUnitMap[i] != i)
+        {
             device_map_stage(This, i, i);
             IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i));
@@ -3850,5 +4249,5 @@
         if (!pshader_sampler_tokens) {
             /* No pixel shader, check fixed function */
-            return current_mapping >= MAX_TEXTURES || !This->fixed_function_usage_map[current_mapping];
+            return current_mapping >= MAX_TEXTURES || !(This->fixed_function_usage_map & (1 << current_mapping));
         }
 
@@ -3862,7 +4261,7 @@
 
 static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps) {
-    const DWORD *vshader_sampler_tokens =
-            ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->baseShader.reg_maps.samplers;
-    const DWORD *pshader_sampler_tokens = NULL;
+    const WINED3DSAMPLER_TEXTURE_TYPE *vshader_sampler_type =
+            ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->baseShader.reg_maps.sampler_type;
+    const WINED3DSAMPLER_TEXTURE_TYPE *pshader_sampler_type = NULL;
     int start = GL_LIMITS(combined_samplers) - 1;
     int i;
@@ -3871,13 +4270,15 @@
         IWineD3DPixelShaderImpl *pshader = (IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader;
 
-        /* Make sure the shader's reg_maps are up to date. This is only relevant for 1.x pixelshaders. */
-        IWineD3DPixelShader_UpdateSamplers((IWineD3DPixelShader *)pshader);
-        pshader_sampler_tokens = pshader->baseShader.reg_maps.samplers;
+        /* Note that we only care if a sampler is sampled or not, not the sampler's specific type.
+         * Otherwise we'd need to call shader_update_samplers() here for 1.x pixelshaders. */
+        pshader_sampler_type = pshader->baseShader.reg_maps.sampler_type;
     }
 
     for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) {
         int vsampler_idx = i + MAX_FRAGMENT_SAMPLERS;
-        if (vshader_sampler_tokens[i]) {
-            if (This->texUnitMap[vsampler_idx] != -1) {
+        if (vshader_sampler_type[i])
+        {
+            if (This->texUnitMap[vsampler_idx] != WINED3D_UNMAPPED_STAGE)
+            {
                 /* Already mapped somewhere */
                 continue;
@@ -3885,5 +4286,6 @@
 
             while (start >= 0) {
-                if (device_unit_free_for_vs(This, pshader_sampler_tokens, vshader_sampler_tokens, start)) {
+                if (device_unit_free_for_vs(This, pshader_sampler_type, vshader_sampler_type, start))
+                {
                     device_map_stage(This, vsampler_idx, start);
                     IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(vsampler_idx));
@@ -3900,6 +4302,6 @@
 
 void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) {
-    BOOL vs = use_vs(This);
-    BOOL ps = use_ps(This);
+    BOOL vs = use_vs(This->stateBlock);
+    BOOL ps = use_ps(This->stateBlock);
     /*
      * Rules are:
@@ -3975,11 +4377,10 @@
 
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    int i, cnt = min(count, MAX_CONST_B - start);
-
-    TRACE("(iface %p, srcData %p, start %d, count %d)\n",
+    unsigned int i, cnt = min(count, MAX_CONST_B - start);
+
+    TRACE("(iface %p, srcData %p, start %u, count %u)\n",
             iface, srcData, start, count);
 
-    if (srcData == NULL || cnt < 0)
-        return WINED3DERR_INVALIDCALL;
+    if (!srcData || start >= MAX_CONST_B) return WINED3DERR_INVALIDCALL;
 
     memcpy(&This->updateStateBlock->pixelShaderConstantB[start], srcData, cnt * sizeof(BOOL));
@@ -3991,5 +4392,5 @@
     }
 
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT);
+    if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT);
 
     return WINED3D_OK;
@@ -4022,11 +4423,10 @@
 
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    int i, cnt = min(count, MAX_CONST_I - start);
-
-    TRACE("(iface %p, srcData %p, start %d, count %d)\n",
+    unsigned int i, cnt = min(count, MAX_CONST_I - start);
+
+    TRACE("(iface %p, srcData %p, start %u, count %u)\n",
             iface, srcData, start, count);
 
-    if (srcData == NULL || cnt < 0)
-        return WINED3DERR_INVALIDCALL;
+    if (!srcData || start >= MAX_CONST_I) return WINED3DERR_INVALIDCALL;
 
     memcpy(&This->updateStateBlock->pixelShaderConstantI[start * 4], srcData, cnt * sizeof(int) * 4);
@@ -4039,5 +4439,5 @@
     }
 
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT);
+    if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT);
 
     return WINED3D_OK;
@@ -4076,5 +4476,5 @@
 
     /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */
-    if (srcData == NULL || start + count > GL_LIMITS(pshader_constantsF) || start > GL_LIMITS(pshader_constantsF))
+    if (srcData == NULL || start + count > This->d3d_pshader_constantF || start > This->d3d_pshader_constantF)
         return WINED3DERR_INVALIDCALL;
 
@@ -4086,52 +4486,12 @@
     }
 
-    for (i = start; i < count + start; ++i) {
-        if (!This->updateStateBlock->changed.pixelShaderConstantsF[i]) {
-            constants_entry *ptr = LIST_ENTRY(list_head(&This->updateStateBlock->set_pconstantsF), constants_entry, entry);
-            if (!ptr || ptr->count >= sizeof(ptr->idx) / sizeof(*ptr->idx)) {
-                ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(constants_entry));
-                list_add_head(&This->updateStateBlock->set_pconstantsF, &ptr->entry);
-            }
-            ptr->idx[ptr->count++] = i;
-            This->updateStateBlock->changed.pixelShaderConstantsF[i] = TRUE;
-        }
-    }
-
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT);
-
-    return WINED3D_OK;
-}
-
-static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantF_DirtyConst(
-    IWineD3DDevice *iface,
-    UINT start,
-    CONST float *srcData,
-    UINT count) {
-
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    UINT i;
-
-    TRACE("(iface %p, srcData %p, start %d, count %d)\n",
-            iface, srcData, start, count);
-
-    /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */
-    if (srcData == NULL || start + count > GL_LIMITS(pshader_constantsF) || start > GL_LIMITS(pshader_constantsF))
-        return WINED3DERR_INVALIDCALL;
-
-    memcpy(&This->updateStateBlock->pixelShaderConstantF[start * 4], srcData, count * sizeof(float) * 4);
-    if(TRACE_ON(d3d)) {
-        for (i = 0; i < count; i++)
-            TRACE("Set FLOAT constant %u to { %f, %f, %f, %f }\n", start + i,
-                    srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]);
-    }
-
-    /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
-     * context. On a context switch the old context will be fully dirtified
-     */
-    memset(This->activeContext->pshader_const_dirty + start, 1,
-           sizeof(*This->activeContext->pshader_const_dirty) * count);
-    This->highest_dirty_ps_const = max(This->highest_dirty_ps_const, start+count+1);
-
-    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT);
+    if (!This->isRecordingState)
+    {
+        This->shader_backend->shader_update_float_pixel_constants(iface, start, count);
+        IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT);
+    }
+
+    memset(This->updateStateBlock->changed.pixelShaderConstantsF + start, 1,
+            sizeof(*This->updateStateBlock->changed.pixelShaderConstantsF) * count);
 
     return WINED3D_OK;
@@ -4145,5 +4505,5 @@
 
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    int cnt = min(count, GL_LIMITS(pshader_constantsF) - start);
+    int cnt = min(count, This->d3d_pshader_constantF - start);
 
     TRACE("(iface %p, dstData %p, start %d, count %d)\n",
@@ -4159,9 +4519,9 @@
 #define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
 static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCount,
-        const WineDirect3DVertexStridedData *lpStrideData, IWineD3DVertexBufferImpl *dest, DWORD dwFlags)
+        const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD dwFlags,
+        DWORD DestFVF)
 {
     char *dest_ptr, *dest_conv = NULL, *dest_conv_addr = NULL;
     unsigned int i;
-    DWORD DestFVF = dest->fvf;
     WINED3DVIEWPORT vp;
     WINED3DMATRIX mat, proj_mat, view_mat, world_mat;
@@ -4169,9 +4529,11 @@
     DWORD numTextures;
 
-    if (lpStrideData->u.s.normal.lpData) {
+    if (stream_info->elements[WINED3D_FFP_NORMAL].data)
+    {
         WARN(" lighting state not saved yet... Some strange stuff may happen !\n");
     }
 
-    if (lpStrideData->u.s.position.lpData == NULL) {
+    if (!stream_info->elements[WINED3D_FFP_POSITION].data)
+    {
         ERR("Source has no position mask\n");
         return WINED3DERR_INVALIDCALL;
@@ -4182,24 +4544,5 @@
 
     if (dest->resource.allocatedMemory == NULL) {
-        /* This may happen if we do direct locking into a vbo. Unlikely,
-         * but theoretically possible(ddraw processvertices test)
-         */
-        dest->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), 0, dest->resource.size);
-        if(!dest->resource.allocatedMemory) {
-            LEAVE_GL();
-            ERR("Out of memory\n");
-            return E_OUTOFMEMORY;
-        }
-        if(dest->vbo) {
-            const void *src;
-            GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, dest->vbo));
-            checkGLcall("glBindBufferARB");
-            src = GL_EXTCALL(glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_ONLY_ARB));
-            if(src) {
-                memcpy(dest->resource.allocatedMemory, src, dest->resource.size);
-            }
-            GL_EXTCALL(glUnmapBufferARB(GL_ARRAY_BUFFER_ARB));
-            checkGLcall("glUnmapBufferARB");
-        }
+        buffer_get_sysmem(dest);
     }
 
@@ -4207,10 +4550,12 @@
      * write correct opengl data into it. It's cheap and allows us to run drawStridedFast
      */
-    if(!dest->vbo && GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT)) {
-        dest->Flags |= VBFLAG_CREATEVBO;
-        IWineD3DVertexBuffer_PreLoad((IWineD3DVertexBuffer *) dest);
-    }
-
-    if(dest->vbo) {
+    if (!dest->buffer_object && GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT))
+    {
+        dest->flags |= WINED3D_BUFFER_CREATEBO;
+        IWineD3DBuffer_PreLoad((IWineD3DBuffer *)dest);
+    }
+
+    if (dest->buffer_object)
+    {
         unsigned char extrabytes = 0;
         /* If the destination vertex buffer has D3DFVF_XYZ position(non-rhw), native d3d writes RHW position, where the RHW
@@ -4247,5 +4592,5 @@
         }
     } else doClip = FALSE;
-    dest_ptr = ((char *) dest->resource.allocatedMemory) + dwDestIndex * get_flexible_vertex_size(DestFVF);
+    dest_ptr = ((char *) buffer_get_sysmem(dest)) + dwDestIndex * get_flexible_vertex_size(DestFVF);
 
     IWineD3DDevice_GetTransform( (IWineD3DDevice *) This,
@@ -4293,6 +4638,6 @@
              ((DestFVF & WINED3DFVF_POSITION_MASK) == WINED3DFVF_XYZRHW ) ) {
             /* The position first */
-            const float *p =
-                    (const float *)(lpStrideData->u.s.position.lpData + i * lpStrideData->u.s.position.dwStride);
+            const struct wined3d_stream_info_element *element = &stream_info->elements[WINED3D_FFP_POSITION];
+            const float *p = (const float *)(element->data + i * element->stride);
             float x, y, z, rhw;
             TRACE("In: ( %06.2f %06.2f %06.2f )\n", p[0], p[1], p[2]);
@@ -4409,6 +4754,6 @@
         }
         if (DestFVF & WINED3DFVF_NORMAL) {
-            const float *normal =
-                    (const float *)(lpStrideData->u.s.normal.lpData + i * lpStrideData->u.s.normal.dwStride);
+            const struct wined3d_stream_info_element *element = &stream_info->elements[WINED3D_FFP_NORMAL];
+            const float *normal = (const float *)(element->data + i * element->stride);
             /* AFAIK this should go into the lighting information */
             FIXME("Didn't expect the destination to have a normal\n");
@@ -4420,6 +4765,6 @@
 
         if (DestFVF & WINED3DFVF_DIFFUSE) {
-            const DWORD *color_d =
-                    (const DWORD *)(lpStrideData->u.s.diffuse.lpData + i * lpStrideData->u.s.diffuse.dwStride);
+            const struct wined3d_stream_info_element *element = &stream_info->elements[WINED3D_FFP_DIFFUSE];
+            const DWORD *color_d = (const DWORD *)(element->data + i * element->stride);
             if(!color_d) {
                 static BOOL warned = FALSE;
@@ -4451,6 +4796,6 @@
         if (DestFVF & WINED3DFVF_SPECULAR) { 
             /* What's the color value in the feedback buffer? */
-            const DWORD *color_s =
-                    (const DWORD *)(lpStrideData->u.s.specular.lpData + i * lpStrideData->u.s.specular.dwStride);
+            const struct wined3d_stream_info_element *element = &stream_info->elements[WINED3D_FFP_SPECULAR];
+            const DWORD *color_s = (const DWORD *)(element->data + i * element->stride);
             if(!color_s) {
                 static BOOL warned = FALSE;
@@ -4481,7 +4826,6 @@
 
         for (tex_index = 0; tex_index < numTextures; tex_index++) {
-            const float *tex_coord =
-                    (const float *)(lpStrideData->u.s.texCoords[tex_index].lpData +
-                            i * lpStrideData->u.s.texCoords[tex_index].dwStride);
+            const struct wined3d_stream_info_element *element = &stream_info->elements[WINED3D_FFP_TEXCOORD0 + tex_index];
+            const float *tex_coord = (const float *)(element->data + i * element->stride);
             if(!tex_coord) {
                 ERR("No source texture, but destination requests one\n");
@@ -4499,5 +4843,5 @@
 
     if(dest_conv) {
-        GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, dest->vbo));
+        GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, dest->buffer_object));
         checkGLcall("glBindBufferARB(GL_ARRAY_BUFFER_ARB)");
         GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, dwDestIndex * get_flexible_vertex_size(DestFVF),
@@ -4514,7 +4858,10 @@
 #undef copy_and_next
 
-static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IWineD3DVertexBuffer* pDestBuffer, IWineD3DVertexDeclaration* pVertexDecl, DWORD Flags) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    WineDirect3DVertexStridedData strided;
+static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, UINT SrcStartIndex, UINT DestIndex,
+        UINT VertexCount, IWineD3DBuffer *pDestBuffer, IWineD3DVertexDeclaration *pVertexDecl, DWORD Flags,
+        DWORD DestFVF)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    struct wined3d_stream_info stream_info;
     BOOL vbo = FALSE, streamWasUP = This->stateBlock->streamIsUP;
     TRACE("(%p)->(%d,%d,%d,%p,%p,%d\n", This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags);
@@ -4531,6 +4878,5 @@
      */
     This->stateBlock->streamIsUP = FALSE;
-    memset(&strided, 0, sizeof(strided));
-    primitiveDeclarationConvertToStridedData(iface, FALSE, &strided, &vbo);
+    device_stream_info_from_declaration(This, FALSE, &stream_info, &vbo);
     This->stateBlock->streamIsUP = streamWasUP;
 
@@ -4538,43 +4884,27 @@
         unsigned int i;
         /* ProcessVertices can't convert FROM a vbo, and vertex buffers used to source into ProcessVertices are
-         * unlikely to ever be used for drawing. Release vbos in those buffers and fix up the strided structure
+         * unlikely to ever be used for drawing. Release vbos in those buffers and fix up the stream_info structure
          *
          * Also get the start index in, but only loop over all elements if there's something to add at all.
          */
-#define FIXSRC(type) \
-        if(strided.u.s.type.VBO) { \
-            IWineD3DVertexBufferImpl *vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[strided.u.s.type.streamNo]; \
-            strided.u.s.type.VBO = 0; \
-            strided.u.s.type.lpData = (BYTE *) ((unsigned long) strided.u.s.type.lpData + (unsigned long) vb->resource.allocatedMemory); \
-            ENTER_GL(); \
-            GL_EXTCALL(glDeleteBuffersARB(1, &vb->vbo)); \
-            vb->vbo = 0; \
-            LEAVE_GL(); \
-        } \
-        if(strided.u.s.type.lpData) { \
-            strided.u.s.type.lpData += strided.u.s.type.dwStride * SrcStartIndex; \
-        }
-        FIXSRC(position);
-        FIXSRC(blendWeights);
-        FIXSRC(blendMatrixIndices);
-        FIXSRC(normal);
-        FIXSRC(pSize);
-        FIXSRC(diffuse);
-        FIXSRC(specular);
-        for(i = 0; i < WINED3DDP_MAXTEXCOORD; i++) {
-            FIXSRC(texCoords[i]);
-        }
-        FIXSRC(position2);
-        FIXSRC(normal2);
-        FIXSRC(tangent);
-        FIXSRC(binormal);
-        FIXSRC(tessFactor);
-        FIXSRC(fog);
-        FIXSRC(depth);
-        FIXSRC(sample);
-#undef FIXSRC
-    }
-
-    return process_vertices_strided(This, DestIndex, VertexCount, &strided, (IWineD3DVertexBufferImpl *) pDestBuffer, Flags);
+        for (i = 0; i < (sizeof(stream_info.elements) / sizeof(*stream_info.elements)); ++i)
+        {
+            struct wined3d_stream_info_element *e = &stream_info.elements[i];
+            if (e->buffer_object)
+            {
+                struct wined3d_buffer *vb = (struct wined3d_buffer *)This->stateBlock->streamSource[e->stream_idx];
+                e->buffer_object = 0;
+                e->data = (BYTE *)((unsigned long)e->data + (unsigned long)buffer_get_sysmem(vb));
+                ENTER_GL();
+                GL_EXTCALL(glDeleteBuffersARB(1, &vb->buffer_object));
+                vb->buffer_object = 0;
+                LEAVE_GL();
+            }
+            if (e->data) e->data += e->stride * SrcStartIndex;
+        }
+    }
+
+    return process_vertices_strided(This, DestIndex, VertexCount, &stream_info,
+            (struct wined3d_buffer *)pDestBuffer, Flags, DestFVF);
 }
 
@@ -4594,5 +4924,5 @@
     }
 
-    This->updateStateBlock->changed.textureState[Stage][Type] = TRUE;
+    This->updateStateBlock->changed.textureState[Stage] |= 1 << Type;
     This->updateStateBlock->textureState[Stage][Type]         = Value;
 
@@ -4617,5 +4947,5 @@
 
     if(Type == WINED3DTSS_COLOROP) {
-        int i;
+        unsigned int i;
 
         if(Value == WINED3DTOP_DISABLE && oldValue != WINED3DTOP_DISABLE) {
@@ -4626,9 +4956,9 @@
              */
             for(i = Stage + 1; i < This->stateBlock->lowest_disabled_stage; i++) {
-                TRACE("Additionally dirtifying stage %d\n", i);
+                TRACE("Additionally dirtifying stage %u\n", i);
                 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP));
             }
             This->stateBlock->lowest_disabled_stage = Stage;
-            TRACE("New lowest disabled: %d\n", Stage);
+            TRACE("New lowest disabled: %u\n", Stage);
         } else if(Value != WINED3DTOP_DISABLE && oldValue == WINED3DTOP_DISABLE) {
             /* Previously disabled stage enabled. Stages above it may need enabling
@@ -4643,9 +4973,9 @@
                     break;
                 }
-                TRACE("Additionally dirtifying stage %d due to enable\n", i);
+                TRACE("Additionally dirtifying stage %u due to enable\n", i);
                 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP));
             }
             This->stateBlock->lowest_disabled_stage = i;
-            TRACE("New lowest disabled: %d\n", i);
+            TRACE("New lowest disabled: %u\n", i);
         }
     }
@@ -4683,12 +5013,9 @@
     oldTexture = This->updateStateBlock->textures[Stage];
 
-    if(pTexture != NULL) {
-        /* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH; 
-         */
-        if(((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH) {
-            WARN("(%p) Attempt to set scratch texture rejected\n", pTexture);
-            return WINED3DERR_INVALIDCALL;
-        }
-        This->stateBlock->textureDimensions[Stage] = IWineD3DBaseTexture_GetTextureDimensions(pTexture);
+    /* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH */
+    if (pTexture && ((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH)
+    {
+        WARN("(%p) Attempt to set scratch texture rejected\n", pTexture);
+        return WINED3DERR_INVALIDCALL;
     }
 
@@ -4696,5 +5023,5 @@
     TRACE("(%p) : oldtexture(%p)\n", This,oldTexture);
 
-    This->updateStateBlock->changed.textures[Stage] = TRUE;
+    This->updateStateBlock->changed.textures |= 1 << Stage;
     TRACE("(%p) : setting new texture to %p\n", This, pTexture);
     This->updateStateBlock->textures[Stage]         = pTexture;
@@ -4718,6 +5045,13 @@
         IWineD3DBaseTextureImpl *new = (IWineD3DBaseTextureImpl *) This->updateStateBlock->textures[Stage];
         ULONG bindCount = InterlockedIncrement(&new->baseTexture.bindCount);
+        UINT dimensions = IWineD3DBaseTexture_GetTextureDimensions(pTexture);
 
         IWineD3DBaseTexture_AddRef(This->updateStateBlock->textures[Stage]);
+
+        if (!oldTexture || dimensions != IWineD3DBaseTexture_GetTextureDimensions(oldTexture))
+        {
+            IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER);
+        }
+
         if(oldTexture == NULL && Stage < MAX_TEXTURES) {
             /* The source arguments for color and alpha ops have different meanings when a NULL texture is bound,
@@ -4851,40 +5185,20 @@
 static HRESULT WINAPI IWineD3DDeviceImpl_BeginStateBlock(IWineD3DDevice *iface) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DStateBlockImpl *object;
-    HRESULT temp_result;
-    int i;
+    IWineD3DStateBlock *stateblock;
+    HRESULT hr;
 
     TRACE("(%p)\n", This);
-    
-    if (This->isRecordingState) {
-        return WINED3DERR_INVALIDCALL;
-    }
-    
-    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DStateBlockImpl));
-    if (NULL == object ) {
-        FIXME("(%p)Error allocating memory for stateblock\n", This);
-        return E_OUTOFMEMORY;
-    }
-    TRACE("(%p) created object %p\n", This, object);
-    object->wineD3DDevice= This;
-    /** FIXME: object->parent       = parent; **/
-    object->parent       = NULL;
-    object->blockType    = WINED3DSBT_RECORDED;
-    object->ref          = 1;
-    object->lpVtbl       = &IWineD3DStateBlock_Vtbl;
-
-    for(i = 0; i < LIGHTMAP_SIZE; i++) {
-        list_init(&object->lightMap[i]);
-    }
-
-    temp_result = allocate_shader_constants(object);
-    if (WINED3D_OK != temp_result)
-        return temp_result;
+
+    if (This->isRecordingState) return WINED3DERR_INVALIDCALL;
+
+    hr = IWineD3DDeviceImpl_CreateStateBlock(iface, WINED3DSBT_RECORDED, &stateblock, NULL);
+    if (FAILED(hr)) return hr;
 
     IWineD3DStateBlock_Release((IWineD3DStateBlock*)This->updateStateBlock);
-    This->updateStateBlock = object;
+    This->updateStateBlock = (IWineD3DStateBlockImpl *)stateblock;
     This->isRecordingState = TRUE;
 
-    TRACE("(%p) recording stateblock %p\n",This , object);
+    TRACE("(%p) recording stateblock %p\n", This, stateblock);
+
     return WINED3D_OK;
 }
@@ -4896,19 +5210,28 @@
 
     if (!This->isRecordingState) {
-        FIXME("(%p) not recording! returning error\n", This);
+        WARN("(%p) not recording! returning error\n", This);
         *ppStateBlock = NULL;
         return WINED3DERR_INVALIDCALL;
     }
 
-    for(i = 1; i <= WINEHIGHEST_RENDER_STATE; i++) {
-        if(object->changed.renderState[i]) {
-            object->contained_render_states[object->num_contained_render_states] = i;
-            object->num_contained_render_states++;
-        }
-    }
-    for(i = 1; i <= HIGHEST_TRANSFORMSTATE; i++) {
-        if(object->changed.transform[i]) {
-            object->contained_transform_states[object->num_contained_transform_states] = i;
-            object->num_contained_transform_states++;
+    for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i)
+    {
+        DWORD map = object->changed.renderState[i];
+        for (j = 0; map; map >>= 1, ++j)
+        {
+            if (!(map & 1)) continue;
+
+            object->contained_render_states[object->num_contained_render_states++] = (i << 5) | j;
+        }
+    }
+
+    for (i = 0; i <= HIGHEST_TRANSFORMSTATE >> 5; ++i)
+    {
+        DWORD map = object->changed.transform[i];
+        for (j = 0; map; map >>= 1, ++j)
+        {
+            if (!(map & 1)) continue;
+
+            object->contained_transform_states[object->num_contained_transform_states++] = (i << 5) | j;
         }
     }
@@ -4933,4 +5256,12 @@
         }
     }
+    for (i = 0; i < GL_LIMITS(pshader_constantsF); ++i)
+    {
+        if (object->changed.pixelShaderConstantsF[i])
+        {
+            object->contained_ps_consts_f[object->num_contained_ps_consts_f] = i;
+            ++object->num_contained_ps_consts_f;
+        }
+    }
     for(i = 0; i < MAX_CONST_I; i++) {
         if (object->changed.pixelShaderConstantsI & (1 << i))
@@ -4948,19 +5279,25 @@
     }
     for(i = 0; i < MAX_TEXTURES; i++) {
-        for(j = 1; j <= WINED3D_HIGHEST_TEXTURE_STATE; j++) {
-            if(object->changed.textureState[i][j]) {
-                object->contained_tss_states[object->num_contained_tss_states].stage = i;
-                object->contained_tss_states[object->num_contained_tss_states].state = j;
-                object->num_contained_tss_states++;
-            }
+        DWORD map = object->changed.textureState[i];
+
+        for(j = 0; map; map >>= 1, ++j)
+        {
+            if (!(map & 1)) continue;
+
+            object->contained_tss_states[object->num_contained_tss_states].stage = i;
+            object->contained_tss_states[object->num_contained_tss_states].state = j;
+            ++object->num_contained_tss_states;
         }
     }
     for(i = 0; i < MAX_COMBINED_SAMPLERS; i++){
-        for (j = 1; j < WINED3D_HIGHEST_SAMPLER_STATE; j++) {
-            if(object->changed.samplerState[i][j]) {
-                object->contained_sampler_states[object->num_contained_sampler_states].stage = i;
-                object->contained_sampler_states[object->num_contained_sampler_states].state = j;
-                object->num_contained_sampler_states++;
-            }
+        DWORD map = object->changed.samplerState[i];
+
+        for (j = 0; map; map >>= 1, ++j)
+        {
+            if (!(map & 1)) continue;
+
+            object->contained_sampler_states[object->num_contained_sampler_states].stage = i;
+            object->contained_sampler_states[object->num_contained_sampler_states].state = j;
+            ++object->num_contained_sampler_states;
         }
     }
@@ -5240,12 +5577,33 @@
  * Drawing functions
  *****/
-static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, WINED3DPRIMITIVETYPE PrimitiveType, UINT StartVertex,
-                                                UINT PrimitiveCount) {
-
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-
-    TRACE("(%p) : Type=(%d,%s), Start=%d, Count=%d\n", This, PrimitiveType,
-                               debug_d3dprimitivetype(PrimitiveType),
-                               StartVertex, PrimitiveCount);
+
+static void WINAPI IWineD3DDeviceImpl_SetPrimitiveType(IWineD3DDevice *iface,
+        WINED3DPRIMITIVETYPE primitive_type)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+
+    TRACE("iface %p, primitive_type %s\n", iface, debug_d3dprimitivetype(primitive_type));
+
+    This->updateStateBlock->changed.primitive_type = TRUE;
+    This->updateStateBlock->gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
+}
+
+static void WINAPI IWineD3DDeviceImpl_GetPrimitiveType(IWineD3DDevice *iface,
+        WINED3DPRIMITIVETYPE *primitive_type)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+
+    TRACE("iface %p, primitive_type %p\n", iface, primitive_type);
+
+    *primitive_type = d3d_primitive_type_from_gl(This->stateBlock->gl_primitive_type);
+
+    TRACE("Returning %s\n", debug_d3dprimitivetype(*primitive_type));
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, UINT StartVertex, UINT vertex_count)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+
+    TRACE("(%p) : start %u, count %u\n", This, StartVertex, vertex_count);
 
     if(!This->stateBlock->vertexDecl) {
@@ -5265,18 +5623,15 @@
     }
     /* Account for the loading offset due to index buffers. Instead of reloading all sources correct it with the startvertex parameter */
-    drawPrimitive(iface, PrimitiveType, PrimitiveCount, StartVertex, 0/* NumVertices */, -1 /* indxStart */,
+    drawPrimitive(iface, vertex_count, 0/* NumVertices */, StartVertex /* start_idx */,
                   0 /* indxSize */, NULL /* indxData */, 0 /* minIndex */);
     return WINED3D_OK;
 }
 
-/* TODO: baseVIndex needs to be provided from This->stateBlock->baseVertexIndex when called from d3d8 */
-static HRESULT  WINAPI  IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *iface,
-                                                           WINED3DPRIMITIVETYPE PrimitiveType,
-                                                           UINT minIndex, UINT NumVertices, UINT startIndex, UINT primCount) {
-
+static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *iface,
+        UINT minIndex, UINT NumVertices, UINT startIndex, UINT index_count)
+{
     IWineD3DDeviceImpl  *This = (IWineD3DDeviceImpl *)iface;
     UINT                 idxStride = 2;
-    IWineD3DIndexBuffer *pIB;
-    WINED3DINDEXBUFFER_DESC  IdxBufDsc;
+    IWineD3DBuffer *pIB;
     GLuint vbo;
 
@@ -5287,5 +5642,5 @@
          * D3D8 simply dies, but I doubt it can do much harm to return
          * D3DERR_INVALIDCALL there as well. */
-        ERR("(%p) : Called without a valid index buffer set, returning WINED3DERR_INVALIDCALL\n", This);
+        WARN("(%p) : Called without a valid index buffer set, returning WINED3DERR_INVALIDCALL\n", This);
         return WINED3DERR_INVALIDCALL;
     }
@@ -5300,12 +5655,10 @@
         This->stateBlock->streamIsUP = FALSE;
     }
-    vbo = ((IWineD3DIndexBufferImpl *) pIB)->vbo;
-
-    TRACE("(%p) : Type=(%d,%s), min=%d, CountV=%d, startIdx=%d, countP=%d\n", This,
-          PrimitiveType, debug_d3dprimitivetype(PrimitiveType),
-          minIndex, NumVertices, startIndex, primCount);
-
-    IWineD3DIndexBuffer_GetDesc(pIB, &IdxBufDsc);
-    if (IdxBufDsc.Format == WINED3DFMT_INDEX16) {
+    vbo = ((struct wined3d_buffer *) pIB)->buffer_object;
+
+    TRACE("(%p) : min %u, vertex count %u, startIdx %u, index count %u\n",
+            This, minIndex, NumVertices, startIndex, index_count);
+
+    if (This->stateBlock->IndexFmt == WINED3DFMT_R16_UINT) {
         idxStride = 2;
     } else {
@@ -5318,19 +5671,18 @@
     }
 
-    drawPrimitive(iface, PrimitiveType, primCount, 0, NumVertices, startIndex,
-                   idxStride, vbo ? NULL : ((IWineD3DIndexBufferImpl *) pIB)->resource.allocatedMemory, minIndex);
-
-    return WINED3D_OK;
-}
-
-static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface, WINED3DPRIMITIVETYPE PrimitiveType,
-                                                    UINT PrimitiveCount, CONST void* pVertexStreamZeroData,
-                                                    UINT VertexStreamZeroStride) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DVertexBuffer *vb;
-
-    TRACE("(%p) : Type=(%d,%s), pCount=%d, pVtxData=%p, Stride=%d\n", This, PrimitiveType,
-             debug_d3dprimitivetype(PrimitiveType),
-             PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride);
+    drawPrimitive(iface, index_count, NumVertices, startIndex, idxStride,
+            vbo ? NULL : ((struct wined3d_buffer *) pIB)->resource.allocatedMemory, minIndex);
+
+    return WINED3D_OK;
+}
+
+static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface, UINT vertex_count,
+        const void *pVertexStreamZeroData, UINT VertexStreamZeroStride)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    IWineD3DBuffer *vb;
+
+    TRACE("(%p) : vertex count %u, pVtxData %p, stride %u\n",
+            This, vertex_count, pVertexStreamZeroData, VertexStreamZeroStride);
 
     if(!This->stateBlock->vertexDecl) {
@@ -5341,6 +5693,6 @@
     /* Note in the following, it's not this type, but that's the purpose of streamIsUP */
     vb = This->stateBlock->streamSource[0];
-    This->stateBlock->streamSource[0] = (IWineD3DVertexBuffer *)pVertexStreamZeroData;
-    if(vb) IWineD3DVertexBuffer_Release(vb);
+    This->stateBlock->streamSource[0] = (IWineD3DBuffer *)pVertexStreamZeroData;
+    if (vb) IWineD3DBuffer_Release(vb);
     This->stateBlock->streamOffset[0] = 0;
     This->stateBlock->streamStride[0] = VertexStreamZeroStride;
@@ -5351,6 +5703,6 @@
     IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC);
 
-    drawPrimitive(iface, PrimitiveType, PrimitiveCount, 0 /* start vertex */, 0  /* NumVertices */,
-                  0 /* indxStart*/, 0 /* indxSize*/, NULL /* indxData */, 0 /* indxMin */);
+    drawPrimitive(iface, vertex_count, 0 /* NumVertices */, 0 /* start_idx */,
+            0 /* indxSize*/, NULL /* indxData */, 0 /* indxMin */);
 
     /* MSDN specifies stream zero settings must be set to NULL */
@@ -5364,18 +5716,16 @@
 }
 
-static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *iface, WINED3DPRIMITIVETYPE PrimitiveType,
-                                                             UINT MinVertexIndex, UINT NumVertices,
-                                                             UINT PrimitiveCount, CONST void* pIndexData,
-                                                             WINED3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,
-                                                             UINT VertexStreamZeroStride) {
+static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *iface, UINT MinVertexIndex,
+        UINT NumVertices, UINT index_count, const void *pIndexData, WINED3DFORMAT IndexDataFormat,
+        const void *pVertexStreamZeroData, UINT VertexStreamZeroStride)
+{
     int                 idxStride;
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DVertexBuffer *vb;
-    IWineD3DIndexBuffer *ib;
-
-    TRACE("(%p) : Type=(%d,%s), MinVtxIdx=%d, NumVIdx=%d, PCount=%d, pidxdata=%p, IdxFmt=%d, pVtxdata=%p, stride=%d\n",
-             This, PrimitiveType, debug_d3dprimitivetype(PrimitiveType),
-             MinVertexIndex, NumVertices, PrimitiveCount, pIndexData,
-             IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
+    IWineD3DBuffer *vb;
+    IWineD3DBuffer *ib;
+
+    TRACE("(%p) : MinVtxIdx %u, NumVIdx %u, index count %u, pidxdata %p, IdxFmt %u, pVtxdata %p, stride=%u\n",
+            This, MinVertexIndex, NumVertices, index_count, pIndexData,
+            IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
 
     if(!This->stateBlock->vertexDecl) {
@@ -5384,5 +5734,5 @@
     }
 
-    if (IndexDataFormat == WINED3DFMT_INDEX16) {
+    if (IndexDataFormat == WINED3DFMT_R16_UINT) {
         idxStride = 2;
     } else {
@@ -5392,6 +5742,6 @@
     /* Note in the following, it's not this type, but that's the purpose of streamIsUP */
     vb = This->stateBlock->streamSource[0];
-    This->stateBlock->streamSource[0] = (IWineD3DVertexBuffer *)pVertexStreamZeroData;
-    if(vb) IWineD3DVertexBuffer_Release(vb);
+    This->stateBlock->streamSource[0] = (IWineD3DBuffer *)pVertexStreamZeroData;
+    if (vb) IWineD3DBuffer_Release(vb);
     This->stateBlock->streamIsUP = TRUE;
     This->stateBlock->streamOffset[0] = 0;
@@ -5405,5 +5755,6 @@
     IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER);
 
-    drawPrimitive(iface, PrimitiveType, PrimitiveCount, 0 /* vertexStart */, NumVertices, 0 /* indxStart */, idxStride, pIndexData, MinVertexIndex);
+    drawPrimitive(iface, index_count, NumVertices, 0 /* start_idx */,
+            idxStride, pIndexData, MinVertexIndex);
 
     /* MSDN specifies stream zero settings and index buffer must be set to NULL */
@@ -5412,5 +5763,5 @@
     ib = This->stateBlock->pIndexData;
     if(ib) {
-        IWineD3DIndexBuffer_Release(ib);
+        IWineD3DBuffer_Release(ib);
         This->stateBlock->pIndexData = NULL;
     }
@@ -5423,6 +5774,5 @@
 
 static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveStrided(IWineD3DDevice *iface,
-        WINED3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount,
-        const WineDirect3DVertexStridedData *DrawPrimStrideData)
+        UINT vertex_count, const WineDirect3DVertexStridedData *DrawPrimStrideData)
 {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
@@ -5436,5 +5786,5 @@
     This->stateBlock->baseVertexIndex = 0;
     This->up_strided = DrawPrimStrideData;
-    drawPrimitive(iface, PrimitiveType, PrimitiveCount, 0, 0, 0, 0, NULL, 0);
+    drawPrimitive(iface, vertex_count, 0, 0, 0, NULL, 0);
     This->up_strided = NULL;
     return WINED3D_OK;
@@ -5442,10 +5792,9 @@
 
 static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided(IWineD3DDevice *iface,
-        WINED3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount,
-        const WineDirect3DVertexStridedData *DrawPrimStrideData, UINT NumVertices, const void *pIndexData,
-        WINED3DFORMAT IndexDataFormat)
+        UINT vertex_count, const WineDirect3DVertexStridedData *DrawPrimStrideData,
+        UINT NumVertices, const void *pIndexData, WINED3DFORMAT IndexDataFormat)
 {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
-    DWORD idxSize = (IndexDataFormat == WINED3DFMT_INDEX32 ? 4 : 2);
+    DWORD idxSize = (IndexDataFormat == WINED3DFMT_R32_UINT ? 4 : 2);
 
     /* Mark the state dirty until we have nicer tracking
@@ -5458,5 +5807,5 @@
     This->stateBlock->baseVertexIndex = 0;
     This->up_strided = DrawPrimStrideData;
-    drawPrimitive(iface, PrimitiveType, PrimitiveCount, 0 /* startvertexidx */, 0 /* numindices */, 0 /* startidx */, idxSize, pIndexData, 0 /* minindex */);
+    drawPrimitive(iface, vertex_count, 0 /* numindices */, 0 /* start_idx */, idxSize, pIndexData, 0 /* minindex */);
     This->up_strided = NULL;
     return WINED3D_OK;
@@ -5536,7 +5885,8 @@
 
     if (WINED3D_OK == hr) {
+        IWineD3DBaseTextureImpl *pDestImpl = (IWineD3DBaseTextureImpl *) pDestinationTexture;
 
         /* Make sure that the destination texture is loaded */
-        IWineD3DBaseTexture_PreLoad(pDestinationTexture);
+        pDestImpl->baseTexture.internal_preload(pDestinationTexture, SRGB_RGB);
 
         /* Update every surface level of the texture */
@@ -5637,5 +5987,4 @@
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     IWineD3DBaseTextureImpl *texture;
-    const struct GlPixelFormatDesc *gl_info;
     DWORD i;
 
@@ -5653,7 +6002,5 @@
 
         texture = (IWineD3DBaseTextureImpl *) This->stateBlock->textures[i];
-        if(!texture) continue;
-        getFormatDescEntry(texture->resource.format, &GLINFO_LOCATION, &gl_info);
-        if(gl_info->Flags & WINED3DFMT_FLAG_FILTERING) continue;
+        if (!texture || texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING) continue;
 
         if(This->stateBlock->samplerState[i][WINED3DSAMP_MAGFILTER] != WINED3DTEXF_POINT) {
@@ -5685,5 +6032,7 @@
     for (i = 0; i < MAX_COMBINED_SAMPLERS; i++) {
             IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl*)device->stateBlock->textures[i];
-            if (texture && (texture->resource.format == WINED3DFMT_P8 || texture->resource.format == WINED3DFMT_A8P8)) {
+            if (texture && (texture->resource.format_desc->format == WINED3DFMT_P8
+                    || texture->resource.format_desc->format == WINED3DFMT_A8P8))
+            {
                 IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(i));
             }
@@ -5870,4 +6219,5 @@
     int rowoffset = 0; /* how many bytes to add onto the end of a row to wraparound to the beginning of the next */
     glDescriptor *glDescription = NULL;
+    const struct GlPixelFormatDesc *src_format_desc, *dst_format_desc;
     GLenum dummy;
     int sampler;
@@ -5922,16 +6272,17 @@
     ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
 
-    if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-        ENTER_GL();
-        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
-        checkGLcall("glActiveTextureARB");
-        LEAVE_GL();
-    }
+    ENTER_GL();
+    GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
+    checkGLcall("glActiveTextureARB");
+    LEAVE_GL();
 
     /* Make sure the surface is loaded and up to date */
-    IWineD3DSurface_PreLoad(pDestinationSurface);
-    IWineD3DSurface_BindTexture(pDestinationSurface);
+    surface_internal_preload(pDestinationSurface, SRGB_RGB);
+    IWineD3DSurface_BindTexture(pDestinationSurface, FALSE);
 
     IWineD3DSurface_GetGlDesc(pDestinationSurface, &glDescription);
+
+    src_format_desc = ((IWineD3DSurfaceImpl *)pSrcSurface)->resource.format_desc;
+    dst_format_desc = ((IWineD3DSurfaceImpl *)pDestinationSurface)->resource.format_desc;
 
     /* this needs to be done in lines if the sourceRect != the sourceWidth */
@@ -5946,6 +6297,6 @@
     the pitch is just bytesPerPixel * width */
     if(srcWidth != srcSurfaceWidth  || srcLeft ){
-        rowoffset = srcSurfaceWidth * pSrcSurface->bytesPerPixel;
-        offset   += srcLeft * pSrcSurface->bytesPerPixel;
+        rowoffset = srcSurfaceWidth * src_format_desc->byte_count;
+        offset   += srcLeft * src_format_desc->byte_count;
         /* TODO: do we ever get 3bpp?, would a shift and an add be quicker than a mul (well maybe a cycle or two) */
     }
@@ -5953,9 +6304,9 @@
 
     if(pSourceRect != NULL && pSourceRect->top != 0){
-       offset +=  pSourceRect->top * srcSurfaceWidth * pSrcSurface->bytesPerPixel;
+       offset +=  pSourceRect->top * srcSurfaceWidth * src_format_desc->byte_count;
     }
     TRACE("(%p) glTexSubImage2D, level %d, left %d, top %d, width %d, height %d, fmt %#x, type %#x, memory %p+%#x\n",
-            This, glDescription->level, destLeft, destTop, srcWidth, srcHeight, glDescription->glFormat,
-            glDescription->glType, IWineD3DSurface_GetData(pSourceSurface), offset);
+            This, glDescription->level, destLeft, destTop, srcWidth, srcHeight, dst_format_desc->glFormat,
+            dst_format_desc->glType, IWineD3DSurface_GetData(pSourceSurface), offset);
 
     /* Sanity check */
@@ -5976,16 +6327,8 @@
         const unsigned char* data =((const unsigned char *)IWineD3DSurface_GetData(pSourceSurface)) + offset;
 
-        for(j = destTop ; j < (srcHeight + destTop) ; j++){
-
-                glTexSubImage2D(glDescription->target
-                    ,glDescription->level
-                    ,destLeft
-                    ,j
-                    ,srcWidth
-                    ,1
-                    ,glDescription->glFormat
-                    ,glDescription->glType
-                    ,data /* could be quicker using */
-                );
+        for (j = destTop; j < (srcHeight + destTop); ++j)
+        {
+            glTexSubImage2D(glDescription->target, glDescription->level, destLeft, j,
+                    srcWidth, 1, dst_format_desc->glFormat, dst_format_desc->glType,data);
             data += rowoffset;
         }
@@ -6007,5 +6350,5 @@
                 } else {
                     GL_EXTCALL(glCompressedTexImage2DARB(glDescription->target, glDescription->level,
-                            glDescription->glFormatInternal, srcWidth, srcHeight, 0, destSize, data));
+                            dst_format_desc->glInternal, srcWidth, srcHeight, 0, destSize, data));
                 }
             } else {
@@ -6016,5 +6359,5 @@
         } else {
             glTexSubImage2D(glDescription->target, glDescription->level, destLeft, destTop,
-                    srcWidth, srcHeight, glDescription->glFormat, glDescription->glType, data);
+                    srcWidth, srcHeight, dst_format_desc->glFormat, dst_format_desc->glType, data);
         }
      }
@@ -6035,4 +6378,5 @@
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     struct WineD3DRectPatch *patch;
+    GLenum old_primitive_type;
     unsigned int i;
     struct list *e;
@@ -6104,5 +6448,8 @@
 
     This->currentPatch = patch;
-    IWineD3DDevice_DrawPrimitiveStrided(iface, WINED3DPT_TRIANGLELIST, patch->numSegs[0] * patch->numSegs[1] * 2, &patch->strided);
+    old_primitive_type = This->stateBlock->gl_primitive_type;
+    This->stateBlock->gl_primitive_type = GL_TRIANGLES;
+    IWineD3DDevice_DrawPrimitiveStrided(iface, patch->numSegs[0] * patch->numSegs[1] * 2 * 3, &patch->strided);
+    This->stateBlock->gl_primitive_type = old_primitive_type;
     This->currentPatch = NULL;
 
@@ -6159,5 +6506,7 @@
 }
 
-static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONST WINED3DRECT *rect, WINED3DCOLOR color) {
+static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
+        const WINED3DRECT *rect, const float color[4])
+{
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
     IWineD3DSwapChain *swapchain;
@@ -6207,5 +6556,5 @@
     IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
 
-    glClearColor(D3DCOLOR_R(color), D3DCOLOR_G(color), D3DCOLOR_B(color), D3DCOLOR_A(color));
+    glClearColor(color[0], color[1], color[2], color[3]);
     glClear(GL_COLOR_BUFFER_BIT);
     checkGLcall("glClear");
@@ -6268,5 +6617,5 @@
             return ret;
 
-        case WINED3DFMT_A8:
+        case WINED3DFMT_A8_UNORM:
             TRACE("Returning %08x\n", a);
             return a;
@@ -6296,5 +6645,5 @@
 
         case WINED3DFMT_X8B8G8R8:
-        case WINED3DFMT_A8B8G8R8:
+        case WINED3DFMT_R8G8B8A8_UNORM:
             ret  = a << 24;
             ret |= b << 16;
@@ -6316,5 +6665,5 @@
             return ret;
 
-        case WINED3DFMT_A2B10G10R10:
+        case WINED3DFMT_R10G10B10A2_UNORM:
             a = (a *    4) / 256;
             r = (r * 1024) / 256;
@@ -6346,5 +6695,6 @@
 
     if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) {
-        color_fill_fbo(iface, pSurface, pRect, color);
+        const float c[4] = {D3DCOLOR_R(color), D3DCOLOR_G(color), D3DCOLOR_B(color), D3DCOLOR_A(color)};
+        color_fill_fbo(iface, pSurface, pRect, c);
         return WINED3D_OK;
     } else {
@@ -6352,8 +6702,61 @@
         memset(&BltFx, 0, sizeof(BltFx));
         BltFx.dwSize = sizeof(BltFx);
-        BltFx.u5.dwFillColor = argb_to_fmt(color, surface->resource.format);
+        BltFx.u5.dwFillColor = argb_to_fmt(color, surface->resource.format_desc->format);
         return IWineD3DSurface_Blt(pSurface, (const RECT *)pRect, NULL, NULL,
                 WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_NONE);
     }
+}
+
+static void WINAPI IWineD3DDeviceImpl_ClearRendertargetView(IWineD3DDevice *iface,
+        IWineD3DRendertargetView *rendertarget_view, const float color[4])
+{
+    IWineD3DResource *resource;
+    IWineD3DSurface *surface;
+    HRESULT hr;
+
+    hr = IWineD3DRendertargetView_GetResource(rendertarget_view, &resource);
+    if (FAILED(hr))
+    {
+        ERR("Failed to get resource, hr %#x\n", hr);
+        return;
+    }
+
+    if (IWineD3DResource_GetType(resource) != WINED3DRTYPE_SURFACE)
+    {
+        FIXME("Only supported on surface resources\n");
+        IWineD3DResource_Release(resource);
+        return;
+    }
+
+    surface = (IWineD3DSurface *)resource;
+
+    if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
+    {
+        color_fill_fbo(iface, surface, NULL, color);
+    }
+    else
+    {
+        WINEDDBLTFX BltFx;
+        WINED3DCOLOR c;
+
+        WARN("Converting to WINED3DCOLOR, this might give incorrect results\n");
+
+        c = ((DWORD)(color[2] * 255.0));
+        c |= ((DWORD)(color[1] * 255.0)) << 8;
+        c |= ((DWORD)(color[0] * 255.0)) << 16;
+        c |= ((DWORD)(color[3] * 255.0)) << 24;
+
+        /* Just forward this to the DirectDraw blitting engine */
+        memset(&BltFx, 0, sizeof(BltFx));
+        BltFx.dwSize = sizeof(BltFx);
+        BltFx.u5.dwFillColor = argb_to_fmt(c, ((IWineD3DSurfaceImpl *)surface)->resource.format_desc->format);
+        hr = IWineD3DSurface_Blt(surface, NULL, NULL, NULL, WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_NONE);
+        if (FAILED(hr))
+        {
+            ERR("Blt failed, hr %#x\n", hr);
+        }
+    }
+
+    IWineD3DResource_Release(resource);
 }
 
@@ -6406,9 +6809,13 @@
 
         if(Swapchain->frontBuffer)
+        {
             IWineD3DSurface_SetContainer(Swapchain->frontBuffer, NULL);
+            ((IWineD3DSurfaceImpl *)Swapchain->frontBuffer)->Flags &= ~SFLAG_SWAPCHAIN;
+        }
         Swapchain->frontBuffer = Front;
 
         if(Swapchain->frontBuffer) {
             IWineD3DSurface_SetContainer(Swapchain->frontBuffer, (IWineD3DBase *) Swapchain);
+            ((IWineD3DSurfaceImpl *)Swapchain->frontBuffer)->Flags |= SFLAG_SWAPCHAIN;
         }
     }
@@ -6448,9 +6855,13 @@
 
         if(Swapchain->backBuffer[0])
+        {
             IWineD3DSurface_SetContainer(Swapchain->backBuffer[0], NULL);
+            ((IWineD3DSurfaceImpl *)Swapchain->backBuffer[0])->Flags &= ~SFLAG_SWAPCHAIN;
+        }
         Swapchain->backBuffer[0] = Back;
 
         if(Swapchain->backBuffer[0]) {
             IWineD3DSurface_SetContainer(Swapchain->backBuffer[0], (IWineD3DBase *) Swapchain);
+            ((IWineD3DSurfaceImpl *)Swapchain->backBuffer[0])->Flags |= SFLAG_SWAPCHAIN;
         } else {
             HeapFree(GetProcessHeap(), 0, Swapchain->backBuffer);
@@ -6747,5 +7158,6 @@
 
         /* MSDN: Cursor must be A8R8G8B8 */
-        if (WINED3DFMT_A8R8G8B8 != pSur->resource.format) {
+        if (WINED3DFMT_A8R8G8B8 != pSur->resource.format_desc->format)
+        {
             ERR("(%p) : surface(%p) has an invalid format\n", This, pCursorBitmap);
             return WINED3DERR_INVALIDCALL;
@@ -6772,7 +7184,6 @@
             if (SUCCEEDED(IWineD3DSurface_LockRect(pCursorBitmap, &rect, NULL, WINED3DLOCK_READONLY)))
             {
-                const struct GlPixelFormatDesc *glDesc;
-                const StaticPixelFormatDesc *tableEntry = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &GLINFO_LOCATION, &glDesc);
-                char *mem, *bits = (char *)rect.pBits;
+                const struct GlPixelFormatDesc *glDesc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &GLINFO_LOCATION);
+                char *mem, *bits = rect.pBits;
                 GLint intfmt = glDesc->glInternal;
                 GLint format = glDesc->glFormat;
@@ -6780,5 +7191,5 @@
                 INT height = This->cursorHeight;
                 INT width = This->cursorWidth;
-                INT bpp = tableEntry->bpp;
+                INT bpp = glDesc->byte_count;
                 INT i, sampler;
 
@@ -6797,8 +7208,6 @@
 
                 /* Make sure that a proper texture unit is selected */
-                if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-                    GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
-                    checkGLcall("glActiveTextureARB");
-                }
+                GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
+                checkGLcall("glActiveTextureARB");
                 sampler = This->rev_tex_unit_map[0];
                 if (sampler != -1) {
@@ -7150,4 +7559,5 @@
         WARN("Requested mode: %d, %d\n", pPresentationParameters->BackBufferWidth,
              pPresentationParameters->BackBufferHeight);
+        IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain);
         return WINED3DERR_INVALIDCALL;
     }
@@ -7195,6 +7605,23 @@
     }
     if (pPresentationParameters->EnableAutoDepthStencil && !This->auto_depth_stencil_buffer) {
-        WARN("Auto depth stencil enabled, but no auto depth stencil present, returning WINED3DERR_INVALIDCALL\n");
-        return WINED3DERR_INVALIDCALL;
+        HRESULT hrc;
+
+        TRACE("Creating the depth stencil buffer\n");
+
+        hrc = IWineD3DDeviceParent_CreateDepthStencilSurface(This->device_parent,
+                This->parent,
+                pPresentationParameters->BackBufferWidth,
+                pPresentationParameters->BackBufferHeight,
+                pPresentationParameters->AutoDepthStencilFormat,
+                pPresentationParameters->MultiSampleType,
+                pPresentationParameters->MultiSampleQuality,
+                FALSE,
+                &This->auto_depth_stencil_buffer);
+
+        if (FAILED(hrc)) {
+            ERR("Failed to create the depth stencil buffer\n");
+            IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
+            return WINED3DERR_INVALIDCALL;
+        }
     }
 
@@ -7224,13 +7651,5 @@
         pPresentationParameters->BackBufferHeight != swapchain->presentParms.BackBufferHeight))
     {
-        WINED3DVIEWPORT vp;
         UINT i;
-
-        vp.X = 0;
-        vp.Y = 0;
-        vp.Width = pPresentationParameters->BackBufferWidth;
-        vp.Height = pPresentationParameters->BackBufferHeight;
-        vp.MinZ = 0;
-        vp.MaxZ = 1;
 
         if(!pPresentationParameters->Windowed) {
@@ -7247,8 +7666,4 @@
             updateSurfaceDesc((IWineD3DSurfaceImpl *)This->auto_depth_stencil_buffer, pPresentationParameters);
         }
-
-
-        /* Now set the new viewport */
-        IWineD3DDevice_SetViewport(iface, &vp);
     }
 
@@ -7290,4 +7705,15 @@
         This->exStyle = exStyle;
     }
+
+    TRACE("Resetting stateblock\n");
+    IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->updateStateBlock);
+    IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock);
+
+    /* Note: No parent needed for initial internal stateblock */
+    hr = IWineD3DDevice_CreateStateBlock(iface, WINED3DSBT_INIT, (IWineD3DStateBlock **)&This->stateBlock, NULL);
+    if (FAILED(hr)) ERR("Resetting the stateblock failed with error 0x%08x\n", hr);
+    else TRACE("Created stateblock %p\n", This->stateBlock);
+    This->updateStateBlock = This->stateBlock;
+    IWineD3DStateBlock_AddRef((IWineD3DStateBlock *)This->updateStateBlock);
 
     hr = IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *) This->stateBlock);
@@ -7450,6 +7876,5 @@
         /* TODO: nothing really? */
         break;
-        case WINED3DRTYPE_VERTEXBUFFER:
-        /* MSDN: When an application no longer holds a references to this interface, the interface will automatically be freed. */
+        case WINED3DRTYPE_BUFFER:
         {
             int streamNumber;
@@ -7474,20 +7899,18 @@
                 }
             }
+
+            if (This->updateStateBlock != NULL ) { /* ==NULL when device is being destroyed */
+                if (This->updateStateBlock->pIndexData == (IWineD3DBuffer *)resource) {
+                    This->updateStateBlock->pIndexData =  NULL;
+                }
+            }
+            if (This->stateBlock != NULL ) { /* ==NULL when device is being destroyed */
+                if (This->stateBlock->pIndexData == (IWineD3DBuffer *)resource) {
+                    This->stateBlock->pIndexData =  NULL;
+                }
+            }
         }
         break;
-        case WINED3DRTYPE_INDEXBUFFER:
-        /* MSDN: When an application no longer holds a references to this interface, the interface will automatically be freed.*/
-        if (This->updateStateBlock != NULL ) { /* ==NULL when device is being destroyed */
-            if (This->updateStateBlock->pIndexData == (IWineD3DIndexBuffer *)resource) {
-                This->updateStateBlock->pIndexData =  NULL;
-            }
-        }
-        if (This->stateBlock != NULL ) { /* ==NULL when device is being destroyed */
-            if (This->stateBlock->pIndexData == (IWineD3DIndexBuffer *)resource) {
-                This->stateBlock->pIndexData =  NULL;
-            }
-        }
-
-        break;
+
         default:
         FIXME("(%p) unknown resource type %p %u\n", This, resource, IWineD3DResource_GetType(resource));
@@ -7534,8 +7957,10 @@
     IWineD3DDeviceImpl_GetParent,
     /*** Creation methods**/
+    IWineD3DDeviceImpl_CreateBuffer,
     IWineD3DDeviceImpl_CreateVertexBuffer,
     IWineD3DDeviceImpl_CreateIndexBuffer,
     IWineD3DDeviceImpl_CreateStateBlock,
     IWineD3DDeviceImpl_CreateSurface,
+    IWineD3DDeviceImpl_CreateRendertargetView,
     IWineD3DDeviceImpl_CreateTexture,
     IWineD3DDeviceImpl_CreateVolumeTexture,
@@ -7581,6 +8006,4 @@
     IWineD3DDeviceImpl_SetDepthStencilSurface,
     IWineD3DDeviceImpl_GetDepthStencilSurface,
-    IWineD3DDeviceImpl_SetFVF,
-    IWineD3DDeviceImpl_GetFVF,
     IWineD3DDeviceImpl_SetGammaRamp,
     IWineD3DDeviceImpl_GetGammaRamp,
@@ -7651,150 +8074,8 @@
     IWineD3DDeviceImpl_Present,
     IWineD3DDeviceImpl_Clear,
+    IWineD3DDeviceImpl_ClearRendertargetView,
     /*** Drawing ***/
-    IWineD3DDeviceImpl_DrawPrimitive,
-    IWineD3DDeviceImpl_DrawIndexedPrimitive,
-    IWineD3DDeviceImpl_DrawPrimitiveUP,
-    IWineD3DDeviceImpl_DrawIndexedPrimitiveUP,
-    IWineD3DDeviceImpl_DrawPrimitiveStrided,
-    IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided,
-    IWineD3DDeviceImpl_DrawRectPatch,
-    IWineD3DDeviceImpl_DrawTriPatch,
-    IWineD3DDeviceImpl_DeletePatch,
-    IWineD3DDeviceImpl_ColorFill,
-    IWineD3DDeviceImpl_UpdateTexture,
-    IWineD3DDeviceImpl_UpdateSurface,
-    IWineD3DDeviceImpl_GetFrontBufferData,
-    /*** object tracking ***/
-    IWineD3DDeviceImpl_ResourceReleased,
-    IWineD3DDeviceImpl_EnumResources
-};
-
-const IWineD3DDeviceVtbl IWineD3DDevice_DirtyConst_Vtbl =
-{
-    /*** IUnknown methods ***/
-    IWineD3DDeviceImpl_QueryInterface,
-    IWineD3DDeviceImpl_AddRef,
-    IWineD3DDeviceImpl_Release,
-    /*** IWineD3DDevice methods ***/
-    IWineD3DDeviceImpl_GetParent,
-    /*** Creation methods**/
-    IWineD3DDeviceImpl_CreateVertexBuffer,
-    IWineD3DDeviceImpl_CreateIndexBuffer,
-    IWineD3DDeviceImpl_CreateStateBlock,
-    IWineD3DDeviceImpl_CreateSurface,
-    IWineD3DDeviceImpl_CreateTexture,
-    IWineD3DDeviceImpl_CreateVolumeTexture,
-    IWineD3DDeviceImpl_CreateVolume,
-    IWineD3DDeviceImpl_CreateCubeTexture,
-    IWineD3DDeviceImpl_CreateQuery,
-    IWineD3DDeviceImpl_CreateSwapChain,
-    IWineD3DDeviceImpl_CreateVertexDeclaration,
-    IWineD3DDeviceImpl_CreateVertexDeclarationFromFVF,
-    IWineD3DDeviceImpl_CreateVertexShader,
-    IWineD3DDeviceImpl_CreatePixelShader,
-    IWineD3DDeviceImpl_CreatePalette,
-    /*** Odd functions **/
-    IWineD3DDeviceImpl_Init3D,
-    IWineD3DDeviceImpl_InitGDI,
-    IWineD3DDeviceImpl_Uninit3D,
-    IWineD3DDeviceImpl_UninitGDI,
-    IWineD3DDeviceImpl_SetMultithreaded,
-    IWineD3DDeviceImpl_EvictManagedResources,
-    IWineD3DDeviceImpl_GetAvailableTextureMem,
-    IWineD3DDeviceImpl_GetBackBuffer,
-    IWineD3DDeviceImpl_GetCreationParameters,
-    IWineD3DDeviceImpl_GetDeviceCaps,
-    IWineD3DDeviceImpl_GetDirect3D,
-    IWineD3DDeviceImpl_GetDisplayMode,
-    IWineD3DDeviceImpl_SetDisplayMode,
-    IWineD3DDeviceImpl_GetNumberOfSwapChains,
-    IWineD3DDeviceImpl_GetRasterStatus,
-    IWineD3DDeviceImpl_GetSwapChain,
-    IWineD3DDeviceImpl_Reset,
-    IWineD3DDeviceImpl_SetDialogBoxMode,
-    IWineD3DDeviceImpl_SetCursorProperties,
-    IWineD3DDeviceImpl_SetCursorPosition,
-    IWineD3DDeviceImpl_ShowCursor,
-    IWineD3DDeviceImpl_TestCooperativeLevel,
-    /*** Getters and setters **/
-    IWineD3DDeviceImpl_SetClipPlane,
-    IWineD3DDeviceImpl_GetClipPlane,
-    IWineD3DDeviceImpl_SetClipStatus,
-    IWineD3DDeviceImpl_GetClipStatus,
-    IWineD3DDeviceImpl_SetCurrentTexturePalette,
-    IWineD3DDeviceImpl_GetCurrentTexturePalette,
-    IWineD3DDeviceImpl_SetDepthStencilSurface,
-    IWineD3DDeviceImpl_GetDepthStencilSurface,
-    IWineD3DDeviceImpl_SetFVF,
-    IWineD3DDeviceImpl_GetFVF,
-    IWineD3DDeviceImpl_SetGammaRamp,
-    IWineD3DDeviceImpl_GetGammaRamp,
-    IWineD3DDeviceImpl_SetIndices,
-    IWineD3DDeviceImpl_GetIndices,
-    IWineD3DDeviceImpl_SetBaseVertexIndex,
-    IWineD3DDeviceImpl_GetBaseVertexIndex,
-    IWineD3DDeviceImpl_SetLight,
-    IWineD3DDeviceImpl_GetLight,
-    IWineD3DDeviceImpl_SetLightEnable,
-    IWineD3DDeviceImpl_GetLightEnable,
-    IWineD3DDeviceImpl_SetMaterial,
-    IWineD3DDeviceImpl_GetMaterial,
-    IWineD3DDeviceImpl_SetNPatchMode,
-    IWineD3DDeviceImpl_GetNPatchMode,
-    IWineD3DDeviceImpl_SetPaletteEntries,
-    IWineD3DDeviceImpl_GetPaletteEntries,
-    IWineD3DDeviceImpl_SetPixelShader,
-    IWineD3DDeviceImpl_GetPixelShader,
-    IWineD3DDeviceImpl_SetPixelShaderConstantB,
-    IWineD3DDeviceImpl_GetPixelShaderConstantB,
-    IWineD3DDeviceImpl_SetPixelShaderConstantI,
-    IWineD3DDeviceImpl_GetPixelShaderConstantI,
-    IWineD3DDeviceImpl_SetPixelShaderConstantF_DirtyConst,
-    IWineD3DDeviceImpl_GetPixelShaderConstantF,
-    IWineD3DDeviceImpl_SetRenderState,
-    IWineD3DDeviceImpl_GetRenderState,
-    IWineD3DDeviceImpl_SetRenderTarget,
-    IWineD3DDeviceImpl_GetRenderTarget,
-    IWineD3DDeviceImpl_SetFrontBackBuffers,
-    IWineD3DDeviceImpl_SetSamplerState,
-    IWineD3DDeviceImpl_GetSamplerState,
-    IWineD3DDeviceImpl_SetScissorRect,
-    IWineD3DDeviceImpl_GetScissorRect,
-    IWineD3DDeviceImpl_SetSoftwareVertexProcessing,
-    IWineD3DDeviceImpl_GetSoftwareVertexProcessing,
-    IWineD3DDeviceImpl_SetStreamSource,
-    IWineD3DDeviceImpl_GetStreamSource,
-    IWineD3DDeviceImpl_SetStreamSourceFreq,
-    IWineD3DDeviceImpl_GetStreamSourceFreq,
-    IWineD3DDeviceImpl_SetTexture,
-    IWineD3DDeviceImpl_GetTexture,
-    IWineD3DDeviceImpl_SetTextureStageState,
-    IWineD3DDeviceImpl_GetTextureStageState,
-    IWineD3DDeviceImpl_SetTransform,
-    IWineD3DDeviceImpl_GetTransform,
-    IWineD3DDeviceImpl_SetVertexDeclaration,
-    IWineD3DDeviceImpl_GetVertexDeclaration,
-    IWineD3DDeviceImpl_SetVertexShader,
-    IWineD3DDeviceImpl_GetVertexShader,
-    IWineD3DDeviceImpl_SetVertexShaderConstantB,
-    IWineD3DDeviceImpl_GetVertexShaderConstantB,
-    IWineD3DDeviceImpl_SetVertexShaderConstantI,
-    IWineD3DDeviceImpl_GetVertexShaderConstantI,
-    IWineD3DDeviceImpl_SetVertexShaderConstantF_DirtyConst,
-    IWineD3DDeviceImpl_GetVertexShaderConstantF,
-    IWineD3DDeviceImpl_SetViewport,
-    IWineD3DDeviceImpl_GetViewport,
-    IWineD3DDeviceImpl_MultiplyTransform,
-    IWineD3DDeviceImpl_ValidateDevice,
-    IWineD3DDeviceImpl_ProcessVertices,
-    /*** State block ***/
-    IWineD3DDeviceImpl_BeginStateBlock,
-    IWineD3DDeviceImpl_EndStateBlock,
-    /*** Scene management ***/
-    IWineD3DDeviceImpl_BeginScene,
-    IWineD3DDeviceImpl_EndScene,
-    IWineD3DDeviceImpl_Present,
-    IWineD3DDeviceImpl_Clear,
-    /*** Drawing ***/
+    IWineD3DDeviceImpl_SetPrimitiveType,
+    IWineD3DDeviceImpl_GetPrimitiveType,
     IWineD3DDeviceImpl_DrawPrimitive,
     IWineD3DDeviceImpl_DrawIndexedPrimitive,
@@ -7854,5 +8135,4 @@
 
 const DWORD SavedPixelStates_T[NUM_SAVEDPIXELSTATES_T] = {
-    WINED3DTSS_ADDRESSW              ,
     WINED3DTSS_ALPHAARG0             ,
     WINED3DTSS_ALPHAARG1             ,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/directx.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/directx.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/directx.c	(revision 19678)
@@ -46,4 +46,6 @@
 WINE_DECLARE_DEBUG_CHANNEL(d3d_caps);
 
+#define GLINFO_LOCATION (*gl_info)
+
 /* The d3d device ID */
 static const GUID IID_D3DDEVICE_D3DUID = { 0xaeb2cdd4, 0x6e41, 0x43ea, { 0x94,0x1c,0x83,0x61,0xcc,0x76,0x07,0x81 } };
@@ -74,4 +76,5 @@
     {"GL_ARB_fragment_program",             ARB_FRAGMENT_PROGRAM,           0                           },
     {"GL_ARB_fragment_shader",              ARB_FRAGMENT_SHADER,            0                           },
+    {"GL_ARB_geometry_shader4",             ARB_GEOMETRY_SHADER4,           0                           },
     {"GL_ARB_half_float_pixel",             ARB_HALF_FLOAT_PIXEL,           0                           },
     {"GL_ARB_imaging",                      ARB_IMAGING,                    0                           },
@@ -92,4 +95,5 @@
     {"GL_ARB_texture_non_power_of_two",     ARB_TEXTURE_NON_POWER_OF_TWO,   MAKEDWORD_VERSION(2, 0)     },
     {"GL_ARB_texture_rectangle",            ARB_TEXTURE_RECTANGLE,          0                           },
+    {"GL_ARB_texture_rg",                   ARB_TEXTURE_RG,                 0                           },
     {"GL_ARB_vertex_blend",                 ARB_VERTEX_BLEND,               0                           },
     {"GL_ARB_vertex_buffer_object",         ARB_VERTEX_BUFFER_OBJECT,       0                           },
@@ -97,4 +101,6 @@
     {"GL_ARB_vertex_shader",                ARB_VERTEX_SHADER,              0                           },
     {"GL_ARB_shader_objects",               ARB_SHADER_OBJECTS,             0                           },
+    {"GL_ARB_shader_texture_lod",           ARB_SHADER_TEXTURE_LOD,         0                           },
+    {"GL_ARB_half_float_vertex",            ARB_HALF_FLOAT_VERTEX,          0                           },
 
     /* EXT */
@@ -119,7 +125,9 @@
     {"GL_EXT_texture_env_dot3",             EXT_TEXTURE_ENV_DOT3,           0                           },
     {"GL_EXT_texture_sRGB",                 EXT_TEXTURE_SRGB,               0                           },
+    {"GL_EXT_texture_swizzle",              EXT_TEXTURE_SWIZZLE,            0                           },
     {"GL_EXT_texture_filter_anisotropic",   EXT_TEXTURE_FILTER_ANISOTROPIC, 0                           },
     {"GL_EXT_texture_lod",                  EXT_TEXTURE_LOD,                0                           },
     {"GL_EXT_texture_lod_bias",             EXT_TEXTURE_LOD_BIAS,           0                           },
+    {"GL_EXT_vertex_array_bgra",            EXT_VERTEX_ARRAY_BGRA,          0                           },
     {"GL_EXT_vertex_shader",                EXT_VERTEX_SHADER,              0                           },
     {"GL_EXT_gpu_program_parameters",       EXT_GPU_PROGRAM_PARAMETERS,     0                           },
@@ -154,12 +162,9 @@
  **********************************************************/
 
-/* Adapters */
-static int numAdapters = 0;
-static struct WineD3DAdapter Adapters[1];
-
 static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType, WINED3DFORMAT AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat, WINED3DSURFTYPE SurfaceType);
-static const struct fragment_pipeline *select_fragment_implementation(UINT Adapter, WINED3DDEVTYPE DeviceType);
-static const shader_backend_t *select_shader_backend(UINT Adapter, WINED3DDEVTYPE DeviceType);
-static const struct blit_shader *select_blit_implementation(UINT Adapter, WINED3DDEVTYPE DeviceType);
+static const struct fragment_pipeline *select_fragment_implementation(struct WineD3DAdapter *adapter,
+        WINED3DDEVTYPE DeviceType);
+static const shader_backend_t *select_shader_backend(struct WineD3DAdapter *adapter, WINED3DDEVTYPE DeviceType);
+static const struct blit_shader *select_blit_implementation(struct WineD3DAdapter *adapter, WINED3DDEVTYPE DeviceType);
 
 /* lookup tables */
@@ -192,10 +197,10 @@
 
 /* drawStridedSlow attributes */
-glAttribFunc position_funcs[WINED3DDECLTYPE_UNUSED];
-glAttribFunc diffuse_funcs[WINED3DDECLTYPE_UNUSED];
-glAttribFunc specular_funcs[WINED3DDECLTYPE_UNUSED];
-glAttribFunc normal_funcs[WINED3DDECLTYPE_UNUSED];
-glMultiTexCoordFunc multi_texcoord_funcs[WINED3DDECLTYPE_UNUSED];
-glAttribFunc texcoord_funcs[WINED3DDECLTYPE_UNUSED];
+glAttribFunc position_funcs[WINED3D_FFP_EMIT_COUNT];
+glAttribFunc diffuse_funcs[WINED3D_FFP_EMIT_COUNT];
+glAttribFunc specular_func_3ubv;
+glAttribFunc specular_funcs[WINED3D_FFP_EMIT_COUNT];
+glAttribFunc normal_funcs[WINED3D_FFP_EMIT_COUNT];
+glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT];
 
 /**
@@ -336,9 +341,9 @@
 /* Adjust the amount of used texture memory */
 long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram){
-    UINT Adapter = D3DDevice->adapterNo;
-
-    Adapters[Adapter].UsedTextureRam += glram;
-    TRACE("Adjusted gl ram by %ld to %d\n", glram, Adapters[Adapter].UsedTextureRam);
-    return Adapters[Adapter].UsedTextureRam;
+    struct WineD3DAdapter *adapter = D3DDevice->adapter;
+
+    adapter->UsedTextureRam += glram;
+    TRACE("Adjusted gl ram by %ld to %d\n", glram, adapter->UsedTextureRam);
+    return adapter->UsedTextureRam;
 }
 
@@ -377,4 +382,10 @@
     ref = InterlockedDecrement(&This->ref);
     if (ref == 0) {
+        unsigned int i;
+
+        for (i = 0; i < This->adapter_count; ++i)
+        {
+            HeapFree(GetProcessHeap(), 0, This->adapters[i].cfgs);
+        }
         HeapFree(GetProcessHeap(), 0, This);
     }
@@ -425,12 +436,8 @@
     switch (vs_selected_mode) {
         case SHADER_GLSL:
-            /* Subtract the other potential uniforms from the max available (bools, ints, and 1 row of projection matrix) */
-            gl_info->max_vshader_constantsF = gl_info->vs_glsl_constantsF - (MAX_CONST_B / 4) - MAX_CONST_I - 1;
+            gl_info->max_vshader_constantsF = gl_info->vs_glsl_constantsF;
             break;
         case SHADER_ARB:
-            /* We have to subtract any other PARAMs that we might use in our shader programs.
-             * ATI seems to count 2 implicit PARAMs when we use fog and NVIDIA counts 1,
-             * and we reference one row of the PROJECTION matrix which counts as 1 PARAM. */
-            gl_info->max_vshader_constantsF = gl_info->vs_arb_constantsF - 3;
+            gl_info->max_vshader_constantsF = gl_info->vs_arb_constantsF;
             break;
         default:
@@ -441,16 +448,8 @@
     switch (ps_selected_mode) {
         case SHADER_GLSL:
-            /* Subtract the other potential uniforms from the max available (bools & ints), and 2 states for fog.
-             * In theory the texbem instruction may need one more shader constant too. But lets assume
-             * that a sm <= 1.3 shader does not need all the uniforms provided by a glsl-capable card,
-             * and lets not take away a uniform needlessly from all other shaders.
-             */
-            gl_info->max_pshader_constantsF = gl_info->ps_glsl_constantsF - (MAX_CONST_B / 4) - MAX_CONST_I - 2;
+            gl_info->max_pshader_constantsF = gl_info->ps_glsl_constantsF;
             break;
         case SHADER_ARB:
-            /* The arb shader only loads the bump mapping environment matrix into the shader if it finds
-             * a free constant to do that, so only reduce the number of available constants by 2 for the fog states.
-             */
-            gl_info->max_pshader_constantsF = gl_info->ps_arb_constantsF - 2;
+            gl_info->max_pshader_constantsF = gl_info->ps_arb_constantsF;
             break;
         default:
@@ -464,5 +463,4 @@
  **********************************************************/
 
-#define GLINFO_LOCATION (*gl_info)
 static inline BOOL test_arb_vs_offset_limit(const WineD3D_GL_Info *gl_info)
 {
@@ -528,6 +526,5 @@
 
     gl_string = (const char *) glGetString(GL_RENDERER);
-    if (NULL == gl_string)
-	gl_string = "None";
+    if (!gl_string) gl_string = "None";
     strcpy(gl_info->gl_renderer, gl_string);
 
@@ -724,5 +721,5 @@
     gl_info->max_fragment_samplers = 1;
     gl_info->max_vertex_samplers = 0;
-    gl_info->max_combined_samplers = 0;
+    gl_info->max_combined_samplers = gl_info->max_fragment_samplers + gl_info->max_vertex_samplers;
     gl_info->max_sampler_stages = 1;
     gl_info->ps_arb_version = PS_VERSION_NOT_SUPPORTED;
@@ -752,5 +749,5 @@
     TRACE_(d3d_caps)("Maximum texture size support - max texture size=%d\n", gl_max);
 
-    glGetFloatv(GL_POINT_SIZE_RANGE, gl_floatv);
+    glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, gl_floatv);
     gl_info->max_pointsizemin = gl_floatv[0];
     gl_info->max_pointsize = gl_floatv[1];
@@ -1023,5 +1020,13 @@
             gl_info->supported[NV_TEXTURE_SHADER3] = FALSE;
         }
-
+        if(gl_info->supported[NV_HALF_FLOAT]) {
+            /* GL_ARB_half_float_vertex is a subset of GL_NV_half_float */
+            gl_info->supported[ARB_HALF_FLOAT_VERTEX] = TRUE;
+        }
+        if(gl_info->supported[ARB_POINT_SPRITE]) {
+            gl_info->max_point_sprite_units = gl_info->max_textures;
+        } else {
+            gl_info->max_point_sprite_units = 0;
+        }
     }
     checkGLcall("extension detection\n");
@@ -1091,11 +1096,27 @@
              */
             if(WINE_D3D9_CAPABLE(gl_info) && (gl_info->vs_nv_version == VS_VERSION_30)) {
-                /* Geforce GTX - highend */
-                if(strstr(gl_info->gl_renderer, "GTX 280")) {
+                /* Geforce 200 - highend */
+                if(strstr(gl_info->gl_renderer, "GTX 280") ||
+                   strstr(gl_info->gl_renderer, "GTX 285") ||
+                   strstr(gl_info->gl_renderer, "GTX 295"))
+                {
                     gl_info->gl_card = CARD_NVIDIA_GEFORCE_GTX280;
                     vidmem = 1024;
                 }
-                /* Geforce9 - highend */
-                else if(strstr(gl_info->gl_renderer, "9800")) {
+                /* Geforce 200 - midend high */
+                if(strstr(gl_info->gl_renderer, "GTX 275")) {
+                    gl_info->gl_card = CARD_NVIDIA_GEFORCE_GTX275;
+                    vidmem = 896;
+                }
+                /* Geforce 200 - midend */
+                if(strstr(gl_info->gl_renderer, "GTX 260")) {
+                    gl_info->gl_card = CARD_NVIDIA_GEFORCE_GTX260;
+                    vidmem = 1024;
+                }
+                /* Geforce9 - highend / Geforce 200 - midend (GTS 150/250 are based on the same core) */
+                else if(strstr(gl_info->gl_renderer, "9800") ||
+                        strstr(gl_info->gl_renderer, "GTS 150") ||
+                        strstr(gl_info->gl_renderer, "GTS 250"))
+                {
                     gl_info->gl_card = CARD_NVIDIA_GEFORCE_9800GT;
                     vidmem = 512;
@@ -1105,4 +1126,26 @@
                     gl_info->gl_card = CARD_NVIDIA_GEFORCE_9600GT;
                     vidmem = 384; /* The 9600GSO has 384MB, the 9600GT has 512-1024MB */
+                }
+                /* Geforce9 - midend low / Geforce 200 - low*/
+                else if(strstr(gl_info->gl_renderer, "9500") ||
+                        strstr(gl_info->gl_renderer, "GT 120") ||
+                        strstr(gl_info->gl_renderer, "GT 130"))
+                {
+                    gl_info->gl_card = CARD_NVIDIA_GEFORCE_9500GT;
+                    vidmem = 256; /* The 9500GT has 256-1024MB */
+                }
+                /* Geforce9 - lowend */
+                else if(strstr(gl_info->gl_renderer, "9400")) {
+                    gl_info->gl_card = CARD_NVIDIA_GEFORCE_9400GT;
+                    vidmem = 256; /* The 9400GT has 256-1024MB */
+                }
+                /* Geforce9 - lowend low */
+                else if(strstr(gl_info->gl_renderer, "9100") ||
+                        strstr(gl_info->gl_renderer, "9200") ||
+                        strstr(gl_info->gl_renderer, "9300") ||
+                        strstr(gl_info->gl_renderer, "G 100"))
+                {
+                    gl_info->gl_card = CARD_NVIDIA_GEFORCE_9200;
+                    vidmem = 256; /* The 9100-9300 cards have 256MB */
                 }
                 /* Geforce8 - highend */
@@ -1295,4 +1338,10 @@
                     vidmem = 128; /* x700/x8*0 use 128-256MB, >=x1300 128-512MB */
                 }
+                /* Radeon Xpress Series - onboard, DX9b, Shader 2.0, 300-400MHz */
+                else if(strstr(gl_info->gl_renderer, "Radeon Xpress"))
+                {
+                    gl_info->gl_card = CARD_ATI_RADEON_XPRESS_200M;
+                    vidmem = 64; /* Shared RAM, BIOS configurable, 64-256M */
+                }
                 /* Radeon R3xx */ 
                 else {
@@ -1312,5 +1361,6 @@
             break;
         case VENDOR_INTEL:
-            if (strstr(gl_info->gl_renderer, "GMA 950")) {
+            if (strstr(gl_info->gl_renderer, "GMA 950") ||
+                strstr(gl_info->gl_renderer, "945GM")) {
                 /* MacOS calls the card GMA 950, but everywhere else the PCI ID is named 945GM */
                 gl_info->gl_card = CARD_INTEL_I945GM;
@@ -1401,10 +1451,12 @@
     hdc = pwglGetCurrentDC();
     if (hdc) {
-        WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc));
-        TRACE_(d3d_caps)("WGL_Extensions reported:\n");
+        /* Not all GL drivers might offer WGL extensions e.g. VirtualBox */
+        if(GL_EXTCALL(wglGetExtensionsStringARB))
+            WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc));
 
         if (NULL == WGL_Extensions) {
             ERR("   WGL_Extensions returns NULL\n");
         } else {
+            TRACE_(d3d_caps)("WGL_Extensions reported:\n");
             while (*WGL_Extensions != 0x00) {
                 const char *Start;
@@ -1430,4 +1482,8 @@
                     TRACE_(d3d_caps)("FOUND: WGL_ARB_pbuffer support\n");
                 }
+                if (!strcmp(ThisExtn, "WGL_ARB_pixel_format")) {
+                    gl_info->supported[WGL_ARB_PIXEL_FORMAT] = TRUE;
+                    TRACE_(d3d_caps)("FOUND: WGL_ARB_pixel_format support\n");
+                }
                 if (!strcmp(ThisExtn, "WGL_WINE_pixel_format_passthrough")) {
                     gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH] = TRUE;
@@ -1441,5 +1497,4 @@
     return return_value;
 }
-#undef GLINFO_LOCATION
 
 /**********************************************************
@@ -1450,6 +1505,7 @@
     IWineD3DImpl *This = (IWineD3DImpl *)iface;
 
-    TRACE_(d3d_caps)("(%p): Reporting %d adapters\n", This, numAdapters);
-    return numAdapters;
+    TRACE_(d3d_caps)("(%p): Reporting %u adapters\n", This, This->adapter_count);
+
+    return This->adapter_count;
 }
 
@@ -1469,5 +1525,5 @@
     }
 
-    return MonitorFromPoint(Adapters[Adapter].monitorPoint, MONITOR_DEFAULTTOPRIMARY);
+    return MonitorFromPoint(This->adapters[Adapter].monitorPoint, MONITOR_DEFAULTTOPRIMARY);
 }
 
@@ -1671,13 +1727,16 @@
     /* Return the information requested */
     TRACE_(d3d_caps)("device/Vendor Name and Version detection using FillGLCaps\n");
-    strcpy(pIdentifier->Driver, Adapters[Adapter].driver);
-    strcpy(pIdentifier->Description, Adapters[Adapter].description);
+    strcpy(pIdentifier->Driver, This->adapters[Adapter].driver);
+    if(This->adapters[Adapter].gl_info.driver_description)
+        strcpy(pIdentifier->Description, This->adapters[Adapter].gl_info.driver_description);
+    else /* Copy default description "Direct3D HAL" */
+        strcpy(pIdentifier->Description, This->adapters[Adapter].description);
 
     /* Note dx8 doesn't supply a DeviceName */
     if (NULL != pIdentifier->DeviceName) strcpy(pIdentifier->DeviceName, "\\\\.\\DISPLAY"); /* FIXME: May depend on desktop? */
-    pIdentifier->DriverVersion->u.HighPart = Adapters[Adapter].gl_info.driver_version_hipart;
-    pIdentifier->DriverVersion->u.LowPart = Adapters[Adapter].gl_info.driver_version;
-    *(pIdentifier->VendorId) = Adapters[Adapter].gl_info.gl_vendor;
-    *(pIdentifier->DeviceId) = Adapters[Adapter].gl_info.gl_card;
+    pIdentifier->DriverVersion->u.HighPart = This->adapters[Adapter].gl_info.driver_version_hipart;
+    pIdentifier->DriverVersion->u.LowPart = This->adapters[Adapter].gl_info.driver_version;
+    *(pIdentifier->VendorId) = This->adapters[Adapter].gl_info.gl_vendor;
+    *(pIdentifier->DeviceId) = This->adapters[Adapter].gl_info.gl_card;
     *(pIdentifier->SubSysId) = 0;
     *(pIdentifier->Revision) = 0;
@@ -1705,5 +1764,7 @@
 }
 
-static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const WineD3D_PixelFormat *cfg, WINED3DFORMAT Format) {
+static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const WineD3D_GL_Info *gl_info,
+        const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc)
+{
     short redSize, greenSize, blueSize, alphaSize, colorBits;
 
@@ -1712,6 +1773,7 @@
 
     if(cfg->iPixelType == WGL_TYPE_RGBA_ARB) { /* Integer RGBA formats */
-        if(!getColorBits(Format, &redSize, &greenSize, &blueSize, &alphaSize, &colorBits)) {
-            ERR("Unable to check compatibility for Format=%s\n", debug_d3dformat(Format));
+        if (!getColorBits(format_desc, &redSize, &greenSize, &blueSize, &alphaSize, &colorBits))
+        {
+            ERR("Unable to check compatibility for Format=%s\n", debug_d3dformat(format_desc->format));
             return FALSE;
         }
@@ -1731,15 +1793,15 @@
         return TRUE;
     } else if(cfg->iPixelType == WGL_TYPE_RGBA_FLOAT_ARB) { /* Float RGBA formats; TODO: WGL_NV_float_buffer */
-        if(Format == WINED3DFMT_R16F)
+        if (format_desc->format == WINED3DFMT_R16_FLOAT)
             return (cfg->redSize == 16 && cfg->greenSize == 0 && cfg->blueSize == 0 && cfg->alphaSize == 0);
-        if(Format == WINED3DFMT_G16R16F)
+        if (format_desc->format == WINED3DFMT_R16G16_FLOAT)
             return (cfg->redSize == 16 && cfg->greenSize == 16 && cfg->blueSize == 0 && cfg->alphaSize == 0);
-        if(Format == WINED3DFMT_A16B16G16R16F)
+        if (format_desc->format == WINED3DFMT_R16G16B16A16_FLOAT)
             return (cfg->redSize == 16 && cfg->greenSize == 16 && cfg->blueSize == 16 && cfg->alphaSize == 16);
-        if(Format == WINED3DFMT_R32F)
+        if (format_desc->format == WINED3DFMT_R32_FLOAT)
             return (cfg->redSize == 32 && cfg->greenSize == 0 && cfg->blueSize == 0 && cfg->alphaSize == 0);
-        if(Format == WINED3DFMT_G32R32F)
+        if (format_desc->format == WINED3DFMT_R32G32_FLOAT)
             return (cfg->redSize == 32 && cfg->greenSize == 32 && cfg->blueSize == 0 && cfg->alphaSize == 0);
-        if(Format == WINED3DFMT_A32B32G32R32F)
+        if (format_desc->format == WINED3DFMT_R32G32B32A32_FLOAT)
             return (cfg->redSize == 32 && cfg->greenSize == 32 && cfg->blueSize == 32 && cfg->alphaSize == 32);
     } else {
@@ -1751,5 +1813,7 @@
 }
 
-static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const WineD3D_PixelFormat *cfg, WINED3DFORMAT Format) {
+static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const WineD3D_GL_Info *gl_info,
+        const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc)
+{
     short depthSize, stencilSize;
     BOOL lockable = FALSE;
@@ -1758,10 +1822,11 @@
         return FALSE;
 
-    if(!getDepthStencilBits(Format, &depthSize, &stencilSize)) {
-        ERR("Unable to check compatibility for Format=%s\n", debug_d3dformat(Format));
+    if (!getDepthStencilBits(format_desc, &depthSize, &stencilSize))
+    {
+        ERR("Unable to check compatibility for Format=%s\n", debug_d3dformat(format_desc->format));
         return FALSE;
     }
 
-    if((Format == WINED3DFMT_D16_LOCKABLE) || (Format == WINED3DFMT_D32F_LOCKABLE))
+    if ((format_desc->format == WINED3DFMT_D16_LOCKABLE) || (format_desc->format == WINED3DFMT_D32F_LOCKABLE))
         lockable = TRUE;
 
@@ -1787,4 +1852,7 @@
     int nCfgs;
     const WineD3D_PixelFormat *cfgs;
+    const struct WineD3DAdapter *adapter;
+    const struct GlPixelFormatDesc *rt_format_desc;
+    const struct GlPixelFormatDesc *ds_format_desc;
     int it;
 
@@ -1801,9 +1869,14 @@
     }
 
-    cfgs = Adapters[Adapter].cfgs;
-    nCfgs = Adapters[Adapter].nCfgs;
+    adapter = &This->adapters[Adapter];
+    rt_format_desc = getFormatDescEntry(RenderTargetFormat, &adapter->gl_info);
+    ds_format_desc = getFormatDescEntry(DepthStencilFormat, &adapter->gl_info);
+    cfgs = adapter->cfgs;
+    nCfgs = adapter->nCfgs;
     for (it = 0; it < nCfgs; ++it) {
-        if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&cfgs[it], RenderTargetFormat)) {
-            if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&cfgs[it], DepthStencilFormat)) {
+        if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, &cfgs[it], rt_format_desc))
+        {
+            if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, &cfgs[it], ds_format_desc))
+            {
                 TRACE_(d3d_caps)("(%p) : Formats matched\n", This);
                 return WINED3D_OK;
@@ -1822,5 +1895,5 @@
     IWineD3DImpl *This = (IWineD3DImpl *)iface;
     const struct GlPixelFormatDesc *glDesc;
-    const StaticPixelFormatDesc *desc;
+    const struct WineD3DAdapter *adapter;
 
     TRACE_(d3d_caps)("(%p)-> (Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x, pQual:%p)\n",
@@ -1847,8 +1920,7 @@
         return WINED3DERR_NOTAVAILABLE;
 
-    desc = getFormatDescEntry(SurfaceFormat, &Adapters[Adapter].gl_info, &glDesc);
-    if(!desc || !glDesc) {
-        return WINED3DERR_INVALIDCALL;
-    }
+    adapter = &This->adapters[Adapter];
+    glDesc = getFormatDescEntry(SurfaceFormat, &adapter->gl_info);
+    if (!glDesc) return WINED3DERR_INVALIDCALL;
 
     if(glDesc->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) {
@@ -1856,11 +1928,11 @@
         const WineD3D_PixelFormat *cfgs;
 
-        cfgs = Adapters[Adapter].cfgs;
-        nCfgs = Adapters[Adapter].nCfgs;
+        cfgs = adapter->cfgs;
+        nCfgs = adapter->nCfgs;
         for(i=0; i<nCfgs; i++) {
             if(cfgs[i].numSamples != MultiSampleType)
                 continue;
 
-            if(!IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&cfgs[i], SurfaceFormat))
+            if (!IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, &cfgs[i], glDesc))
                 continue;
 
@@ -1877,11 +1949,12 @@
         const WineD3D_PixelFormat *cfgs;
 
-        if(!getColorBits(SurfaceFormat, &redSize, &greenSize, &blueSize, &alphaSize, &colorBits)) {
+        if (!getColorBits(glDesc, &redSize, &greenSize, &blueSize, &alphaSize, &colorBits))
+        {
             ERR("Unable to color bits for format %#x, can't check multisampling capability!\n", SurfaceFormat);
             return WINED3DERR_NOTAVAILABLE;
         }
 
-        cfgs = Adapters[Adapter].cfgs;
-        nCfgs = Adapters[Adapter].nCfgs;
+        cfgs = adapter->cfgs;
+        nCfgs = adapter->nCfgs;
         for(i=0; i<nCfgs; i++) {
             if(cfgs[i].numSamples != MultiSampleType)
@@ -1991,23 +2064,22 @@
 
 
-#define GLINFO_LOCATION Adapters[Adapter].gl_info
 /* Check if we support bumpmapping for a format */
-static BOOL CheckBumpMapCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINED3DFORMAT CheckFormat)
+static BOOL CheckBumpMapCapability(struct WineD3DAdapter *adapter,
+        WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc)
 {
     const struct fragment_pipeline *fp;
-    const struct GlPixelFormatDesc *glDesc;
-
-    switch(CheckFormat) {
-        case WINED3DFMT_V8U8:
-        case WINED3DFMT_V16U16:
+
+    switch(format_desc->format)
+    {
+        case WINED3DFMT_R8G8_SNORM:
+        case WINED3DFMT_R16G16_SNORM:
         case WINED3DFMT_L6V5U5:
         case WINED3DFMT_X8L8V8U8:
-        case WINED3DFMT_Q8W8V8U8:
+        case WINED3DFMT_R8G8B8A8_SNORM:
             /* Ask the fixed function pipeline implementation if it can deal
              * with the conversion. If we've got a GL extension giving native
              * support this will be an identity conversion. */
-            getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &glDesc);
-            fp = select_fragment_implementation(Adapter, DeviceType);
-            if (fp->color_fixup_supported(glDesc->color_fixup))
+            fp = select_fragment_implementation(adapter, DeviceType);
+            if (fp->color_fixup_supported(format_desc->color_fixup))
             {
                 TRACE_(d3d_caps)("[OK]\n");
@@ -2024,23 +2096,20 @@
 
 /* Check if the given DisplayFormat + DepthStencilFormat combination is valid for the Adapter */
-static BOOL CheckDepthStencilCapability(UINT Adapter, WINED3DFORMAT DisplayFormat, WINED3DFORMAT DepthStencilFormat)
+static BOOL CheckDepthStencilCapability(struct WineD3DAdapter *adapter,
+        const struct GlPixelFormatDesc *display_format_desc, const struct GlPixelFormatDesc *ds_format_desc)
 {
     int it=0;
-    const struct GlPixelFormatDesc *glDesc;
-    const StaticPixelFormatDesc *desc = getFormatDescEntry(DepthStencilFormat, &GLINFO_LOCATION, &glDesc);
-
-    /* Fail if we weren't able to get a description of the format */
-    if(!desc || !glDesc)
-        return FALSE;
 
     /* Only allow depth/stencil formats */
-    if(!(glDesc->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)))
-        return FALSE;
+    if (!(ds_format_desc->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))) return FALSE;
 
     /* Walk through all WGL pixel formats to find a match */
-    for (it = 0; it < Adapters[Adapter].nCfgs; ++it) {
-        WineD3D_PixelFormat *cfg = &Adapters[Adapter].cfgs[it];
-        if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(cfg, DisplayFormat)) {
-            if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(cfg, DepthStencilFormat)) {
+    for (it = 0; it < adapter->nCfgs; ++it)
+    {
+        WineD3D_PixelFormat *cfg = &adapter->cfgs[it];
+        if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, cfg, display_format_desc))
+        {
+            if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, cfg, ds_format_desc))
+            {
                 return TRUE;
             }
@@ -2051,16 +2120,8 @@
 }
 
-static BOOL CheckFilterCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
+static BOOL CheckFilterCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc)
 {
-    const struct GlPixelFormatDesc *glDesc;
-    const StaticPixelFormatDesc *desc = getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &glDesc);
-
-    /* Fail if we weren't able to get a description of the format */
-    if(!desc || !glDesc)
-        return FALSE;
-
     /* The flags entry of a format contains the filtering capability */
-    if(glDesc->Flags & WINED3DFMT_FLAG_FILTERING)
-        return TRUE;
+    if (format_desc->Flags & WINED3DFMT_FLAG_FILTERING) return TRUE;
 
     return FALSE;
@@ -2068,26 +2129,18 @@
 
 /* Check the render target capabilities of a format */
-static BOOL CheckRenderTargetCapability(WINED3DFORMAT AdapterFormat, WINED3DFORMAT CheckFormat)
+static BOOL CheckRenderTargetCapability(struct WineD3DAdapter *adapter,
+        const struct GlPixelFormatDesc *adapter_format_desc, const struct GlPixelFormatDesc *check_format_desc)
 {
-    UINT Adapter = 0;
-    const struct GlPixelFormatDesc *glDesc;
-    const StaticPixelFormatDesc *desc = getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &glDesc);
-
-    /* Fail if we weren't able to get a description of the format */
-    if(!desc || !glDesc)
-        return FALSE;
-
     /* Filter out non-RT formats */
-    if(!(glDesc->Flags & WINED3DFMT_FLAG_RENDERTARGET))
-        return FALSE;
+    if (!(check_format_desc->Flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE;
 
     if(wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) {
-        WineD3D_PixelFormat *cfgs = Adapters[Adapter].cfgs;
+        WineD3D_PixelFormat *cfgs = adapter->cfgs;
         int it;
         short AdapterRed, AdapterGreen, AdapterBlue, AdapterAlpha, AdapterTotalSize;
         short CheckRed, CheckGreen, CheckBlue, CheckAlpha, CheckTotalSize;
 
-        getColorBits(AdapterFormat, &AdapterRed, &AdapterGreen, &AdapterBlue, &AdapterAlpha, &AdapterTotalSize);
-        getColorBits(CheckFormat, &CheckRed, &CheckGreen, &CheckBlue, &CheckAlpha, &CheckTotalSize);
+        getColorBits(adapter_format_desc, &AdapterRed, &AdapterGreen, &AdapterBlue, &AdapterAlpha, &AdapterTotalSize);
+        getColorBits(check_format_desc, &CheckRed, &CheckGreen, &CheckBlue, &CheckAlpha, &CheckTotalSize);
 
         /* In backbuffer mode the front and backbuffer share the same WGL pixelformat.
@@ -2100,7 +2153,11 @@
         /* Check if there is a WGL pixel format matching the requirements, the format should also be window
          * drawable (not offscreen; e.g. Nvidia offers R5G6B5 for pbuffers even when X is running at 24bit) */
-        for (it = 0; it < Adapters[Adapter].nCfgs; ++it) {
-            if (cfgs[it].windowDrawable && IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&cfgs[it], CheckFormat)) {
-                TRACE_(d3d_caps)("iPixelFormat=%d is compatible with CheckFormat=%s\n", cfgs[it].iPixelFormat, debug_d3dformat(CheckFormat));
+        for (it = 0; it < adapter->nCfgs; ++it)
+        {
+            if (cfgs[it].windowDrawable && IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info,
+                    &cfgs[it], check_format_desc))
+            {
+                TRACE_(d3d_caps)("iPixelFormat=%d is compatible with CheckFormat=%s\n",
+                        cfgs[it].iPixelFormat, debug_d3dformat(check_format_desc->format));
                 return TRUE;
             }
@@ -2108,11 +2165,15 @@
     } else if(wined3d_settings.offscreen_rendering_mode == ORM_PBUFFER) {
         /* We can probably use this function in FBO mode too on some drivers to get some basic indication of the capabilities. */
-        WineD3D_PixelFormat *cfgs = Adapters[Adapter].cfgs;
+        WineD3D_PixelFormat *cfgs = adapter->cfgs;
         int it;
 
         /* Check if there is a WGL pixel format matching the requirements, the pixel format should also be usable with pbuffers */
-        for (it = 0; it < Adapters[Adapter].nCfgs; ++it) {
-            if (cfgs[it].pbufferDrawable && IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&cfgs[it], CheckFormat)) {
-                TRACE_(d3d_caps)("iPixelFormat=%d is compatible with CheckFormat=%s\n", cfgs[it].iPixelFormat, debug_d3dformat(CheckFormat));
+        for (it = 0; it < adapter->nCfgs; ++it)
+        {
+            if (cfgs[it].pbufferDrawable && IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info,
+                    &cfgs[it], check_format_desc))
+            {
+                TRACE_(d3d_caps)("iPixelFormat=%d is compatible with CheckFormat=%s\n",
+                        cfgs[it].iPixelFormat, debug_d3dformat(check_format_desc->format));
                 return TRUE;
             }
@@ -2126,6 +2187,8 @@
 }
 
-static BOOL CheckSrgbReadCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
+static BOOL CheckSrgbReadCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc)
 {
+    const WineD3D_GL_Info *gl_info = &adapter->gl_info;
+
     /* Check for supported sRGB formats (Texture loading and framebuffer) */
     if(!GL_SUPPORT(EXT_TEXTURE_SRGB)) {
@@ -2134,5 +2197,6 @@
     }
 
-    switch (CheckFormat) {
+    switch (format_desc->format)
+    {
         case WINED3DFMT_A8R8G8B8:
         case WINED3DFMT_X8R8G8B8:
@@ -2149,5 +2213,5 @@
 
         default:
-            TRACE_(d3d_caps)("[FAILED] Gamma texture format %s not supported.\n", debug_d3dformat(CheckFormat));
+            TRACE_(d3d_caps)("[FAILED] Gamma texture format %s not supported.\n", debug_d3dformat(format_desc->format));
             return FALSE;
     }
@@ -2155,13 +2219,15 @@
 }
 
-static BOOL CheckSrgbWriteCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINED3DFORMAT CheckFormat)
+static BOOL CheckSrgbWriteCapability(struct WineD3DAdapter *adapter,
+        WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc)
 {
     /* Only offer SRGB writing on X8R8G8B8/A8R8G8B8 when we use ARB or GLSL shaders as we are
      * doing the color fixup in shaders.
      * Note Windows drivers (at least on the Geforce 8800) also offer this on R5G6B5. */
-    if((CheckFormat == WINED3DFMT_X8R8G8B8) || (CheckFormat == WINED3DFMT_A8R8G8B8)) {
+    if ((format_desc->format == WINED3DFMT_X8R8G8B8) || (format_desc->format == WINED3DFMT_A8R8G8B8))
+    {
         int vs_selected_mode;
         int ps_selected_mode;
-        select_shader_mode(&GLINFO_LOCATION, DeviceType, &ps_selected_mode, &vs_selected_mode);
+        select_shader_mode(&adapter->gl_info, DeviceType, &ps_selected_mode, &vs_selected_mode);
 
         if((ps_selected_mode == SHADER_ARB) || (ps_selected_mode == SHADER_GLSL)) {
@@ -2171,26 +2237,20 @@
     }
 
-    TRACE_(d3d_caps)("[FAILED] - no SRGB writing support on format=%s\n", debug_d3dformat(CheckFormat));
+    TRACE_(d3d_caps)("[FAILED] - no SRGB writing support on format=%s\n", debug_d3dformat(format_desc->format));
     return FALSE;
 }
 
 /* Check if a format support blending in combination with pixel shaders */
-static BOOL CheckPostPixelShaderBlendingCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
+static BOOL CheckPostPixelShaderBlendingCapability(struct WineD3DAdapter *adapter,
+        const struct GlPixelFormatDesc *format_desc)
 {
-    const struct GlPixelFormatDesc *glDesc;
-    const StaticPixelFormatDesc *desc = getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &glDesc);
-
-    /* Fail if we weren't able to get a description of the format */
-    if(!desc || !glDesc)
-        return FALSE;
-
     /* The flags entry of a format contains the post pixel shader blending capability */
-    if(glDesc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)
-        return TRUE;
+    if (format_desc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) return TRUE;
 
     return FALSE;
 }
 
-static BOOL CheckWrapAndMipCapability(UINT Adapter, WINED3DFORMAT CheckFormat) {
+static BOOL CheckWrapAndMipCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc)
+{
     /* OpenGL supports mipmapping on all formats basically. Wrapping is unsupported,
      * but we have to report mipmapping so we cannot reject this flag. Tests show that
@@ -2206,12 +2266,13 @@
 
 /* Check if a texture format is supported on the given adapter */
-static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINED3DFORMAT CheckFormat)
+static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter,
+        WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc)
 {
+    const WineD3D_GL_Info *gl_info = &adapter->gl_info;
     const shader_backend_t *shader_backend;
     const struct fragment_pipeline *fp;
-    const struct GlPixelFormatDesc *glDesc;
-
-    switch (CheckFormat) {
-
+
+    switch (format_desc->format)
+    {
         /*****
          *  supported: RGB(A) formats
@@ -2224,11 +2285,11 @@
         case WINED3DFMT_A1R5G5B5:
         case WINED3DFMT_A4R4G4B4:
-        case WINED3DFMT_A8:
+        case WINED3DFMT_A8_UNORM:
         case WINED3DFMT_X4R4G4B4:
-        case WINED3DFMT_A8B8G8R8:
+        case WINED3DFMT_R8G8B8A8_UNORM:
         case WINED3DFMT_X8B8G8R8:
         case WINED3DFMT_A2R10G10B10:
-        case WINED3DFMT_A2B10G10R10:
-        case WINED3DFMT_G16R16:
+        case WINED3DFMT_R10G10B10A2_UNORM:
+        case WINED3DFMT_R16G16_UNORM:
             TRACE_(d3d_caps)("[OK]\n");
             return TRUE;
@@ -2266,5 +2327,5 @@
          */
         case WINED3DFMT_D16_LOCKABLE:
-        case WINED3DFMT_D16:
+        case WINED3DFMT_D16_UNORM:
         case WINED3DFMT_D15S1:
         case WINED3DFMT_D24X8:
@@ -2280,15 +2341,14 @@
          *  GL_NV_texture_shader). Emulated by shaders
          */
-        case WINED3DFMT_V8U8:
+        case WINED3DFMT_R8G8_SNORM:
         case WINED3DFMT_X8L8V8U8:
         case WINED3DFMT_L6V5U5:
-        case WINED3DFMT_Q8W8V8U8:
-        case WINED3DFMT_V16U16:
+        case WINED3DFMT_R8G8B8A8_SNORM:
+        case WINED3DFMT_R16G16_SNORM:
             /* Ask the shader backend if it can deal with the conversion. If
              * we've got a GL extension giving native support this will be an
              * identity conversion. */
-            getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &glDesc);
-            shader_backend = select_shader_backend(Adapter, DeviceType);
-            if (shader_backend->shader_color_fixup_supported(glDesc->color_fixup))
+            shader_backend = select_shader_backend(adapter, DeviceType);
+            if (shader_backend->shader_color_fixup_supported(format_desc->color_fixup))
             {
                 TRACE_(d3d_caps)("[OK]\n");
@@ -2315,7 +2375,7 @@
          */
         case WINED3DFMT_VERTEXDATA:
-        case WINED3DFMT_INDEX16:
-        case WINED3DFMT_INDEX32:
-        case WINED3DFMT_Q16W16V16U16:
+        case WINED3DFMT_R16_UINT:
+        case WINED3DFMT_R32_UINT:
+        case WINED3DFMT_R16G16B16A16_SNORM:
         case WINED3DFMT_A2W10V10U10:
         case WINED3DFMT_W11V11U10:
@@ -2344,5 +2404,5 @@
 
             /* Not supported */
-        case WINED3DFMT_A16B16G16R16:
+        case WINED3DFMT_R16G16B16A16_UNORM:
         case WINED3DFMT_A8R3G3B2:
             TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
@@ -2350,6 +2410,7 @@
 
             /* Floating point formats */
-        case WINED3DFMT_R16F:
-        case WINED3DFMT_A16B16G16R16F:
+        case WINED3DFMT_R16_FLOAT:
+        case WINED3DFMT_R16G16_FLOAT:
+        case WINED3DFMT_R16G16B16A16_FLOAT:
             if(GL_SUPPORT(ARB_TEXTURE_FLOAT) && GL_SUPPORT(ARB_HALF_FLOAT_PIXEL)) {
                 TRACE_(d3d_caps)("[OK]\n");
@@ -2359,15 +2420,11 @@
             return FALSE;
 
-        case WINED3DFMT_R32F:
-        case WINED3DFMT_A32B32G32R32F:
+        case WINED3DFMT_R32_FLOAT:
+        case WINED3DFMT_R32G32_FLOAT:
+        case WINED3DFMT_R32G32B32A32_FLOAT:
             if (GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
                 TRACE_(d3d_caps)("[OK]\n");
                 return TRUE;
             }
-            TRACE_(d3d_caps)("[FAILED]\n");
-            return FALSE;
-
-        case WINED3DFMT_G16R16F:
-        case WINED3DFMT_G32R32F:
             TRACE_(d3d_caps)("[FAILED]\n");
             return FALSE;
@@ -2402,9 +2459,8 @@
         case WINED3DFMT_ATI2N:
             if(GL_SUPPORT(ATI_TEXTURE_COMPRESSION_3DC) || GL_SUPPORT(EXT_TEXTURE_COMPRESSION_RGTC)) {
-                getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &glDesc);
-                shader_backend = select_shader_backend(Adapter, DeviceType);
-                fp = select_fragment_implementation(Adapter, DeviceType);
-                if (shader_backend->shader_color_fixup_supported(glDesc->color_fixup)
-                        && fp->color_fixup_supported(glDesc->color_fixup))
+                shader_backend = select_shader_backend(adapter, DeviceType);
+                fp = select_fragment_implementation(adapter, DeviceType);
+                if (shader_backend->shader_color_fixup_supported(format_desc->color_fixup)
+                        && fp->color_fixup_supported(format_desc->color_fixup))
                 {
                     TRACE_(d3d_caps)("[OK]\n");
@@ -2433,5 +2489,5 @@
 
         default:
-            ERR("Unhandled format=%s\n", debug_d3dformat(CheckFormat));
+            ERR("Unhandled format=%s\n", debug_d3dformat(format_desc->format));
             break;
     }
@@ -2439,10 +2495,12 @@
 }
 
-static BOOL CheckSurfaceCapability(UINT Adapter, WINED3DFORMAT AdapterFormat, WINED3DDEVTYPE DeviceType, WINED3DFORMAT CheckFormat, WINED3DSURFTYPE SurfaceType) {
-    const struct GlPixelFormatDesc *format_desc;
+static BOOL CheckSurfaceCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *adapter_format_desc,
+        WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *check_format_desc, WINED3DSURFTYPE SurfaceType)
+{
     const struct blit_shader *blitter;
 
     if(SurfaceType == SURFACE_GDI) {
-        switch(CheckFormat) {
+        switch(check_format_desc->format)
+        {
             case WINED3DFMT_R8G8B8:
             case WINED3DFMT_A8R8G8B8:
@@ -2453,13 +2511,13 @@
             case WINED3DFMT_A4R4G4B4:
             case WINED3DFMT_R3G3B2:
-            case WINED3DFMT_A8:
+            case WINED3DFMT_A8_UNORM:
             case WINED3DFMT_A8R3G3B2:
             case WINED3DFMT_X4R4G4B4:
-            case WINED3DFMT_A2B10G10R10:
-            case WINED3DFMT_A8B8G8R8:
+            case WINED3DFMT_R10G10B10A2_UNORM:
+            case WINED3DFMT_R8G8B8A8_UNORM:
             case WINED3DFMT_X8B8G8R8:
-            case WINED3DFMT_G16R16:
+            case WINED3DFMT_R16G16_UNORM:
             case WINED3DFMT_A2R10G10B10:
-            case WINED3DFMT_A16B16G16R16:
+            case WINED3DFMT_R16G16B16A16_UNORM:
             case WINED3DFMT_P8:
                 TRACE_(d3d_caps)("[OK]\n");
@@ -2472,12 +2530,11 @@
 
     /* All format that are supported for textures are supported for surfaces as well */
-    if(CheckTextureCapability(Adapter, DeviceType, CheckFormat)) return TRUE;
+    if (CheckTextureCapability(adapter, DeviceType, check_format_desc)) return TRUE;
     /* All depth stencil formats are supported on surfaces */
-    if(CheckDepthStencilCapability(Adapter, AdapterFormat, CheckFormat)) return TRUE;
+    if (CheckDepthStencilCapability(adapter, adapter_format_desc, check_format_desc)) return TRUE;
 
     /* If opengl can't process the format natively, the blitter may be able to convert it */
-    getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &format_desc);
-    blitter = select_blit_implementation(Adapter, DeviceType);
-    if (blitter->color_fixup_supported(format_desc->color_fixup))
+    blitter = select_blit_implementation(adapter, DeviceType);
+    if (blitter->color_fixup_supported(check_format_desc->color_fixup))
     {
         TRACE_(d3d_caps)("[OK]\n");
@@ -2490,6 +2547,8 @@
 }
 
-static BOOL CheckVertexTextureCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
+static BOOL CheckVertexTextureCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc)
 {
+    const WineD3D_GL_Info *gl_info = &adapter->gl_info;
+
     if (!GL_LIMITS(vertex_samplers)) {
         TRACE_(d3d_caps)("[FAILED]\n");
@@ -2497,6 +2556,7 @@
     }
 
-    switch (CheckFormat) {
-        case WINED3DFMT_A32B32G32R32F:
+    switch (format_desc->format)
+    {
+        case WINED3DFMT_R32G32B32A32_FLOAT:
             if (!GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
                 TRACE_(d3d_caps)("[FAILED]\n");
@@ -2517,4 +2577,8 @@
         WINED3DSURFTYPE SurfaceType) {
     IWineD3DImpl *This = (IWineD3DImpl *)iface;
+    struct WineD3DAdapter *adapter = &This->adapters[Adapter];
+    const WineD3D_GL_Info *gl_info = &adapter->gl_info;
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(CheckFormat, gl_info);
+    const struct GlPixelFormatDesc *adapter_format_desc = getFormatDescEntry(AdapterFormat, gl_info);
     DWORD UsageCaps = 0;
 
@@ -2550,5 +2614,6 @@
         if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
             /* Check if the texture format is around */
-            if(CheckTextureCapability(Adapter, DeviceType, CheckFormat)) {
+            if (CheckTextureCapability(adapter, DeviceType, format_desc))
+            {
                 if(Usage & WINED3DUSAGE_AUTOGENMIPMAP) {
                     /* Check for automatic mipmap generation support */
@@ -2566,5 +2631,6 @@
 
                 if(Usage & WINED3DUSAGE_RENDERTARGET) {
-                    if(CheckRenderTargetCapability(AdapterFormat, CheckFormat)) {
+                    if(CheckRenderTargetCapability(adapter, adapter_format_desc, format_desc))
+                    {
                         UsageCaps |= WINED3DUSAGE_RENDERTARGET;
                     } else {
@@ -2580,5 +2646,6 @@
                 /* Check QUERY_FILTER support */
                 if(Usage & WINED3DUSAGE_QUERY_FILTER) {
-                    if(CheckFilterCapability(Adapter, CheckFormat)) {
+                    if (CheckFilterCapability(adapter, format_desc))
+                    {
                         UsageCaps |= WINED3DUSAGE_QUERY_FILTER;
                     } else {
@@ -2590,5 +2657,6 @@
                 /* Check QUERY_POSTPIXELSHADER_BLENDING support */
                 if(Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) {
-                    if(CheckPostPixelShaderBlendingCapability(Adapter, CheckFormat)) {
+                    if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
+                    {
                         UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING;
                     } else {
@@ -2600,5 +2668,6 @@
                 /* Check QUERY_SRGBREAD support */
                 if(Usage & WINED3DUSAGE_QUERY_SRGBREAD) {
-                    if(CheckSrgbReadCapability(Adapter, CheckFormat)) {
+                    if (CheckSrgbReadCapability(adapter, format_desc))
+                    {
                         UsageCaps |= WINED3DUSAGE_QUERY_SRGBREAD;
                     } else {
@@ -2610,5 +2679,6 @@
                 /* Check QUERY_SRGBWRITE support */
                 if(Usage & WINED3DUSAGE_QUERY_SRGBWRITE) {
-                    if(CheckSrgbWriteCapability(Adapter, DeviceType, CheckFormat)) {
+                    if (CheckSrgbWriteCapability(adapter, DeviceType, format_desc))
+                    {
                         UsageCaps |= WINED3DUSAGE_QUERY_SRGBWRITE;
                     } else {
@@ -2620,5 +2690,6 @@
                 /* Check QUERY_VERTEXTEXTURE support */
                 if(Usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) {
-                    if(CheckVertexTextureCapability(Adapter, CheckFormat)) {
+                    if (CheckVertexTextureCapability(adapter, format_desc))
+                    {
                         UsageCaps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE;
                     } else {
@@ -2630,5 +2701,6 @@
                 /* Check QUERY_WRAPANDMIP support */
                 if(Usage & WINED3DUSAGE_QUERY_WRAPANDMIP) {
-                    if(CheckWrapAndMipCapability(Adapter, CheckFormat)) {
+                    if (CheckWrapAndMipCapability(adapter, format_desc))
+                    {
                         UsageCaps |= WINED3DUSAGE_QUERY_WRAPANDMIP;
                     } else {
@@ -2652,7 +2724,9 @@
          */
 
-        if(CheckSurfaceCapability(Adapter, AdapterFormat, DeviceType, CheckFormat, SurfaceType)) {
+        if (CheckSurfaceCapability(adapter, adapter_format_desc, DeviceType, format_desc, SurfaceType))
+        {
             if(Usage & WINED3DUSAGE_DEPTHSTENCIL) {
-                if(CheckDepthStencilCapability(Adapter, AdapterFormat, CheckFormat)) {
+                if (CheckDepthStencilCapability(adapter, adapter_format_desc, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL;
                 } else {
@@ -2663,5 +2737,6 @@
 
             if(Usage & WINED3DUSAGE_RENDERTARGET) {
-                if(CheckRenderTargetCapability(AdapterFormat, CheckFormat)) {
+                if (CheckRenderTargetCapability(adapter, adapter_format_desc, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_RENDERTARGET;
                 } else {
@@ -2673,5 +2748,6 @@
             /* Check QUERY_POSTPIXELSHADER_BLENDING support */
             if(Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) {
-                if(CheckPostPixelShaderBlendingCapability(Adapter, CheckFormat)) {
+                if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING;
                 } else {
@@ -2704,5 +2780,6 @@
 
         /* Check if the texture format is around */
-        if(CheckTextureCapability(Adapter, DeviceType, CheckFormat)) {
+        if (CheckTextureCapability(adapter, DeviceType, format_desc))
+        {
             if(Usage & WINED3DUSAGE_AUTOGENMIPMAP) {
                 /* Check for automatic mipmap generation support */
@@ -2720,5 +2797,6 @@
 
             if(Usage & WINED3DUSAGE_RENDERTARGET) {
-                if(CheckRenderTargetCapability(AdapterFormat, CheckFormat)) {
+                if (CheckRenderTargetCapability(adapter, adapter_format_desc, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_RENDERTARGET;
                 } else {
@@ -2734,5 +2812,6 @@
             /* Check QUERY_FILTER support */
             if(Usage & WINED3DUSAGE_QUERY_FILTER) {
-                if(CheckFilterCapability(Adapter, CheckFormat)) {
+                if (CheckFilterCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_FILTER;
                 } else {
@@ -2744,5 +2823,6 @@
             /* Check QUERY_LEGACYBUMPMAP support */
             if(Usage & WINED3DUSAGE_QUERY_LEGACYBUMPMAP) {
-                if(CheckBumpMapCapability(Adapter, DeviceType, CheckFormat)) {
+                if (CheckBumpMapCapability(adapter, DeviceType, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_LEGACYBUMPMAP;
                 } else {
@@ -2754,5 +2834,6 @@
             /* Check QUERY_POSTPIXELSHADER_BLENDING support */
             if(Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) {
-                if(CheckPostPixelShaderBlendingCapability(Adapter, CheckFormat)) {
+                if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING;
                 } else {
@@ -2764,5 +2845,6 @@
             /* Check QUERY_SRGBREAD support */
             if(Usage & WINED3DUSAGE_QUERY_SRGBREAD) {
-                if(CheckSrgbReadCapability(Adapter, CheckFormat)) {
+                if (CheckSrgbReadCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_SRGBREAD;
                 } else {
@@ -2774,5 +2856,6 @@
             /* Check QUERY_SRGBWRITE support */
             if(Usage & WINED3DUSAGE_QUERY_SRGBWRITE) {
-                if(CheckSrgbWriteCapability(Adapter, DeviceType, CheckFormat)) {
+                if (CheckSrgbWriteCapability(adapter, DeviceType, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_SRGBWRITE;
                 } else {
@@ -2784,5 +2867,6 @@
             /* Check QUERY_VERTEXTEXTURE support */
             if(Usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) {
-                if(CheckVertexTextureCapability(Adapter, CheckFormat)) {
+                if (CheckVertexTextureCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE;
                 } else {
@@ -2794,5 +2878,6 @@
             /* Check QUERY_WRAPANDMIP support */
             if(Usage & WINED3DUSAGE_QUERY_WRAPANDMIP) {
-                if(CheckWrapAndMipCapability(Adapter, CheckFormat)) {
+                if (CheckWrapAndMipCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_WRAPANDMIP;
                 } else {
@@ -2803,5 +2888,6 @@
 
             if(Usage & WINED3DUSAGE_DEPTHSTENCIL) {
-                if(CheckDepthStencilCapability(Adapter, AdapterFormat, CheckFormat)) {
+                if (CheckDepthStencilCapability(adapter, adapter_format_desc, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL;
                 } else {
@@ -2832,5 +2918,6 @@
         /* Check volume texture and volume usage caps */
         if(GL_SUPPORT(EXT_TEXTURE3D)) {
-            if(CheckTextureCapability(Adapter, DeviceType, CheckFormat) == FALSE) {
+            if (!CheckTextureCapability(adapter, DeviceType, format_desc))
+            {
                 TRACE_(d3d_caps)("[FAILED] - Format not supported\n");
                 return WINED3DERR_NOTAVAILABLE;
@@ -2847,5 +2934,6 @@
             /* Check QUERY_FILTER support */
             if(Usage & WINED3DUSAGE_QUERY_FILTER) {
-                if(CheckFilterCapability(Adapter, CheckFormat)) {
+                if (CheckFilterCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_FILTER;
                 } else {
@@ -2857,5 +2945,6 @@
             /* Check QUERY_POSTPIXELSHADER_BLENDING support */
             if(Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) {
-                if(CheckPostPixelShaderBlendingCapability(Adapter, CheckFormat)) {
+                if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING;
                 } else {
@@ -2867,5 +2956,6 @@
             /* Check QUERY_SRGBREAD support */
             if(Usage & WINED3DUSAGE_QUERY_SRGBREAD) {
-                if(CheckSrgbReadCapability(Adapter, CheckFormat)) {
+                if (CheckSrgbReadCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_SRGBREAD;
                 } else {
@@ -2877,5 +2967,6 @@
             /* Check QUERY_SRGBWRITE support */
             if(Usage & WINED3DUSAGE_QUERY_SRGBWRITE) {
-                if(CheckSrgbWriteCapability(Adapter, DeviceType, CheckFormat)) {
+                if (CheckSrgbWriteCapability(adapter, DeviceType, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_SRGBWRITE;
                 } else {
@@ -2887,5 +2978,6 @@
             /* Check QUERY_VERTEXTEXTURE support */
             if(Usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) {
-                if(CheckVertexTextureCapability(Adapter, CheckFormat)) {
+                if (CheckVertexTextureCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE;
                 } else {
@@ -2897,5 +2989,6 @@
             /* Check QUERY_WRAPANDMIP support */
             if(Usage & WINED3DUSAGE_QUERY_WRAPANDMIP) {
-                if(CheckWrapAndMipCapability(Adapter, CheckFormat)) {
+                if (CheckWrapAndMipCapability(adapter, format_desc))
+                {
                     UsageCaps |= WINED3DUSAGE_QUERY_WRAPANDMIP;
                 } else {
@@ -2918,14 +3011,14 @@
             case WINED3DFMT_P8:
             case WINED3DFMT_A4L4:
-            case WINED3DFMT_R32F:
-            case WINED3DFMT_R16F:
+            case WINED3DFMT_R32_FLOAT:
+            case WINED3DFMT_R16_FLOAT:
             case WINED3DFMT_X8L8V8U8:
             case WINED3DFMT_L6V5U5:
-            case WINED3DFMT_G16R16:
+            case WINED3DFMT_R16G16_UNORM:
                 TRACE_(d3d_caps)("[FAILED] - No converted formats on volumes\n");
                 return WINED3DERR_NOTAVAILABLE;
 
-            case WINED3DFMT_Q8W8V8U8:
-            case WINED3DFMT_V16U16:
+            case WINED3DFMT_R8G8B8A8_SNORM:
+            case WINED3DFMT_R16G16_SNORM:
             if(!GL_SUPPORT(NV_TEXTURE_SHADER)) {
                 TRACE_(d3d_caps)("[FAILED] - No converted formats on volumes\n");
@@ -2934,5 +3027,5 @@
             break;
 
-            case WINED3DFMT_V8U8:
+            case WINED3DFMT_R8G8_SNORM:
             if(!GL_SUPPORT(NV_TEXTURE_SHADER)) {
                 TRACE_(d3d_caps)("[FAILED] - No converted formats on volumes\n");
@@ -2958,5 +3051,5 @@
                 break;
         }
-    } else if((RType == WINED3DRTYPE_INDEXBUFFER) || (RType == WINED3DRTYPE_VERTEXBUFFER)){
+    } else if(RType == WINED3DRTYPE_BUFFER){
         /* For instance vertexbuffer/indexbuffer aren't supported yet because no Windows drivers seem to offer it */
         TRACE_(d3d_caps)("Unhandled resource type D3DRTYPE_INDEXBUFFER / D3DRTYPE_VERTEXBUFFER\n");
@@ -3002,10 +3095,11 @@
 }
 
-static const shader_backend_t *select_shader_backend(UINT Adapter, WINED3DDEVTYPE DeviceType) {
+static const shader_backend_t *select_shader_backend(struct WineD3DAdapter *adapter, WINED3DDEVTYPE DeviceType)
+{
     const shader_backend_t *ret;
     int vs_selected_mode;
     int ps_selected_mode;
 
-    select_shader_mode(&GLINFO_LOCATION, DeviceType, &ps_selected_mode, &vs_selected_mode);
+    select_shader_mode(&adapter->gl_info, DeviceType, &ps_selected_mode, &vs_selected_mode);
     if (vs_selected_mode == SHADER_GLSL || ps_selected_mode == SHADER_GLSL) {
         ret = &glsl_shader_backend;
@@ -3018,9 +3112,12 @@
 }
 
-static const struct fragment_pipeline *select_fragment_implementation(UINT Adapter, WINED3DDEVTYPE DeviceType) {
+static const struct fragment_pipeline *select_fragment_implementation(struct WineD3DAdapter *adapter,
+        WINED3DDEVTYPE DeviceType)
+{
+    const WineD3D_GL_Info *gl_info = &adapter->gl_info;
     int vs_selected_mode;
     int ps_selected_mode;
 
-    select_shader_mode(&GLINFO_LOCATION, DeviceType, &ps_selected_mode, &vs_selected_mode);
+    select_shader_mode(&adapter->gl_info, DeviceType, &ps_selected_mode, &vs_selected_mode);
     if((ps_selected_mode == SHADER_ARB || ps_selected_mode == SHADER_GLSL) && GL_SUPPORT(ARB_FRAGMENT_PROGRAM)) {
         return &arbfp_fragment_pipeline;
@@ -3036,9 +3133,11 @@
 }
 
-static const struct blit_shader *select_blit_implementation(UINT Adapter, WINED3DDEVTYPE DeviceType) {
+static const struct blit_shader *select_blit_implementation(struct WineD3DAdapter *adapter, WINED3DDEVTYPE DeviceType)
+{
+    const WineD3D_GL_Info *gl_info = &adapter->gl_info;
     int vs_selected_mode;
     int ps_selected_mode;
 
-    select_shader_mode(&GLINFO_LOCATION, DeviceType, &ps_selected_mode, &vs_selected_mode);
+    select_shader_mode(&adapter->gl_info, DeviceType, &ps_selected_mode, &vs_selected_mode);
     if((ps_selected_mode == SHADER_ARB || ps_selected_mode == SHADER_GLSL) && GL_SUPPORT(ARB_FRAGMENT_PROGRAM)) {
         return &arbfp_blit;
@@ -3054,4 +3153,6 @@
 
     IWineD3DImpl    *This = (IWineD3DImpl *)iface;
+    struct WineD3DAdapter *adapter = &This->adapters[Adapter];
+    const WineD3D_GL_Info *gl_info = &adapter->gl_info;
     int vs_selected_mode;
     int ps_selected_mode;
@@ -3068,9 +3169,9 @@
     }
 
-    select_shader_mode(&Adapters[Adapter].gl_info, DeviceType, &ps_selected_mode, &vs_selected_mode);
+    select_shader_mode(&adapter->gl_info, DeviceType, &ps_selected_mode, &vs_selected_mode);
 
     /* This function should *not* be modifying GL caps
      * TODO: move the functionality where it belongs */
-    select_shader_max_constants(ps_selected_mode, vs_selected_mode, &Adapters[Adapter].gl_info);
+    select_shader_max_constants(ps_selected_mode, vs_selected_mode, &adapter->gl_info);
 
     /* ------------------------------------------------
@@ -3155,9 +3256,9 @@
     }
                         /* FIXME Add:
-			   WINED3DPRASTERCAPS_COLORPERSPECTIVE
-			   WINED3DPRASTERCAPS_STRETCHBLTMULTISAMPLE
-			   WINED3DPRASTERCAPS_ANTIALIASEDGES
-			   WINED3DPRASTERCAPS_ZBUFFERLESSHSR
-			   WINED3DPRASTERCAPS_WBUFFER */
+                           WINED3DPRASTERCAPS_COLORPERSPECTIVE
+                           WINED3DPRASTERCAPS_STRETCHBLTMULTISAMPLE
+                           WINED3DPRASTERCAPS_ANTIALIASEDGES
+                           WINED3DPRASTERCAPS_ZBUFFERLESSHSR
+                           WINED3DPRASTERCAPS_WBUFFER */
 
     pCaps->ZCmpCaps = WINED3DPCMPCAPS_ALWAYS       |
@@ -3423,10 +3524,10 @@
 
     memset(&shader_caps, 0, sizeof(shader_caps));
-    shader_backend = select_shader_backend(Adapter, DeviceType);
-    shader_backend->shader_get_caps(DeviceType, &GLINFO_LOCATION, &shader_caps);
+    shader_backend = select_shader_backend(adapter, DeviceType);
+    shader_backend->shader_get_caps(DeviceType, &adapter->gl_info, &shader_caps);
 
     memset(&fragment_caps, 0, sizeof(fragment_caps));
-    frag_pipeline = select_fragment_implementation(Adapter, DeviceType);
-    frag_pipeline->get_caps(DeviceType, &GLINFO_LOCATION, &fragment_caps);
+    frag_pipeline = select_fragment_implementation(adapter, DeviceType);
+    frag_pipeline->get_caps(DeviceType, &adapter->gl_info, &fragment_caps);
 
     /* Add shader misc caps. Only some of them belong to the shader parts of the pipeline */
@@ -3474,13 +3575,13 @@
         pCaps->VS20Caps.Caps                     = WINED3DVS20CAPS_PREDICATION;
         pCaps->VS20Caps.DynamicFlowControlDepth  = WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* VS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */
-        pCaps->VS20Caps.NumTemps                 = max(32, GLINFO_LOCATION.vs_arb_max_temps);
+        pCaps->VS20Caps.NumTemps                 = max(32, adapter->gl_info.vs_arb_max_temps);
         pCaps->VS20Caps.StaticFlowControlDepth   = WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH ; /* level of nesting in loops / if-statements; VS 3.0 requires MAX (4) */
 
         pCaps->MaxVShaderInstructionsExecuted    = 65535; /* VS 3.0 needs at least 65535, some cards even use 2^32-1 */
-        pCaps->MaxVertexShader30InstructionSlots = max(512, GLINFO_LOCATION.vs_arb_max_instructions);
+        pCaps->MaxVertexShader30InstructionSlots = max(512, adapter->gl_info.vs_arb_max_instructions);
     } else if(pCaps->VertexShaderVersion == WINED3DVS_VERSION(2,0)) {
         pCaps->VS20Caps.Caps                     = 0;
         pCaps->VS20Caps.DynamicFlowControlDepth  = WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH;
-        pCaps->VS20Caps.NumTemps                 = max(12, GLINFO_LOCATION.vs_arb_max_temps);
+        pCaps->VS20Caps.NumTemps                 = max(12, adapter->gl_info.vs_arb_max_temps);
         pCaps->VS20Caps.StaticFlowControlDepth   = 1;
 
@@ -3508,15 +3609,15 @@
                 WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT;
         pCaps->PS20Caps.DynamicFlowControlDepth  = WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */
-        pCaps->PS20Caps.NumTemps                 = max(32, GLINFO_LOCATION.ps_arb_max_temps);
+        pCaps->PS20Caps.NumTemps                 = max(32, adapter->gl_info.ps_arb_max_temps);
         pCaps->PS20Caps.StaticFlowControlDepth   = WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_STATICFLOWCONTROLDEPTH (4) */
         pCaps->PS20Caps.NumInstructionSlots      = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS; /* PS 3.0 requires MAX_NUMINSTRUCTIONSLOTS (512) */
 
         pCaps->MaxPShaderInstructionsExecuted    = 65535;
-        pCaps->MaxPixelShader30InstructionSlots  = max(WINED3DMIN30SHADERINSTRUCTIONS, GLINFO_LOCATION.ps_arb_max_instructions);
+        pCaps->MaxPixelShader30InstructionSlots  = max(WINED3DMIN30SHADERINSTRUCTIONS, adapter->gl_info.ps_arb_max_instructions);
     } else if(pCaps->PixelShaderVersion == WINED3DPS_VERSION(2,0)) {
         /* Below we assume PS2.0 specs, not extended 2.0a(GeforceFX)/2.0b(Radeon R3xx) ones */
         pCaps->PS20Caps.Caps                     = 0;
         pCaps->PS20Caps.DynamicFlowControlDepth  = 0; /* WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0 */
-        pCaps->PS20Caps.NumTemps                 = max(12, GLINFO_LOCATION.ps_arb_max_temps);
+        pCaps->PS20Caps.NumTemps                 = max(12, adapter->gl_info.ps_arb_max_temps);
         pCaps->PS20Caps.StaticFlowControlDepth   = WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH; /* Minimum: 1 */
         pCaps->PS20Caps.NumInstructionSlots      = WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS; /* Minimum number (64 ALU + 32 Texture), a GeforceFX uses 512 */
@@ -3547,5 +3648,5 @@
                            WINED3DDTCAPS_SHORT2N   |
                            WINED3DDTCAPS_SHORT4N;
-        if (GL_SUPPORT(NV_HALF_FLOAT)) {
+        if (GL_SUPPORT(ARB_HALF_FLOAT_VERTEX)) {
             pCaps->DeclTypes |= WINED3DDTCAPS_FLOAT16_2 |
                                 WINED3DDTCAPS_FLOAT16_4;
@@ -3612,5 +3713,6 @@
 
     /* Set D3D caps if OpenGL is available. */
-    if(Adapters[Adapter].opengl) {
+    if (adapter->opengl)
+    {
         pCaps->DirectDrawCaps.ddsCaps |=WINEDDSCAPS_3DDEVICE                |
                                         WINEDDSCAPS_MIPMAP                  |
@@ -3625,14 +3727,17 @@
 /* Note due to structure differences between dx8 and dx9 D3DPRESENT_PARAMETERS,
    and fields being inserted in the middle, a new structure is used in place    */
-static HRESULT  WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType, HWND hFocusWindow,
-                                           DWORD BehaviourFlags, IWineD3DDevice** ppReturnedDeviceInterface,
-                                           IUnknown *parent) {
-
+static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
+        WINED3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviourFlags, IUnknown *parent,
+        IWineD3DDeviceParent *device_parent, IWineD3DDevice **ppReturnedDeviceInterface)
+{
     IWineD3DDeviceImpl *object  = NULL;
     IWineD3DImpl       *This    = (IWineD3DImpl *)iface;
+    struct WineD3DAdapter *adapter = &This->adapters[Adapter];
     WINED3DDISPLAYMODE  mode;
     const struct fragment_pipeline *frag_pipeline = NULL;
     int i;
     struct fragment_caps ffp_caps;
+    struct shader_caps shader_caps;
+    HRESULT hr;
 
     /* Validate the adapter number. If no adapters are available(no GL), ignore the adapter
@@ -3655,7 +3760,8 @@
     object->ref     = 1;
     object->wineD3D = iface;
-    object->adapter = numAdapters ? &Adapters[Adapter] : NULL;
+    object->adapter = This->adapter_count ? adapter : NULL;
     IWineD3D_AddRef(object->wineD3D);
     object->parent  = parent;
+    object->device_parent = device_parent;
     list_init(&object->resources);
     list_init(&object->shaders);
@@ -3684,25 +3790,30 @@
     object->devType                      = DeviceType;
 
-    select_shader_mode(&GLINFO_LOCATION, DeviceType, &object->ps_selected_mode, &object->vs_selected_mode);
-    object->shader_backend = select_shader_backend(Adapter, DeviceType);
+    select_shader_mode(&adapter->gl_info, DeviceType,
+            &object->ps_selected_mode, &object->vs_selected_mode);
+    object->shader_backend = select_shader_backend(adapter, DeviceType);
+
+    memset(&shader_caps, 0, sizeof(shader_caps));
+    object->shader_backend->shader_get_caps(DeviceType, &adapter->gl_info, &shader_caps);
+    object->d3d_vshader_constantF = shader_caps.MaxVertexShaderConst;
+    object->d3d_pshader_constantF = shader_caps.MaxPixelShaderConst;
 
     memset(&ffp_caps, 0, sizeof(ffp_caps));
-    frag_pipeline = select_fragment_implementation(Adapter, DeviceType);
+    frag_pipeline = select_fragment_implementation(adapter, DeviceType);
     object->frag_pipe = frag_pipeline;
-    frag_pipeline->get_caps(DeviceType, &GLINFO_LOCATION, &ffp_caps);
+    frag_pipeline->get_caps(DeviceType, &adapter->gl_info, &ffp_caps);
     object->max_ffp_textures = ffp_caps.MaxSimultaneousTextures;
     object->max_ffp_texture_stages = ffp_caps.MaxTextureBlendStages;
-    compile_state_table(object->StateTable, object->multistate_funcs, &GLINFO_LOCATION,
+    hr = compile_state_table(object->StateTable, object->multistate_funcs, &adapter->gl_info,
                         ffp_vertexstate_template, frag_pipeline, misc_state_template);
 
-    object->blitter = select_blit_implementation(Adapter, DeviceType);
-
-    /* Prefer the vtable with functions optimized for single dirtifyable objects if the shader
-     * model can deal with that. It is essentially the same, just with adjusted
-     * Set*ShaderConstantF implementations
-     */
-    if(object->shader_backend->shader_dirtifyable_constants((IWineD3DDevice *) object)) {
-        object->lpVtbl  = &IWineD3DDevice_DirtyConst_Vtbl;
-    }
+    if (FAILED(hr)) {
+        IWineD3D_Release(object->wineD3D);
+        HeapFree(GetProcessHeap(), 0, object);
+
+        return hr;
+    }
+
+    object->blitter = select_blit_implementation(adapter, DeviceType);
 
     /* set the state of the device to valid */
@@ -3719,7 +3830,9 @@
         list_init(&object->patches[i]);
     }
+
+    IWineD3DDeviceParent_WineD3DDeviceCreated(device_parent, *ppReturnedDeviceInterface);
+
     return WINED3D_OK;
 }
-#undef GLINFO_LOCATION
 
 static HRESULT WINAPI IWineD3DImpl_GetParent(IWineD3D *iface, IUnknown **pParent) {
@@ -3750,5 +3863,5 @@
 }
 
-static BOOL implementation_is_apple(const WineD3D_GL_Info *gl_info)
+static BOOL match_apple(const WineD3D_GL_Info *gl_info)
 {
     /* MacOS has various specialities in the extensions it advertises. Some have to be loaded from
@@ -3778,5 +3891,4 @@
 }
 
-#define GLINFO_LOCATION (*gl_info)
 static void test_pbo_functionality(WineD3D_GL_Info *gl_info) {
     /* Some OpenGL implementations, namely Apple's Geforce 8 driver, advertises PBOs,
@@ -3808,4 +3920,6 @@
     glGenTextures(1, &texture);
     glBindTexture(GL_TEXTURE_2D, texture);
+
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
     glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 0);
     checkGLcall("Specifying the PBO test texture\n");
@@ -3838,5 +3952,4 @@
     }
 }
-#undef GLINFO_LOCATION
 
 /* Certain applications(Steam) complain if we report an outdated driver version. In general,
@@ -3849,4 +3962,5 @@
     WORD vendor;                        /* reported PCI card vendor ID  */
     WORD card;                          /* reported PCI card device ID  */
+    const char *description;                  /* Description of the card e.g. NVIDIA RIVA TNT */
     WORD hipart_hi, hipart_lo;          /* driver hiword to report      */
     WORD lopart_hi, lopart_lo;          /* driver loword to report      */
@@ -3854,76 +3968,127 @@
 
 static const struct driver_version_information driver_version_table[] = {
-    /* Nvidia drivers. Geforce6 and newer cards are supported by the current driver (177.x)*/
-    /* GeforceFX support is up to 173.x, Geforce2MX/3/4 up to 96.x, TNT/Geforce1/2 up to 71.x */
-    /* Note that version numbers >100 lets say 123.45 use >= x.y.11.2345 and not x.y.10.12345 */
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCEFX_5200,     7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCEFX_5600,     7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCEFX_5800,     7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_6200,       7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_6600GT,     7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_6800,       7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7400,       7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7300,       7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7600,       7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7800GT,     7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8300GS,     7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8600GT,     7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8600MGT,    7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8800GTS,    7,  15, 11, 7341   },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_9600GT,     7,  15, 11, 7341    },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_9800GT,     7,  15, 11, 7341    },
-    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX280,     7,  15, 11, 7341    },
+    /* Nvidia drivers. Geforce6 and newer cards are supported by the current driver (180.x)
+     * GeforceFX support is up to 173.x, - driver uses numbering x.y.11.7341 for 173.41 where x is the windows revision (6=2000/xp, 7=vista), y is unknown
+     * Geforce2MX/3/4 up to 96.x - driver uses numbering 9.6.8.9 for 96.89
+     * TNT/Geforce1/2 up to 71.x - driver uses numbering 7.1.8.6 for 71.86
+     *
+     * All version numbers used below are from the Linux nvidia drivers.
+     */
+    {VENDOR_NVIDIA,     CARD_NVIDIA_RIVA_TNT,           "NVIDIA RIVA TNT",                  7,  1,  8,  6      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_RIVA_TNT2,          "NVIDIA RIVA TNT2/TNT2 Pro",        7,  1,  8,  6      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE,            "NVIDIA GeForce 256",               7,  1,  8,  6      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE2_MX,        "NVIDIA GeForce2 MX/MX 400",        9,  6,  4,  3      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE2,           "NVIDIA GeForce2 GTS/GeForce2 Pro", 7,  1,  8,  6      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE3,           "NVIDIA GeForce3",                  9,  6,  4,  3      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE4_MX,        "NVIDIA GeForce4 MX 460",           9,  6,  4,  3      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE4_TI4200,    "NVIDIA GeForce4 Ti 4200",          9,  6,  4,  3      },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCEFX_5200,     "NVIDIA GeForce FX 5200",           7,  15, 11, 7341   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCEFX_5600,     "NVIDIA GeForce FX 5600",           7,  15, 11, 7341   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCEFX_5800,     "NVIDIA GeForce FX 5800",           7,  15, 11, 7341   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_6200,       "NVIDIA GeForce 6200",              7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_6600GT,     "NVIDIA GeForce 6600 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_6800,       "NVIDIA GeForce 6800",              7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7300,       "NVIDIA GeForce Go 7300",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7400,       "NVIDIA GeForce Go 7400",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7600,       "NVIDIA GeForce 7600 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_7800GT,     "NVIDIA GeForce 7800 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8300GS,     "NVIDIA GeForce 8300 GS",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8600GT,     "NVIDIA GeForce 8600 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8600MGT,    "NVIDIA GeForce 8600M GT",          7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_8800GTS,    "NVIDIA GeForce 8800 GTS",          7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_9200,       "NVIDIA GeForce 9200",              7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_9400GT,     "NVIDIA GeForce 9400 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_9500GT,     "NVIDIA GeForce 9500 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_9600GT,     "NVIDIA GeForce 9600 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_9800GT,     "NVIDIA GeForce 9800 GT",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX260,     "NVIDIA GeForce GTX 260",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX275,     "NVIDIA GeForce GTX 275",           7,  15, 11, 8044   },
+    {VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX280,     "NVIDIA GeForce GTX 280",           7,  15, 11, 8044   },
 
     /* ATI cards. The driver versions are somewhat similar, but not quite the same. Let's hardcode */
-    {VENDOR_ATI,        CARD_ATI_RADEON_9500,           6,  14, 10, 6764    },
-    {VENDOR_ATI,        CARD_ATI_RADEON_X700,           6,  14, 10, 6764    },
-    {VENDOR_ATI,        CARD_ATI_RADEON_X1600,          6,  14, 10, 6764    },
-    {VENDOR_ATI,        CARD_ATI_RADEON_HD2300,         6,  14, 10, 6764    },
-    {VENDOR_ATI,        CARD_ATI_RADEON_HD2600,         6,  14, 10, 6764    },
-    {VENDOR_ATI,        CARD_ATI_RADEON_HD2900,         6,  14, 10, 6764    },
-
-    /* TODO: Add information about legacy nvidia and ATI hardware, Intel and other cards */
+    {VENDOR_ATI,        CARD_ATI_RADEON_9500,           "ATI Radeon 9500",                  6,  14, 10, 6764    },
+    {VENDOR_ATI,        CARD_ATI_RADEON_X700,           "ATI Radeon X700 SE",               6,  14, 10, 6764    },
+    {VENDOR_ATI,        CARD_ATI_RADEON_X1600,          "ATI Radeon X1600 Series",          6,  14, 10, 6764    },
+    {VENDOR_ATI,        CARD_ATI_RADEON_HD2300,         "ATI Mobility Radeon HD 2300",      6,  14, 10, 6764    },
+    {VENDOR_ATI,        CARD_ATI_RADEON_HD2600,         "ATI Mobility Radeon HD 2600",      6,  14, 10, 6764    },
+    {VENDOR_ATI,        CARD_ATI_RADEON_HD2900,         "ATI Radeon HD 2900 XT",            6,  14, 10, 6764    },
+
+    /* TODO: Add information about legacy ATI hardware, Intel and other cards */
 };
 
-static void fixup_extensions(WineD3D_GL_Info *gl_info) {
-    unsigned int i;
-    BOOL apple = implementation_is_apple(gl_info);
-
-    if(apple) {
-        /* MacOS advertises more GLSL vertex shader uniforms than supported by the hardware, and if more are
-         * used it falls back to software. While the compiler can detect if the shader uses all declared
-         * uniforms, the optimization fails if the shader uses relative addressing. So any GLSL shader
-         * using relative addressing falls back to software.
-         *
-         * ARB vp gives the correct amount of uniforms, so use it instead of GLSL
-         */
-        if(gl_info->vs_glsl_constantsF <= gl_info->vs_arb_constantsF) {
-            FIXME("GLSL doesn't advertise more vertex shader uniforms than ARB. Driver fixup outdated?\n");
-        } else {
-            TRACE("Driver claims %u GLSL vs uniforms, replacing with %u ARB vp uniforms\n",
-                  gl_info->vs_glsl_constantsF, gl_info->vs_arb_constantsF);
-            gl_info->vs_glsl_constantsF = gl_info->vs_arb_constantsF;
-        }
-
-        /* The Intel GPUs on MacOS set the .w register of texcoords to 0.0 by default, which causes problems
-         * with fixed function fragment processing. Ideally this flag should be detected with a test shader
-         * and OpenGL feedback mode, but some GL implementations (MacOS ATI at least, probably all MacOS ones)
-         * do not like vertex shaders in feedback mode and return an error, even though it should be valid
-         * according to the spec.
-         *
-         * We don't want to enable this on all cards, as it adds an extra instruction per texcoord used. This
-         * makes the shader slower and eats instruction slots which should be available to the d3d app.
-         *
-         * ATI Radeon HD 2xxx cards on MacOS have the issue. Instead of checking for the buggy cards, blacklist
-         * all radeon cards on Macs and whitelist the good ones. That way we're prepared for the future. If
-         * this workaround is activated on cards that do not need it, it won't break things, just affect
-         * performance negatively.
-         */
-        if(gl_info->gl_vendor == VENDOR_INTEL ||
-           (gl_info->gl_vendor == VENDOR_ATI && gl_info->gl_card != CARD_ATI_RADEON_X1600)) {
-            TRACE("Enabling vertex texture coord fixes in vertex shaders\n");
-            gl_info->set_texcoord_w = TRUE;
-        }
-    }
+static BOOL match_ati_r300_to_500(const WineD3D_GL_Info *gl_info) {
+    if(gl_info->gl_vendor != VENDOR_ATI) return FALSE;
+    if(gl_info->gl_card == CARD_ATI_RADEON_9500) return TRUE;
+    if(gl_info->gl_card == CARD_ATI_RADEON_X700) return TRUE;
+    if(gl_info->gl_card == CARD_ATI_RADEON_X1600) return TRUE;
+    return FALSE;
+}
+
+static BOOL match_geforce5(const WineD3D_GL_Info *gl_info) {
+    if(gl_info->gl_vendor == VENDOR_NVIDIA) {
+        if(gl_info->gl_card == CARD_NVIDIA_GEFORCEFX_5800 || gl_info->gl_card == CARD_NVIDIA_GEFORCEFX_5600) {
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+
+static BOOL match_apple_intel(const WineD3D_GL_Info *gl_info) {
+    return gl_info->gl_vendor == VENDOR_INTEL && match_apple(gl_info);
+}
+
+static BOOL match_apple_nonr500ati(const WineD3D_GL_Info *gl_info) {
+    if(!match_apple(gl_info)) return FALSE;
+    if(gl_info->gl_vendor != VENDOR_ATI) return FALSE;
+    if(gl_info->gl_card == CARD_ATI_RADEON_X1600) return FALSE;
+    return TRUE;
+}
+
+static BOOL match_fglrx(const WineD3D_GL_Info *gl_info) {
+    if(gl_info->gl_vendor != VENDOR_ATI) return FALSE;
+    if(match_apple(gl_info)) return FALSE;
+    if(strstr(gl_info->gl_renderer, "DRI")) return FALSE; /* Filter out Mesa DRI drivers */
+    return TRUE;
+}
+
+static void quirk_arb_constants(WineD3D_GL_Info *gl_info) {
+    TRACE_(d3d_caps)("Using ARB vs constant limit(=%u) for GLSL\n", gl_info->vs_arb_constantsF);
+    gl_info->vs_glsl_constantsF = gl_info->vs_arb_constantsF;
+    TRACE_(d3d_caps)("Using ARB ps constant limit(=%u) for GLSL\n", gl_info->ps_arb_constantsF);
+    gl_info->ps_glsl_constantsF = gl_info->ps_arb_constantsF;
+}
+
+static void quirk_apple_glsl_constants(WineD3D_GL_Info *gl_info) {
+    quirk_arb_constants(gl_info);
+    /* MacOS needs uniforms for relative addressing offsets. This can accumulate to quite a few uniforms.
+     * Beyond that the general uniform isn't optimal, so reserve a number of uniforms. 12 vec4's should
+     * allow 48 different offsets or other helper immediate values
+     */
+    TRACE_(d3d_caps)("Reserving 12 GLSL constants for compiler private use\n");
+    gl_info->reserved_glsl_constants = max(gl_info->reserved_glsl_constants, 12);
+}
+
+/* fglrx crashes with a very bad kernel panic if GL_POINT_SPRITE_ARB is set to GL_COORD_REPLACE_ARB
+ * on more than one texture unit. This means that the d3d9 visual point size test will cause a
+ * kernel panic on any machine running fglrx 9.3(latest that supports r300 to r500 cards). This
+ * quirk only enables point sprites on the first texture unit. This keeps point sprites working in
+ * most games, but avoids the crash
+ *
+ * A more sophisticated way would be to find all units that need texture coordinates and enable
+ * point sprites for one if only one is found, and software emulate point sprites in drawStridedSlow
+ * if more than one unit needs texture coordinates(This requires software ffp and vertex shaders though)
+ *
+ * Note that disabling the extension entirely does not gain predictability because there is no point
+ * sprite capability flag in d3d, so the potential rendering bugs are the same if we disable the extension.
+ */
+static void quirk_one_point_sprite(WineD3D_GL_Info *gl_info) {
+    if(gl_info->supported[ARB_POINT_SPRITE]) {
+        TRACE("Limiting point sprites to one texture unit\n");
+        gl_info->max_point_sprite_units = 1;
+    }
+}
+
+static void quirk_ati_dx9(WineD3D_GL_Info *gl_info) {
+    quirk_arb_constants(gl_info);
 
     /* MacOS advertises GL_ARB_texture_non_power_of_two on ATI r500 and earlier cards, although
@@ -3939,14 +4104,16 @@
      * due to that, so this code works on fglrx as well.
      */
-    if(gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] && gl_info->gl_vendor == VENDOR_ATI) {
-        if(gl_info->gl_card == CARD_ATI_RADEON_X700 || gl_info->gl_card == CARD_ATI_RADEON_X1600 ||
-            gl_info->gl_card == CARD_ATI_RADEON_9500 || gl_info->gl_card == CARD_ATI_RADEON_8500  ||
-            gl_info->gl_card == CARD_ATI_RADEON_7200 || gl_info->gl_card == CARD_ATI_RAGE_128PRO) {
-            TRACE("GL_ARB_texture_non_power_of_two advertised on R500 or earlier card, removing\n");
-            gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE;
-            gl_info->supported[WINE_NORMALIZED_TEXRECT] = TRUE;
-        }
-    }
-
+    TRACE("GL_ARB_texture_non_power_of_two advertised on R500 or earlier card, removing\n");
+    gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE;
+    gl_info->supported[WINE_NORMALIZED_TEXRECT] = TRUE;
+
+    /* fglrx has the same structural issues as the one described in quirk_apple_glsl_constants, although
+     * it is generally more efficient. Reserve just 8 constants
+     */
+    TRACE_(d3d_caps)("Reserving 8 GLSL constants for compiler private use\n");
+    gl_info->reserved_glsl_constants = max(gl_info->reserved_glsl_constants, 8);
+}
+
+static void quirk_no_np2(WineD3D_GL_Info *gl_info) {
     /*  The nVidia GeForceFX series reports OpenGL 2.0 capabilities with the latest drivers versions, but
      *  doesn't explicitly advertise the ARB_tex_npot extension in the GL extension string.
@@ -3964,10 +4131,75 @@
      *  The behaviour can be verified through a simple test app attached in bugreport #14724.
      */
-    if(gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] && gl_info->gl_vendor == VENDOR_NVIDIA) {
-        if(gl_info->gl_card == CARD_NVIDIA_GEFORCEFX_5800 || gl_info->gl_card == CARD_NVIDIA_GEFORCEFX_5600) {
-            TRACE("GL_ARB_texture_non_power_of_two advertised through OpenGL 2.0 on NV FX card, removing\n");
-            gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE;
-            gl_info->supported[ARB_TEXTURE_RECTANGLE] = TRUE;
-        }
+    TRACE("GL_ARB_texture_non_power_of_two advertised through OpenGL 2.0 on NV FX card, removing\n");
+    gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE;
+    gl_info->supported[ARB_TEXTURE_RECTANGLE] = TRUE;
+}
+
+static void quirk_texcoord_w(WineD3D_GL_Info *gl_info) {
+    /* The Intel GPUs on MacOS set the .w register of texcoords to 0.0 by default, which causes problems
+     * with fixed function fragment processing. Ideally this flag should be detected with a test shader
+     * and OpenGL feedback mode, but some GL implementations (MacOS ATI at least, probably all MacOS ones)
+     * do not like vertex shaders in feedback mode and return an error, even though it should be valid
+     * according to the spec.
+     *
+     * We don't want to enable this on all cards, as it adds an extra instruction per texcoord used. This
+     * makes the shader slower and eats instruction slots which should be available to the d3d app.
+     *
+     * ATI Radeon HD 2xxx cards on MacOS have the issue. Instead of checking for the buggy cards, blacklist
+     * all radeon cards on Macs and whitelist the good ones. That way we're prepared for the future. If
+     * this workaround is activated on cards that do not need it, it won't break things, just affect
+     * performance negatively.
+     */
+    TRACE("Enabling vertex texture coord fixes in vertex shaders\n");
+    gl_info->set_texcoord_w = TRUE;
+}
+
+struct driver_quirk quirk_table[] = {
+    {
+        match_ati_r300_to_500,
+        quirk_ati_dx9,
+        "ATI GLSL constant and normalized texrect quirk"
+    },
+    /* MacOS advertises more GLSL vertex shader uniforms than supported by the hardware, and if more are
+     * used it falls back to software. While the compiler can detect if the shader uses all declared
+     * uniforms, the optimization fails if the shader uses relative addressing. So any GLSL shader
+     * using relative addressing falls back to software.
+     *
+     * ARB vp gives the correct amount of uniforms, so use it instead of GLSL
+     */
+    {
+        match_apple,
+        quirk_apple_glsl_constants,
+        "Apple GLSL uniform override"
+    },
+    {
+        match_geforce5,
+        quirk_no_np2,
+        "Geforce 5 NP2 disable"
+    },
+    {
+        match_apple_intel,
+        quirk_texcoord_w,
+        "Init texcoord .w for Apple Intel GPU driver"
+    },
+    {
+        match_apple_nonr500ati,
+        quirk_texcoord_w,
+        "Init texcoord .w for Apple ATI >= r600 GPU driver"
+    },
+    {
+        match_fglrx,
+        quirk_one_point_sprite,
+        "Fglrx point sprite crash workaround"
+    }
+};
+
+static void fixup_extensions(WineD3D_GL_Info *gl_info) {
+    unsigned int i;
+
+    for(i = 0; i < (sizeof(quirk_table) / sizeof(*quirk_table)); i++) {
+        if(!quirk_table[i].match(gl_info)) continue;
+        TRACE_(d3d_caps)("Applying driver quirk \"%s\"\n", quirk_table[i].description);
+        quirk_table[i].apply(gl_info);
     }
 
@@ -3985,4 +4217,5 @@
             gl_info->driver_version_hipart = MAKEDWORD_VERSION(driver_version_table[i].hipart_hi,
                                                                driver_version_table[i].hipart_lo);
+            strcpy(gl_info->driver_description, driver_version_table[i].description);
             break;
         }
@@ -4001,6 +4234,4 @@
     DebugBreak();
 }
-
-#define GLINFO_LOCATION (Adapters[0].gl_info)
 
 /* Helper functions for providing vertex data to opengl. The arrays are initialized based on
@@ -4044,8 +4275,9 @@
 {
     DWORD specularColor = *((const DWORD *)data);
-
-    GL_EXTCALL(glSecondaryColor3ubEXT)(D3DCOLOR_B_R(specularColor),
-                                       D3DCOLOR_B_G(specularColor),
-                                       D3DCOLOR_B_B(specularColor));
+    GLbyte d[] = {D3DCOLOR_B_R(specularColor),
+            D3DCOLOR_B_G(specularColor),
+            D3DCOLOR_B_B(specularColor)};
+
+    specular_func_3ubv(d);
 }
 
@@ -4057,140 +4289,118 @@
 static void fillGLAttribFuncs(const WineD3D_GL_Info *gl_info)
 {
-    position_funcs[WINED3DDECLTYPE_FLOAT1]      = invalid_func;
-    position_funcs[WINED3DDECLTYPE_FLOAT2]      = invalid_func;
-    position_funcs[WINED3DDECLTYPE_FLOAT3]      = (glAttribFunc)glVertex3fv;
-    position_funcs[WINED3DDECLTYPE_FLOAT4]      = position_float4;
-    position_funcs[WINED3DDECLTYPE_D3DCOLOR]    = position_d3dcolor;
-    position_funcs[WINED3DDECLTYPE_UBYTE4]      = invalid_func;
-    position_funcs[WINED3DDECLTYPE_SHORT2]      = invalid_func;
-    position_funcs[WINED3DDECLTYPE_SHORT4]      = (glAttribFunc)glVertex2sv;
-    position_funcs[WINED3DDECLTYPE_UBYTE4N]     = invalid_func;
-    position_funcs[WINED3DDECLTYPE_SHORT2N]     = invalid_func;
-    position_funcs[WINED3DDECLTYPE_SHORT4N]     = invalid_func;
-    position_funcs[WINED3DDECLTYPE_USHORT2N]    = invalid_func;
-    position_funcs[WINED3DDECLTYPE_USHORT4N]    = invalid_func;
-    position_funcs[WINED3DDECLTYPE_UDEC3]       = invalid_func;
-    position_funcs[WINED3DDECLTYPE_DEC3N]       = invalid_func;
-    position_funcs[WINED3DDECLTYPE_FLOAT16_2]   = invalid_func;
-    position_funcs[WINED3DDECLTYPE_FLOAT16_4]   = invalid_func;
-
-    diffuse_funcs[WINED3DDECLTYPE_FLOAT1]       = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_FLOAT2]       = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_FLOAT3]       = (glAttribFunc)glColor3fv;
-    diffuse_funcs[WINED3DDECLTYPE_FLOAT4]       = (glAttribFunc)glColor4fv;
-    diffuse_funcs[WINED3DDECLTYPE_D3DCOLOR]     = diffuse_d3dcolor;
-    diffuse_funcs[WINED3DDECLTYPE_UBYTE4]       = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_SHORT2]       = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_SHORT4]       = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_UBYTE4N]      = (glAttribFunc)glColor4ubv;
-    diffuse_funcs[WINED3DDECLTYPE_SHORT2N]      = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_SHORT4N]      = (glAttribFunc)glColor4sv;
-    diffuse_funcs[WINED3DDECLTYPE_USHORT2N]     = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_USHORT4N]     = (glAttribFunc)glColor4usv;
-    diffuse_funcs[WINED3DDECLTYPE_UDEC3]        = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_DEC3N]        = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_FLOAT16_2]    = invalid_func;
-    diffuse_funcs[WINED3DDECLTYPE_FLOAT16_4]    = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_FLOAT1]      = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_FLOAT2]      = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_FLOAT3]      = (glAttribFunc)glVertex3fv;
+    position_funcs[WINED3D_FFP_EMIT_FLOAT4]      = position_float4;
+    position_funcs[WINED3D_FFP_EMIT_D3DCOLOR]    = position_d3dcolor;
+    position_funcs[WINED3D_FFP_EMIT_UBYTE4]      = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_SHORT2]      = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_SHORT4]      = (glAttribFunc)glVertex2sv;
+    position_funcs[WINED3D_FFP_EMIT_UBYTE4N]     = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_SHORT2N]     = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_SHORT4N]     = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_USHORT2N]    = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_USHORT4N]    = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_UDEC3]       = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_DEC3N]       = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_FLOAT16_2]   = invalid_func;
+    position_funcs[WINED3D_FFP_EMIT_FLOAT16_4]   = invalid_func;
+
+    diffuse_funcs[WINED3D_FFP_EMIT_FLOAT1]       = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_FLOAT2]       = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_FLOAT3]       = (glAttribFunc)glColor3fv;
+    diffuse_funcs[WINED3D_FFP_EMIT_FLOAT4]       = (glAttribFunc)glColor4fv;
+    diffuse_funcs[WINED3D_FFP_EMIT_D3DCOLOR]     = diffuse_d3dcolor;
+    diffuse_funcs[WINED3D_FFP_EMIT_UBYTE4]       = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_SHORT2]       = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_SHORT4]       = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_UBYTE4N]      = (glAttribFunc)glColor4ubv;
+    diffuse_funcs[WINED3D_FFP_EMIT_SHORT2N]      = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_SHORT4N]      = (glAttribFunc)glColor4sv;
+    diffuse_funcs[WINED3D_FFP_EMIT_USHORT2N]     = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_USHORT4N]     = (glAttribFunc)glColor4usv;
+    diffuse_funcs[WINED3D_FFP_EMIT_UDEC3]        = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_DEC3N]        = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_FLOAT16_2]    = invalid_func;
+    diffuse_funcs[WINED3D_FFP_EMIT_FLOAT16_4]    = invalid_func;
 
     /* No 4 component entry points here */
-    specular_funcs[WINED3DDECLTYPE_FLOAT1]      = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_FLOAT2]      = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_FLOAT1]      = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_FLOAT2]      = invalid_func;
     if(GL_SUPPORT(EXT_SECONDARY_COLOR)) {
-        specular_funcs[WINED3DDECLTYPE_FLOAT3]      = (glAttribFunc)GL_EXTCALL(glSecondaryColor3fvEXT);
+        specular_funcs[WINED3D_FFP_EMIT_FLOAT3]  = (glAttribFunc)GL_EXTCALL(glSecondaryColor3fvEXT);
     } else {
-        specular_funcs[WINED3DDECLTYPE_FLOAT3]      = warn_no_specular_func;
-    }
-    specular_funcs[WINED3DDECLTYPE_FLOAT4]      = invalid_func;
+        specular_funcs[WINED3D_FFP_EMIT_FLOAT3]  = warn_no_specular_func;
+    }
+    specular_funcs[WINED3D_FFP_EMIT_FLOAT4]      = invalid_func;
     if(GL_SUPPORT(EXT_SECONDARY_COLOR)) {
-        specular_funcs[WINED3DDECLTYPE_D3DCOLOR]    = specular_d3dcolor;
+        specular_func_3ubv = (glAttribFunc)GL_EXTCALL(glSecondaryColor3ubvEXT);
+        specular_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = specular_d3dcolor;
     } else {
-        specular_funcs[WINED3DDECLTYPE_D3DCOLOR]      = warn_no_specular_func;
-    }
-    specular_funcs[WINED3DDECLTYPE_UBYTE4]      = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_SHORT2]      = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_SHORT4]      = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_UBYTE4N]     = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_SHORT2N]     = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_SHORT4N]     = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_USHORT2N]    = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_USHORT4N]    = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_UDEC3]       = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_DEC3N]       = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_FLOAT16_2]   = invalid_func;
-    specular_funcs[WINED3DDECLTYPE_FLOAT16_4]   = invalid_func;
+        specular_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = warn_no_specular_func;
+    }
+    specular_funcs[WINED3D_FFP_EMIT_UBYTE4]      = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_SHORT2]      = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_SHORT4]      = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_UBYTE4N]     = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_SHORT2N]     = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_SHORT4N]     = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_USHORT2N]    = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_USHORT4N]    = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_UDEC3]       = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_DEC3N]       = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_FLOAT16_2]   = invalid_func;
+    specular_funcs[WINED3D_FFP_EMIT_FLOAT16_4]   = invalid_func;
 
     /* Only 3 component entry points here. Test how others behave. Float4 normals are used
      * by one of our tests, trying to pass it to the pixel shader, which fails on Windows.
      */
-    normal_funcs[WINED3DDECLTYPE_FLOAT1]         = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_FLOAT2]         = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_FLOAT3]         = (glAttribFunc)glNormal3fv;
-    normal_funcs[WINED3DDECLTYPE_FLOAT4]         = (glAttribFunc)glNormal3fv; /* Just ignore the 4th value */
-    normal_funcs[WINED3DDECLTYPE_D3DCOLOR]       = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_UBYTE4]         = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_SHORT2]         = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_SHORT4]         = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_UBYTE4N]        = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_SHORT2N]        = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_SHORT4N]        = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_USHORT2N]       = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_USHORT4N]       = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_UDEC3]          = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_DEC3N]          = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_FLOAT16_2]      = invalid_func;
-    normal_funcs[WINED3DDECLTYPE_FLOAT16_4]      = invalid_func;
-
-    multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT1]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord1fvARB);
-    multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT2]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2fvARB);
-    multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT3]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord3fvARB);
-    multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT4]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4fvARB);
-    multi_texcoord_funcs[WINED3DDECLTYPE_D3DCOLOR]  = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_UBYTE4]    = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_SHORT2]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2svARB);
-    multi_texcoord_funcs[WINED3DDECLTYPE_SHORT4]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4svARB);
-    multi_texcoord_funcs[WINED3DDECLTYPE_UBYTE4N]   = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_SHORT2N]   = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_SHORT4N]   = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_USHORT2N]  = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_USHORT4N]  = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_UDEC3]     = invalid_texcoord_func;
-    multi_texcoord_funcs[WINED3DDECLTYPE_DEC3N]     = invalid_texcoord_func;
+    normal_funcs[WINED3D_FFP_EMIT_FLOAT1]         = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_FLOAT2]         = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_FLOAT3]         = (glAttribFunc)glNormal3fv;
+    normal_funcs[WINED3D_FFP_EMIT_FLOAT4]         = (glAttribFunc)glNormal3fv; /* Just ignore the 4th value */
+    normal_funcs[WINED3D_FFP_EMIT_D3DCOLOR]       = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_UBYTE4]         = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_SHORT2]         = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_SHORT4]         = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_UBYTE4N]        = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_SHORT2N]        = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_SHORT4N]        = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_USHORT2N]       = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_USHORT4N]       = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_UDEC3]          = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_DEC3N]          = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_FLOAT16_2]      = invalid_func;
+    normal_funcs[WINED3D_FFP_EMIT_FLOAT16_4]      = invalid_func;
+
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT1]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord1fvARB);
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT2]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2fvARB);
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT3]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord3fvARB);
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT4]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4fvARB);
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_D3DCOLOR]  = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_UBYTE4]    = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT2]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2svARB);
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT4]    = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4svARB);
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_UBYTE4N]   = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT2N]   = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT4N]   = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_USHORT2N]  = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_USHORT4N]  = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_UDEC3]     = invalid_texcoord_func;
+    multi_texcoord_funcs[WINED3D_FFP_EMIT_DEC3N]     = invalid_texcoord_func;
     if (GL_SUPPORT(NV_HALF_FLOAT))
     {
-        multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2hvNV);
-        multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4hvNV);
+        /* Not supported by ARB_HALF_FLOAT_VERTEX, so check for NV_HALF_FLOAT */
+        multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2hvNV);
+        multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4hvNV);
     } else {
-        multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = invalid_texcoord_func;
-        multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = invalid_texcoord_func;
-    }
-
-    texcoord_funcs[WINED3DDECLTYPE_FLOAT1]      = (glAttribFunc)glTexCoord1fv;
-    texcoord_funcs[WINED3DDECLTYPE_FLOAT2]      = (glAttribFunc)glTexCoord2fv;
-    texcoord_funcs[WINED3DDECLTYPE_FLOAT3]      = (glAttribFunc)glTexCoord3fv;
-    texcoord_funcs[WINED3DDECLTYPE_FLOAT4]      = (glAttribFunc)glTexCoord4fv;
-    texcoord_funcs[WINED3DDECLTYPE_D3DCOLOR]    = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_UBYTE4]      = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_SHORT2]      = (glAttribFunc)glTexCoord2sv;
-    texcoord_funcs[WINED3DDECLTYPE_SHORT4]      = (glAttribFunc)glTexCoord4sv;
-    texcoord_funcs[WINED3DDECLTYPE_UBYTE4N]     = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_SHORT2N]     = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_SHORT4N]     = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_USHORT2N]    = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_USHORT4N]    = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_UDEC3]       = invalid_func;
-    texcoord_funcs[WINED3DDECLTYPE_DEC3N]       = invalid_func;
-    if (GL_SUPPORT(NV_HALF_FLOAT))
-    {
-        texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2]   = (glAttribFunc)GL_EXTCALL(glTexCoord2hvNV);
-        texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4]   = (glAttribFunc)GL_EXTCALL(glTexCoord4hvNV);
-    } else {
-        texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2]   = invalid_func;
-        texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4]   = invalid_func;
-    }
-}
-
-#define PUSH1(att)        attribs[nAttribs++] = (att);
-BOOL InitAdapters(void) {
-    static HMODULE mod_gl, mod_win32gl;
+        multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_texcoord_func;
+        multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_texcoord_func;
+    }
+}
+
+BOOL InitAdapters(IWineD3DImpl *This)
+{
+    static HMODULE mod_gl;
     BOOL ret;
     int ps_selected_mode, vs_selected_mode;
@@ -4199,5 +4409,4 @@
      * wined3d simultaneously
      */
-    if(numAdapters > 0) return Adapters[0].opengl;
 
     TRACE("Initializing adapters\n");
@@ -4211,14 +4420,8 @@
             goto nogl_adapter;
         }
-        mod_win32gl = mod_gl;
 #else
 #define USE_GL_FUNC(pfn) pfn = (void*)pwglGetProcAddress(#pfn);
         /* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 (glXGetProcAddress wrapper) instead of opengl32's */
         mod_gl = GetModuleHandleA("gdi32.dll");
-        mod_win32gl = LoadLibraryA("opengl32.dll");
-        if(!mod_win32gl) {
-            ERR("Can't load opengl32.dll!\n");
-            goto nogl_adapter;
-        }
 #endif
     }
@@ -4241,24 +4444,30 @@
      * otherwise because we have to use winex11.drv's override
      */
-    glFinish = (void*)GetProcAddress(mod_win32gl, "glFinish");
-    glFlush = (void*)GetProcAddress(mod_win32gl, "glFlush");
+#ifdef USE_WIN32_OPENGL
+    glFinish = (void*)GetProcAddress(mod_gl, "glFinish");
+    glFlush = (void*)GetProcAddress(mod_gl, "glFlush");
+#else
+    glFinish = (void*)pwglGetProcAddress("wglFinish");
+    glFlush = (void*)pwglGetProcAddress("wglFlush");
+#endif
+
+    glEnableWINE = glEnable;
+    glDisableWINE = glDisable;
 
     /* For now only one default adapter */
     {
+        struct WineD3DAdapter *adapter = &This->adapters[0];
+        const WineD3D_GL_Info *gl_info = &adapter->gl_info;
         int iPixelFormat;
-        int attribs[10];
-        int values[10];
-        int nAttribs = 0;
         int res;
         int i;
         WineD3D_PixelFormat *cfgs;
-        int attribute;
         DISPLAY_DEVICEW DisplayDevice;
         HDC hdc;
 
         TRACE("Initializing default adapter\n");
-        Adapters[0].num = 0;
-        Adapters[0].monitorPoint.x = -1;
-        Adapters[0].monitorPoint.y = -1;
+        adapter->num = 0;
+        adapter->monitorPoint.x = -1;
+        adapter->monitorPoint.y = -1;
 
         if (!WineD3D_CreateFakeGLContext()) {
@@ -4268,5 +4477,5 @@
         }
 
-        ret = IWineD3DImpl_FillGLCaps(&Adapters[0].gl_info);
+        ret = IWineD3DImpl_FillGLCaps(&adapter->gl_info);
         if(!ret) {
             ERR("Failed to initialize gl caps for default adapter\n");
@@ -4274,5 +4483,5 @@
             goto nogl_adapter;
         }
-        ret = initPixelFormats(&Adapters[0].gl_info);
+        ret = initPixelFormats(&adapter->gl_info);
         if(!ret) {
             ERR("Failed to init gl formats\n");
@@ -4288,14 +4497,14 @@
         }
 
-        Adapters[0].driver = "Display";
-        Adapters[0].description = "Direct3D HAL";
+        adapter->driver = "Display";
+        adapter->description = "Direct3D HAL";
 
         /* Use the VideoRamSize registry setting when set */
         if(wined3d_settings.emulated_textureram)
-            Adapters[0].TextureRam = wined3d_settings.emulated_textureram;
+            adapter->TextureRam = wined3d_settings.emulated_textureram;
         else
-            Adapters[0].TextureRam = Adapters[0].gl_info.vidmem;
-        Adapters[0].UsedTextureRam = 0;
-        TRACE("Emulating %dMB of texture ram\n", Adapters[0].TextureRam/(1024*1024));
+            adapter->TextureRam = adapter->gl_info.vidmem;
+        adapter->UsedTextureRam = 0;
+        TRACE("Emulating %dMB of texture ram\n", adapter->TextureRam/(1024*1024));
 
         /* Initialize the Adapter's DeviceName which is required for ChangeDisplaySettings and friends */
@@ -4303,65 +4512,128 @@
         EnumDisplayDevicesW(NULL, 0 /* Adapter 0 = iDevNum 0 */, &DisplayDevice, 0);
         TRACE("DeviceName: %s\n", debugstr_w(DisplayDevice.DeviceName));
-        strcpyW(Adapters[0].DeviceName, DisplayDevice.DeviceName);
-
-        attribute = WGL_NUMBER_PIXEL_FORMATS_ARB;
-        GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &Adapters[0].nCfgs));
-
-        Adapters[0].cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Adapters[0].nCfgs *sizeof(WineD3D_PixelFormat));
-        cfgs = Adapters[0].cfgs;
-        PUSH1(WGL_RED_BITS_ARB)
-        PUSH1(WGL_GREEN_BITS_ARB)
-        PUSH1(WGL_BLUE_BITS_ARB)
-        PUSH1(WGL_ALPHA_BITS_ARB)
-        PUSH1(WGL_DEPTH_BITS_ARB)
-        PUSH1(WGL_STENCIL_BITS_ARB)
-        PUSH1(WGL_DRAW_TO_WINDOW_ARB)
-        PUSH1(WGL_PIXEL_TYPE_ARB)
-        PUSH1(WGL_DOUBLE_BUFFER_ARB)
-        PUSH1(WGL_AUX_BUFFERS_ARB)
-
-        for(iPixelFormat=1; iPixelFormat<=Adapters[0].nCfgs; iPixelFormat++) {
-            res = GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, nAttribs, attribs, values));
-
-            if(!res)
-                continue;
-
-            /* Cache the pixel format */
-            cfgs->iPixelFormat = iPixelFormat;
-            cfgs->redSize = values[0];
-            cfgs->greenSize = values[1];
-            cfgs->blueSize = values[2];
-            cfgs->alphaSize = values[3];
-            cfgs->depthSize = values[4];
-            cfgs->stencilSize = values[5];
-            cfgs->windowDrawable = values[6];
-            cfgs->iPixelType = values[7];
-            cfgs->doubleBuffer = values[8];
-            cfgs->auxBuffers = values[9];
-
-            cfgs->pbufferDrawable = FALSE;
-            /* Check for pbuffer support when it is around as wglGetPixelFormatAttribiv fails for unknown attributes. */
-            if(GL_SUPPORT(WGL_ARB_PBUFFER)) {
-                int attrib = WGL_DRAW_TO_PBUFFER_ARB;
-                int value;
-                if(GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, 1, &attrib, &value)))
-                    cfgs->pbufferDrawable = value;
-            }
-
-            cfgs->numSamples = 0;
-            /* Check multisample support */
-            if(GL_SUPPORT(ARB_MULTISAMPLE)) {
-                int attrib[2] = {WGL_SAMPLE_BUFFERS_ARB, WGL_SAMPLES_ARB};
-                int value[2];
-                if(GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, 2, attrib, value))) {
-                    /* value[0] = WGL_SAMPLE_BUFFERS_ARB which tells whether multisampling is supported.
-                     * value[1] = number of multi sample buffers*/
-                    if(value[0])
-                        cfgs->numSamples = value[1];
-                }
-            }
-
-            TRACE("iPixelFormat=%d, iPixelType=%#x, doubleBuffer=%d, RGBA=%d/%d/%d/%d, depth=%d, stencil=%d, windowDrawable=%d, pbufferDrawable=%d\n", cfgs->iPixelFormat, cfgs->iPixelType, cfgs->doubleBuffer, cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, cfgs->depthSize, cfgs->stencilSize, cfgs->windowDrawable, cfgs->pbufferDrawable);
-            cfgs++;
+        strcpyW(adapter->DeviceName, DisplayDevice.DeviceName);
+
+        if(GL_SUPPORT(WGL_ARB_PIXEL_FORMAT))
+        {
+            int attribute;
+            int attribs[10];
+            int values[10];
+            int nAttribs = 0;
+
+            attribute = WGL_NUMBER_PIXEL_FORMATS_ARB;
+            GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &adapter->nCfgs));
+
+            adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, adapter->nCfgs *sizeof(WineD3D_PixelFormat));
+            cfgs = adapter->cfgs;
+            attribs[nAttribs++] = WGL_RED_BITS_ARB;
+            attribs[nAttribs++] = WGL_GREEN_BITS_ARB;
+            attribs[nAttribs++] = WGL_BLUE_BITS_ARB;
+            attribs[nAttribs++] = WGL_ALPHA_BITS_ARB;
+            attribs[nAttribs++] = WGL_DEPTH_BITS_ARB;
+            attribs[nAttribs++] = WGL_STENCIL_BITS_ARB;
+            attribs[nAttribs++] = WGL_DRAW_TO_WINDOW_ARB;
+            attribs[nAttribs++] = WGL_PIXEL_TYPE_ARB;
+            attribs[nAttribs++] = WGL_DOUBLE_BUFFER_ARB;
+            attribs[nAttribs++] = WGL_AUX_BUFFERS_ARB;
+
+            for (iPixelFormat=1; iPixelFormat <= adapter->nCfgs; ++iPixelFormat)
+            {
+                res = GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, nAttribs, attribs, values));
+
+                if(!res)
+                    continue;
+
+                /* Cache the pixel format */
+                cfgs->iPixelFormat = iPixelFormat;
+                cfgs->redSize = values[0];
+                cfgs->greenSize = values[1];
+                cfgs->blueSize = values[2];
+                cfgs->alphaSize = values[3];
+                cfgs->depthSize = values[4];
+                cfgs->stencilSize = values[5];
+                cfgs->windowDrawable = values[6];
+                cfgs->iPixelType = values[7];
+                cfgs->doubleBuffer = values[8];
+                cfgs->auxBuffers = values[9];
+
+                cfgs->pbufferDrawable = FALSE;
+                /* Check for pbuffer support when it is around as wglGetPixelFormatAttribiv fails for unknown attributes. */
+                if(GL_SUPPORT(WGL_ARB_PBUFFER)) {
+                    int attrib = WGL_DRAW_TO_PBUFFER_ARB;
+                    int value;
+                    if(GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, 1, &attrib, &value)))
+                        cfgs->pbufferDrawable = value;
+                }
+
+                cfgs->numSamples = 0;
+                /* Check multisample support */
+                if(GL_SUPPORT(ARB_MULTISAMPLE)) {
+                    int attrib[2] = {WGL_SAMPLE_BUFFERS_ARB, WGL_SAMPLES_ARB};
+                    int value[2];
+                    if(GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, 2, attrib, value))) {
+                        /* value[0] = WGL_SAMPLE_BUFFERS_ARB which tells whether multisampling is supported.
+                        * value[1] = number of multi sample buffers*/
+                        if(value[0])
+                            cfgs->numSamples = value[1];
+                    }
+                }
+
+                TRACE("iPixelFormat=%d, iPixelType=%#x, doubleBuffer=%d, RGBA=%d/%d/%d/%d, depth=%d, stencil=%d, windowDrawable=%d, pbufferDrawable=%d\n", cfgs->iPixelFormat, cfgs->iPixelType, cfgs->doubleBuffer, cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, cfgs->depthSize, cfgs->stencilSize, cfgs->windowDrawable, cfgs->pbufferDrawable);
+                cfgs++;
+            }
+        }
+        else
+        {
+            int nCfgs = DescribePixelFormat(hdc, 0, 0, 0);
+            adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nCfgs*sizeof(WineD3D_PixelFormat));
+            adapter->nCfgs = 0; /* We won't accept all formats e.g. software accelerated ones will be skipped */
+
+            cfgs = adapter->cfgs;
+            for(iPixelFormat=1; iPixelFormat<=nCfgs; iPixelFormat++)
+            {
+                PIXELFORMATDESCRIPTOR ppfd;
+
+                res = DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &ppfd);
+                if(!res)
+                    continue;
+
+                /* We only want HW acceleration using an OpenGL ICD driver.
+                 * PFD_GENERIC_FORMAT = slow opengl 1.1 gdi software rendering
+                 * PFD_GENERIC_ACCELERATED = partial hw acceleration using a MCD driver (e.g. 3dfx minigl)
+                 */
+                if(ppfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED))
+                {
+                    TRACE("Skipping iPixelFormat=%d because it isn't ICD accelerated\n", iPixelFormat);
+                    continue;
+                }
+
+                cfgs->iPixelFormat = iPixelFormat;
+                cfgs->redSize = ppfd.cRedBits;
+                cfgs->greenSize = ppfd.cGreenBits;
+                cfgs->blueSize = ppfd.cBlueBits;
+                cfgs->alphaSize = ppfd.cAlphaBits;
+                cfgs->depthSize = ppfd.cDepthBits;
+                cfgs->stencilSize = ppfd.cStencilBits;
+                cfgs->pbufferDrawable = 0;
+                cfgs->windowDrawable = (ppfd.dwFlags & PFD_DRAW_TO_WINDOW) ? 1 : 0;
+                cfgs->iPixelType = (ppfd.iPixelType == PFD_TYPE_RGBA) ? WGL_TYPE_RGBA_ARB : WGL_TYPE_COLORINDEX_ARB;
+                cfgs->doubleBuffer = (ppfd.dwFlags & PFD_DOUBLEBUFFER) ? 1 : 0;
+                cfgs->auxBuffers = ppfd.cAuxBuffers;
+                cfgs->numSamples = 0;
+
+                TRACE("iPixelFormat=%d, iPixelType=%#x, doubleBuffer=%d, RGBA=%d/%d/%d/%d, depth=%d, stencil=%d, windowDrawable=%d, pbufferDrawable=%d\n", cfgs->iPixelFormat, cfgs->iPixelType, cfgs->doubleBuffer, cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, cfgs->depthSize, cfgs->stencilSize, cfgs->windowDrawable, cfgs->pbufferDrawable);
+                cfgs++;
+                adapter->nCfgs++;
+            }
+
+            /* Yikes we haven't found any suitable formats. This should only happen in case of GDI software rendering which we can't use anyway as its 3D functionality is very, very limited */
+            if(!adapter->nCfgs)
+            {
+                ERR("Disabling Direct3D because no hardware accelerated pixel formats have been found!\n");
+
+                WineD3D_ReleaseFakeGLContext();
+                HeapFree(GetProcessHeap(), 0, adapter->cfgs);
+                goto nogl_adapter;
+            }
         }
 
@@ -4375,25 +4647,26 @@
          * Mark an adapter with this broken stencil behavior.
          */
-        Adapters[0].brokenStencil = TRUE;
-        for(i=0, cfgs=Adapters[0].cfgs; i<Adapters[0].nCfgs; i++) {
+        adapter->brokenStencil = TRUE;
+        for (i = 0, cfgs = adapter->cfgs; i < adapter->nCfgs; ++i)
+        {
             /* Nearly all drivers offer depth formats without stencil, only on i915 this if-statement won't be entered. */
             if(cfgs[i].depthSize && !cfgs[i].stencilSize) {
-                Adapters[0].brokenStencil = FALSE;
+                adapter->brokenStencil = FALSE;
                 break;
             }
         }
 
-        fixup_extensions(&Adapters[0].gl_info);
+        fixup_extensions(&adapter->gl_info);
+        add_gl_compat_wrappers(&adapter->gl_info);
 
         WineD3D_ReleaseFakeGLContext();
 
-        select_shader_mode(&Adapters[0].gl_info, WINED3DDEVTYPE_HAL, &ps_selected_mode, &vs_selected_mode);
-        select_shader_max_constants(ps_selected_mode, vs_selected_mode, &Adapters[0].gl_info);
-        fillGLAttribFuncs(&Adapters[0].gl_info);
-        init_type_lookup(&Adapters[0].gl_info);
-        Adapters[0].opengl = TRUE;
-    }
-    numAdapters = 1;
-    TRACE("%d adapters successfully initialized\n", numAdapters);
+        select_shader_mode(&adapter->gl_info, WINED3DDEVTYPE_HAL, &ps_selected_mode, &vs_selected_mode);
+        select_shader_max_constants(ps_selected_mode, vs_selected_mode, &adapter->gl_info);
+        fillGLAttribFuncs(&adapter->gl_info);
+        adapter->opengl = TRUE;
+    }
+    This->adapter_count = 1;
+    TRACE("%u adapters successfully initialized\n", This->adapter_count);
 
     return TRUE;
@@ -4401,23 +4674,23 @@
 nogl_adapter:
     /* Initialize an adapter for ddraw-only memory counting */
-    memset(Adapters, 0, sizeof(Adapters));
-    Adapters[0].num = 0;
-    Adapters[0].opengl = FALSE;
-    Adapters[0].monitorPoint.x = -1;
-    Adapters[0].monitorPoint.y = -1;
-
-    Adapters[0].driver = "Display";
-    Adapters[0].description = "WineD3D DirectDraw Emulation";
+    memset(This->adapters, 0, sizeof(This->adapters));
+    This->adapters[0].num = 0;
+    This->adapters[0].opengl = FALSE;
+    This->adapters[0].monitorPoint.x = -1;
+    This->adapters[0].monitorPoint.y = -1;
+
+    This->adapters[0].driver = "Display";
+    This->adapters[0].description = "WineD3D DirectDraw Emulation";
     if(wined3d_settings.emulated_textureram) {
-        Adapters[0].TextureRam = wined3d_settings.emulated_textureram;
+        This->adapters[0].TextureRam = wined3d_settings.emulated_textureram;
     } else {
-        Adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */
-    }
-
-    numAdapters = 1;
+        This->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */
+    }
+
+    initPixelFormatsNoGL(&This->adapters[0].gl_info);
+
+    This->adapter_count = 1;
     return FALSE;
 }
-#undef PUSH1
-#undef GLINFO_LOCATION
 
 /**********************************************************
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/drawprim.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/drawprim.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/drawprim.c	(revision 19678)
@@ -42,251 +42,35 @@
 #include <math.h>
 
-/* Issues the glBegin call for gl given the primitive type and count */
-static DWORD primitiveToGl(WINED3DPRIMITIVETYPE PrimitiveType,
-                    DWORD            NumPrimitives,
-                    GLenum          *primType)
+#define ceilf ceil
+
+static void drawStridedFast(IWineD3DDevice *iface, GLenum primitive_type,
+        UINT min_vertex_idx, UINT max_vertex_idx, UINT count, UINT idx_size,
+        const void *idx_data, UINT start_idx)
 {
-    DWORD   NumVertexes = NumPrimitives;
-
-    switch (PrimitiveType) {
-    case WINED3DPT_POINTLIST:
-        TRACE("POINTS\n");
-        *primType   = GL_POINTS;
-        NumVertexes = NumPrimitives;
-        break;
-
-    case WINED3DPT_LINELIST:
-        TRACE("LINES\n");
-        *primType   = GL_LINES;
-        NumVertexes = NumPrimitives * 2;
-        break;
-
-    case WINED3DPT_LINESTRIP:
-        TRACE("LINE_STRIP\n");
-        *primType   = GL_LINE_STRIP;
-        NumVertexes = NumPrimitives + 1;
-        break;
-
-    case WINED3DPT_TRIANGLELIST:
-        TRACE("TRIANGLES\n");
-        *primType   = GL_TRIANGLES;
-        NumVertexes = NumPrimitives * 3;
-        break;
-
-    case WINED3DPT_TRIANGLESTRIP:
-        TRACE("TRIANGLE_STRIP\n");
-        *primType   = GL_TRIANGLE_STRIP;
-        NumVertexes = NumPrimitives + 2;
-        break;
-
-    case WINED3DPT_TRIANGLEFAN:
-        TRACE("TRIANGLE_FAN\n");
-        *primType   = GL_TRIANGLE_FAN;
-        NumVertexes = NumPrimitives + 2;
-        break;
-
-    default:
-        FIXME("Unhandled primitive\n");
-        *primType    = GL_POINTS;
-        break;
-    }
-    return NumVertexes;
-}
-
-static BOOL fixed_get_input(
-    BYTE usage, BYTE usage_idx,
-    unsigned int* regnum) {
-
-    *regnum = -1;
-
-    /* Those positions must have the order in the
-     * named part of the strided data */
-
-    if ((usage == WINED3DDECLUSAGE_POSITION || usage == WINED3DDECLUSAGE_POSITIONT) && usage_idx == 0)
-        *regnum = 0;
-    else if (usage == WINED3DDECLUSAGE_BLENDWEIGHT && usage_idx == 0)
-        *regnum = 1;
-    else if (usage == WINED3DDECLUSAGE_BLENDINDICES && usage_idx == 0)
-        *regnum = 2;
-    else if (usage == WINED3DDECLUSAGE_NORMAL && usage_idx == 0)
-        *regnum = 3;
-    else if (usage == WINED3DDECLUSAGE_PSIZE && usage_idx == 0)
-        *regnum = 4;
-    else if (usage == WINED3DDECLUSAGE_COLOR && usage_idx == 0)
-        *regnum = 5;
-    else if (usage == WINED3DDECLUSAGE_COLOR && usage_idx == 1)
-        *regnum = 6;
-    else if (usage == WINED3DDECLUSAGE_TEXCOORD && usage_idx < WINED3DDP_MAXTEXCOORD)
-        *regnum = 7 + usage_idx;
-    else if ((usage == WINED3DDECLUSAGE_POSITION || usage == WINED3DDECLUSAGE_POSITIONT) && usage_idx == 1)
-        *regnum = 7 + WINED3DDP_MAXTEXCOORD;
-    else if (usage == WINED3DDECLUSAGE_NORMAL && usage_idx == 1)
-        *regnum = 8 + WINED3DDP_MAXTEXCOORD;
-    else if (usage == WINED3DDECLUSAGE_TANGENT && usage_idx == 0)
-        *regnum = 9 + WINED3DDP_MAXTEXCOORD;
-    else if (usage == WINED3DDECLUSAGE_BINORMAL && usage_idx == 0)
-        *regnum = 10 + WINED3DDP_MAXTEXCOORD;
-    else if (usage == WINED3DDECLUSAGE_TESSFACTOR && usage_idx == 0)
-        *regnum = 11 + WINED3DDP_MAXTEXCOORD;
-    else if (usage == WINED3DDECLUSAGE_FOG && usage_idx == 0)
-        *regnum = 12 + WINED3DDP_MAXTEXCOORD;
-    else if (usage == WINED3DDECLUSAGE_DEPTH && usage_idx == 0)
-        *regnum = 13 + WINED3DDP_MAXTEXCOORD;
-    else if (usage == WINED3DDECLUSAGE_SAMPLE && usage_idx == 0)
-        *regnum = 14 + WINED3DDP_MAXTEXCOORD;
-
-    if (*regnum == -1) {
-        FIXME("Unsupported input stream [usage=%s, usage_idx=%u]\n",
-            debug_d3ddeclusage(usage), usage_idx);
-        return FALSE;
-    }
-    return TRUE;
-}
-
-void primitiveDeclarationConvertToStridedData(
-     IWineD3DDevice *iface,
-     BOOL useVertexShaderFunction,
-     WineDirect3DVertexStridedData *strided,
-     BOOL *fixup) {
-
-     /* We need to deal with frequency data!*/
-
-    const BYTE *data = NULL;
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DVertexDeclarationImpl* vertexDeclaration = (IWineD3DVertexDeclarationImpl *)This->stateBlock->vertexDecl;
-    unsigned int i;
-    const WINED3DVERTEXELEMENT *element;
-    DWORD stride;
-    DWORD numPreloadStreams = This->stateBlock->streamIsUP ? 0 : vertexDeclaration->num_streams;
-    const DWORD *streams = vertexDeclaration->streams;
-
-    /* Check for transformed vertices, disable vertex shader if present */
-    strided->u.s.position_transformed = vertexDeclaration->position_transformed;
-    if(vertexDeclaration->position_transformed) {
-        useVertexShaderFunction = FALSE;
-    }
-
-    /* Translate the declaration into strided data */
-    for (i = 0 ; i < vertexDeclaration->declarationWNumElements - 1; ++i) {
-        GLint streamVBO = 0;
-        BOOL stride_used;
-        unsigned int idx;
-
-        element = vertexDeclaration->pDeclarationWine + i;
-        TRACE("%p Element %p (%u of %u)\n", vertexDeclaration->pDeclarationWine,
-            element,  i + 1, vertexDeclaration->declarationWNumElements - 1);
-
-        if (This->stateBlock->streamSource[element->Stream] == NULL)
-            continue;
-
-        stride  = This->stateBlock->streamStride[element->Stream];
-        if (This->stateBlock->streamIsUP) {
-            TRACE("Stream is up %d, %p\n", element->Stream, This->stateBlock->streamSource[element->Stream]);
-            streamVBO = 0;
-            data    = (BYTE *)This->stateBlock->streamSource[element->Stream];
-        } else {
-            TRACE("Stream isn't up %d, %p\n", element->Stream, This->stateBlock->streamSource[element->Stream]);
-            data    = IWineD3DVertexBufferImpl_GetMemory(This->stateBlock->streamSource[element->Stream], 0, &streamVBO);
-
-            /* Can't use vbo's if the base vertex index is negative. OpenGL doesn't accept negative offsets
-             * (or rather offsets bigger than the vbo, because the pointer is unsigned), so use system memory
-             * sources. In most sane cases the pointer - offset will still be > 0, otherwise it will wrap
-             * around to some big value. Hope that with the indices, the driver wraps it back internally. If
-             * not, drawStridedSlow is needed, including a vertex buffer path.
-             */
-            if(This->stateBlock->loadBaseVertexIndex < 0) {
-                WARN("loadBaseVertexIndex is < 0 (%d), not using vbos\n", This->stateBlock->loadBaseVertexIndex);
-                streamVBO = 0;
-                data = ((IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[element->Stream])->resource.allocatedMemory;
-                if((UINT_PTR)data < -This->stateBlock->loadBaseVertexIndex * stride) {
-                    FIXME("System memory vertex data load offset is negative!\n");
-                }
-            }
-
-            if(fixup) {
-                if( streamVBO != 0) *fixup = TRUE;
-                else if(*fixup && !useVertexShaderFunction &&
-                       (element->Usage == WINED3DDECLUSAGE_COLOR ||
-                        element->Usage == WINED3DDECLUSAGE_POSITIONT)) {
-                    static BOOL warned = FALSE;
-                    if(!warned) {
-			/* This may be bad with the fixed function pipeline */
-			FIXME("Missing vbo streams with unfixed colors or transformed position, expect problems\n");
-                        warned = TRUE;
-                    }
-                }
-            }
-        }
-        data += element->Offset;
-
-        TRACE("Offset %d Stream %d UsageIndex %d\n", element->Offset, element->Stream, element->UsageIndex);
-
-        if (useVertexShaderFunction)
-            stride_used = vshader_get_input(This->stateBlock->vertexShader,
-                element->Usage, element->UsageIndex, &idx);
-        else
-            stride_used = fixed_get_input(element->Usage, element->UsageIndex, &idx);
-
-        if (stride_used) {
-            TRACE("Load %s array %u [usage=%s, usage_idx=%u, "
-                    "stream=%u, offset=%u, stride=%u, type=%s, VBO=%u]\n",
-                    useVertexShaderFunction? "shader": "fixed function", idx,
-                    debug_d3ddeclusage(element->Usage), element->UsageIndex,
-                    element->Stream, element->Offset, stride, debug_d3ddecltype(element->Type), streamVBO);
-
-            if (!useVertexShaderFunction && !vertexDeclaration->ffp_valid[i]) {
-                WARN("Skipping unsupported fixed function element of type %s and usage %s\n",
-                    debug_d3ddecltype(element->Type), debug_d3ddeclusage(element->Usage));
-            } else {
-                strided->u.input[idx].lpData = data;
-                strided->u.input[idx].dwType = element->Type;
-                strided->u.input[idx].dwStride = stride;
-                strided->u.input[idx].VBO = streamVBO;
-                strided->u.input[idx].streamNo = element->Stream;
-            }
-        }
-    }
-    /* Now call PreLoad on all the vertex buffers. In the very rare case
-     * that the buffers stopps converting PreLoad will dirtify the VDECL again.
-     * The vertex buffer can now use the strided structure in the device instead of finding its
-     * own again.
-     *
-     * NULL streams won't be recorded in the array, UP streams won't be either. A stream is only
-     * once in there.
-     */
-    for(i=0; i < numPreloadStreams; i++) {
-        IWineD3DVertexBuffer *vb = This->stateBlock->streamSource[streams[i]];
-        if(vb) {
-            IWineD3DVertexBuffer_PreLoad(vb);
-        }
-    }
-}
-
-static void drawStridedFast(IWineD3DDevice *iface,UINT numberOfVertices, GLenum glPrimitiveType,
-                     const void *idxData, short idxSize, ULONG minIndex, ULONG startIdx, ULONG startVertex) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-
-    if (idxSize != 0 /* This crashes sometimes!*/) {
-        TRACE("(%p) : glElements(%x, %d, %d, ...)\n", This, glPrimitiveType, numberOfVertices, minIndex);
-        idxData = idxData == (void *)-1 ? NULL : idxData;
+
+    if (idx_size)
+    {
+        TRACE("(%p) : glElements(%x, %d, %d, ...)\n", This, primitive_type, count, min_vertex_idx);
+
 #if 1
-        glDrawElements(glPrimitiveType, numberOfVertices, idxSize == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT,
-                     (const char *)idxData+(idxSize * startIdx));
+        glDrawElements(primitive_type, count,
+                idx_size == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT,
+                (const char *)idx_data + (idx_size * start_idx));
         checkGLcall("glDrawElements");
-#else /* using drawRangeElements may be faster */
-
-        glDrawRangeElements(glPrimitiveType, minIndex, minIndex + numberOfVertices - 1, numberOfVertices,
-                      idxSize == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT,
-                      (const char *)idxData+(idxSize * startIdx));
+#else
+        glDrawRangeElements(primitive_type, min_vertex_idx, max_vertex_idx, count,
+                idx_size == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT,
+                (const char *)idx_data + (idx_size * start_idx));
         checkGLcall("glDrawRangeElements");
 #endif
-
-    } else {
-        TRACE("(%p) : glDrawArrays(%#x, %d, %d)\n", This, glPrimitiveType, startVertex, numberOfVertices);
-        glDrawArrays(glPrimitiveType, startVertex, numberOfVertices);
+    }
+    else
+    {
+        TRACE("(%p) : glDrawArrays(%#x, %d, %d)\n", This, primitive_type, start_idx, count);
+
+        glDrawArrays(primitive_type, start_idx, count);
         checkGLcall("glDrawArrays");
     }
-
-    return;
 }
 
@@ -296,19 +80,20 @@
  */
 
-static void drawStridedSlow(IWineD3DDevice *iface, const WineDirect3DVertexStridedData *sd, UINT NumVertexes,
-        GLenum glPrimType, const void *idxData, short idxSize, ULONG minIndex, ULONG startIdx, ULONG startVertex)
+static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_stream_info *si, UINT NumVertexes,
+        GLenum glPrimType, const void *idxData, UINT idxSize, UINT minIndex, UINT startIdx)
 {
     unsigned int               textureNo    = 0;
     const WORD                *pIdxBufS     = NULL;
     const DWORD               *pIdxBufL     = NULL;
-    ULONG                      vx_index;
+    UINT vx_index;
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     const UINT *streamOffset = This->stateBlock->streamOffset;
-    long                      SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex;
-    BOOL                      pixelShader = use_ps(This);
+    long                      SkipnStrides = startIdx + This->stateBlock->loadBaseVertexIndex;
+    BOOL                      pixelShader = use_ps(This->stateBlock);
     BOOL specular_fog = FALSE;
     UINT texture_stages = GL_LIMITS(texture_stages);
     const BYTE *texCoords[WINED3DDP_MAXTEXCOORD];
     const BYTE *diffuse = NULL, *specular = NULL, *normal = NULL, *position = NULL;
+    const struct wined3d_stream_info_element *element;
     DWORD tex_mask = 0;
 
@@ -322,9 +107,9 @@
          */
         if(idxData == NULL) {
-            idxData = ((IWineD3DIndexBufferImpl *) This->stateBlock->pIndexData)->resource.allocatedMemory;
-        }
-
-        if (idxSize == 2) pIdxBufS = (const WORD *) idxData;
-        else pIdxBufL = (const DWORD *) idxData;
+            idxData = buffer_get_sysmem((struct wined3d_buffer *) This->stateBlock->pIndexData);
+        }
+
+        if (idxSize == 2) pIdxBufS = idxData;
+        else pIdxBufL = idxData;
     } else if (idxData) {
         ERR("non-NULL idxData with 0 idxSize, this should never happen\n");
@@ -336,28 +121,32 @@
     glBegin(glPrimType);
 
-    if (sd->u.s.position.lpData) position = sd->u.s.position.lpData + streamOffset[sd->u.s.position.streamNo];
-
-    if (sd->u.s.normal.lpData) normal = sd->u.s.normal.lpData + streamOffset[sd->u.s.normal.streamNo];
+    element = &si->elements[WINED3D_FFP_POSITION];
+    if (element->data) position = element->data + streamOffset[element->stream_idx];
+
+    element = &si->elements[WINED3D_FFP_NORMAL];
+    if (element->data) normal = element->data + streamOffset[element->stream_idx];
     else glNormal3f(0, 0, 0);
 
-    if (sd->u.s.diffuse.lpData) diffuse = sd->u.s.diffuse.lpData + streamOffset[sd->u.s.diffuse.streamNo];
+    element = &si->elements[WINED3D_FFP_DIFFUSE];
+    if (element->data) diffuse = element->data + streamOffset[element->stream_idx];
     else glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
-    if (This->activeContext->num_untracked_materials && sd->u.s.diffuse.dwType != WINED3DDECLTYPE_D3DCOLOR)
-        FIXME("Implement diffuse color tracking from %s\n", debug_d3ddecltype(sd->u.s.diffuse.dwType));
-
-    if (sd->u.s.specular.lpData)
+    if (This->activeContext->num_untracked_materials && element->format_desc->format != WINED3DFMT_A8R8G8B8)
+        FIXME("Implement diffuse color tracking from %s\n", debug_d3dformat(element->format_desc->format));
+
+    element = &si->elements[WINED3D_FFP_SPECULAR];
+    if (element->data)
     {
-        specular = sd->u.s.specular.lpData + streamOffset[sd->u.s.specular.streamNo];
+        specular = element->data + streamOffset[element->stream_idx];
 
         /* special case where the fog density is stored in the specular alpha channel */
         if (This->stateBlock->renderState[WINED3DRS_FOGENABLE]
                 && (This->stateBlock->renderState[WINED3DRS_FOGVERTEXMODE] == WINED3DFOG_NONE
-                    || sd->u.s.position.dwType == WINED3DDECLTYPE_FLOAT4)
+                    || si->elements[WINED3D_FFP_POSITION].format_desc->format == WINED3DFMT_R32G32B32A32_FLOAT)
                 && This->stateBlock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE)
         {
             if (GL_SUPPORT(EXT_FOG_COORD))
             {
-                if (sd->u.s.specular.dwType == WINED3DDECLTYPE_D3DCOLOR) specular_fog = TRUE;
-                else FIXME("Implement fog coordinates from %s\n", debug_d3ddecltype(sd->u.s.specular.dwType));
+                if (element->format_desc->format == WINED3DFMT_A8R8G8B8) specular_fog = TRUE;
+                else FIXME("Implement fog coordinates from %s\n", debug_d3dformat(element->format_desc->format));
             }
             else
@@ -405,8 +194,8 @@
         }
 
-        if(sd->u.s.texCoords[textureNo].lpData)
-        {
-            texCoords[textureNo] =
-                    sd->u.s.texCoords[textureNo].lpData + streamOffset[sd->u.s.texCoords[textureNo].streamNo];
+        element = &si->elements[WINED3D_FFP_TEXCOORD0 + coordIdx];
+        if (element->data)
+        {
+            texCoords[coordIdx] = element->data + streamOffset[element->stream_idx];
             tex_mask |= (1 << textureNo);
         }
@@ -450,26 +239,21 @@
             int coord_idx;
             const void *ptr;
+            int texture_idx;
 
             if (!(tmp_tex_mask & 1)) continue;
 
             coord_idx = This->stateBlock->textureState[texture][WINED3DTSS_TEXCOORDINDEX];
-            ptr = texCoords[coord_idx] + (SkipnStrides * sd->u.s.texCoords[coord_idx].dwStride);
-
-            if (GL_SUPPORT(ARB_MULTITEXTURE))
-            {
-                int texture_idx = This->texUnitMap[texture];
-                multi_texcoord_funcs[sd->u.s.texCoords[coord_idx].dwType](GL_TEXTURE0_ARB + texture_idx, ptr);
-            }
-            else
-            {
-                texcoord_funcs[sd->u.s.texCoords[coord_idx].dwType](ptr);
-            }
+            ptr = texCoords[coord_idx] + (SkipnStrides * si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].stride);
+
+            texture_idx = This->texUnitMap[texture];
+            multi_texcoord_funcs[si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format_desc->emit_idx](
+                    GL_TEXTURE0_ARB + texture_idx, ptr);
         }
 
         /* Diffuse -------------------------------- */
         if (diffuse) {
-            const void *ptrToCoords = diffuse + SkipnStrides * sd->u.s.diffuse.dwStride;
-
-            diffuse_funcs[sd->u.s.diffuse.dwType](ptrToCoords);
+            const void *ptrToCoords = diffuse + SkipnStrides * si->elements[WINED3D_FFP_DIFFUSE].stride;
+
+            diffuse_funcs[si->elements[WINED3D_FFP_DIFFUSE].format_desc->emit_idx](ptrToCoords);
             if(This->activeContext->num_untracked_materials) {
                 DWORD diffuseColor = ((const DWORD *)ptrToCoords)[0];
@@ -490,7 +274,7 @@
         /* Specular ------------------------------- */
         if (specular) {
-            const void *ptrToCoords = specular + SkipnStrides * sd->u.s.specular.dwStride;
-
-            specular_funcs[sd->u.s.specular.dwType](ptrToCoords);
+            const void *ptrToCoords = specular + SkipnStrides * si->elements[WINED3D_FFP_SPECULAR].stride;
+
+            specular_funcs[si->elements[WINED3D_FFP_SPECULAR].format_desc->emit_idx](ptrToCoords);
 
             if (specular_fog)
@@ -503,12 +287,12 @@
         /* Normal -------------------------------- */
         if (normal != NULL) {
-            const void *ptrToCoords = normal + SkipnStrides * sd->u.s.normal.dwStride;
-            normal_funcs[sd->u.s.normal.dwType](ptrToCoords);
+            const void *ptrToCoords = normal + SkipnStrides * si->elements[WINED3D_FFP_NORMAL].stride;
+            normal_funcs[si->elements[WINED3D_FFP_NORMAL].format_desc->emit_idx](ptrToCoords);
         }
 
         /* Position -------------------------------- */
         if (position) {
-            const void *ptrToCoords = position + SkipnStrides * sd->u.s.position.dwStride;
-            position_funcs[sd->u.s.position.dwType](ptrToCoords);
+            const void *ptrToCoords = position + SkipnStrides * si->elements[WINED3D_FFP_POSITION].stride;
+            position_funcs[si->elements[WINED3D_FFP_POSITION].format_desc->emit_idx](ptrToCoords);
         }
 
@@ -523,35 +307,47 @@
 }
 
-static inline void send_attribute(IWineD3DDeviceImpl *This, const DWORD type, const UINT index, const void *ptr) {
-    switch(type) {
-        case WINED3DDECLTYPE_FLOAT1:
-            GL_EXTCALL(glVertexAttrib1fvARB(index, (const float *)ptr));
-            break;
-        case WINED3DDECLTYPE_FLOAT2:
-            GL_EXTCALL(glVertexAttrib2fvARB(index, (const float *)ptr));
-            break;
-        case WINED3DDECLTYPE_FLOAT3:
-            GL_EXTCALL(glVertexAttrib3fvARB(index, (const float *)ptr));
-            break;
-        case WINED3DDECLTYPE_FLOAT4:
-            GL_EXTCALL(glVertexAttrib4fvARB(index, (const float *)ptr));
-            break;
-
-        case WINED3DDECLTYPE_UBYTE4:
+static inline void send_attribute(IWineD3DDeviceImpl *This, WINED3DFORMAT format, const UINT index, const void *ptr)
+{
+    switch(format)
+    {
+        case WINED3DFMT_R32_FLOAT:
+            GL_EXTCALL(glVertexAttrib1fvARB(index, ptr));
+            break;
+        case WINED3DFMT_R32G32_FLOAT:
+            GL_EXTCALL(glVertexAttrib2fvARB(index, ptr));
+            break;
+        case WINED3DFMT_R32G32B32_FLOAT:
+            GL_EXTCALL(glVertexAttrib3fvARB(index, ptr));
+            break;
+        case WINED3DFMT_R32G32B32A32_FLOAT:
+            GL_EXTCALL(glVertexAttrib4fvARB(index, ptr));
+            break;
+
+        case WINED3DFMT_R8G8B8A8_UINT:
             GL_EXTCALL(glVertexAttrib4ubvARB(index, ptr));
             break;
-        case WINED3DDECLTYPE_UBYTE4N:
-        case WINED3DDECLTYPE_D3DCOLOR:
+        case WINED3DFMT_A8R8G8B8:
+            if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
+            {
+                const DWORD *src = ptr;
+                DWORD c = *src & 0xff00ff00;
+                c |= (*src & 0xff0000) >> 16;
+                c |= (*src & 0xff) << 16;
+                GL_EXTCALL(glVertexAttrib4NubvARB(index, (GLubyte *)&c));
+                break;
+            }
+            /* else fallthrough */
+        case WINED3DFMT_R8G8B8A8_UNORM:
             GL_EXTCALL(glVertexAttrib4NubvARB(index, ptr));
             break;
 
-        case WINED3DDECLTYPE_SHORT2:
-            GL_EXTCALL(glVertexAttrib4svARB(index, (const GLshort *)ptr));
-            break;
-        case WINED3DDECLTYPE_SHORT4:
-            GL_EXTCALL(glVertexAttrib4svARB(index, (const GLshort *)ptr));
-            break;
-
-        case WINED3DDECLTYPE_SHORT2N:
+        case WINED3DFMT_R16G16_SINT:
+            GL_EXTCALL(glVertexAttrib4svARB(index, ptr));
+            break;
+        case WINED3DFMT_R16G16B16A16_SINT:
+            GL_EXTCALL(glVertexAttrib4svARB(index, ptr));
+            break;
+
+        case WINED3DFMT_R16G16_SNORM:
         {
             GLshort s[4] = {((const GLshort *)ptr)[0], ((const GLshort *)ptr)[1], 0, 1};
@@ -559,5 +355,5 @@
             break;
         }
-        case WINED3DDECLTYPE_USHORT2N:
+        case WINED3DFMT_R16G16_UNORM:
         {
             GLushort s[4] = {((const GLushort *)ptr)[0], ((const GLushort *)ptr)[1], 0, 1};
@@ -565,26 +361,27 @@
             break;
         }
-        case WINED3DDECLTYPE_SHORT4N:
-            GL_EXTCALL(glVertexAttrib4NsvARB(index, (const GLshort *)ptr));
-            break;
-        case WINED3DDECLTYPE_USHORT4N:
-            GL_EXTCALL(glVertexAttrib4NusvARB(index, (const GLushort *)ptr));
-            break;
-
-        case WINED3DDECLTYPE_UDEC3:
+        case WINED3DFMT_R16G16B16A16_SNORM:
+            GL_EXTCALL(glVertexAttrib4NsvARB(index, ptr));
+            break;
+        case WINED3DFMT_R16G16B16A16_UNORM:
+            GL_EXTCALL(glVertexAttrib4NusvARB(index, ptr));
+            break;
+
+        case WINED3DFMT_R10G10B10A2_UINT:
             FIXME("Unsure about WINED3DDECLTYPE_UDEC3\n");
             /*glVertexAttrib3usvARB(instancedData[j], (GLushort *) ptr); Does not exist */
             break;
-        case WINED3DDECLTYPE_DEC3N:
+        case WINED3DFMT_R10G10B10A2_SNORM:
             FIXME("Unsure about WINED3DDECLTYPE_DEC3N\n");
             /*glVertexAttrib3NusvARB(instancedData[j], (GLushort *) ptr); Does not exist */
             break;
 
-        case WINED3DDECLTYPE_FLOAT16_2:
+        case WINED3DFMT_R16G16_FLOAT:
             /* Are those 16 bit floats. C doesn't have a 16 bit float type. I could read the single bits and calculate a 4
              * byte float according to the IEEE standard
              */
             if (GL_SUPPORT(NV_HALF_FLOAT)) {
-                GL_EXTCALL(glVertexAttrib2hvNV(index, (const GLhalfNV *)ptr));
+                /* Not supported by GL_ARB_half_float_vertex */
+                GL_EXTCALL(glVertexAttrib2hvNV(index, ptr));
             } else {
                 float x = float_16_to_32(((const unsigned short *)ptr) + 0);
@@ -593,7 +390,8 @@
             }
             break;
-        case WINED3DDECLTYPE_FLOAT16_4:
+        case WINED3DFMT_R16G16B16A16_FLOAT:
             if (GL_SUPPORT(NV_HALF_FLOAT)) {
-                GL_EXTCALL(glVertexAttrib4hvNV(index, (const GLhalfNV *)ptr));
+                /* Not supported by GL_ARB_half_float_vertex */
+                GL_EXTCALL(glVertexAttrib4hvNV(index, ptr));
             } else {
                 float x = float_16_to_32(((const unsigned short *)ptr) + 0);
@@ -605,19 +403,18 @@
             break;
 
-        case WINED3DDECLTYPE_UNUSED:
         default:
-            ERR("Unexpected attribute declaration: %d\n", type);
+            ERR("Unexpected attribute format: %s\n", debug_d3dformat(format));
             break;
     }
 }
 
-static void drawStridedSlowVs(IWineD3DDevice *iface, const WineDirect3DVertexStridedData *sd, UINT numberOfVertices,
-        GLenum glPrimitiveType, const void *idxData, short idxSize, ULONG minIndex, ULONG startIdx, ULONG startVertex)
+static void drawStridedSlowVs(IWineD3DDevice *iface, const struct wined3d_stream_info *si, UINT numberOfVertices,
+        GLenum glPrimitiveType, const void *idxData, UINT idxSize, UINT minIndex, UINT startIdx)
 {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
-    long                      SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex;
+    long                      SkipnStrides = startIdx + This->stateBlock->loadBaseVertexIndex;
     const WORD                *pIdxBufS     = NULL;
     const DWORD               *pIdxBufL     = NULL;
-    ULONG                      vx_index;
+    UINT vx_index;
     int i;
     IWineD3DStateBlockImpl *stateblock = This->stateBlock;
@@ -630,9 +427,9 @@
          */
         if(idxData == NULL) {
-            idxData = ((IWineD3DIndexBufferImpl *) stateblock->pIndexData)->resource.allocatedMemory;
-        }
-
-        if (idxSize == 2) pIdxBufS = (const WORD *) idxData;
-        else pIdxBufL = (const DWORD *) idxData;
+            idxData = buffer_get_sysmem((struct wined3d_buffer *) This->stateBlock->pIndexData);
+        }
+
+        if (idxSize == 2) pIdxBufS = idxData;
+        else pIdxBufL = idxData;
     } else if (idxData) {
         ERR("non-NULL idxData with 0 idxSize, this should never happen\n");
@@ -658,11 +455,11 @@
 
         for(i = MAX_ATTRIBS - 1; i >= 0; i--) {
-            if(!sd->u.input[i].lpData) continue;
-
-            ptr = sd->u.input[i].lpData +
-                  sd->u.input[i].dwStride * SkipnStrides +
-                  stateblock->streamOffset[sd->u.input[i].streamNo];
-
-            send_attribute(This, sd->u.input[i].dwType, i, ptr);
+            if(!si->elements[i].data) continue;
+
+            ptr = si->elements[i].data +
+                  si->elements[i].stride * SkipnStrides +
+                  stateblock->streamOffset[si->elements[i].stream_idx];
+
+            send_attribute(This, si->elements[i].format_desc->format, i, ptr);
         }
         SkipnStrides++;
@@ -672,11 +469,11 @@
 }
 
-static inline void drawStridedInstanced(IWineD3DDevice *iface, const WineDirect3DVertexStridedData *sd,
-        UINT numberOfVertices, GLenum glPrimitiveType, const void *idxData, short idxSize, ULONG minIndex,
-        ULONG startIdx, ULONG startVertex)
+static inline void drawStridedInstanced(IWineD3DDevice *iface, const struct wined3d_stream_info *si,
+        UINT numberOfVertices, GLenum glPrimitiveType, const void *idxData, UINT idxSize, UINT minIndex,
+        UINT startIdx)
 {
     UINT numInstances = 0, i;
     int numInstancedAttribs = 0, j;
-    UINT instancedData[sizeof(sd->u.input) / sizeof(sd->u.input[0]) /* 16 */];
+    UINT instancedData[sizeof(si->elements) / sizeof(*si->elements) /* 16 */];
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
     IWineD3DStateBlockImpl *stateblock = This->stateBlock;
@@ -694,5 +491,4 @@
 
     TRACE("(%p) : glElements(%x, %d, %d, ...)\n", This, glPrimitiveType, numberOfVertices, minIndex);
-    idxData = idxData == (void *)-1 ? NULL : idxData;
 
     /* First, figure out how many instances we have to draw */
@@ -710,6 +506,8 @@
     }
 
-    for(i = 0; i < sizeof(sd->u.input) / sizeof(sd->u.input[0]); i++) {
-        if(stateblock->streamFlags[sd->u.input[i].streamNo] & WINED3DSTREAMSOURCE_INSTANCEDATA) {
+    for (i = 0; i < sizeof(si->elements) / sizeof(*si->elements); ++i)
+    {
+        if (stateblock->streamFlags[si->elements[i].stream_idx] & WINED3DSTREAMSOURCE_INSTANCEDATA)
+        {
             instancedData[numInstancedAttribs] = i;
             numInstancedAttribs++;
@@ -721,13 +519,15 @@
         /* Specify the instanced attributes using immediate mode calls */
         for(j = 0; j < numInstancedAttribs; j++) {
-            const BYTE *ptr = sd->u.input[instancedData[j]].lpData +
-                        sd->u.input[instancedData[j]].dwStride * i +
-                        stateblock->streamOffset[sd->u.input[instancedData[j]].streamNo];
-            if(sd->u.input[instancedData[j]].VBO) {
-                IWineD3DVertexBufferImpl *vb = (IWineD3DVertexBufferImpl *) stateblock->streamSource[sd->u.input[instancedData[j]].streamNo];
-                ptr += (long) vb->resource.allocatedMemory;
-            }
-
-            send_attribute(This, sd->u.input[instancedData[j]].dwType, instancedData[j], ptr);
+            const BYTE *ptr = si->elements[instancedData[j]].data +
+                        si->elements[instancedData[j]].stride * i +
+                        stateblock->streamOffset[si->elements[instancedData[j]].stream_idx];
+            if (si->elements[instancedData[j]].buffer_object)
+            {
+                struct wined3d_buffer *vb =
+                        (struct wined3d_buffer *)stateblock->streamSource[si->elements[instancedData[j]].stream_idx];
+                ptr += (long) buffer_get_sysmem(vb);
+            }
+
+            send_attribute(This, si->elements[instancedData[j]].format_desc->format, instancedData[j], ptr);
         }
 
@@ -738,103 +538,24 @@
 }
 
-static inline void remove_vbos(IWineD3DDeviceImpl *This, WineDirect3DVertexStridedData *s) {
-    unsigned char i;
-    IWineD3DVertexBufferImpl *vb;
-
-    if(s->u.s.position.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.position.streamNo];
-        s->u.s.position.VBO = 0;
-        s->u.s.position.lpData = (BYTE *) ((unsigned long) s->u.s.position.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.blendWeights.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.blendWeights.streamNo];
-        s->u.s.blendWeights.VBO = 0;
-        s->u.s.blendWeights.lpData = (BYTE *) ((unsigned long) s->u.s.blendWeights.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.blendMatrixIndices.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.blendMatrixIndices.streamNo];
-        s->u.s.blendMatrixIndices.VBO = 0;
-        s->u.s.blendMatrixIndices.lpData = (BYTE *) ((unsigned long) s->u.s.blendMatrixIndices.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.normal.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.normal.streamNo];
-        s->u.s.normal.VBO = 0;
-        s->u.s.normal.lpData = (BYTE *) ((unsigned long) s->u.s.normal.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.pSize.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.pSize.streamNo];
-        s->u.s.pSize.VBO = 0;
-        s->u.s.pSize.lpData = (BYTE *) ((unsigned long) s->u.s.pSize.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.diffuse.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.diffuse.streamNo];
-        s->u.s.diffuse.VBO = 0;
-        s->u.s.diffuse.lpData = (BYTE *) ((unsigned long) s->u.s.diffuse.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.specular.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.specular.streamNo];
-        s->u.s.specular.VBO = 0;
-        s->u.s.specular.lpData = (BYTE *) ((unsigned long) s->u.s.specular.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    for(i = 0; i < WINED3DDP_MAXTEXCOORD; i++) {
-        if(s->u.s.texCoords[i].VBO) {
-            vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.texCoords[i].streamNo];
-            s->u.s.texCoords[i].VBO = 0;
-            s->u.s.texCoords[i].lpData = (BYTE *) ((unsigned long) s->u.s.texCoords[i].lpData + (unsigned long) vb->resource.allocatedMemory);
-        }
-    }
-    if(s->u.s.position2.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.position2.streamNo];
-        s->u.s.position2.VBO = 0;
-        s->u.s.position2.lpData = (BYTE *) ((unsigned long) s->u.s.position2.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.normal2.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.normal2.streamNo];
-        s->u.s.normal2.VBO = 0;
-        s->u.s.normal2.lpData = (BYTE *) ((unsigned long) s->u.s.normal2.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.tangent.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.tangent.streamNo];
-        s->u.s.tangent.VBO = 0;
-        s->u.s.tangent.lpData = (BYTE *) ((unsigned long) s->u.s.tangent.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.binormal.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.binormal.streamNo];
-        s->u.s.binormal.VBO = 0;
-        s->u.s.binormal.lpData = (BYTE *) ((unsigned long) s->u.s.binormal.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.tessFactor.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.tessFactor.streamNo];
-        s->u.s.tessFactor.VBO = 0;
-        s->u.s.tessFactor.lpData = (BYTE *) ((unsigned long) s->u.s.tessFactor.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.fog.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.fog.streamNo];
-        s->u.s.fog.VBO = 0;
-        s->u.s.fog.lpData = (BYTE *) ((unsigned long) s->u.s.fog.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.depth.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.depth.streamNo];
-        s->u.s.depth.VBO = 0;
-        s->u.s.depth.lpData = (BYTE *) ((unsigned long) s->u.s.depth.lpData + (unsigned long) vb->resource.allocatedMemory);
-    }
-    if(s->u.s.sample.VBO) {
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.sample.streamNo];
-        s->u.s.sample.VBO = 0;
-        s->u.s.sample.lpData = (BYTE *) ((unsigned long) s->u.s.sample.lpData + (unsigned long) vb->resource.allocatedMemory);
+static inline void remove_vbos(IWineD3DDeviceImpl *This, struct wined3d_stream_info *s)
+{
+    unsigned int i;
+
+    for (i = 0; i < (sizeof(s->elements) / sizeof(*s->elements)); ++i)
+    {
+        struct wined3d_stream_info_element *e = &s->elements[i];
+        if (e->buffer_object)
+        {
+            struct wined3d_buffer *vb = (struct wined3d_buffer *)This->stateBlock->streamSource[e->stream_idx];
+            e->buffer_object = 0;
+            e->data = (BYTE *)((unsigned long)e->data + (unsigned long)buffer_get_sysmem(vb));
+        }
     }
 }
 
 /* Routine common to the draw primitive and draw indexed primitive routines */
-void drawPrimitive(IWineD3DDevice *iface,
-                   int PrimitiveType,
-                   long NumPrimitives,
-                   /* for Indexed: */
-                   long  StartVertexIndex,
-                   UINT  numberOfVertices,
-                   long  StartIdx,
-                   short idxSize,
-                   const void *idxData,
-                   int   minIndex) {
+void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT numberOfVertices,
+        UINT StartIdx, UINT idxSize, const void *idxData, UINT minIndex)
+{
 
     IWineD3DDeviceImpl           *This = (IWineD3DDeviceImpl *)iface;
@@ -842,5 +563,5 @@
     unsigned int i;
 
-    if (NumPrimitives == 0) return;
+    if (!index_count) return;
 
     /* Invalidate the back buffer memory so LockRect will read it the next time */
@@ -869,17 +590,16 @@
     ENTER_GL();
     {
-        GLenum glPrimType;
+        GLenum glPrimType = This->stateBlock->gl_primitive_type;
         BOOL emulation = FALSE;
-        const WineDirect3DVertexStridedData *strided = &This->strided_streams;
-        WineDirect3DVertexStridedData stridedlcl;
-        /* Ok, Work out which primitive is requested and how many vertexes that
-           will be                                                              */
-        UINT calculatedNumberOfindices = primitiveToGl(PrimitiveType, NumPrimitives, &glPrimType);
-        if (numberOfVertices == 0 )
-            numberOfVertices = calculatedNumberOfindices;
-
-        if(!use_vs(This)) {
-            if(!This->strided_streams.u.s.position_transformed && This->activeContext->num_untracked_materials &&
-                This->stateBlock->renderState[WINED3DRS_LIGHTING]) {
+        const struct wined3d_stream_info *stream_info = &This->strided_streams;
+        struct wined3d_stream_info stridedlcl;
+
+        if (!numberOfVertices) numberOfVertices = index_count;
+
+        if (!use_vs(This->stateBlock))
+        {
+            if (!This->strided_streams.position_transformed && This->activeContext->num_untracked_materials
+                    && This->stateBlock->renderState[WINED3DRS_LIGHTING])
+            {
                 static BOOL warned;
                 if (!warned) {
@@ -906,5 +626,5 @@
 
             if(emulation) {
-                strided = &stridedlcl;
+                stream_info = &stridedlcl;
                 memcpy(&stridedlcl, &This->strided_streams, sizeof(stridedlcl));
                 remove_vbos(This, &stridedlcl);
@@ -914,5 +634,6 @@
         if (This->useDrawStridedSlow || emulation) {
             /* Immediate mode drawing */
-            if(use_vs(This)) {
+            if (use_vs(This->stateBlock))
+            {
                 static BOOL warned;
                 if (!warned) {
@@ -922,17 +643,15 @@
                     TRACE("Using immediate mode with vertex shaders for half float emulation\n");
                 }
-                drawStridedSlowVs(iface, strided, calculatedNumberOfindices, glPrimType,
-                                  idxData, idxSize, minIndex, StartIdx, StartVertexIndex);
+                drawStridedSlowVs(iface, stream_info, index_count, glPrimType, idxData, idxSize, minIndex, StartIdx);
             } else {
-                drawStridedSlow(iface, strided, calculatedNumberOfindices,
-                                glPrimType, idxData, idxSize, minIndex, StartIdx, StartVertexIndex);
+                drawStridedSlow(iface, stream_info, index_count, glPrimType, idxData, idxSize, minIndex, StartIdx);
             }
         } else if(This->instancedDraw) {
             /* Instancing emulation with mixing immediate mode and arrays */
-            drawStridedInstanced(iface, &This->strided_streams, calculatedNumberOfindices, glPrimType,
-                            idxData, idxSize, minIndex, StartIdx, StartVertexIndex);
+            drawStridedInstanced(iface, &This->strided_streams, index_count,
+                    glPrimType, idxData, idxSize, minIndex, StartIdx);
         } else {
-            drawStridedFast(iface, calculatedNumberOfindices, glPrimType,
-                            idxData, idxSize, minIndex, StartIdx, StartVertexIndex);
+            drawStridedFast(iface, glPrimType, minIndex, minIndex + numberOfVertices - 1,
+                    index_count, idxSize, idxData, StartIdx);
         }
     }
@@ -966,5 +685,5 @@
                     TRACE("Saving texture %s\n", buffer);
                     if (IWineD3DBaseTexture_GetType(This->stateBlock->textures[textureNo]) == WINED3DRTYPE_TEXTURE) {
-                            IWineD3DTexture_GetSurfaceLevel((IWineD3DTexture *)This->stateBlock->textures[textureNo], 0, &pSur);
+                            IWineD3DTexture_GetSurfaceLevel(This->stateBlock->textures[textureNo], 0, &pSur);
                             IWineD3DSurface_SaveSnapshot(pSur, buffer);
                             IWineD3DSurface_Release(pSur);
@@ -1021,5 +740,6 @@
     unsigned int i, j, num_quads, out_vertex_size, buffer_size, d3d_out_vertex_size;
     float max_x = 0.0, max_y = 0.0, max_z = 0.0, neg_z = 0.0;
-    WineDirect3DVertexStridedData strided;
+    struct wined3d_stream_info stream_info;
+    struct wined3d_stream_info_element *e;
     const BYTE *data;
     const WINED3DRECTPATCH_INFO *info = &patch->RectPatchInfo;
@@ -1031,21 +751,21 @@
      * Beware of vbos
      */
-    memset(&strided, 0, sizeof(strided));
-    primitiveDeclarationConvertToStridedData((IWineD3DDevice *) This, FALSE, &strided, NULL);
-    if(strided.u.s.position.VBO) {
-        IWineD3DVertexBufferImpl *vb;
-        vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[strided.u.s.position.streamNo];
-        strided.u.s.position.lpData = (BYTE *) ((unsigned long) strided.u.s.position.lpData +
-                                                (unsigned long) vb->resource.allocatedMemory);
-    }
-    vtxStride = strided.u.s.position.dwStride;
-    data = strided.u.s.position.lpData +
+    device_stream_info_from_declaration(This, FALSE, &stream_info, NULL);
+
+    e = &stream_info.elements[WINED3D_FFP_POSITION];
+    if (e->buffer_object)
+    {
+        struct wined3d_buffer *vb;
+        vb = (struct wined3d_buffer *)This->stateBlock->streamSource[e->stream_idx];
+        e->data = (BYTE *)((unsigned long)e->data + (unsigned long)buffer_get_sysmem(vb));
+    }
+    vtxStride = e->stride;
+    data = e->data +
            vtxStride * info->Stride * info->StartVertexOffsetHeight +
            vtxStride * info->StartVertexOffsetWidth;
 
     /* Not entirely sure about what happens with transformed vertices */
-    if(strided.u.s.position_transformed) {
-        FIXME("Transformed position in rectpatch generation\n");
-    }
+    if (stream_info.position_transformed) FIXME("Transformed position in rectpatch generation\n");
+
     if(vtxStride % sizeof(GLfloat)) {
         /* glMap2f reads vertex sizes in GLfloats, the d3d stride is in bytes.
@@ -1102,9 +822,9 @@
     IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_FILLMODE));
     if(patch->has_normals) {
-        const GLfloat black[4] = {0, 0, 0, 0};
-        const GLfloat red[4]   = {1, 0, 0, 0};
-        const GLfloat green[4] = {0, 1, 0, 0};
-        const GLfloat blue[4]  = {0, 0, 1, 0};
-        const GLfloat white[4] = {1, 1, 1, 1};
+        static const GLfloat black[] = {0, 0, 0, 0};
+        static const GLfloat red[]   = {1, 0, 0, 0};
+        static const GLfloat green[] = {0, 1, 0, 0};
+        static const GLfloat blue[]  = {0, 0, 1, 0};
+        static const GLfloat white[] = {1, 1, 1, 1};
         glEnable(GL_LIGHTING);
         checkGLcall("glEnable(GL_LIGHTING)");
@@ -1155,5 +875,5 @@
      * GL_MAP2_TEXTURE_COORD_4 for texture coords
      */
-    num_quads = ceil(patch->numSegs[0]) * ceil(patch->numSegs[1]);
+    num_quads = ceilf(patch->numSegs[0]) * ceilf(patch->numSegs[1]);
     out_vertex_size = 3 /* position */;
     d3d_out_vertex_size = 3;
@@ -1198,5 +918,5 @@
         checkGLcall("glMap2f");
     }
-    glMapGrid2f(ceil(patch->numSegs[0]), 0.0, 1.0, ceil(patch->numSegs[1]), 0.0, 1.0);
+    glMapGrid2f(ceilf(patch->numSegs[0]), 0.0, 1.0, ceilf(patch->numSegs[1]), 0.0, 1.0);
     checkGLcall("glMapGrid2f");
 
@@ -1205,5 +925,5 @@
     glRenderMode(GL_FEEDBACK);
 
-    glEvalMesh2(GL_FILL, 0, ceil(patch->numSegs[0]), 0, ceil(patch->numSegs[1]));
+    glEvalMesh2(GL_FILL, 0, ceilf(patch->numSegs[0]), 0, ceilf(patch->numSegs[1]));
     checkGLcall("glEvalMesh2\n");
 
@@ -1273,7 +993,7 @@
     if(patch->has_normals) {
         /* Now do the same with reverse light directions */
-        const GLfloat x[4] = {-1,  0,  0, 0};
-        const GLfloat y[4] = { 0, -1,  0, 0};
-        const GLfloat z[4] = { 0,  0, -1, 0};
+        static const GLfloat x[] = {-1,  0,  0, 0};
+        static const GLfloat y[] = { 0, -1,  0, 0};
+        static const GLfloat z[] = { 0,  0, -1, 0};
         glLightfv(GL_LIGHT0, GL_POSITION, x);
         glLightfv(GL_LIGHT1, GL_POSITION, y);
@@ -1283,5 +1003,5 @@
         glRenderMode(GL_FEEDBACK);
         checkGLcall("glRenderMode(GL_FEEDBACK)");
-        glEvalMesh2(GL_FILL, 0, ceil(patch->numSegs[0]), 0, ceil(patch->numSegs[1]));
+        glEvalMesh2(GL_FILL, 0, ceilf(patch->numSegs[0]), 0, ceilf(patch->numSegs[1]));
         checkGLcall("glEvalMesh2\n");
         i = glRenderMode(GL_RENDER);
@@ -1344,27 +1064,20 @@
     }
     memset(&patch->strided, 0, sizeof(&patch->strided));
-    patch->strided.u.s.position.lpData = (BYTE *) patch->mem;
-    patch->strided.u.s.position.dwStride = vtxStride;
-    patch->strided.u.s.position.dwType = WINED3DDECLTYPE_FLOAT3;
-    patch->strided.u.s.position.streamNo = 255;
+    patch->strided.position.format = WINED3DFMT_R32G32B32_FLOAT;
+    patch->strided.position.lpData = (BYTE *) patch->mem;
+    patch->strided.position.dwStride = vtxStride;
 
     if(patch->has_normals) {
-        patch->strided.u.s.normal.lpData = (BYTE *) patch->mem + 3 * sizeof(float) /* pos */;
-        patch->strided.u.s.normal.dwStride = vtxStride;
-        patch->strided.u.s.normal.dwType = WINED3DDECLTYPE_FLOAT3;
-        patch->strided.u.s.normal.streamNo = 255;
+        patch->strided.normal.format = WINED3DFMT_R32G32B32_FLOAT;
+        patch->strided.normal.lpData = (BYTE *) patch->mem + 3 * sizeof(float) /* pos */;
+        patch->strided.normal.dwStride = vtxStride;
     }
     if(patch->has_texcoords) {
-        patch->strided.u.s.texCoords[0].lpData = (BYTE *) patch->mem + 3 * sizeof(float) /* pos */;
+        patch->strided.texCoords[0].format = WINED3DFMT_R32G32B32A32_FLOAT;
+        patch->strided.texCoords[0].lpData = (BYTE *) patch->mem + 3 * sizeof(float) /* pos */;
         if(patch->has_normals) {
-            patch->strided.u.s.texCoords[0].lpData += 3 * sizeof(float);
-        }
-        patch->strided.u.s.texCoords[0].dwStride = vtxStride;
-        patch->strided.u.s.texCoords[0].dwType = WINED3DDECLTYPE_FLOAT4;
-        /* MAX_STREAMS index points to an unused element in stateblock->streamOffsets which
-         * always remains set to 0. Windows uses stream 255 here, but this is not visible to the
-         * application.
-         */
-        patch->strided.u.s.texCoords[0].streamNo = MAX_STREAMS;
+            patch->strided.texCoords[0].lpData += 3 * sizeof(float);
+        }
+        patch->strided.texCoords[0].dwStride = vtxStride;
     }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/gl_compat.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/gl_compat.c	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/gl_compat.c	(revision 19678)
@@ -0,0 +1,544 @@
+/*
+ * Compatibility functions for older GL implementations
+ *
+ * Copyright 2008 Stefan Dösinger for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_FLOAT_H
+# include <float.h>
+#endif
+#include "wined3d_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(gl_compat);
+
+/* Start GL_ARB_multitexture emulation */
+static void WINE_GLAPI wine_glMultiTexCoord1fARB(GLenum target, GLfloat s) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord1f(s);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord1fvARB(GLenum target, const GLfloat *v) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord1fv(v);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord2f(s, t);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord2fvARB(GLenum target, const GLfloat *v) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord2fv(v);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord3f(s, t, r);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord3fvARB(GLenum target, const GLfloat *v) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord3fv(v);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord4f(s, t, r, q);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord4fvARB(GLenum target, const GLfloat *v) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord4fv(v);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord2svARB(GLenum target, const GLshort *v) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord2sv(v);
+}
+
+static void WINE_GLAPI wine_glMultiTexCoord4svARB(GLenum target, const GLshort *v) {
+    if(target != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+    glTexCoord4sv(v);
+}
+
+static void WINE_GLAPI wine_glActiveTextureARB(GLenum texture) {
+    if(texture != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+}
+
+static void WINE_GLAPI wine_glClientActiveTextureARB(GLenum texture) {
+    if(texture != GL_TEXTURE0) {
+        ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
+        return;
+    }
+}
+
+static void (WINE_GLAPI *old_multitex_glGetIntegerv) (GLenum pname, GLint* params) = NULL;
+static void WINE_GLAPI wine_glGetIntegerv(GLenum pname, GLint* params) {
+    switch(pname) {
+        case GL_ACTIVE_TEXTURE:         *params = 0;    break;
+        case GL_MAX_TEXTURE_UNITS_ARB:  *params = 1;    break;
+        default: old_multitex_glGetIntegerv(pname, params);
+    }
+}
+
+static void (WINE_GLAPI *old_multitex_glGetFloatv) (GLenum pname, GLfloat* params) = NULL;
+static void WINE_GLAPI wine_glGetFloatv(GLenum pname, GLfloat* params) {
+    if(pname == GL_ACTIVE_TEXTURE) *params = 0.0;
+    else old_multitex_glGetFloatv(pname, params);
+}
+
+static void (WINE_GLAPI *old_multitex_glGetDoublev) (GLenum pname, GLdouble* params) = NULL;
+static void WINE_GLAPI wine_glGetDoublev(GLenum pname, GLdouble* params) {
+    if(pname == GL_ACTIVE_TEXTURE) *params = 0.0;
+    else old_multitex_glGetDoublev(pname, params);
+}
+
+/* Start GL_EXT_fogcoord emulation */
+static void (WINE_GLAPI *old_fogcoord_glEnable) (GLenum cap) = NULL;
+static void WINE_GLAPI wine_glEnable(GLenum cap) {
+    if(cap == GL_FOG) {
+        WineD3DContext *ctx = getActiveContext();
+        ctx->fog_enabled = 1;
+        if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
+    }
+    old_fogcoord_glEnable(cap);
+}
+
+static void (WINE_GLAPI *old_fogcoord_glDisable) (GLenum cap) = NULL;
+static void WINE_GLAPI wine_glDisable(GLenum cap) {
+    if(cap == GL_FOG) {
+        WineD3DContext *ctx = getActiveContext();
+        ctx->fog_enabled = 0;
+        if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
+    }
+    old_fogcoord_glDisable(cap);
+}
+
+static void (WINE_GLAPI *old_fogcoord_glFogi) (GLenum pname, GLint param) = NULL;
+static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) {
+    if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
+        WineD3DContext *ctx = getActiveContext();
+        ctx->gl_fog_source = param;
+        if(param == GL_FRAGMENT_DEPTH_EXT) {
+            if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
+        } else {
+            WARN("Fog coords activated, but not supported. Using slow emulation\n");
+            old_fogcoord_glDisable(GL_FOG);
+        }
+    } else {
+        if(pname == GL_FOG_START) {
+            getActiveContext()->fogstart = param;
+        } else if(pname == GL_FOG_END) {
+            getActiveContext()->fogend = param;
+        }
+        old_fogcoord_glFogi(pname, param);
+    }
+}
+
+static void (WINE_GLAPI *old_fogcoord_glFogiv) (GLenum pname, const GLint *param) = NULL;
+static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) {
+    if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
+        WineD3DContext *ctx = getActiveContext();
+        ctx->gl_fog_source = *param;
+        if(*param == GL_FRAGMENT_DEPTH_EXT) {
+            if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
+        } else {
+            WARN("Fog coords activated, but not supported. Using slow emulation\n");
+            old_fogcoord_glDisable(GL_FOG);
+        }
+    } else {
+        if(pname == GL_FOG_START) {
+            getActiveContext()->fogstart = *param;
+        } else if(pname == GL_FOG_END) {
+            getActiveContext()->fogend = *param;
+        }
+        old_fogcoord_glFogiv(pname, param);
+    }
+}
+
+static void (WINE_GLAPI *old_fogcoord_glFogf) (GLenum pname, GLfloat param) = NULL;
+static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) {
+    if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
+        WineD3DContext *ctx = getActiveContext();
+        ctx->gl_fog_source = (GLint) param;
+        if(param == GL_FRAGMENT_DEPTH_EXT) {
+            if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
+        } else {
+            WARN("Fog coords activated, but not supported. Using slow emulation\n");
+            old_fogcoord_glDisable(GL_FOG);
+        }
+    } else {
+        if(pname == GL_FOG_START) {
+            getActiveContext()->fogstart = param;
+        } else if(pname == GL_FOG_END) {
+            getActiveContext()->fogend = param;
+        }
+        old_fogcoord_glFogf(pname, param);
+    }
+}
+
+static void (WINE_GLAPI *old_fogcoord_glFogfv) (GLenum pname, const GLfloat *param) = NULL;
+static void WINE_GLAPI wine_glFogfv(GLenum pname, const GLfloat *param) {
+    if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
+        WineD3DContext *ctx = getActiveContext();
+        ctx->gl_fog_source = (GLint) *param;
+        if(*param == GL_FRAGMENT_DEPTH_EXT) {
+            if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
+        } else {
+            WARN("Fog coords activated, but not supported. Using slow emulation\n");
+            old_fogcoord_glDisable(GL_FOG);
+        }
+    } else {
+        if(pname == GL_FOG_COLOR) {
+            WineD3DContext *ctx = getActiveContext();
+            ctx->fogcolor[0] = param[0];
+            ctx->fogcolor[1] = param[1];
+            ctx->fogcolor[2] = param[2];
+            ctx->fogcolor[3] = param[3];
+        } else if(pname == GL_FOG_START) {
+            getActiveContext()->fogstart = *param;
+        } else if(pname == GL_FOG_END) {
+            getActiveContext()->fogend = *param;
+        }
+        old_fogcoord_glFogfv(pname, param);
+    }
+}
+
+static void (WINE_GLAPI *old_fogcoord_glVertex4f) (GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glVertex4fv) (const GLfloat *pos) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glVertex3f) (GLfloat x, GLfloat y, GLfloat z) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glVertex3fv) (const GLfloat *pos) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glColor4f) (GLfloat r, GLfloat g, GLfloat b, GLfloat a) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glColor4fv) (const GLfloat *color) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glColor3f) (GLfloat r, GLfloat g, GLfloat b) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glColor3fv) (const GLfloat *color) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glColor4ub) (GLubyte r, GLubyte g, GLubyte b, GLubyte a) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glFogCoordfEXT) (GLfloat f) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glFogCoorddEXT) (GLdouble f) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glFogCoordfvEXT) (const GLfloat *f) = NULL;
+static void (WINE_GLAPI *old_fogcoord_glFogCoorddvEXT) (const GLdouble *f) = NULL;
+
+static void WINE_GLAPI wine_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+    WineD3DContext *ctx = getActiveContext();
+    if(ctx->gl_fog_source == GL_FOG_COORDINATE_EXT && ctx->fog_enabled) {
+        GLfloat c[4] = {ctx->color[0], ctx->color[1], ctx->color[2], ctx->color[3]};
+        GLfloat i;
+
+        i = (ctx->fogend - ctx->fog_coord_value) / (ctx->fogend - ctx->fogstart);
+        c[0] = i * c[0] + (1.0 - i) * ctx->fogcolor[0];
+        c[1] = i * c[1] + (1.0 - i) * ctx->fogcolor[1];
+        c[2] = i * c[2] + (1.0 - i) * ctx->fogcolor[2];
+
+        old_fogcoord_glColor4f(c[0], c[1], c[2], c[3]);
+        old_fogcoord_glVertex4f(x, y, z, w);
+    } else {
+        old_fogcoord_glVertex4f(x, y, z, w);
+    }
+}
+
+static void WINE_GLAPI wine_glVertex4fv(const GLfloat *pos) {
+    wine_glVertex4f(pos[0], pos[1], pos[2], pos[3]);
+}
+
+static void WINE_GLAPI wine_glVertex3f(GLfloat x, GLfloat y, GLfloat z) {
+    wine_glVertex4f(x, y, z, 1.0);
+}
+
+static void WINE_GLAPI wine_glVertex3fv(const GLfloat *pos) {
+    wine_glVertex4f(pos[0], pos[1], pos[2], 1.0);
+}
+
+static void WINE_GLAPI wine_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
+    WineD3DContext *ctx = getActiveContext();
+    ctx->color[0] = r;
+    ctx->color[1] = g;
+    ctx->color[2] = b;
+    ctx->color[3] = a;
+    old_fogcoord_glColor4f(r, g, b, a);
+}
+
+static void WINE_GLAPI wine_glColor4fv(const GLfloat *c) {
+    wine_glColor4f(c[0], c[1], c[2], c[3]);
+}
+
+static void WINE_GLAPI wine_glColor3f(GLfloat r, GLfloat g, GLfloat b) {
+    wine_glColor4f(r, g, b, 1.0);
+}
+
+static void WINE_GLAPI wine_glColor3fv(const GLfloat *c) {
+    wine_glColor4f(c[0], c[1], c[2], 1.0);
+}
+
+static void WINE_GLAPI wine_glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a) {
+    wine_glColor4f(r / 255.0, g / 255.0, b / 255.0, a / 255.0);
+}
+
+/* In D3D the fog coord is a UBYTE, so there's no problem with using the single
+ * precision function
+ */
+static void WINE_GLAPI wine_glFogCoordfEXT(GLfloat f) {
+    WineD3DContext *ctx = getActiveContext();
+    ctx->fog_coord_value = f;
+}
+static void WINE_GLAPI wine_glFogCoorddEXT(GLdouble f) {
+    wine_glFogCoordfEXT(f);
+}
+static void WINE_GLAPI wine_glFogCoordfvEXT(const GLfloat *f) {
+    wine_glFogCoordfEXT(*f);
+}
+static void WINE_GLAPI wine_glFogCoorddvEXT(const GLdouble *f) {
+    wine_glFogCoordfEXT(*f);
+}
+
+/* End GL_EXT_fog_coord emulation */
+
+#define GLINFO_LOCATION (*gl_info)
+void add_gl_compat_wrappers(WineD3D_GL_Info *gl_info) {
+    if(!GL_SUPPORT(ARB_MULTITEXTURE)) {
+        TRACE("Applying GL_ARB_multitexture emulation hooks\n");
+        gl_info->glActiveTextureARB         = wine_glActiveTextureARB;
+        gl_info->glClientActiveTextureARB   = wine_glClientActiveTextureARB;
+        gl_info->glMultiTexCoord1fARB       = wine_glMultiTexCoord1fARB;
+        gl_info->glMultiTexCoord1fvARB      = wine_glMultiTexCoord1fvARB;
+        gl_info->glMultiTexCoord2fARB       = wine_glMultiTexCoord2fARB;
+        gl_info->glMultiTexCoord2fvARB      = wine_glMultiTexCoord2fvARB;
+        gl_info->glMultiTexCoord3fARB       = wine_glMultiTexCoord3fARB;
+        gl_info->glMultiTexCoord3fvARB      = wine_glMultiTexCoord3fvARB;
+        gl_info->glMultiTexCoord4fARB       = wine_glMultiTexCoord4fARB;
+        gl_info->glMultiTexCoord4fvARB      = wine_glMultiTexCoord4fvARB;
+        gl_info->glMultiTexCoord2svARB      = wine_glMultiTexCoord2svARB;
+        gl_info->glMultiTexCoord4svARB      = wine_glMultiTexCoord4svARB;
+        if(old_multitex_glGetIntegerv) {
+            FIXME("GL_ARB_multitexture glGetIntegerv hook already applied\n");
+        } else {
+            old_multitex_glGetIntegerv = glGetIntegerv;
+            glGetIntegerv = wine_glGetIntegerv;
+        }
+        if(old_multitex_glGetFloatv) {
+            FIXME("GL_ARB_multitexture glGetGloatv hook already applied\n");
+        } else {
+            old_multitex_glGetFloatv = glGetFloatv;
+            glGetFloatv = wine_glGetFloatv;
+        }
+        if(old_multitex_glGetDoublev) {
+            FIXME("GL_ARB_multitexture glGetDoublev hook already applied\n");
+        } else {
+            old_multitex_glGetDoublev = glGetDoublev;
+            glGetDoublev = wine_glGetDoublev;
+        }
+        gl_info->supported[ARB_MULTITEXTURE] = TRUE;
+    }
+
+    if(!GL_SUPPORT(EXT_FOG_COORD)) {
+        /* This emulation isn't perfect. There are a number of potential problems, but they should
+         * not matter in practise:
+         *
+         * Fog vs fragment shader: If we are using GL_ARB_fragment_program with the fog option, the
+         * glDisable(GL_FOG) here won't matter. However, if we have GL_ARB_fragment_program, it is pretty
+         * unlikely that we don't have GL_EXT_fog_coord. Besides, we probably have GL_ARB_vertex_program
+         * too, which would allow fog coord emulation in a fixed function vertex pipeline replacement.
+         *
+         * Fog vs texture: We apply the fog in the vertex color. An app could set up texturing settings which
+         * ignore the vertex color, thus effectively disabing our fog. However, in D3D this type of fog is
+         * a per-vertex fog too, so the apps shouldn't do that.
+         *
+         * Fog vs lighting: The app could in theory use D3DFOG_NONE table and D3DFOG_NONE vertex fog with
+         * untransformed vertices. That enables lighting and fog coords at the same time, and the lighting
+         * calculations could affect the already blended in fog color. There's nothing we can do against that,
+         * but most apps using fog color do their own lighting too and often even use RHW vertices. So live
+         * with it.
+         */
+        TRACE("Applying GL_ARB_fog_coord emulation hooks\n");
+
+        /* This probably means that the implementation doesn't advertise the extension, but implicitly supports
+         * it via the GL core version, or someone messed around in the extension table in directx.c. Add version-
+         * dependent loading for this extension if we ever hit this situation
+         */
+        if(GL_SUPPORT(ARB_FRAGMENT_PROGRAM)) {
+            FIXME("GL implementation supports GL_ARB_fragment_program but not GL_EXT_fog_coord\n");
+            FIXME("The fog coord emulation will most likely fail\n");
+        } else if(GL_SUPPORT(ARB_FRAGMENT_SHADER)) {
+            FIXME("GL implementation supports GL_ARB_fragment_shader but not GL_EXT_fog_coord\n");
+            FIXME("The fog coord emulation will most likely fail\n");
+        }
+
+        if(old_fogcoord_glFogi) {
+            FIXME("GL_EXT_fogcoord glFogi hook already applied\n");
+        } else {
+            old_fogcoord_glFogi = glFogi;
+            glFogi = wine_glFogi;
+        }
+        if(old_fogcoord_glFogiv) {
+            FIXME("GL_EXT_fogcoord glFogiv hook already applied\n");
+        } else {
+            old_fogcoord_glFogiv = glFogiv;
+            glFogiv = wine_glFogiv;
+        }
+        if(old_fogcoord_glFogf) {
+            FIXME("GL_EXT_fogcoord glFogf hook already applied\n");
+        } else {
+            old_fogcoord_glFogf = glFogf;
+            glFogf = wine_glFogf;
+        }
+        if(old_fogcoord_glFogfv) {
+            FIXME("GL_EXT_fogcoord glFogfv hook already applied\n");
+        } else {
+            old_fogcoord_glFogfv = glFogfv;
+            glFogfv = wine_glFogfv;
+        }
+        if(old_fogcoord_glEnable) {
+            FIXME("GL_EXT_fogcoord glEnable hook already applied\n");
+        } else {
+            old_fogcoord_glEnable = glEnableWINE;
+            glEnableWINE = wine_glEnable;
+        }
+        if(old_fogcoord_glDisable) {
+            FIXME("GL_EXT_fogcoord glDisable hook already applied\n");
+        } else {
+            old_fogcoord_glDisable = glDisableWINE;
+            glDisableWINE = wine_glDisable;
+        }
+
+        if(old_fogcoord_glVertex4f) {
+            FIXME("GL_EXT_fogcoord glVertex4f hook already applied\n");
+        } else {
+            old_fogcoord_glVertex4f = glVertex4f;
+            glVertex4f = wine_glVertex4f;
+        }
+        if(old_fogcoord_glVertex4fv) {
+            FIXME("GL_EXT_fogcoord glVertex4fv hook already applied\n");
+        } else {
+            old_fogcoord_glVertex4fv = glVertex4fv;
+            glVertex4fv = wine_glVertex4fv;
+        }
+        if(old_fogcoord_glVertex3f) {
+            FIXME("GL_EXT_fogcoord glVertex3f hook already applied\n");
+        } else {
+            old_fogcoord_glVertex3f = glVertex3f;
+            glVertex3f = wine_glVertex3f;
+        }
+        if(old_fogcoord_glVertex3fv) {
+            FIXME("GL_EXT_fogcoord glVertex3fv hook already applied\n");
+        } else {
+            old_fogcoord_glVertex3fv = glVertex3fv;
+            glVertex3fv = wine_glVertex3fv;
+        }
+
+        if(old_fogcoord_glColor4f) {
+            FIXME("GL_EXT_fogcoord glColor4f hook already applied\n");
+        } else {
+            old_fogcoord_glColor4f = glColor4f;
+            glColor4f = wine_glColor4f;
+        }
+        if(old_fogcoord_glColor4fv) {
+            FIXME("GL_EXT_fogcoord glColor4fv hook already applied\n");
+        } else {
+            old_fogcoord_glColor4fv = glColor4fv;
+            glColor4fv = wine_glColor4fv;
+        }
+        if(old_fogcoord_glColor3f) {
+            FIXME("GL_EXT_fogcoord glColor3f hook already applied\n");
+        } else {
+            old_fogcoord_glColor3f = glColor3f;
+            glColor3f = wine_glColor3f;
+        }
+        if(old_fogcoord_glColor3fv) {
+            FIXME("GL_EXT_fogcoord glColor3fv hook already applied\n");
+        } else {
+            old_fogcoord_glColor3fv = glColor3fv;
+            glColor3fv = wine_glColor3fv;
+        }
+        if(old_fogcoord_glColor4ub) {
+            FIXME("GL_EXT_fogcoord glColor4ub hook already applied\n");
+        } else {
+            old_fogcoord_glColor4ub = glColor4ub;
+            glColor4ub = wine_glColor4ub;
+        }
+
+        if(old_fogcoord_glFogCoordfEXT) {
+            FIXME("GL_EXT_fogcoord glFogCoordfEXT hook already applied\n");
+        } else {
+            old_fogcoord_glFogCoordfEXT = gl_info->glFogCoordfEXT;
+            gl_info->glFogCoordfEXT = wine_glFogCoordfEXT;
+        }
+        if(old_fogcoord_glFogCoordfvEXT) {
+            FIXME("GL_EXT_fogcoord glFogCoordfvEXT hook already applied\n");
+        } else {
+            old_fogcoord_glFogCoordfvEXT = gl_info->glFogCoordfvEXT;
+            gl_info->glFogCoordfvEXT = wine_glFogCoordfvEXT;
+        }
+        if(old_fogcoord_glFogCoorddEXT) {
+            FIXME("GL_EXT_fogcoord glFogCoorddEXT hook already applied\n");
+        } else {
+            old_fogcoord_glFogCoorddEXT = gl_info->glFogCoorddEXT;
+            gl_info->glFogCoorddEXT = wine_glFogCoorddEXT;
+        }
+        if(old_fogcoord_glFogCoorddvEXT) {
+            FIXME("GL_EXT_fogcoord glFogCoorddvEXT hook already applied\n");
+        } else {
+            old_fogcoord_glFogCoorddvEXT = gl_info->glFogCoorddvEXT;
+            gl_info->glFogCoorddvEXT = wine_glFogCoorddvEXT;
+        }
+        gl_info->supported[EXT_FOG_COORD] = TRUE;
+    }
+}
+#undef GLINFO_LOCATION
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c	(revision 19678)
@@ -5,4 +5,5 @@
  * Copyright 2006-2007 Henri Verbeet
  * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
+ * Copyright 2009 Henri Verbeet for CodeWeavers
  *
  * This library is free software; you can redistribute it and/or
@@ -22,13 +23,4 @@
 
 /*
- * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
- * other than GPL or LGPL is available it will apply instead, Sun elects to use only
- * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
- * a choice of LGPL license versions is made available with the language indicating
- * that LGPLv2 or any later version may be used, or where a choice of which version
- * of the LGPL is applied is otherwise unspecified.
- */
-
-/*
  * D3D shader asm has swizzles on source parameters, and write masks for
  * destination parameters. GLSL uses swizzles for both. The result of this is
@@ -39,4 +31,5 @@
 
 #include "config.h"
+#include <limits.h>
 #include <stdio.h>
 #include "wined3d_private.h"
@@ -49,4 +42,9 @@
 #define GLINFO_LOCATION      (*gl_info)
 
+#define WINED3D_GLSL_SAMPLE_PROJECTED   0x1
+#define WINED3D_GLSL_SAMPLE_RECT        0x2
+#define WINED3D_GLSL_SAMPLE_LOD         0x4
+#define WINED3D_GLSL_SAMPLE_GRAD        0x8
+
 typedef struct {
     char reg_name[150];
@@ -56,5 +54,5 @@
 typedef struct {
     char reg_name[150];
-    char param_str[100];
+    char param_str[200];
 } glsl_src_param_t;
 
@@ -64,9 +62,33 @@
 } glsl_sample_function_t;
 
+enum heap_node_op
+{
+    HEAP_NODE_TRAVERSE_LEFT,
+    HEAP_NODE_TRAVERSE_RIGHT,
+    HEAP_NODE_POP,
+};
+
+struct constant_entry
+{
+    unsigned int idx;
+    unsigned int version;
+};
+
+struct constant_heap
+{
+    struct constant_entry *entries;
+    unsigned int *positions;
+    unsigned int size;
+};
+
 /* GLSL shader private data */
 struct shader_glsl_priv {
     struct hash_table_t *glsl_program_lookup;
-    const struct glsl_shader_prog_link *glsl_program;
+    struct glsl_shader_prog_link *glsl_program;
+    struct constant_heap vconst_heap;
+    struct constant_heap pconst_heap;
+    unsigned char *stack;
     GLhandleARB depth_blt_program[tex_type_count];
+    UINT next_constant_version;
 };
 
@@ -76,23 +98,27 @@
     struct list                 pshader_entry;
     GLhandleARB                 programId;
-    GLhandleARB                 *vuniformF_locations;
-    GLhandleARB                 *puniformF_locations;
-    GLhandleARB                 vuniformI_locations[MAX_CONST_I];
-    GLhandleARB                 puniformI_locations[MAX_CONST_I];
-    GLhandleARB                 posFixup_location;
-    GLhandleARB                 bumpenvmat_location[MAX_TEXTURES];
-    GLhandleARB                 luminancescale_location[MAX_TEXTURES];
-    GLhandleARB                 luminanceoffset_location[MAX_TEXTURES];
-    GLhandleARB                 ycorrection_location;
+    GLint                       *vuniformF_locations;
+    GLint                       *puniformF_locations;
+    GLint                       vuniformI_locations[MAX_CONST_I];
+    GLint                       puniformI_locations[MAX_CONST_I];
+    GLint                       posFixup_location;
+    GLint                       np2Fixup_location[MAX_FRAGMENT_SAMPLERS];
+    GLint                       bumpenvmat_location[MAX_TEXTURES];
+    GLint                       luminancescale_location[MAX_TEXTURES];
+    GLint                       luminanceoffset_location[MAX_TEXTURES];
+    GLint                       ycorrection_location;
     GLenum                      vertex_color_clamp;
-    GLhandleARB                 vshader;
+    IWineD3DVertexShader        *vshader;
+    IWineD3DPixelShader         *pshader;
+    struct vs_compile_args      vs_args;
+    struct ps_compile_args      ps_args;
+    UINT                        constant_version;
+};
+
+typedef struct {
+    IWineD3DVertexShader        *vshader;
     IWineD3DPixelShader         *pshader;
     struct ps_compile_args      ps_args;
-};
-
-typedef struct {
-    GLhandleARB                 vshader;
-    IWineD3DPixelShader         *pshader;
-    struct ps_compile_args      ps_args;
+    struct vs_compile_args      vs_args;
 } glsl_program_key_t;
 
@@ -106,5 +132,6 @@
     BOOL is_spam;
 
-    const char *spam[] = {
+    static const char * const spam[] =
+    {
         "Vertex shader was successfully compiled to run on hardware.\n",    /* fglrx          */
         "Fragment shader was successfully compiled to run on hardware.\n",  /* fglrx          */
@@ -113,9 +140,12 @@
         "Vertex shader(s) linked, no fragment shader(s) defined. \n ",      /* fglrx, with \n */
         "Vertex shader(s) linked, no fragment shader(s) defined.",          /* fglrx, no \n   */
-        "Fragment shader was successfully compiled to run on hardware.\nWARNING: 0:1: extension 'GL_ARB_draw_buffers' is not supported",
+        "Fragment shader was successfully compiled to run on hardware.\n"
+        "WARNING: 0:2: extension 'GL_ARB_draw_buffers' is not supported",
         "Fragment shader(s) linked, no vertex shader(s) defined.",          /* fglrx, no \n   */
         "Fragment shader(s) linked, no vertex shader(s) defined. \n ",      /* fglrx, with \n */
         "WARNING: 0:2: extension 'GL_ARB_draw_buffers' is not supported\n"  /* MacOS ati      */
     };
+
+    if (!TRACE_ON(d3d_shader) && !FIXME_ON(d3d_shader)) return;
 
     GL_EXTCALL(glGetObjectParameterivARB(obj,
@@ -152,8 +182,7 @@
  * Loads (pixel shader) samplers
  */
-static void shader_glsl_load_psamplers(const WineD3D_GL_Info *gl_info, IWineD3DStateBlock *iface, GLhandleARB programId)
-{
-    IWineD3DStateBlockImpl* stateBlock = (IWineD3DStateBlockImpl*) iface;
-    GLhandleARB name_loc;
+static void shader_glsl_load_psamplers(const WineD3D_GL_Info *gl_info, DWORD *tex_unit_map, GLhandleARB programId)
+{
+    GLint name_loc;
     int i;
     char sampler_name[20];
@@ -163,6 +192,7 @@
         name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));
         if (name_loc != -1) {
-            int mapped_unit = stateBlock->wineD3DDevice->texUnitMap[i];
-            if (mapped_unit != -1 && mapped_unit < GL_LIMITS(fragment_samplers)) {
+            DWORD mapped_unit = tex_unit_map[i];
+            if (mapped_unit != WINED3D_UNMAPPED_STAGE && mapped_unit < GL_LIMITS(fragment_samplers))
+            {
                 TRACE("Loading %s for texture %d\n", sampler_name, mapped_unit);
                 GL_EXTCALL(glUniform1iARB(name_loc, mapped_unit));
@@ -175,8 +205,7 @@
 }
 
-static void shader_glsl_load_vsamplers(const WineD3D_GL_Info *gl_info, IWineD3DStateBlock *iface, GLhandleARB programId)
-{
-    IWineD3DStateBlockImpl* stateBlock = (IWineD3DStateBlockImpl*) iface;
-    GLhandleARB name_loc;
+static void shader_glsl_load_vsamplers(const WineD3D_GL_Info *gl_info, DWORD *tex_unit_map, GLhandleARB programId)
+{
+    GLint name_loc;
     char sampler_name[20];
     int i;
@@ -186,6 +215,7 @@
         name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));
         if (name_loc != -1) {
-            int mapped_unit = stateBlock->wineD3DDevice->texUnitMap[MAX_FRAGMENT_SAMPLERS + i];
-            if (mapped_unit != -1 && mapped_unit < GL_LIMITS(combined_samplers)) {
+            DWORD mapped_unit = tex_unit_map[MAX_FRAGMENT_SAMPLERS + i];
+            if (mapped_unit != WINED3D_UNMAPPED_STAGE && mapped_unit < GL_LIMITS(combined_samplers))
+            {
                 TRACE("Loading %s for texture %d\n", sampler_name, mapped_unit);
                 GL_EXTCALL(glUniform1iARB(name_loc, mapped_unit));
@@ -198,104 +228,164 @@
 }
 
-/** 
- * Loads floating point constants (aka uniforms) into the currently set GLSL program.
- * When constant_list == NULL, it will load all the constants.
- */
+static inline void walk_constant_heap(const WineD3D_GL_Info *gl_info, const float *constants,
+        const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version)
+{
+    int stack_idx = 0;
+    unsigned int heap_idx = 1;
+    unsigned int idx;
+
+    if (heap->entries[heap_idx].version <= version) return;
+
+    idx = heap->entries[heap_idx].idx;
+    if (constant_locations[idx] != -1) GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4]));
+    stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
+
+    while (stack_idx >= 0)
+    {
+        /* Note that we fall through to the next case statement. */
+        switch(stack[stack_idx])
+        {
+            case HEAP_NODE_TRAVERSE_LEFT:
+            {
+                unsigned int left_idx = heap_idx << 1;
+                if (left_idx < heap->size && heap->entries[left_idx].version > version)
+                {
+                    heap_idx = left_idx;
+                    idx = heap->entries[heap_idx].idx;
+                    if (constant_locations[idx] != -1)
+                        GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4]));
+
+                    stack[stack_idx++] = HEAP_NODE_TRAVERSE_RIGHT;
+                    stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
+                    break;
+                }
+            }
+
+            case HEAP_NODE_TRAVERSE_RIGHT:
+            {
+                unsigned int right_idx = (heap_idx << 1) + 1;
+                if (right_idx < heap->size && heap->entries[right_idx].version > version)
+                {
+                    heap_idx = right_idx;
+                    idx = heap->entries[heap_idx].idx;
+                    if (constant_locations[idx] != -1)
+                        GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4]));
+
+                    stack[stack_idx++] = HEAP_NODE_POP;
+                    stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
+                    break;
+                }
+            }
+
+            case HEAP_NODE_POP:
+            {
+                heap_idx >>= 1;
+                --stack_idx;
+                break;
+            }
+        }
+    }
+    checkGLcall("walk_constant_heap()");
+}
+
+static inline void apply_clamped_constant(const WineD3D_GL_Info *gl_info, GLint location, const GLfloat *data)
+{
+    GLfloat clamped_constant[4];
+
+    if (location == -1) return;
+
+    clamped_constant[0] = data[0] < -1.0f ? -1.0f : data[0] > 1.0 ? 1.0 : data[0];
+    clamped_constant[1] = data[1] < -1.0f ? -1.0f : data[1] > 1.0 ? 1.0 : data[1];
+    clamped_constant[2] = data[2] < -1.0f ? -1.0f : data[2] > 1.0 ? 1.0 : data[2];
+    clamped_constant[3] = data[3] < -1.0f ? -1.0f : data[3] > 1.0 ? 1.0 : data[3];
+
+    GL_EXTCALL(glUniform4fvARB(location, 1, clamped_constant));
+}
+
+static inline void walk_constant_heap_clamped(const WineD3D_GL_Info *gl_info, const float *constants,
+        const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version)
+{
+    int stack_idx = 0;
+    unsigned int heap_idx = 1;
+    unsigned int idx;
+
+    if (heap->entries[heap_idx].version <= version) return;
+
+    idx = heap->entries[heap_idx].idx;
+    apply_clamped_constant(gl_info, constant_locations[idx], &constants[idx * 4]);
+    stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
+
+    while (stack_idx >= 0)
+    {
+        /* Note that we fall through to the next case statement. */
+        switch(stack[stack_idx])
+        {
+            case HEAP_NODE_TRAVERSE_LEFT:
+            {
+                unsigned int left_idx = heap_idx << 1;
+                if (left_idx < heap->size && heap->entries[left_idx].version > version)
+                {
+                    heap_idx = left_idx;
+                    idx = heap->entries[heap_idx].idx;
+                    apply_clamped_constant(gl_info, constant_locations[idx], &constants[idx * 4]);
+
+                    stack[stack_idx++] = HEAP_NODE_TRAVERSE_RIGHT;
+                    stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
+                    break;
+                }
+            }
+
+            case HEAP_NODE_TRAVERSE_RIGHT:
+            {
+                unsigned int right_idx = (heap_idx << 1) + 1;
+                if (right_idx < heap->size && heap->entries[right_idx].version > version)
+                {
+                    heap_idx = right_idx;
+                    idx = heap->entries[heap_idx].idx;
+                    apply_clamped_constant(gl_info, constant_locations[idx], &constants[idx * 4]);
+
+                    stack[stack_idx++] = HEAP_NODE_POP;
+                    stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
+                    break;
+                }
+            }
+
+            case HEAP_NODE_POP:
+            {
+                heap_idx >>= 1;
+                --stack_idx;
+                break;
+            }
+        }
+    }
+    checkGLcall("walk_constant_heap_clamped()");
+}
+
+/* Loads floating point constants (aka uniforms) into the currently set GLSL program. */
 static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl *This, const WineD3D_GL_Info *gl_info,
-        unsigned int max_constants, const float *constants, const GLhandleARB *constant_locations,
-        const struct list *constant_list)
-{
-    const constants_entry *constant;
+        const float *constants, const GLint *constant_locations, const struct constant_heap *heap,
+        unsigned char *stack, UINT version)
+{
     const local_constant *lconst;
-    GLhandleARB tmp_loc;
-    DWORD i, j, k;
-    const DWORD *idx;
-
-    if (TRACE_ON(d3d_shader)) {
-        LIST_FOR_EACH_ENTRY(constant, constant_list, constants_entry, entry) {
-            idx = constant->idx;
-            j = constant->count;
-            while (j--) {
-                i = *idx++;
-                tmp_loc = constant_locations[i];
-                if (tmp_loc != -1) {
-                    TRACE_(d3d_constants)("Loading constants %i: %f, %f, %f, %f\n", i,
-                            constants[i * 4 + 0], constants[i * 4 + 1],
-                            constants[i * 4 + 2], constants[i * 4 + 3]);
-                }
-            }
-        }
-    }
 
     /* 1.X pshaders have the constants clamped to [-1;1] implicitly. */
-    if(WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1 &&
-       shader_is_pshader_version(This->baseShader.hex_version)) {
-        float lcl_const[4];
-
-        LIST_FOR_EACH_ENTRY(constant, constant_list, constants_entry, entry) {
-            idx = constant->idx;
-            j = constant->count;
-            while (j--) {
-                i = *idx++;
-                tmp_loc = constant_locations[i];
-                if (tmp_loc != -1) {
-                    /* We found this uniform name in the program - go ahead and send the data */
-                    k = i * 4;
-                    if(constants[k + 0] < -1.0) lcl_const[0] = -1.0;
-                    else if(constants[k + 0] > 1.0) lcl_const[0] = 1.0;
-                    else lcl_const[0] = constants[k + 0];
-                    if(constants[k + 1] < -1.0) lcl_const[1] = -1.0;
-                    else if(constants[k + 1] > 1.0) lcl_const[1] = 1.0;
-                    else lcl_const[1] = constants[k + 1];
-                    if(constants[k + 2] < -1.0) lcl_const[2] = -1.0;
-                    else if(constants[k + 2] > 1.0) lcl_const[2] = 1.0;
-                    else lcl_const[2] = constants[k + 2];
-                    if(constants[k + 3] < -1.0) lcl_const[3] = -1.0;
-                    else if(constants[k + 3] > 1.0) lcl_const[3] = 1.0;
-                    else lcl_const[3] = constants[k + 3];
-
-                    GL_EXTCALL(glUniform4fvARB(tmp_loc, 1, lcl_const));
-                }
-            }
-        }
-    } else {
-        LIST_FOR_EACH_ENTRY(constant, constant_list, constants_entry, entry) {
-            idx = constant->idx;
-            j = constant->count;
-            while (j--) {
-                i = *idx++;
-                tmp_loc = constant_locations[i];
-                if (tmp_loc != -1) {
-                    /* We found this uniform name in the program - go ahead and send the data */
-                    GL_EXTCALL(glUniform4fvARB(tmp_loc, 1, constants + (i * 4)));
-                }
-            }
-        }
-    }
-    checkGLcall("glUniform4fvARB()");
-
-    if(!This->baseShader.load_local_constsF) {
+    if (This->baseShader.reg_maps.shader_version.major == 1
+            && shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type))
+        walk_constant_heap_clamped(gl_info, constants, constant_locations, heap, stack, version);
+    else
+        walk_constant_heap(gl_info, constants, constant_locations, heap, stack, version);
+
+    if (!This->baseShader.load_local_constsF)
+    {
         TRACE("No need to load local float constants for this shader\n");
         return;
     }
 
-    /* Load immediate constants */
-    if (TRACE_ON(d3d_shader)) {
-        LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
-            tmp_loc = constant_locations[lconst->idx];
-            if (tmp_loc != -1) {
-                const GLfloat *values = (const GLfloat *)lconst->value;
-                TRACE_(d3d_constants)("Loading local constants %i: %f, %f, %f, %f\n", lconst->idx,
-                        values[0], values[1], values[2], values[3]);
-            }
-        }
-    }
     /* Immediate constants are clamped to [-1;1] at shader creation time if needed */
-    LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
-        tmp_loc = constant_locations[lconst->idx];
-        if (tmp_loc != -1) {
-            /* We found this uniform name in the program - go ahead and send the data */
-            GL_EXTCALL(glUniform4fvARB(tmp_loc, 1, (const GLfloat *)lconst->value));
-        }
+    LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry)
+    {
+        GLint location = constant_locations[lconst->idx];
+        /* We found this uniform name in the program - go ahead and send the data */
+        if (location != -1) GL_EXTCALL(glUniform4fvARB(location, 1, (const GLfloat *)lconst->value));
     }
     checkGLcall("glUniform4fvARB()");
@@ -304,5 +394,5 @@
 /* Loads integer constants (aka uniforms) into the currently set GLSL program. */
 static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const WineD3D_GL_Info *gl_info,
-        const GLhandleARB locations[MAX_CONST_I], const int *constants, WORD constants_set)
+        const GLint locations[MAX_CONST_I], const int *constants, WORD constants_set)
 {
     unsigned int i;
@@ -342,8 +432,8 @@
         GLhandleARB programId, const BOOL *constants, WORD constants_set)
 {
-    GLhandleARB tmp_loc;
+    GLint tmp_loc;
     unsigned int i;
     char tmp_name[8];
-    char is_pshader = shader_is_pshader_version(This->baseShader.hex_version);
+    char is_pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
     const char* prefix = is_pshader? "PB":"VB";
     struct list* ptr;
@@ -389,5 +479,51 @@
 }
 
-
+static void reset_program_constant_version(void *value, void *context)
+{
+    struct glsl_shader_prog_link *entry = value;
+    entry->constant_version = 0;
+}
+
+/**
+ * Loads the texture dimensions for NP2 fixup into the currently set GLSL program.
+ */
+static void shader_glsl_load_np2fixup_constants(
+    IWineD3DDevice* device,
+    char usePixelShader,
+    char useVertexShader) {
+
+    const IWineD3DDeviceImpl* deviceImpl = (const IWineD3DDeviceImpl*) device;
+    const struct glsl_shader_prog_link* prog = ((struct shader_glsl_priv *)(deviceImpl->shader_priv))->glsl_program;
+
+    if (!prog) {
+        /* No GLSL program set - nothing to do. */
+        return;
+    }
+
+    if (!usePixelShader) {
+        /* NP2 texcoord fixup is (currently) only done for pixelshaders. */
+        return;
+    }
+
+    if (prog->ps_args.np2_fixup) {
+        UINT i;
+        UINT fixup = prog->ps_args.np2_fixup;
+        const WineD3D_GL_Info* gl_info = &deviceImpl->adapter->gl_info;
+        const IWineD3DStateBlockImpl* stateBlock = (const IWineD3DStateBlockImpl*) deviceImpl->stateBlock;
+
+        for (i = 0; fixup; fixup >>= 1, ++i) {
+            if (-1 != prog->np2Fixup_location[i]) {
+                const IWineD3DBaseTextureImpl* const tex = (const IWineD3DBaseTextureImpl*) stateBlock->textures[i];
+                if (!tex) {
+                    FIXME("Nonexistent texture is flagged for NP2 texcoord fixup\n");
+                    continue;
+                } else {
+                    const float tex_dim[2] = {tex->baseTexture.pow2Matrix[0], tex->baseTexture.pow2Matrix[5]};
+                    GL_EXTCALL(glUniform2fvARB(prog->np2Fixup_location[i], 1, tex_dim));
+                }
+            }
+        }
+    }
+}
 
 /**
@@ -400,12 +536,11 @@
    
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
-    const struct shader_glsl_priv *priv = (struct shader_glsl_priv *)deviceImpl->shader_priv;
+    struct shader_glsl_priv *priv = deviceImpl->shader_priv;
     IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
     const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
 
-    const GLhandleARB *constant_locations;
-    const struct list *constant_list;
     GLhandleARB programId;
-    const struct glsl_shader_prog_link *prog = priv->glsl_program;
+    struct glsl_shader_prog_link *prog = priv->glsl_program;
+    UINT constant_version;
     int i;
 
@@ -415,22 +550,20 @@
     }
     programId = prog->programId;
+    constant_version = prog->constant_version;
 
     if (useVertexShader) {
         IWineD3DBaseShaderImpl* vshader = (IWineD3DBaseShaderImpl*) stateBlock->vertexShader;
 
-        constant_locations = prog->vuniformF_locations;
-        constant_list = &stateBlock->set_vconstantsF;
-
         /* Load DirectX 9 float constants/uniforms for vertex shader */
-        shader_glsl_load_constantsF(vshader, gl_info, GL_LIMITS(vshader_constantsF),
-                stateBlock->vertexShaderConstantF, constant_locations, constant_list);
+        shader_glsl_load_constantsF(vshader, gl_info, stateBlock->vertexShaderConstantF,
+                prog->vuniformF_locations, &priv->vconst_heap, priv->stack, constant_version);
 
         /* Load DirectX 9 integer constants/uniforms for vertex shader */
-        shader_glsl_load_constantsI(vshader, gl_info, prog->vuniformI_locations,
-                stateBlock->vertexShaderConstantI, stateBlock->changed.vertexShaderConstantsI);
+        shader_glsl_load_constantsI(vshader, gl_info, prog->vuniformI_locations, stateBlock->vertexShaderConstantI,
+                stateBlock->changed.vertexShaderConstantsI & vshader->baseShader.reg_maps.integer_constants);
 
         /* Load DirectX 9 boolean constants/uniforms for vertex shader */
-        shader_glsl_load_constantsB(vshader, gl_info, programId,
-                stateBlock->vertexShaderConstantB, stateBlock->changed.vertexShaderConstantsB);
+        shader_glsl_load_constantsB(vshader, gl_info, programId, stateBlock->vertexShaderConstantB,
+                stateBlock->changed.vertexShaderConstantsB & vshader->baseShader.reg_maps.boolean_constants);
 
         /* Upload the position fixup params */
@@ -443,18 +576,15 @@
         IWineD3DBaseShaderImpl* pshader = (IWineD3DBaseShaderImpl*) stateBlock->pixelShader;
 
-        constant_locations = prog->puniformF_locations;
-        constant_list = &stateBlock->set_pconstantsF;
-
         /* Load DirectX 9 float constants/uniforms for pixel shader */
-        shader_glsl_load_constantsF(pshader, gl_info, GL_LIMITS(pshader_constantsF),
-                stateBlock->pixelShaderConstantF, constant_locations, constant_list);
+        shader_glsl_load_constantsF(pshader, gl_info, stateBlock->pixelShaderConstantF,
+                prog->puniformF_locations, &priv->pconst_heap, priv->stack, constant_version);
 
         /* Load DirectX 9 integer constants/uniforms for pixel shader */
-        shader_glsl_load_constantsI(pshader, gl_info, prog->puniformI_locations,
-                stateBlock->pixelShaderConstantI, stateBlock->changed.pixelShaderConstantsI);
+        shader_glsl_load_constantsI(pshader, gl_info, prog->puniformI_locations, stateBlock->pixelShaderConstantI,
+                stateBlock->changed.pixelShaderConstantsI & pshader->baseShader.reg_maps.integer_constants);
 
         /* Load DirectX 9 boolean constants/uniforms for pixel shader */
-        shader_glsl_load_constantsB(pshader, gl_info, programId,
-                stateBlock->pixelShaderConstantB, stateBlock->changed.pixelShaderConstantsB);
+        shader_glsl_load_constantsB(pshader, gl_info, programId, stateBlock->pixelShaderConstantB,
+                stateBlock->changed.pixelShaderConstantsB & pshader->baseShader.reg_maps.boolean_constants);
 
         /* Upload the environment bump map matrix if needed. The needsbumpmat member specifies the texture stage to load the matrix from.
@@ -496,9 +626,76 @@
         }
     }
+
+    if (priv->next_constant_version == UINT_MAX)
+    {
+        TRACE("Max constant version reached, resetting to 0.\n");
+        hash_table_for_each_entry(priv->glsl_program_lookup, reset_program_constant_version, NULL);
+        priv->next_constant_version = 1;
+    }
+    else
+    {
+        prog->constant_version = priv->next_constant_version++;
+    }
+}
+
+static inline void update_heap_entry(struct constant_heap *heap, unsigned int idx,
+        unsigned int heap_idx, DWORD new_version)
+{
+    struct constant_entry *entries = heap->entries;
+    unsigned int *positions = heap->positions;
+    unsigned int parent_idx;
+
+    while (heap_idx > 1)
+    {
+        parent_idx = heap_idx >> 1;
+
+        if (new_version <= entries[parent_idx].version) break;
+
+        entries[heap_idx] = entries[parent_idx];
+        positions[entries[parent_idx].idx] = heap_idx;
+        heap_idx = parent_idx;
+    }
+
+    entries[heap_idx].version = new_version;
+    entries[heap_idx].idx = idx;
+    positions[idx] = heap_idx;
+}
+
+static void shader_glsl_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    struct shader_glsl_priv *priv = This->shader_priv;
+    struct constant_heap *heap = &priv->vconst_heap;
+    UINT i;
+
+    for (i = start; i < count + start; ++i)
+    {
+        if (!This->stateBlock->changed.vertexShaderConstantsF[i])
+            update_heap_entry(heap, i, heap->size++, priv->next_constant_version);
+        else
+            update_heap_entry(heap, i, heap->positions[i], priv->next_constant_version);
+    }
+}
+
+static void shader_glsl_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count)
+{
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    struct shader_glsl_priv *priv = This->shader_priv;
+    struct constant_heap *heap = &priv->pconst_heap;
+    UINT i;
+
+    for (i = start; i < count + start; ++i)
+    {
+        if (!This->stateBlock->changed.pixelShaderConstantsF[i])
+            update_heap_entry(heap, i, heap->size++, priv->next_constant_version);
+        else
+            update_heap_entry(heap, i, heap->positions[i], priv->next_constant_version);
+    }
 }
 
 /** Generate the variable & register declarations for the GLSL output target */
 static void shader_generate_glsl_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps,
-        SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_info)
+        SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_info,
+        const struct ps_compile_args *ps_args)
 {
     IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
@@ -508,5 +705,5 @@
 
     /* There are some minor differences between pixel and vertex shaders */
-    char pshader = shader_is_pshader_version(This->baseShader.hex_version);
+    char pshader = shader_is_pshader_version(reg_maps->shader_version.type);
     char prefix = pshader ? 'P' : 'V';
 
@@ -519,13 +716,52 @@
     /* Declare the constants (aka uniforms) */
     if (This->baseShader.limits.constant_float > 0) {
-        unsigned max_constantsF = min(This->baseShader.limits.constant_float, 
-                (pshader ? GL_LIMITS(pshader_constantsF) : GL_LIMITS(vshader_constantsF)));
+        unsigned max_constantsF;
+        /* Unless the shader uses indirect addressing, always declare the maximum array size and ignore that we need some
+         * uniforms privately. E.g. if GL supports 256 uniforms, and we need 2 for the pos fixup and immediate values, still
+         * declare VC[256]. If the shader needs more uniforms than we have it won't work in any case. If it uses less, the
+         * compiler will figure out which uniforms are really used and strip them out. This allows a shader to use c255 on
+         * a dx9 card, as long as it doesn't also use all the other constants.
+         *
+         * If the shader uses indirect addressing the compiler must assume that all declared uniforms are used. In this case,
+         * declare only the amount that we're assured to have.
+         *
+         * Thus we run into problems in these two cases:
+         * 1) The shader really uses more uniforms than supported
+         * 2) The shader uses indirect addressing, less constants than supported, but uses a constant index > #supported consts
+         */
+        if(pshader) {
+            /* No indirect addressing here */
+            max_constantsF = GL_LIMITS(pshader_constantsF);
+        } else {
+            if(This->baseShader.reg_maps.usesrelconstF) {
+                /* Subtract the other potential uniforms from the max available (bools, ints, and 1 row of projection matrix).
+                 * Subtract another uniform for immediate values, which have to be loaded via uniform by the driver as well.
+                 * The shader code only uses 0.5, 2.0, 1.0, 128 and -128 in vertex shader code, so one vec4 should be enough
+                 * (Unfortunately the Nvidia driver doesn't store 128 and -128 in one float
+                 */
+                max_constantsF = GL_LIMITS(vshader_constantsF) - 3;
+                max_constantsF -= count_bits(This->baseShader.reg_maps.integer_constants);
+                /* Strictly speaking a bool only uses one scalar, but the nvidia(Linux) compiler doesn't pack them properly,
+                 * so each scalar requires a full vec4. We could work around this by packing the booleans ourselves, but
+                 * for now take this into account when calculating the number of available constants
+                 */
+                max_constantsF -= count_bits(This->baseShader.reg_maps.boolean_constants);
+                /* Set by driver quirks in directx.c */
+                max_constantsF -= GLINFO_LOCATION.reserved_glsl_constants;
+            } else {
+                max_constantsF = GL_LIMITS(vshader_constantsF);
+            }
+        }
+        max_constantsF = min(This->baseShader.limits.constant_float, max_constantsF);
         shader_addline(buffer, "uniform vec4 %cC[%u];\n", prefix, max_constantsF);
     }
 
-    if (This->baseShader.limits.constant_int > 0)
+    /* Always declare the full set of constants, the compiler can remove the unused ones because d3d doesn't(yet)
+     * support indirect int and bool constant addressing. This avoids problems if the app uses e.g. i0 and i9.
+     */
+    if (This->baseShader.limits.constant_int > 0 && This->baseShader.reg_maps.integer_constants)
         shader_addline(buffer, "uniform ivec4 %cI[%u];\n", prefix, This->baseShader.limits.constant_int);
 
-    if (This->baseShader.limits.constant_bool > 0)
+    if (This->baseShader.limits.constant_bool > 0 && This->baseShader.reg_maps.boolean_constants)
         shader_addline(buffer, "uniform bool %cB[%u];\n", prefix, This->baseShader.limits.constant_bool);
 
@@ -542,5 +778,6 @@
          * inout.
          */
-        if(This->baseShader.hex_version >= WINED3DVS_VERSION(3, 0)) {
+        if (reg_maps->shader_version.major >= 3)
+        {
             shader_addline(buffer, "void order_ps_input(in vec4[%u]);\n", MAX_REG_OUTPUT);
         } else {
@@ -572,5 +809,5 @@
         }
 
-        if(device->stateBlock->renderState[WINED3DRS_SRGBWRITEENABLE]) {
+        if(ps_args->srgb_correction) {
             shader_addline(buffer, "const vec4 srgb_mul_low = vec4(%f, %f, %f, %f);\n",
                             srgb_mul_low, srgb_mul_low, srgb_mul_low, srgb_mul_low);
@@ -598,9 +835,8 @@
     /* Declare texture samplers */ 
     for (i = 0; i < This->baseShader.limits.sampler; i++) {
-        if (reg_maps->samplers[i]) {
-
-            DWORD stype = reg_maps->samplers[i] & WINED3DSP_TEXTURETYPE_MASK;
-            switch (stype) {
-
+        if (reg_maps->sampler_type[i])
+        {
+            switch (reg_maps->sampler_type[i])
+            {
                 case WINED3DSTT_1D:
                     shader_addline(buffer, "uniform sampler1D %csampler%u;\n", prefix, i);
@@ -613,4 +849,13 @@
                         shader_addline(buffer, "uniform sampler2D %csampler%u;\n", prefix, i);
                     }
+
+                    if (pshader && ps_args->np2_fixup & (1 << i))
+                    {
+                        /* NP2/RECT textures in OpenGL use texcoords in the range [0,width]x[0,height]
+                         * while D3D has them in the (normalized) [0,1]x[0,1] range.
+                         * samplerNP2Fixup stores texture dimensions and is updated through
+                         * shader_glsl_load_np2fixup_constants when the sampler changes. */
+                        shader_addline(buffer, "uniform vec2 %csamplerNP2Fixup%u;\n", prefix, i);
+                    }
                     break;
                 case WINED3DSTT_CUBE:
@@ -622,5 +867,5 @@
                 default:
                     shader_addline(buffer, "uniform unsupported_sampler %csampler%u;\n", prefix, i);
-                    FIXME("Unrecognized sampler type: %#x\n", stype);
+                    FIXME("Unrecognized sampler type: %#x\n", reg_maps->sampler_type[i]);
                     break;
             }
@@ -643,6 +888,8 @@
      * helper function shader that is linked in at link time
      */
-    if(pshader && This->baseShader.hex_version >= WINED3DPS_VERSION(3, 0)) {
-        if(use_vs(device)) {
+    if (pshader && reg_maps->shader_version.major >= 3)
+    {
+        if (use_vs(device->stateBlock))
+        {
             shader_addline(buffer, "varying vec4 IN[%u];\n", GL_LIMITS(glsl_varyings) / 4);
         } else {
@@ -720,6 +967,6 @@
 
 /* Prototypes */
-static void shader_glsl_add_src_param(const SHADER_OPCODE_ARG *arg, const DWORD param,
-        const DWORD addr_token, DWORD mask, glsl_src_param_t *src_param);
+static void shader_glsl_add_src_param(const struct wined3d_shader_instruction *ins,
+        const struct wined3d_shader_src_param *wined3d_src, DWORD mask, glsl_src_param_t *glsl_src);
 
 /** Used for opcode modifiers - They multiply the result by the specified amount */
@@ -744,16 +991,10 @@
 
 /* Generate a GLSL parameter that does the input modifier computation and return the input register/mask to use */
-static void shader_glsl_gen_modifier (
-    const DWORD instr,
-    const char *in_reg,
-    const char *in_regswizzle,
-    char *out_str) {
-
+static void shader_glsl_gen_modifier(DWORD src_modifier, const char *in_reg, const char *in_regswizzle, char *out_str)
+{
     out_str[0] = 0;
-    
-    if (instr == WINED3DSIO_TEXKILL)
-        return;
-
-    switch (instr & WINED3DSP_SRCMOD_MASK) {
+
+    switch (src_modifier)
+    {
     case WINED3DSPSM_DZ: /* Need to handle this in the instructions itself (texld & texcrd). */
     case WINED3DSPSM_DW:
@@ -795,5 +1036,5 @@
         break;
     default:
-        FIXME("Unhandled modifier %u\n", (instr & WINED3DSP_SRCMOD_MASK));
+        FIXME("Unhandled modifier %u\n", src_modifier);
         sprintf(out_str, "%s%s", in_reg, in_regswizzle);
     }
@@ -802,211 +1043,232 @@
 /** Writes the GLSL variable name that corresponds to the register that the
  * DX opcode parameter is trying to access */
-static void shader_glsl_get_register_name(const DWORD param, const DWORD addr_token,
-        char *regstr, BOOL *is_color, const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_get_register_name(const struct wined3d_shader_register *reg,
+        char *register_name, BOOL *is_color, const struct wined3d_shader_instruction *ins)
 {
     /* oPos, oFog and oPts in D3D */
     static const char * const hwrastout_reg_names[] = { "gl_Position", "gl_FogFragCoord", "gl_PointSize" };
 
-    DWORD reg = param & WINED3DSP_REGNUM_MASK;
-    DWORD regtype = shader_get_regtype(param);
-    IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) arg->shader;
+    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
     const WineD3D_GL_Info* gl_info = &deviceImpl->adapter->gl_info;
-
-    char pshader = shader_is_pshader_version(This->baseShader.hex_version);
-    char tmpStr[150];
-
-    *is_color = FALSE;   
- 
-    switch (regtype) {
-    case WINED3DSPR_TEMP:
-        sprintf(tmpStr, "R%u", reg);
-    break;
-    case WINED3DSPR_INPUT:
-        if (pshader) {
-            /* Pixel shaders >= 3.0 */
-            if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 3) {
+    char pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
+
+    *is_color = FALSE;
+
+    switch (reg->type)
+    {
+        case WINED3DSPR_TEMP:
+            sprintf(register_name, "R%u", reg->idx);
+            break;
+
+        case WINED3DSPR_INPUT:
+            /* vertex shaders */
+            if (!pshader)
+            {
+                if (((IWineD3DVertexShaderImpl *)This)->cur_args->swizzle_map & (1 << reg->idx)) *is_color = TRUE;
+                sprintf(register_name, "attrib%u", reg->idx);
+                break;
+            }
+
+            /* pixel shaders >= 3.0 */
+            if (This->baseShader.reg_maps.shader_version.major >= 3)
+            {
+                DWORD idx = ((IWineD3DPixelShaderImpl *)This)->input_reg_map[reg->idx];
                 DWORD in_count = GL_LIMITS(glsl_varyings) / 4;
 
-                if (param & WINED3DSHADER_ADDRMODE_RELATIVE) {
+                if (reg->rel_addr)
+                {
                     glsl_src_param_t rel_param;
-                    shader_glsl_add_src_param(arg, addr_token, 0, WINED3DSP_WRITEMASK_0, &rel_param);
+
+                    shader_glsl_add_src_param(ins, reg->rel_addr, WINED3DSP_WRITEMASK_0, &rel_param);
 
                     /* Removing a + 0 would be an obvious optimization, but macos doesn't see the NOP
-                     * operation there
-                     */
-                    if(((IWineD3DPixelShaderImpl *) This)->input_reg_map[reg]) {
-                        if (((IWineD3DPixelShaderImpl *)This)->declared_in_count > in_count) {
-                            sprintf(tmpStr, "((%s + %u) > %d ? (%s + %u) > %d ? gl_SecondaryColor : gl_Color : IN[%s + %u])",
-                                    rel_param.param_str, ((IWineD3DPixelShaderImpl *)This)->input_reg_map[reg], in_count - 1,
-                                    rel_param.param_str, ((IWineD3DPixelShaderImpl *)This)->input_reg_map[reg], in_count,
-                                    rel_param.param_str, ((IWineD3DPixelShaderImpl *)This)->input_reg_map[reg]);
-                        } else {
-                            sprintf(tmpStr, "IN[%s + %u]", rel_param.param_str, ((IWineD3DPixelShaderImpl *)This)->input_reg_map[reg]);
+                     * operation there */
+                    if (idx)
+                    {
+                        if (((IWineD3DPixelShaderImpl *)This)->declared_in_count > in_count)
+                        {
+                            sprintf(register_name,
+                                    "((%s + %u) > %d ? (%s + %u) > %d ? gl_SecondaryColor : gl_Color : IN[%s + %u])",
+                                    rel_param.param_str, idx, in_count - 1, rel_param.param_str, idx, in_count,
+                                    rel_param.param_str, idx);
                         }
-                    } else {
-                        if (((IWineD3DPixelShaderImpl *)This)->declared_in_count > in_count) {
-                            sprintf(tmpStr, "((%s) > %d ? (%s) > %d ? gl_SecondaryColor : gl_Color : IN[%s])",
-                                    rel_param.param_str, in_count - 1,
-                                    rel_param.param_str, in_count,
-                                    rel_param.param_str);
-                        } else {
-                            sprintf(tmpStr, "IN[%s]", rel_param.param_str);
+                        else
+                        {
+                            sprintf(register_name, "IN[%s + %u]", rel_param.param_str, idx);
                         }
                     }
-                } else {
-                    DWORD idx = ((IWineD3DPixelShaderImpl *) This)->input_reg_map[reg];
-                    if (idx == in_count) {
-                        sprintf(tmpStr, "gl_Color");
-                    } else if (idx == in_count + 1) {
-                        sprintf(tmpStr, "gl_SecondaryColor");
-                    } else {
-                        sprintf(tmpStr, "IN[%u]", idx);
+                    else
+                    {
+                        if (((IWineD3DPixelShaderImpl *)This)->declared_in_count > in_count)
+                        {
+                            sprintf(register_name, "((%s) > %d ? (%s) > %d ? gl_SecondaryColor : gl_Color : IN[%s])",
+                                    rel_param.param_str, in_count - 1, rel_param.param_str, in_count,
+                                    rel_param.param_str);
+                        }
+                        else
+                        {
+                            sprintf(register_name, "IN[%s]", rel_param.param_str);
+                        }
                     }
                 }
-            } else {
-                if (reg==0)
-                    strcpy(tmpStr, "gl_Color");
                 else
-                    strcpy(tmpStr, "gl_SecondaryColor");
-            }
-        } else {
-            if (vshader_input_is_color((IWineD3DVertexShader*) This, reg))
-               *is_color = TRUE;
-            sprintf(tmpStr, "attrib%u", reg);
-        } 
-        break;
-    case WINED3DSPR_CONST:
-    {
-        const char prefix = pshader? 'P':'V';
-
-        /* Relative addressing */
-        if (param & WINED3DSHADER_ADDRMODE_RELATIVE) {
-
-           /* Relative addressing on shaders 2.0+ have a relative address token, 
-            * prior to that, it was hard-coded as "A0.x" because there's only 1 register */
-           if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 2)  {
-               glsl_src_param_t rel_param;
-               shader_glsl_add_src_param(arg, addr_token, 0, WINED3DSP_WRITEMASK_0, &rel_param);
-               if(reg) {
-                   sprintf(tmpStr, "%cC[%s + %u]", prefix, rel_param.param_str, reg);
-               } else {
-                   sprintf(tmpStr, "%cC[%s]", prefix, rel_param.param_str);
-               }
-           } else {
-               if(reg) {
-                   sprintf(tmpStr, "%cC[A0.x + %u]", prefix, reg);
-               } else {
-                   sprintf(tmpStr, "%cC[A0.x]", prefix);
-               }
-           }
-
-        } else {
-            if(shader_constant_is_local(This, reg)) {
-                sprintf(tmpStr, "%cLC%u", prefix, reg);
-            } else {
-                sprintf(tmpStr, "%cC[%u]", prefix, reg);
-            }
-        }
-
-        break;
-    }
-    case WINED3DSPR_CONSTINT:
-        if (pshader)
-            sprintf(tmpStr, "PI[%u]", reg);
-        else
-            sprintf(tmpStr, "VI[%u]", reg);
-        break;
-    case WINED3DSPR_CONSTBOOL:
-        if (pshader)
-            sprintf(tmpStr, "PB[%u]", reg);
-        else
-            sprintf(tmpStr, "VB[%u]", reg);
-        break;
-    case WINED3DSPR_TEXTURE: /* case WINED3DSPR_ADDR: */
-        if (pshader) {
-            sprintf(tmpStr, "T%u", reg);
-        } else {
-            sprintf(tmpStr, "A%u", reg);
-        }
-    break;
-    case WINED3DSPR_LOOP:
-        sprintf(tmpStr, "aL%u", This->baseShader.cur_loop_regno - 1);
-    break;
-    case WINED3DSPR_SAMPLER:
-        if (pshader)
-            sprintf(tmpStr, "Psampler%u", reg);
-        else
-            sprintf(tmpStr, "Vsampler%u", reg);
-    break;
-    case WINED3DSPR_COLOROUT:
-        if (reg >= GL_LIMITS(buffers)) {
-            WARN("Write to render target %u, only %d supported\n", reg, 4);
-        }
-        if (GL_SUPPORT(ARB_DRAW_BUFFERS)) {
-            sprintf(tmpStr, "gl_FragData[%u]", reg);
-        } else { /* On older cards with GLSL support like the GeforceFX there's only one buffer. */
-            sprintf(tmpStr, "gl_FragColor");
-        }
-    break;
-    case WINED3DSPR_RASTOUT:
-        sprintf(tmpStr, "%s", hwrastout_reg_names[reg]);
-    break;
-    case WINED3DSPR_DEPTHOUT:
-        sprintf(tmpStr, "gl_FragDepth");
-    break;
-    case WINED3DSPR_ATTROUT:
-        if (reg == 0) {
-            sprintf(tmpStr, "gl_FrontColor");
-        } else {
-            sprintf(tmpStr, "gl_FrontSecondaryColor");
-        }
-    break;
-    case WINED3DSPR_TEXCRDOUT:
-        /* Vertex shaders >= 3.0: WINED3DSPR_OUTPUT */
-        if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 3)
-            sprintf(tmpStr, "OUT[%u]", reg);
-        else
-            sprintf(tmpStr, "gl_TexCoord[%u]", reg);
-    break;
-    case WINED3DSPR_MISCTYPE:
-        if (reg == 0) {
-            /* vPos */
-            sprintf(tmpStr, "vpos");
-        } else if (reg == 1){
-            /* Note that gl_FrontFacing is a bool, while vFace is
-             * a float for which the sign determines front/back
-             */
-            sprintf(tmpStr, "(gl_FrontFacing ? 1.0 : -1.0)");
-        } else {
-            FIXME("Unhandled misctype register %d\n", reg);
-            sprintf(tmpStr, "unrecognized_register");
-        }
-        break;
-    default:
-        FIXME("Unhandled register name Type(%d)\n", regtype);
-        sprintf(tmpStr, "unrecognized_register");
-    break;
-    }
-
-    strcat(regstr, tmpStr);
+                {
+                    if (idx == in_count) sprintf(register_name, "gl_Color");
+                    else if (idx == in_count + 1) sprintf(register_name, "gl_SecondaryColor");
+                    else sprintf(register_name, "IN[%u]", idx);
+                }
+            }
+            else
+            {
+                if (reg->idx == 0) strcpy(register_name, "gl_Color");
+                else strcpy(register_name, "gl_SecondaryColor");
+                break;
+            }
+            break;
+
+        case WINED3DSPR_CONST:
+            {
+                const char prefix = pshader ? 'P' : 'V';
+
+                /* Relative addressing */
+                if (reg->rel_addr)
+                {
+                    glsl_src_param_t rel_param;
+                    shader_glsl_add_src_param(ins, reg->rel_addr, WINED3DSP_WRITEMASK_0, &rel_param);
+                    if (reg->idx) sprintf(register_name, "%cC[%s + %u]", prefix, rel_param.param_str, reg->idx);
+                    else sprintf(register_name, "%cC[%s]", prefix, rel_param.param_str);
+                }
+                else
+                {
+                    if (shader_constant_is_local(This, reg->idx))
+                        sprintf(register_name, "%cLC%u", prefix, reg->idx);
+                    else
+                        sprintf(register_name, "%cC[%u]", prefix, reg->idx);
+                }
+            }
+            break;
+
+        case WINED3DSPR_CONSTINT:
+            if (pshader) sprintf(register_name, "PI[%u]", reg->idx);
+            else sprintf(register_name, "VI[%u]", reg->idx);
+            break;
+
+        case WINED3DSPR_CONSTBOOL:
+            if (pshader) sprintf(register_name, "PB[%u]", reg->idx);
+            else sprintf(register_name, "VB[%u]", reg->idx);
+            break;
+
+        case WINED3DSPR_TEXTURE: /* case WINED3DSPR_ADDR: */
+            if (pshader) sprintf(register_name, "T%u", reg->idx);
+            else sprintf(register_name, "A%u", reg->idx);
+            break;
+
+        case WINED3DSPR_LOOP:
+            sprintf(register_name, "aL%u", This->baseShader.cur_loop_regno - 1);
+            break;
+
+        case WINED3DSPR_SAMPLER:
+            if (pshader) sprintf(register_name, "Psampler%u", reg->idx);
+            else sprintf(register_name, "Vsampler%u", reg->idx);
+            break;
+
+        case WINED3DSPR_COLOROUT:
+            if (reg->idx >= GL_LIMITS(buffers))
+                WARN("Write to render target %u, only %d supported\n", reg->idx, 4);
+
+            if (GL_SUPPORT(ARB_DRAW_BUFFERS)) sprintf(register_name, "gl_FragData[%u]", reg->idx);
+            /* On older cards with GLSL support like the GeforceFX there's only one buffer. */
+            else sprintf(register_name, "gl_FragColor");
+            break;
+
+        case WINED3DSPR_RASTOUT:
+            sprintf(register_name, "%s", hwrastout_reg_names[reg->idx]);
+            break;
+
+        case WINED3DSPR_DEPTHOUT:
+            sprintf(register_name, "gl_FragDepth");
+            break;
+
+        case WINED3DSPR_ATTROUT:
+            if (reg->idx == 0) sprintf(register_name, "gl_FrontColor");
+            else sprintf(register_name, "gl_FrontSecondaryColor");
+            break;
+
+        case WINED3DSPR_TEXCRDOUT:
+            /* Vertex shaders >= 3.0: WINED3DSPR_OUTPUT */
+            if (This->baseShader.reg_maps.shader_version.major >= 3) sprintf(register_name, "OUT[%u]", reg->idx);
+            else sprintf(register_name, "gl_TexCoord[%u]", reg->idx);
+            break;
+
+        case WINED3DSPR_MISCTYPE:
+            if (reg->idx == 0)
+            {
+                /* vPos */
+                sprintf(register_name, "vpos");
+            }
+            else if (reg->idx == 1)
+            {
+                /* Note that gl_FrontFacing is a bool, while vFace is
+                 * a float for which the sign determines front/back */
+                sprintf(register_name, "(gl_FrontFacing ? 1.0 : -1.0)");
+            }
+            else
+            {
+                FIXME("Unhandled misctype register %d\n", reg->idx);
+                sprintf(register_name, "unrecognized_register");
+            }
+            break;
+
+        case WINED3DSPR_IMMCONST:
+            switch (reg->immconst_type)
+            {
+                case WINED3D_IMMCONST_FLOAT:
+                    sprintf(register_name, "%.8e", *(float *)reg->immconst_data);
+                    break;
+
+                case WINED3D_IMMCONST_FLOAT4:
+                    sprintf(register_name, "vec4(%.8e, %.8e, %.8e, %.8e)",
+                            *(float *)&reg->immconst_data[0], *(float *)&reg->immconst_data[1],
+                            *(float *)&reg->immconst_data[2], *(float *)&reg->immconst_data[3]);
+                    break;
+
+                default:
+                    FIXME("Unhandled immconst type %#x\n", reg->immconst_type);
+                    sprintf(register_name, "<unhandled_immconst_type %#x>", reg->immconst_type);
+            }
+            break;
+
+        default:
+            FIXME("Unhandled register name Type(%d)\n", reg->type);
+            sprintf(register_name, "unrecognized_register");
+            break;
+    }
+}
+
+static void shader_glsl_write_mask_to_str(DWORD write_mask, char *str)
+{
+    *str++ = '.';
+    if (write_mask & WINED3DSP_WRITEMASK_0) *str++ = 'x';
+    if (write_mask & WINED3DSP_WRITEMASK_1) *str++ = 'y';
+    if (write_mask & WINED3DSP_WRITEMASK_2) *str++ = 'z';
+    if (write_mask & WINED3DSP_WRITEMASK_3) *str++ = 'w';
+    *str = '\0';
 }
 
 /* Get the GLSL write mask for the destination register */
-static DWORD shader_glsl_get_write_mask(const DWORD param, char *write_mask) {
-    char *ptr = write_mask;
-    DWORD mask = param & WINED3DSP_WRITEMASK_ALL;
-
-    if (shader_is_scalar(param)) {
+static DWORD shader_glsl_get_write_mask(const struct wined3d_shader_dst_param *param, char *write_mask)
+{
+    DWORD mask = param->write_mask;
+
+    if (shader_is_scalar(&param->reg))
+    {
         mask = WINED3DSP_WRITEMASK_0;
-    } else {
-        *ptr++ = '.';
-        if (param & WINED3DSP_WRITEMASK_0) *ptr++ = 'x';
-        if (param & WINED3DSP_WRITEMASK_1) *ptr++ = 'y';
-        if (param & WINED3DSP_WRITEMASK_2) *ptr++ = 'z';
-        if (param & WINED3DSP_WRITEMASK_3) *ptr++ = 'w';
-    }
-
-    *ptr = '\0';
+        *write_mask = '\0';
+    }
+    else
+    {
+        shader_glsl_write_mask_to_str(mask, write_mask);
+    }
 
     return mask;
@@ -1024,22 +1286,27 @@
 }
 
-static void shader_glsl_get_swizzle(const DWORD param, BOOL fixup, DWORD mask, char *swizzle_str) {
+static void shader_glsl_swizzle_to_str(const DWORD swizzle, BOOL fixup, DWORD mask, char *str)
+{
     /* For registers of type WINED3DDECLTYPE_D3DCOLOR, data is stored as "bgra",
      * but addressed as "rgba". To fix this we need to swap the register's x
      * and z components. */
-    DWORD swizzle = (param & WINED3DSP_SWIZZLE_MASK) >> WINED3DSP_SWIZZLE_SHIFT;
     const char *swizzle_chars = fixup ? "zyxw" : "xyzw";
-    char *ptr = swizzle_str;
-
-    if (!shader_is_scalar(param)) {
-        *ptr++ = '.';
-        /* swizzle bits fields: wwzzyyxx */
-        if (mask & WINED3DSP_WRITEMASK_0) *ptr++ = swizzle_chars[swizzle & 0x03];
-        if (mask & WINED3DSP_WRITEMASK_1) *ptr++ = swizzle_chars[(swizzle >> 2) & 0x03];
-        if (mask & WINED3DSP_WRITEMASK_2) *ptr++ = swizzle_chars[(swizzle >> 4) & 0x03];
-        if (mask & WINED3DSP_WRITEMASK_3) *ptr++ = swizzle_chars[(swizzle >> 6) & 0x03];
-    }
-
-    *ptr = '\0';
+
+    *str++ = '.';
+    /* swizzle bits fields: wwzzyyxx */
+    if (mask & WINED3DSP_WRITEMASK_0) *str++ = swizzle_chars[swizzle & 0x03];
+    if (mask & WINED3DSP_WRITEMASK_1) *str++ = swizzle_chars[(swizzle >> 2) & 0x03];
+    if (mask & WINED3DSP_WRITEMASK_2) *str++ = swizzle_chars[(swizzle >> 4) & 0x03];
+    if (mask & WINED3DSP_WRITEMASK_3) *str++ = swizzle_chars[(swizzle >> 6) & 0x03];
+    *str = '\0';
+}
+
+static void shader_glsl_get_swizzle(const struct wined3d_shader_src_param *param,
+        BOOL fixup, DWORD mask, char *swizzle_str)
+{
+    if (shader_is_scalar(&param->reg))
+        *swizzle_str = '\0';
+    else
+        shader_glsl_swizzle_to_str(param->swizzle, fixup, mask, swizzle_str);
 }
 
@@ -1047,18 +1314,17 @@
  * Also, return the actual register name and swizzle in case the
  * caller needs this information as well. */
-static void shader_glsl_add_src_param(const SHADER_OPCODE_ARG *arg, const DWORD param,
-        const DWORD addr_token, DWORD mask, glsl_src_param_t *src_param)
+static void shader_glsl_add_src_param(const struct wined3d_shader_instruction *ins,
+        const struct wined3d_shader_src_param *wined3d_src, DWORD mask, glsl_src_param_t *glsl_src)
 {
     BOOL is_color = FALSE;
     char swizzle_str[6];
 
-    src_param->reg_name[0] = '\0';
-    src_param->param_str[0] = '\0';
+    glsl_src->reg_name[0] = '\0';
+    glsl_src->param_str[0] = '\0';
     swizzle_str[0] = '\0';
 
-    shader_glsl_get_register_name(param, addr_token, src_param->reg_name, &is_color, arg);
-
-    shader_glsl_get_swizzle(param, is_color, mask, swizzle_str);
-    shader_glsl_gen_modifier(param, src_param->reg_name, swizzle_str, src_param->param_str);
+    shader_glsl_get_register_name(&wined3d_src->reg, glsl_src->reg_name, &is_color, ins);
+    shader_glsl_get_swizzle(wined3d_src, is_color, mask, swizzle_str);
+    shader_glsl_gen_modifier(wined3d_src->modifiers, glsl_src->reg_name, swizzle_str, glsl_src->param_str);
 }
 
@@ -1066,67 +1332,68 @@
  * Also, return the actual register name and swizzle in case the
  * caller needs this information as well. */
-static DWORD shader_glsl_add_dst_param(const SHADER_OPCODE_ARG* arg, const DWORD param,
-        const DWORD addr_token, glsl_dst_param_t *dst_param)
+static DWORD shader_glsl_add_dst_param(const struct wined3d_shader_instruction *ins,
+        const struct wined3d_shader_dst_param *wined3d_dst, glsl_dst_param_t *glsl_dst)
 {
     BOOL is_color = FALSE;
 
-    dst_param->mask_str[0] = '\0';
-    dst_param->reg_name[0] = '\0';
-
-    shader_glsl_get_register_name(param, addr_token, dst_param->reg_name, &is_color, arg);
-    return shader_glsl_get_write_mask(param, dst_param->mask_str);
+    glsl_dst->mask_str[0] = '\0';
+    glsl_dst->reg_name[0] = '\0';
+
+    shader_glsl_get_register_name(&wined3d_dst->reg, glsl_dst->reg_name, &is_color, ins);
+    return shader_glsl_get_write_mask(wined3d_dst, glsl_dst->mask_str);
 }
 
 /* Append the destination part of the instruction to the buffer, return the effective write mask */
-static DWORD shader_glsl_append_dst_ext(SHADER_BUFFER *buffer, const SHADER_OPCODE_ARG *arg, const DWORD param)
+static DWORD shader_glsl_append_dst_ext(SHADER_BUFFER *buffer,
+        const struct wined3d_shader_instruction *ins, const struct wined3d_shader_dst_param *dst)
+{
+    glsl_dst_param_t glsl_dst;
+    DWORD mask;
+
+    mask = shader_glsl_add_dst_param(ins, dst, &glsl_dst);
+    if (mask) shader_addline(buffer, "%s%s = %s(", glsl_dst.reg_name, glsl_dst.mask_str, shift_glsl_tab[dst->shift]);
+
+    return mask;
+}
+
+/* Append the destination part of the instruction to the buffer, return the effective write mask */
+static DWORD shader_glsl_append_dst(SHADER_BUFFER *buffer, const struct wined3d_shader_instruction *ins)
+{
+    return shader_glsl_append_dst_ext(buffer, ins, &ins->dst[0]);
+}
+
+/** Process GLSL instruction modifiers */
+static void shader_glsl_add_instruction_modifiers(const struct wined3d_shader_instruction *ins)
 {
     glsl_dst_param_t dst_param;
-    DWORD mask;
-    int shift;
-
-    mask = shader_glsl_add_dst_param(arg, param, arg->dst_addr, &dst_param);
-
-    if(mask) {
-        shift = (param & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
-        shader_addline(buffer, "%s%s = %s(", dst_param.reg_name, dst_param.mask_str, shift_glsl_tab[shift]);
-    }
-
-    return mask;
-}
-
-/* Append the destination part of the instruction to the buffer, return the effective write mask */
-static DWORD shader_glsl_append_dst(SHADER_BUFFER *buffer, const SHADER_OPCODE_ARG *arg)
-{
-    return shader_glsl_append_dst_ext(buffer, arg, arg->dst);
-}
-
-/** Process GLSL instruction modifiers */
-void shader_glsl_add_instruction_modifiers(const SHADER_OPCODE_ARG* arg)
-{
-    DWORD mask = arg->dst & WINED3DSP_DSTMOD_MASK;
- 
-    if (arg->opcode->dst_token && mask != 0) {
-        glsl_dst_param_t dst_param;
-
-        shader_glsl_add_dst_param(arg, arg->dst, 0, &dst_param);
-
-        if (mask & WINED3DSPDM_SATURATE) {
-            /* _SAT means to clamp the value of the register to between 0 and 1 */
-            shader_addline(arg->buffer, "%s%s = clamp(%s%s, 0.0, 1.0);\n", dst_param.reg_name,
-                    dst_param.mask_str, dst_param.reg_name, dst_param.mask_str);
-        }
-        if (mask & WINED3DSPDM_MSAMPCENTROID) {
-            FIXME("_centroid modifier not handled\n");
-        }
-        if (mask & WINED3DSPDM_PARTIALPRECISION) {
-            /* MSDN says this modifier can be safely ignored, so that's what we'll do. */
-        }
-    }
-}
-
-static inline const char* shader_get_comp_op(
-    const DWORD opcode) {
-
-    DWORD op = (opcode & INST_CONTROLS_MASK) >> INST_CONTROLS_SHIFT;
+    DWORD modifiers;
+
+    if (!ins->dst_count) return;
+
+    modifiers = ins->dst[0].modifiers;
+    if (!modifiers) return;
+
+    shader_glsl_add_dst_param(ins, &ins->dst[0], &dst_param);
+
+    if (modifiers & WINED3DSPDM_SATURATE)
+    {
+        /* _SAT means to clamp the value of the register to between 0 and 1 */
+        shader_addline(ins->ctx->buffer, "%s%s = clamp(%s%s, 0.0, 1.0);\n", dst_param.reg_name,
+                dst_param.mask_str, dst_param.reg_name, dst_param.mask_str);
+    }
+
+    if (modifiers & WINED3DSPDM_MSAMPCENTROID)
+    {
+        FIXME("_centroid modifier not handled\n");
+    }
+
+    if (modifiers & WINED3DSPDM_PARTIALPRECISION)
+    {
+        /* MSDN says this modifier can be safely ignored, so that's what we'll do. */
+    }
+}
+
+static inline const char *shader_get_comp_op(DWORD op)
+{
     switch (op) {
         case COMPARISON_GT: return ">";
@@ -1142,25 +1409,64 @@
 }
 
-static void shader_glsl_get_sample_function(DWORD sampler_type, BOOL projected, BOOL texrect, glsl_sample_function_t *sample_function) {
+static void shader_glsl_get_sample_function(DWORD sampler_type, DWORD flags, glsl_sample_function_t *sample_function)
+{
+    BOOL projected = flags & WINED3D_GLSL_SAMPLE_PROJECTED;
+    BOOL texrect = flags & WINED3D_GLSL_SAMPLE_RECT;
+    BOOL lod = flags & WINED3D_GLSL_SAMPLE_LOD;
+    BOOL grad = flags & WINED3D_GLSL_SAMPLE_GRAD;
+
     /* Note that there's no such thing as a projected cube texture. */
     switch(sampler_type) {
         case WINED3DSTT_1D:
-            sample_function->name = projected ? "texture1DProj" : "texture1D";
+            if(lod) {
+                sample_function->name = projected ? "texture1DProjLod" : "texture1DLod";
+            } else  if(grad) {
+                sample_function->name = projected ? "texture1DProjGradARB" : "texture1DGradARB";
+            } else {
+                sample_function->name = projected ? "texture1DProj" : "texture1D";
+            }
             sample_function->coord_mask = WINED3DSP_WRITEMASK_0;
             break;
         case WINED3DSTT_2D:
             if(texrect) {
-                sample_function->name = projected ? "texture2DRectProj" : "texture2DRect";
+                if(lod) {
+                    sample_function->name = projected ? "texture2DRectProjLod" : "texture2DRectLod";
+                } else  if(grad) {
+                    /* What good are texrect grad functions? I don't know, but GL_EXT_gpu_shader4 defines them.
+                    * There is no GL_ARB_shader_texture_lod spec yet, so I don't know if they're defined there
+                     */
+                    sample_function->name = projected ? "shadow2DRectProjGradARB" : "shadow2DRectGradARB";
+                } else {
+                    sample_function->name = projected ? "texture2DRectProj" : "texture2DRect";
+                }
             } else {
-                sample_function->name = projected ? "texture2DProj" : "texture2D";
+                if(lod) {
+                    sample_function->name = projected ? "texture2DProjLod" : "texture2DLod";
+                } else  if(grad) {
+                    sample_function->name = projected ? "texture2DProjGradARB" : "texture2DGradARB";
+                } else {
+                    sample_function->name = projected ? "texture2DProj" : "texture2D";
+                }
             }
             sample_function->coord_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1;
             break;
         case WINED3DSTT_CUBE:
-            sample_function->name = "textureCube";
+            if(lod) {
+                sample_function->name = "textureCubeLod";
+            } else if(grad) {
+                sample_function->name = "textureCubeGradARB";
+            } else {
+                sample_function->name = "textureCube";
+            }
             sample_function->coord_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
             break;
         case WINED3DSTT_VOLUME:
-            sample_function->name = projected ? "texture3DProj" : "texture3D";
+            if(lod) {
+                sample_function->name = projected ? "texture3DProjLod" : "texture3DLod";
+            } else  if(grad) {
+                sample_function->name = projected ? "texture3DProjGradARB" : "texture3DGradARB";
+            } else {
+                sample_function->name = projected ? "texture3DProj" : "texture3D";
+            }
             sample_function->coord_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
             break;
@@ -1215,11 +1521,11 @@
 }
 
-static void shader_glsl_color_correction(const struct SHADER_OPCODE_ARG *arg, struct color_fixup_desc fixup)
-{
+static void shader_glsl_color_correction(const struct wined3d_shader_instruction *ins, struct color_fixup_desc fixup)
+{
+    struct wined3d_shader_dst_param dst;
     unsigned int mask_size, remaining;
     glsl_dst_param_t dst_param;
     char arguments[256];
     DWORD mask;
-    BOOL dummy;
 
     mask = 0;
@@ -1228,5 +1534,5 @@
     if (fixup.z_sign_fixup || fixup.z_source != CHANNEL_SOURCE_Z) mask |= WINED3DSP_WRITEMASK_2;
     if (fixup.w_sign_fixup || fixup.w_source != CHANNEL_SOURCE_W) mask |= WINED3DSP_WRITEMASK_3;
-    mask &= arg->dst;
+    mask &= ins->dst[0].write_mask;
 
     if (!mask) return; /* Nothing to do */
@@ -1241,9 +1547,7 @@
     mask_size = shader_glsl_get_write_mask_size(mask);
 
-    dst_param.mask_str[0] = '\0';
-    shader_glsl_get_write_mask(mask, dst_param.mask_str);
-
-    dst_param.reg_name[0] = '\0';
-    shader_glsl_get_register_name(arg->dst, arg->dst_addr, dst_param.reg_name, &dummy, arg);
+    dst = ins->dst[0];
+    dst.write_mask = mask;
+    shader_glsl_add_dst_param(ins, &dst, &dst_param);
 
     arguments[0] = '\0';
@@ -1272,10 +1576,66 @@
     if (mask_size > 1)
     {
-        shader_addline(arg->buffer, "%s%s = vec%u(%s);\n",
+        shader_addline(ins->ctx->buffer, "%s%s = vec%u(%s);\n",
                 dst_param.reg_name, dst_param.mask_str, mask_size, arguments);
     }
     else
     {
-        shader_addline(arg->buffer, "%s%s = %s;\n", dst_param.reg_name, dst_param.mask_str, arguments);
+        shader_addline(ins->ctx->buffer, "%s%s = %s;\n", dst_param.reg_name, dst_param.mask_str, arguments);
+    }
+}
+
+static void PRINTF_ATTR(8, 9) shader_glsl_gen_sample_code(const struct wined3d_shader_instruction *ins,
+        DWORD sampler, const glsl_sample_function_t *sample_function, DWORD swizzle,
+        const char *dx, const char *dy,
+        const char *bias, const char *coord_reg_fmt, ...)
+{
+    const char *sampler_base;
+    char dst_swizzle[6];
+    struct color_fixup_desc fixup;
+    BOOL np2_fixup = FALSE;
+    va_list args;
+
+    shader_glsl_swizzle_to_str(swizzle, FALSE, ins->dst[0].write_mask, dst_swizzle);
+
+    if (shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type))
+    {
+        IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+        fixup = This->cur_args->color_fixup[sampler];
+        sampler_base = "Psampler";
+
+        if(This->cur_args->np2_fixup & (1 << sampler)) {
+            if(bias) {
+                FIXME("Biased sampling from NP2 textures is unsupported\n");
+            } else {
+                np2_fixup = TRUE;
+            }
+        }
+    } else {
+        sampler_base = "Vsampler";
+        fixup = COLOR_FIXUP_IDENTITY; /* FIXME: Vshader color fixup */
+    }
+
+    shader_glsl_append_dst(ins->ctx->buffer, ins);
+
+    shader_addline(ins->ctx->buffer, "%s(%s%u, ", sample_function->name, sampler_base, sampler);
+
+    va_start(args, coord_reg_fmt);
+    shader_vaddline(ins->ctx->buffer, coord_reg_fmt, args);
+    va_end(args);
+
+    if(bias) {
+        shader_addline(ins->ctx->buffer, ", %s)%s);\n", bias, dst_swizzle);
+    } else {
+        if (np2_fixup) {
+            shader_addline(ins->ctx->buffer, " * PsamplerNP2Fixup%u)%s);\n", sampler, dst_swizzle);
+        } else if(dx && dy) {
+            shader_addline(ins->ctx->buffer, ", %s, %s)%s);\n", dx, dy, dst_swizzle);
+        } else {
+            shader_addline(ins->ctx->buffer, ")%s);\n", dst_swizzle);
+        }
+    }
+
+    if(!is_identity_fixup(fixup)) {
+        shader_glsl_color_correction(ins, fixup);
     }
 }
@@ -1288,8 +1648,7 @@
 
 /* Generate GLSL arithmetic functions (dst = src1 + src2) */
-static void shader_glsl_arith(const SHADER_OPCODE_ARG *arg)
-{
-    CONST SHADER_OPCODE* curOpcode = arg->opcode;
-    SHADER_BUFFER* buffer = arg->buffer;
+static void shader_glsl_arith(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src0_param;
     glsl_src_param_t src1_param;
@@ -1298,36 +1657,37 @@
 
     /* Determine the GLSL operator to use based on the opcode */
-    switch (curOpcode->opcode) {
-        case WINED3DSIO_MUL: op = '*'; break;
-        case WINED3DSIO_ADD: op = '+'; break;
-        case WINED3DSIO_SUB: op = '-'; break;
+    switch (ins->handler_idx)
+    {
+        case WINED3DSIH_MUL: op = '*'; break;
+        case WINED3DSIH_ADD: op = '+'; break;
+        case WINED3DSIH_SUB: op = '-'; break;
         default:
             op = ' ';
-            FIXME("Opcode %s not yet handled in GLSL\n", curOpcode->name);
+            FIXME("Opcode %#x not yet handled in GLSL\n", ins->handler_idx);
             break;
     }
 
-    write_mask = shader_glsl_append_dst(buffer, arg);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], write_mask, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
+    write_mask = shader_glsl_append_dst(buffer, ins);
+    shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
     shader_addline(buffer, "%s %c %s);\n", src0_param.param_str, op, src1_param.param_str);
 }
 
 /* Process the WINED3DSIO_MOV opcode using GLSL (dst = src) */
-static void shader_glsl_mov(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
-    SHADER_BUFFER* buffer = arg->buffer;
+static void shader_glsl_mov(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src0_param;
     DWORD write_mask;
 
-    write_mask = shader_glsl_append_dst(buffer, arg);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], write_mask, &src0_param);
+    write_mask = shader_glsl_append_dst(buffer, ins);
+    shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param);
 
     /* In vs_1_1 WINED3DSIO_MOV can write to the address register. In later
      * shader versions WINED3DSIO_MOVA is used for this. */
-    if ((WINED3DSHADER_VERSION_MAJOR(shader->baseShader.hex_version) == 1 &&
-            !shader_is_pshader_version(shader->baseShader.hex_version) &&
-            shader_get_regtype(arg->dst) == WINED3DSPR_ADDR)) {
+    if (ins->ctx->reg_maps->shader_version.major == 1
+            && !shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type)
+            && ins->dst[0].reg.type == WINED3DSPR_ADDR)
+    {
         /* This is a simple floor() */
         unsigned int mask_size = shader_glsl_get_write_mask_size(write_mask);
@@ -1337,5 +1697,7 @@
             shader_addline(buffer, "int(floor(%s)));\n", src0_param.param_str);
         }
-    } else if(arg->opcode->opcode == WINED3DSIO_MOVA) {
+    }
+    else if(ins->handler_idx == WINED3DSIH_MOVA)
+    {
         /* We need to *round* to the nearest int here. */
         unsigned int mask_size = shader_glsl_get_write_mask_size(write_mask);
@@ -1351,8 +1713,7 @@
 
 /* Process the dot product operators DP3 and DP4 in GLSL (dst = dot(src0, src1)) */
-static void shader_glsl_dot(const SHADER_OPCODE_ARG *arg)
-{
-    CONST SHADER_OPCODE* curOpcode = arg->opcode;
-    SHADER_BUFFER* buffer = arg->buffer;
+static void shader_glsl_dot(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src0_param;
     glsl_src_param_t src1_param;
@@ -1360,9 +1721,10 @@
     unsigned int dst_size = 0;
 
-    dst_write_mask = shader_glsl_append_dst(buffer, arg);
+    dst_write_mask = shader_glsl_append_dst(buffer, ins);
     dst_size = shader_glsl_get_write_mask_size(dst_write_mask);
 
     /* dp3 works on vec3, dp4 on vec4 */
-    if (curOpcode->opcode == WINED3DSIO_DP4) {
+    if (ins->handler_idx == WINED3DSIH_DP4)
+    {
         src_write_mask = WINED3DSP_WRITEMASK_ALL;
     } else {
@@ -1370,6 +1732,6 @@
     }
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_write_mask, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], src_write_mask, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], src_write_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], src_write_mask, &src1_param);
 
     if (dst_size > 1) {
@@ -1382,5 +1744,5 @@
 /* Note that this instruction has some restrictions. The destination write mask
  * can't contain the w component, and the source swizzles have to be .xyzw */
-static void shader_glsl_cross(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_cross(const struct wined3d_shader_instruction *ins)
 {
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
@@ -1389,9 +1751,9 @@
     char dst_mask[6];
 
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], src_mask, &src1_param);
-    shader_addline(arg->buffer, "cross(%s, %s)%s);\n", src0_param.param_str, src1_param.param_str, dst_mask);
+    shader_glsl_get_write_mask(&ins->dst[0], dst_mask);
+    shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], src_mask, &src1_param);
+    shader_addline(ins->ctx->buffer, "cross(%s, %s)%s);\n", src0_param.param_str, src1_param.param_str, dst_mask);
 }
 
@@ -1399,7 +1761,7 @@
  * Src0 and src1 are scalars. Note that D3D uses the absolute of src0, while
  * GLSL uses the value as-is. */
-static void shader_glsl_pow(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER *buffer = arg->buffer;
+static void shader_glsl_pow(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src0_param;
     glsl_src_param_t src1_param;
@@ -1407,9 +1769,9 @@
     unsigned int dst_size;
 
-    dst_write_mask = shader_glsl_append_dst(buffer, arg);
+    dst_write_mask = shader_glsl_append_dst(buffer, ins);
     dst_size = shader_glsl_get_write_mask_size(dst_write_mask);
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_0, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_0, &src1_param);
 
     if (dst_size > 1) {
@@ -1423,15 +1785,15 @@
  * Src0 is a scalar. Note that D3D uses the absolute of src0, while
  * GLSL uses the value as-is. */
-static void shader_glsl_log(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER *buffer = arg->buffer;
+static void shader_glsl_log(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src0_param;
     DWORD dst_write_mask;
     unsigned int dst_size;
 
-    dst_write_mask = shader_glsl_append_dst(buffer, arg);
+    dst_write_mask = shader_glsl_append_dst(buffer, ins);
     dst_size = shader_glsl_get_write_mask_size(dst_write_mask);
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
 
     if (dst_size > 1) {
@@ -1443,11 +1805,9 @@
 
 /* Map the opcode 1-to-1 to the GL code (arg->dst = instruction(src0, src1, ...) */
-static void shader_glsl_map2gl(const SHADER_OPCODE_ARG *arg)
-{
-    CONST SHADER_OPCODE* curOpcode = arg->opcode;
-    SHADER_BUFFER* buffer = arg->buffer;
+static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src_param;
     const char *instruction;
-    char arguments[256];
     DWORD write_mask;
     unsigned i;
@@ -1455,33 +1815,36 @@
     /* Determine the GLSL function to use based on the opcode */
     /* TODO: Possibly make this a table for faster lookups */
-    switch (curOpcode->opcode) {
-        case WINED3DSIO_MIN: instruction = "min"; break;
-        case WINED3DSIO_MAX: instruction = "max"; break;
-        case WINED3DSIO_ABS: instruction = "abs"; break;
-        case WINED3DSIO_FRC: instruction = "fract"; break;
-        case WINED3DSIO_NRM: instruction = "normalize"; break;
-        case WINED3DSIO_EXP: instruction = "exp2"; break;
-        case WINED3DSIO_SGN: instruction = "sign"; break;
-        case WINED3DSIO_DSX: instruction = "dFdx"; break;
-        case WINED3DSIO_DSY: instruction = "ycorrection.y * dFdy"; break;
+    switch (ins->handler_idx)
+    {
+        case WINED3DSIH_MIN: instruction = "min"; break;
+        case WINED3DSIH_MAX: instruction = "max"; break;
+        case WINED3DSIH_ABS: instruction = "abs"; break;
+        case WINED3DSIH_FRC: instruction = "fract"; break;
+        case WINED3DSIH_NRM: instruction = "normalize"; break;
+        case WINED3DSIH_EXP: instruction = "exp2"; break;
+        case WINED3DSIH_SGN: instruction = "sign"; break;
+        case WINED3DSIH_DSX: instruction = "dFdx"; break;
+        case WINED3DSIH_DSY: instruction = "ycorrection.y * dFdy"; break;
         default: instruction = "";
-            FIXME("Opcode %s not yet handled in GLSL\n", curOpcode->name);
+            FIXME("Opcode %#x not yet handled in GLSL\n", ins->handler_idx);
             break;
     }
 
-    write_mask = shader_glsl_append_dst(buffer, arg);
-
-    arguments[0] = '\0';
-    if (curOpcode->num_params > 0) {
-        shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], write_mask, &src_param);
-        strcat(arguments, src_param.param_str);
-        for (i = 2; i < curOpcode->num_params; ++i) {
-            strcat(arguments, ", ");
-            shader_glsl_add_src_param(arg, arg->src[i-1], arg->src_addr[i-1], write_mask, &src_param);
-            strcat(arguments, src_param.param_str);
-        }
-    }
-
-    shader_addline(buffer, "%s(%s));\n", instruction, arguments);
+    write_mask = shader_glsl_append_dst(buffer, ins);
+
+    shader_addline(buffer, "%s(", instruction);
+
+    if (ins->src_count)
+    {
+        shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src_param);
+        shader_addline(buffer, "%s", src_param.param_str);
+        for (i = 1; i < ins->src_count; ++i)
+        {
+            shader_glsl_add_src_param(ins, &ins->src[i], write_mask, &src_param);
+            shader_addline(buffer, ", %s", src_param.param_str);
+        }
+    }
+
+    shader_addline(buffer, "));\n");
 }
 
@@ -1495,33 +1858,33 @@
  *   dst = 2^src;    (partial precision is allowed, but optional)
  */
-static void shader_glsl_expp(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)arg->shader;
+static void shader_glsl_expp(const struct wined3d_shader_instruction *ins)
+{
     glsl_src_param_t src_param;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src_param);
-
-    if (shader->baseShader.hex_version < WINED3DPS_VERSION(2,0)) {
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src_param);
+
+    if (ins->ctx->reg_maps->shader_version.major < 2)
+    {
         char dst_mask[6];
 
-        shader_addline(arg->buffer, "tmp0.x = exp2(floor(%s));\n", src_param.param_str);
-        shader_addline(arg->buffer, "tmp0.y = %s - floor(%s);\n", src_param.param_str, src_param.param_str);
-        shader_addline(arg->buffer, "tmp0.z = exp2(%s);\n", src_param.param_str);
-        shader_addline(arg->buffer, "tmp0.w = 1.0;\n");
-
-        shader_glsl_append_dst(arg->buffer, arg);
-        shader_glsl_get_write_mask(arg->dst, dst_mask);
-        shader_addline(arg->buffer, "tmp0%s);\n", dst_mask);
+        shader_addline(ins->ctx->buffer, "tmp0.x = exp2(floor(%s));\n", src_param.param_str);
+        shader_addline(ins->ctx->buffer, "tmp0.y = %s - floor(%s);\n", src_param.param_str, src_param.param_str);
+        shader_addline(ins->ctx->buffer, "tmp0.z = exp2(%s);\n", src_param.param_str);
+        shader_addline(ins->ctx->buffer, "tmp0.w = 1.0;\n");
+
+        shader_glsl_append_dst(ins->ctx->buffer, ins);
+        shader_glsl_get_write_mask(&ins->dst[0], dst_mask);
+        shader_addline(ins->ctx->buffer, "tmp0%s);\n", dst_mask);
     } else {
         DWORD write_mask;
         unsigned int mask_size;
 
-        write_mask = shader_glsl_append_dst(arg->buffer, arg);
+        write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
         mask_size = shader_glsl_get_write_mask_size(write_mask);
 
         if (mask_size > 1) {
-            shader_addline(arg->buffer, "vec%d(exp2(%s)));\n", mask_size, src_param.param_str);
+            shader_addline(ins->ctx->buffer, "vec%d(exp2(%s)));\n", mask_size, src_param.param_str);
         } else {
-            shader_addline(arg->buffer, "exp2(%s));\n", src_param.param_str);
+            shader_addline(ins->ctx->buffer, "exp2(%s));\n", src_param.param_str);
         }
     }
@@ -1529,5 +1892,5 @@
 
 /** Process the RCP (reciprocal or inverse) opcode in GLSL (dst = 1 / src) */
-static void shader_glsl_rcp(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_rcp(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src_param;
@@ -1535,26 +1898,26 @@
     unsigned int mask_size;
 
-    write_mask = shader_glsl_append_dst(arg->buffer, arg);
+    write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
     mask_size = shader_glsl_get_write_mask_size(write_mask);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &src_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &src_param);
 
     if (mask_size > 1) {
-        shader_addline(arg->buffer, "vec%d(1.0 / %s));\n", mask_size, src_param.param_str);
+        shader_addline(ins->ctx->buffer, "vec%d(1.0 / %s));\n", mask_size, src_param.param_str);
     } else {
-        shader_addline(arg->buffer, "1.0 / %s);\n", src_param.param_str);
-    }
-}
-
-static void shader_glsl_rsq(const SHADER_OPCODE_ARG *arg)
-{
-    SHADER_BUFFER* buffer = arg->buffer;
+        shader_addline(ins->ctx->buffer, "1.0 / %s);\n", src_param.param_str);
+    }
+}
+
+static void shader_glsl_rsq(const struct wined3d_shader_instruction *ins)
+{
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src_param;
     DWORD write_mask;
     unsigned int mask_size;
 
-    write_mask = shader_glsl_append_dst(buffer, arg);
+    write_mask = shader_glsl_append_dst(buffer, ins);
     mask_size = shader_glsl_get_write_mask_size(write_mask);
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &src_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &src_param);
 
     if (mask_size > 1) {
@@ -1566,5 +1929,5 @@
 
 /** Process signed comparison opcodes in GLSL. */
-static void shader_glsl_compare(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_compare(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
@@ -1573,24 +1936,26 @@
     unsigned int mask_size;
 
-    write_mask = shader_glsl_append_dst(arg->buffer, arg);
+    write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
     mask_size = shader_glsl_get_write_mask_size(write_mask);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], write_mask, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
 
     if (mask_size > 1) {
         const char *compare;
 
-        switch(arg->opcode->opcode) {
-            case WINED3DSIO_SLT: compare = "lessThan"; break;
-            case WINED3DSIO_SGE: compare = "greaterThanEqual"; break;
+        switch(ins->handler_idx)
+        {
+            case WINED3DSIH_SLT: compare = "lessThan"; break;
+            case WINED3DSIH_SGE: compare = "greaterThanEqual"; break;
             default: compare = "";
-                FIXME("Can't handle opcode %s\n", arg->opcode->name);
-        }
-
-        shader_addline(arg->buffer, "vec%d(%s(%s, %s)));\n", mask_size, compare,
+                FIXME("Can't handle opcode %#x\n", ins->handler_idx);
+        }
+
+        shader_addline(ins->ctx->buffer, "vec%d(%s(%s, %s)));\n", mask_size, compare,
                 src0_param.param_str, src1_param.param_str);
     } else {
-        switch(arg->opcode->opcode) {
-            case WINED3DSIO_SLT:
+        switch(ins->handler_idx)
+        {
+            case WINED3DSIH_SLT:
                 /* Step(src0, src1) is not suitable here because if src0 == src1 SLT is supposed,
                  * to return 0.0 but step returns 1.0 because step is not < x
@@ -1600,12 +1965,13 @@
                  * a scalar.
                  */
-                shader_addline(arg->buffer, "(%s < %s) ? 1.0 : 0.0);\n", src0_param.param_str, src1_param.param_str);
+                shader_addline(ins->ctx->buffer, "(%s < %s) ? 1.0 : 0.0);\n",
+                        src0_param.param_str, src1_param.param_str);
                 break;
-            case WINED3DSIO_SGE:
+            case WINED3DSIH_SGE:
                 /* Here we can use the step() function and safe a conditional */
-                shader_addline(arg->buffer, "step(%s, %s));\n", src1_param.param_str, src0_param.param_str);
+                shader_addline(ins->ctx->buffer, "step(%s, %s));\n", src1_param.param_str, src0_param.param_str);
                 break;
             default:
-                FIXME("Can't handle opcode %s\n", arg->opcode->name);
+                FIXME("Can't handle opcode %#x\n", ins->handler_idx);
         }
 
@@ -1614,5 +1980,5 @@
 
 /** Process CMP instruction in GLSL (dst = src0 >= 0.0 ? src1 : src2), per channel */
-static void shader_glsl_cmp(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
@@ -1624,22 +1990,17 @@
     BOOL temp_destination = FALSE;
 
-    if(shader_is_scalar(arg->src[0])) {
-        write_mask = shader_glsl_append_dst(arg->buffer, arg);
-
-        shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_ALL, &src0_param);
-        shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
-        shader_glsl_add_src_param(arg, arg->src[2], arg->src_addr[2], write_mask, &src2_param);
-
-        shader_addline(arg->buffer, "%s >= 0.0 ? %s : %s);\n",
+    if (shader_is_scalar(&ins->src[0].reg))
+    {
+        write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
+
+        shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_ALL, &src0_param);
+        shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
+        shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param);
+
+        shader_addline(ins->ctx->buffer, "%s >= 0.0 ? %s : %s);\n",
                        src0_param.param_str, src1_param.param_str, src2_param.param_str);
     } else {
-        DWORD src0reg = arg->src[0] & WINED3DSP_REGNUM_MASK;
-        DWORD src1reg = arg->src[1] & WINED3DSP_REGNUM_MASK;
-        DWORD src2reg = arg->src[2] & WINED3DSP_REGNUM_MASK;
-        DWORD src0regtype = shader_get_regtype(arg->src[0]);
-        DWORD src1regtype = shader_get_regtype(arg->src[1]);
-        DWORD src2regtype = shader_get_regtype(arg->src[2]);
-        DWORD dstreg = arg->dst & WINED3DSP_REGNUM_MASK;
-        DWORD dstregtype = shader_get_regtype(arg->dst);
+        DWORD dst_mask = ins->dst[0].write_mask;
+        struct wined3d_shader_dst_param dst = ins->dst[0];
 
         /* Cycle through all source0 channels */
@@ -1648,9 +2009,11 @@
             /* Find the destination channels which use the current source0 channel */
             for (j=0; j<4; j++) {
-                if ( ((arg->src[0] >> (WINED3DSP_SWIZZLE_SHIFT + 2*j)) & 0x3) == i ) {
+                if (((ins->src[0].swizzle >> (2 * j)) & 0x3) == i)
+                {
                     write_mask |= WINED3DSP_WRITEMASK_0 << j;
                     cmp_channel = WINED3DSP_WRITEMASK_0 << j;
                 }
             }
+            dst.write_mask = dst_mask & write_mask;
 
             /* Splitting the cmp instruction up in multiple lines imposes a problem:
@@ -1658,29 +2021,32 @@
             * Deal with that by using a temporary destination register if needed
             */
-            if((src0reg == dstreg && src0regtype == dstregtype) ||
-            (src1reg == dstreg && src1regtype == dstregtype) ||
-            (src2reg == dstreg && src2regtype == dstregtype)) {
-
-                write_mask = shader_glsl_get_write_mask(arg->dst & (~WINED3DSP_SWIZZLE_MASK | write_mask), mask_char);
+            if ((ins->src[0].reg.idx == ins->dst[0].reg.idx
+                    && ins->src[0].reg.type == ins->dst[0].reg.type)
+                    || (ins->src[1].reg.idx == ins->dst[0].reg.idx
+                    && ins->src[1].reg.type == ins->dst[0].reg.type)
+                    || (ins->src[2].reg.idx == ins->dst[0].reg.idx
+                    && ins->src[2].reg.type == ins->dst[0].reg.type))
+            {
+                write_mask = shader_glsl_get_write_mask(&dst, mask_char);
                 if (!write_mask) continue;
-                shader_addline(arg->buffer, "tmp0%s = (", mask_char);
+                shader_addline(ins->ctx->buffer, "tmp0%s = (", mask_char);
                 temp_destination = TRUE;
             } else {
-                write_mask = shader_glsl_append_dst_ext(arg->buffer, arg, arg->dst & (~WINED3DSP_SWIZZLE_MASK | write_mask));
+                write_mask = shader_glsl_append_dst_ext(ins->ctx->buffer, ins, &dst);
                 if (!write_mask) continue;
             }
 
-            shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], cmp_channel, &src0_param);
-            shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
-            shader_glsl_add_src_param(arg, arg->src[2], arg->src_addr[2], write_mask, &src2_param);
-
-            shader_addline(arg->buffer, "%s >= 0.0 ? %s : %s);\n",
+            shader_glsl_add_src_param(ins, &ins->src[0], cmp_channel, &src0_param);
+            shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
+            shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param);
+
+            shader_addline(ins->ctx->buffer, "%s >= 0.0 ? %s : %s);\n",
                         src0_param.param_str, src1_param.param_str, src2_param.param_str);
         }
 
         if(temp_destination) {
-            shader_glsl_get_write_mask(arg->dst, mask_char);
-            shader_glsl_append_dst_ext(arg->buffer, arg, arg->dst);
-            shader_addline(arg->buffer, "tmp0%s);\n", mask_char);
+            shader_glsl_get_write_mask(&ins->dst[0], mask_char);
+            shader_glsl_append_dst(ins->ctx->buffer, ins);
+            shader_addline(ins->ctx->buffer, "tmp0%s);\n", mask_char);
         }
     }
@@ -1691,7 +2057,7 @@
 /* For ps 1.1-1.3, only a single component of src0 is used. For ps 1.4
  * the compare is done per component of src0. */
-static void shader_glsl_cnd(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
+static void shader_glsl_cnd(const struct wined3d_shader_instruction *ins)
+{
+    struct wined3d_shader_dst_param dst;
     glsl_src_param_t src0_param;
     glsl_src_param_t src1_param;
@@ -1699,16 +2065,21 @@
     DWORD write_mask, cmp_channel = 0;
     unsigned int i, j;
-
-    if (shader->baseShader.hex_version < WINED3DPS_VERSION(1, 4)) {
-        write_mask = shader_glsl_append_dst(arg->buffer, arg);
-        shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
-        shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
-        shader_glsl_add_src_param(arg, arg->src[2], arg->src_addr[2], write_mask, &src2_param);
+    DWORD dst_mask;
+    DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major,
+            ins->ctx->reg_maps->shader_version.minor);
+
+    if (shader_version < WINED3D_SHADER_VERSION(1, 4))
+    {
+        write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
+        shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
+        shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
+        shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param);
 
         /* Fun: The D3DSI_COISSUE flag changes the semantic of the cnd instruction for < 1.4 shaders */
-        if(arg->opcode_token & WINED3DSI_COISSUE) {
-            shader_addline(arg->buffer, "%s /* COISSUE! */);\n", src1_param.param_str);
+        if (ins->coissue)
+        {
+            shader_addline(ins->ctx->buffer, "%s /* COISSUE! */);\n", src1_param.param_str);
         } else {
-            shader_addline(arg->buffer, "%s > 0.5 ? %s : %s);\n",
+            shader_addline(ins->ctx->buffer, "%s > 0.5 ? %s : %s);\n",
                     src0_param.param_str, src1_param.param_str, src2_param.param_str);
         }
@@ -1716,21 +2087,26 @@
     }
     /* Cycle through all source0 channels */
+    dst_mask = ins->dst[0].write_mask;
+    dst = ins->dst[0];
     for (i=0; i<4; i++) {
         write_mask = 0;
         /* Find the destination channels which use the current source0 channel */
         for (j=0; j<4; j++) {
-            if ( ((arg->src[0] >> (WINED3DSP_SWIZZLE_SHIFT + 2*j)) & 0x3) == i ) {
+            if (((ins->src[0].swizzle >> (2 * j)) & 0x3) == i)
+            {
                 write_mask |= WINED3DSP_WRITEMASK_0 << j;
                 cmp_channel = WINED3DSP_WRITEMASK_0 << j;
             }
         }
-        write_mask = shader_glsl_append_dst_ext(arg->buffer, arg, arg->dst & (~WINED3DSP_SWIZZLE_MASK | write_mask));
+
+        dst.write_mask = dst_mask & write_mask;
+        write_mask = shader_glsl_append_dst_ext(ins->ctx->buffer, ins, &dst);
         if (!write_mask) continue;
 
-        shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], cmp_channel, &src0_param);
-        shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
-        shader_glsl_add_src_param(arg, arg->src[2], arg->src_addr[2], write_mask, &src2_param);
-
-        shader_addline(arg->buffer, "%s > 0.5 ? %s : %s);\n",
+        shader_glsl_add_src_param(ins, &ins->src[0], cmp_channel, &src0_param);
+        shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
+        shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param);
+
+        shader_addline(ins->ctx->buffer, "%s > 0.5 ? %s : %s);\n",
                 src0_param.param_str, src1_param.param_str, src2_param.param_str);
     }
@@ -1738,5 +2114,5 @@
 
 /** GLSL code generation for WINED3DSIO_MAD: Multiply the first 2 opcodes, then add the last */
-static void shader_glsl_mad(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_mad(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
@@ -1745,9 +2121,9 @@
     DWORD write_mask;
 
-    write_mask = shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], write_mask, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
-    shader_glsl_add_src_param(arg, arg->src[2], arg->src_addr[2], write_mask, &src2_param);
-    shader_addline(arg->buffer, "(%s * %s) + %s);\n",
+    write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param);
+    shader_addline(ins->ctx->buffer, "(%s * %s) + %s);\n",
             src0_param.param_str, src1_param.param_str, src2_param.param_str);
 }
@@ -1755,43 +2131,42 @@
 /** Handles transforming all WINED3DSIO_M?x? opcodes for 
     Vertex shaders to GLSL codes */
-static void shader_glsl_mnxn(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)arg->shader;
-    const SHADER_OPCODE *opcode_table = shader->baseShader.shader_ins;
-    DWORD shader_version = shader->baseShader.hex_version;
+static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
+{
     int i;
     int nComponents = 0;
-    SHADER_OPCODE_ARG tmpArg;
-   
-    memset(&tmpArg, 0, sizeof(SHADER_OPCODE_ARG));
+    struct wined3d_shader_dst_param tmp_dst = {{0}};
+    struct wined3d_shader_src_param tmp_src[2] = {{{0}}};
+    struct wined3d_shader_instruction tmp_ins;
+
+    memset(&tmp_ins, 0, sizeof(tmp_ins));
 
     /* Set constants for the temporary argument */
-    tmpArg.shader      = arg->shader;
-    tmpArg.buffer      = arg->buffer;
-    tmpArg.src[0]      = arg->src[0];
-    tmpArg.src_addr[0] = arg->src_addr[0];
-    tmpArg.src_addr[1] = arg->src_addr[1];
-    tmpArg.reg_maps = arg->reg_maps; 
-    
-    switch(arg->opcode->opcode) {
-        case WINED3DSIO_M4x4:
+    tmp_ins.ctx = ins->ctx;
+    tmp_ins.dst_count = 1;
+    tmp_ins.dst = &tmp_dst;
+    tmp_ins.src_count = 2;
+    tmp_ins.src = tmp_src;
+
+    switch(ins->handler_idx)
+    {
+        case WINED3DSIH_M4x4:
             nComponents = 4;
-            tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP4);
+            tmp_ins.handler_idx = WINED3DSIH_DP4;
             break;
-        case WINED3DSIO_M4x3:
+        case WINED3DSIH_M4x3:
             nComponents = 3;
-            tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP4);
+            tmp_ins.handler_idx = WINED3DSIH_DP4;
             break;
-        case WINED3DSIO_M3x4:
+        case WINED3DSIH_M3x4:
             nComponents = 4;
-            tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP3);
+            tmp_ins.handler_idx = WINED3DSIH_DP3;
             break;
-        case WINED3DSIO_M3x3:
+        case WINED3DSIH_M3x3:
             nComponents = 3;
-            tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP3);
+            tmp_ins.handler_idx = WINED3DSIH_DP3;
             break;
-        case WINED3DSIO_M3x2:
+        case WINED3DSIH_M3x2:
             nComponents = 2;
-            tmpArg.opcode = shader_get_opcode(opcode_table, shader_version, WINED3DSIO_DP3);
+            tmp_ins.handler_idx = WINED3DSIH_DP3;
             break;
         default:
@@ -1799,8 +2174,12 @@
     }
 
-    for (i = 0; i < nComponents; i++) {
-        tmpArg.dst = ((arg->dst) & ~WINED3DSP_WRITEMASK_ALL)|(WINED3DSP_WRITEMASK_0<<i);
-        tmpArg.src[1]      = arg->src[1]+i;
-        shader_glsl_dot(&tmpArg);
+    tmp_dst = ins->dst[0];
+    tmp_src[0] = ins->src[0];
+    tmp_src[1] = ins->src[1];
+    for (i = 0; i < nComponents; ++i)
+    {
+        tmp_dst.write_mask = WINED3DSP_WRITEMASK_0 << i;
+        shader_glsl_dot(&tmp_ins);
+        ++tmp_src[1].reg.idx;
     }
 }
@@ -1812,5 +2191,5 @@
     This is equivalent to mix(src2, src1, src0);
 */
-static void shader_glsl_lrp(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_lrp(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
@@ -1819,11 +2198,11 @@
     DWORD write_mask;
 
-    write_mask = shader_glsl_append_dst(arg->buffer, arg);
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], write_mask, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], write_mask, &src1_param);
-    shader_glsl_add_src_param(arg, arg->src[2], arg->src_addr[2], write_mask, &src2_param);
-
-    shader_addline(arg->buffer, "mix(%s, %s, %s));\n",
+    write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
+
+    shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param);
+
+    shader_addline(ins->ctx->buffer, "mix(%s, %s, %s));\n",
             src2_param.param_str, src1_param.param_str, src0_param.param_str);
 }
@@ -1835,5 +2214,5 @@
  *                                        where src.w is clamped at +- 128
  */
-static void shader_glsl_lit(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_lit(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
@@ -1842,10 +2221,10 @@
     char dst_mask[6];
 
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_1, &src1_param);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &src3_param);
+    shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_glsl_get_write_mask(&ins->dst[0], dst_mask);
+
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_1, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &src3_param);
 
     /* The sdk specifies the instruction like this
@@ -1870,6 +2249,7 @@
      * if both x and y are > 0, we get pow(y * 1.0, power), as it is supposed to
      */
-    shader_addline(arg->buffer, "vec4(1.0, max(%s, 0.0), pow(max(0.0, %s) * step(0.0, %s), clamp(%s, -128.0, 128.0)), 1.0)%s);\n",
-                   src0_param.param_str, src1_param.param_str, src0_param.param_str, src3_param.param_str, dst_mask);
+    shader_addline(ins->ctx->buffer,
+            "vec4(1.0, max(%s, 0.0), pow(max(0.0, %s) * step(0.0, %s), clamp(%s, -128.0, 128.0)), 1.0)%s);\n",
+            src0_param.param_str, src1_param.param_str, src0_param.param_str, src3_param.param_str, dst_mask);
 }
 
@@ -1880,5 +2260,5 @@
  * dst.w = src1.w
  */
-static void shader_glsl_dst(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_dst(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0y_param;
@@ -1888,13 +2268,13 @@
     char dst_mask[6];
 
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_1, &src0y_param);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_2, &src0z_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_1, &src1y_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_3, &src1w_param);
-
-    shader_addline(arg->buffer, "vec4(1.0, %s * %s, %s, %s))%s;\n",
+    shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_glsl_get_write_mask(&ins->dst[0], dst_mask);
+
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_1, &src0y_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_2, &src0z_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_1, &src1y_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_3, &src1w_param);
+
+    shader_addline(ins->ctx->buffer, "vec4(1.0, %s * %s, %s, %s))%s;\n",
             src0y_param.param_str, src1y_param.param_str, src0z_param.param_str, src1w_param.param_str, dst_mask);
 }
@@ -1909,23 +2289,23 @@
  * dst.w = dst.w
  */
-static void shader_glsl_sincos(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_sincos(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
     DWORD write_mask;
 
-    write_mask = shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
+    write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
 
     switch (write_mask) {
         case WINED3DSP_WRITEMASK_0:
-            shader_addline(arg->buffer, "cos(%s));\n", src0_param.param_str);
+            shader_addline(ins->ctx->buffer, "cos(%s));\n", src0_param.param_str);
             break;
 
         case WINED3DSP_WRITEMASK_1:
-            shader_addline(arg->buffer, "sin(%s));\n", src0_param.param_str);
+            shader_addline(ins->ctx->buffer, "sin(%s));\n", src0_param.param_str);
             break;
 
         case (WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1):
-            shader_addline(arg->buffer, "vec2(cos(%s), sin(%s)));\n", src0_param.param_str, src0_param.param_str);
+            shader_addline(ins->ctx->buffer, "vec2(cos(%s), sin(%s)));\n", src0_param.param_str, src0_param.param_str);
             break;
 
@@ -1942,14 +2322,12 @@
  */
 /* FIXME: I don't think nested loops will work correctly this way. */
-static void shader_glsl_loop(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_loop(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src1_param;
-    IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
-    DWORD regtype = shader_get_regtype(arg->src[1]);
-    DWORD reg = arg->src[1] & WINED3DSP_REGNUM_MASK;
+    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
     const DWORD *control_values = NULL;
     const local_constant *constant;
 
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_ALL, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_ALL, &src1_param);
 
     /* Try to hardcode the loop control parameters if possible. Direct3D 9 class hardware doesn't support real
@@ -1958,7 +2336,9 @@
      * addressing.
      */
-    if(regtype == WINED3DSPR_CONSTINT) {
+    if (ins->src[1].reg.type == WINED3DSPR_CONSTINT)
+    {
         LIST_FOR_EACH_ENTRY(constant, &shader->baseShader.constantsI, local_constant, entry) {
-            if(constant->idx == reg) {
+            if (constant->idx == ins->src[1].reg.idx)
+            {
                 control_values = constant->value;
                 break;
@@ -1969,24 +2349,25 @@
     if(control_values) {
         if(control_values[2] > 0) {
-            shader_addline(arg->buffer, "for (aL%u = %d; aL%u < (%d * %d + %d); aL%u += %d) {\n",
-                           shader->baseShader.cur_loop_depth, control_values[1],
-                           shader->baseShader.cur_loop_depth, control_values[0], control_values[2], control_values[1],
-                           shader->baseShader.cur_loop_depth, control_values[2]);
+            shader_addline(ins->ctx->buffer, "for (aL%u = %d; aL%u < (%d * %d + %d); aL%u += %d) {\n",
+                    shader->baseShader.cur_loop_depth, control_values[1],
+                    shader->baseShader.cur_loop_depth, control_values[0], control_values[2], control_values[1],
+                    shader->baseShader.cur_loop_depth, control_values[2]);
         } else if(control_values[2] == 0) {
-            shader_addline(arg->buffer, "for (aL%u = %d, tmpInt%u = 0; tmpInt%u < %d; tmpInt%u++) {\n",
-                           shader->baseShader.cur_loop_depth, control_values[1], shader->baseShader.cur_loop_depth,
-                           shader->baseShader.cur_loop_depth, control_values[0],
-                           shader->baseShader.cur_loop_depth);
+            shader_addline(ins->ctx->buffer, "for (aL%u = %d, tmpInt%u = 0; tmpInt%u < %d; tmpInt%u++) {\n",
+                    shader->baseShader.cur_loop_depth, control_values[1], shader->baseShader.cur_loop_depth,
+                    shader->baseShader.cur_loop_depth, control_values[0],
+                    shader->baseShader.cur_loop_depth);
         } else {
-            shader_addline(arg->buffer, "for (aL%u = %d; aL%u > (%d * %d + %d); aL%u += %d) {\n",
-                           shader->baseShader.cur_loop_depth, control_values[1],
-                           shader->baseShader.cur_loop_depth, control_values[0], control_values[2], control_values[1],
-                           shader->baseShader.cur_loop_depth, control_values[2]);
+            shader_addline(ins->ctx->buffer, "for (aL%u = %d; aL%u > (%d * %d + %d); aL%u += %d) {\n",
+                    shader->baseShader.cur_loop_depth, control_values[1],
+                    shader->baseShader.cur_loop_depth, control_values[0], control_values[2], control_values[1],
+                    shader->baseShader.cur_loop_depth, control_values[2]);
         }
     } else {
-        shader_addline(arg->buffer, "for (tmpInt%u = 0, aL%u = %s.y; tmpInt%u < %s.x; tmpInt%u++, aL%u += %s.z) {\n",
-                       shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_regno,
-                       src1_param.reg_name, shader->baseShader.cur_loop_depth, src1_param.reg_name,
-                       shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_regno, src1_param.reg_name);
+        shader_addline(ins->ctx->buffer,
+                "for (tmpInt%u = 0, aL%u = %s.y; tmpInt%u < %s.x; tmpInt%u++, aL%u += %s.z) {\n",
+                shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_regno,
+                src1_param.reg_name, shader->baseShader.cur_loop_depth, src1_param.reg_name,
+                shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_regno, src1_param.reg_name);
     }
 
@@ -1995,95 +2376,115 @@
 }
 
-static void shader_glsl_end(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
-
-    shader_addline(arg->buffer, "}\n");
-
-    if(arg->opcode->opcode == WINED3DSIO_ENDLOOP) {
+static void shader_glsl_end(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
+
+    shader_addline(ins->ctx->buffer, "}\n");
+
+    if (ins->handler_idx == WINED3DSIH_ENDLOOP)
+    {
         shader->baseShader.cur_loop_depth--;
         shader->baseShader.cur_loop_regno--;
     }
-    if(arg->opcode->opcode == WINED3DSIO_ENDREP) {
+
+    if (ins->handler_idx == WINED3DSIH_ENDREP)
+    {
         shader->baseShader.cur_loop_depth--;
     }
 }
 
-static void shader_glsl_rep(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
+static void shader_glsl_rep(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
     glsl_src_param_t src0_param;
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
-    shader_addline(arg->buffer, "for (tmpInt%d = 0; tmpInt%d < %s; tmpInt%d++) {\n",
-                   shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_depth,
-                   src0_param.param_str, shader->baseShader.cur_loop_depth);
+    const DWORD *control_values = NULL;
+    const local_constant *constant;
+
+    /* Try to hardcode local values to help the GLSL compiler to unroll and optimize the loop */
+    if (ins->src[0].reg.type == WINED3DSPR_CONSTINT)
+    {
+        LIST_FOR_EACH_ENTRY(constant, &shader->baseShader.constantsI, local_constant, entry)
+        {
+            if (constant->idx == ins->src[0].reg.idx)
+            {
+                control_values = constant->value;
+                break;
+            }
+        }
+    }
+
+    if(control_values) {
+        shader_addline(ins->ctx->buffer, "for (tmpInt%d = 0; tmpInt%d < %d; tmpInt%d++) {\n",
+                       shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_depth,
+                       control_values[0], shader->baseShader.cur_loop_depth);
+    } else {
+        shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
+        shader_addline(ins->ctx->buffer, "for (tmpInt%d = 0; tmpInt%d < %s; tmpInt%d++) {\n",
+                shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_depth,
+                src0_param.param_str, shader->baseShader.cur_loop_depth);
+    }
     shader->baseShader.cur_loop_depth++;
 }
 
-static void shader_glsl_if(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_if(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
-    shader_addline(arg->buffer, "if (%s) {\n", src0_param.param_str);
-}
-
-static void shader_glsl_ifc(const SHADER_OPCODE_ARG *arg)
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
+    shader_addline(ins->ctx->buffer, "if (%s) {\n", src0_param.param_str);
+}
+
+static void shader_glsl_ifc(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
     glsl_src_param_t src1_param;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_0, &src1_param);
-
-    shader_addline(arg->buffer, "if (%s %s %s) {\n",
-            src0_param.param_str, shader_get_comp_op(arg->opcode_token), src1_param.param_str);
-}
-
-static void shader_glsl_else(const SHADER_OPCODE_ARG *arg)
-{
-    shader_addline(arg->buffer, "} else {\n");
-}
-
-static void shader_glsl_break(const SHADER_OPCODE_ARG *arg)
-{
-    shader_addline(arg->buffer, "break;\n");
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_0, &src1_param);
+
+    shader_addline(ins->ctx->buffer, "if (%s %s %s) {\n",
+            src0_param.param_str, shader_get_comp_op(ins->flags), src1_param.param_str);
+}
+
+static void shader_glsl_else(const struct wined3d_shader_instruction *ins)
+{
+    shader_addline(ins->ctx->buffer, "} else {\n");
+}
+
+static void shader_glsl_break(const struct wined3d_shader_instruction *ins)
+{
+    shader_addline(ins->ctx->buffer, "break;\n");
 }
 
 /* FIXME: According to MSDN the compare is done per component. */
-static void shader_glsl_breakc(const SHADER_OPCODE_ARG *arg)
+static void shader_glsl_breakc(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
     glsl_src_param_t src1_param;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_0, &src1_param);
-
-    shader_addline(arg->buffer, "if (%s %s %s) break;\n",
-            src0_param.param_str, shader_get_comp_op(arg->opcode_token), src1_param.param_str);
-}
-
-static void shader_glsl_label(const SHADER_OPCODE_ARG *arg)
-{
-
-    DWORD snum = (arg->src[0]) & WINED3DSP_REGNUM_MASK;
-    shader_addline(arg->buffer, "}\n");
-    shader_addline(arg->buffer, "void subroutine%u () {\n",  snum);
-}
-
-static void shader_glsl_call(const SHADER_OPCODE_ARG *arg)
-{
-    DWORD snum = (arg->src[0]) & WINED3DSP_REGNUM_MASK;
-    shader_addline(arg->buffer, "subroutine%u();\n", snum);
-}
-
-static void shader_glsl_callnz(const SHADER_OPCODE_ARG *arg)
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_0, &src1_param);
+
+    shader_addline(ins->ctx->buffer, "if (%s %s %s) break;\n",
+            src0_param.param_str, shader_get_comp_op(ins->flags), src1_param.param_str);
+}
+
+static void shader_glsl_label(const struct wined3d_shader_instruction *ins)
+{
+    shader_addline(ins->ctx->buffer, "}\n");
+    shader_addline(ins->ctx->buffer, "void subroutine%u () {\n",  ins->src[0].reg.idx);
+}
+
+static void shader_glsl_call(const struct wined3d_shader_instruction *ins)
+{
+    shader_addline(ins->ctx->buffer, "subroutine%u();\n", ins->src[0].reg.idx);
+}
+
+static void shader_glsl_callnz(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src1_param;
 
-    DWORD snum = (arg->src[0]) & WINED3DSP_REGNUM_MASK;
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_0, &src1_param);
-    shader_addline(arg->buffer, "if (%s) subroutine%u();\n", src1_param.param_str, snum);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_0, &src1_param);
+    shader_addline(ins->ctx->buffer, "if (%s) subroutine%u();\n", src1_param.param_str, ins->src[0].reg.idx);
 }
 
@@ -2091,34 +2492,29 @@
  * Pixel Shader Specific Code begins here
  ********************************************/
-static void pshader_glsl_tex(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_glsl_tex(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
-    DWORD hex_version = This->baseShader.hex_version;
-    char dst_swizzle[6];
+    DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major,
+            ins->ctx->reg_maps->shader_version.minor);
     glsl_sample_function_t sample_function;
-    DWORD sampler_type;
+    DWORD sample_flags = 0;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type;
     DWORD sampler_idx;
-    BOOL projected, texrect = FALSE;
-    DWORD mask = 0;
-
-    /* All versions have a destination register */
-    shader_glsl_append_dst(arg->buffer, arg);
+    DWORD mask = 0, swizzle;
 
     /* 1.0-1.4: Use destination register as sampler source.
      * 2.0+: Use provided sampler source. */
-    if (hex_version < WINED3DPS_VERSION(2,0)) {
-        sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
-    } else {
-        sampler_idx = arg->src[1] & WINED3DSP_REGNUM_MASK;
-    }
-    sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK;
-
-    if (hex_version < WINED3DPS_VERSION(1,4)) {
+    if (shader_version < WINED3D_SHADER_VERSION(2,0)) sampler_idx = ins->dst[0].reg.idx;
+    else sampler_idx = ins->src[1].reg.idx;
+    sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
+
+    if (shader_version < WINED3D_SHADER_VERSION(1,4))
+    {
         DWORD flags = deviceImpl->stateBlock->textureState[sampler_idx][WINED3DTSS_TEXTURETRANSFORMFLAGS];
 
         /* Projected cube textures don't make a lot of sense, the resulting coordinates stay the same. */
         if (flags & WINED3DTTFF_PROJECTED && sampler_type != WINED3DSTT_CUBE) {
-            projected = TRUE;
+            sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED;
             switch (flags & ~WINED3DTTFF_PROJECTED) {
                 case WINED3DTTFF_COUNT1: FIXME("WINED3DTTFF_PROJECTED with WINED3DTTFF_COUNT1?\n"); break;
@@ -2128,26 +2524,23 @@
                 case WINED3DTTFF_DISABLE: mask = WINED3DSP_WRITEMASK_3; break;
             }
-        } else {
-            projected = FALSE;
-        }
-    } else if (hex_version < WINED3DPS_VERSION(2,0)) {
-        DWORD src_mod = arg->src[0] & WINED3DSP_SRCMOD_MASK;
+        }
+    }
+    else if (shader_version < WINED3D_SHADER_VERSION(2,0))
+    {
+        DWORD src_mod = ins->src[0].modifiers;
 
         if (src_mod == WINED3DSPSM_DZ) {
-            projected = TRUE;
+            sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED;
             mask = WINED3DSP_WRITEMASK_2;
         } else if (src_mod == WINED3DSPSM_DW) {
-            projected = TRUE;
+            sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED;
             mask = WINED3DSP_WRITEMASK_3;
-        } else {
-            projected = FALSE;
         }
     } else {
-        if(arg->opcode_token & WINED3DSI_TEXLD_PROJECT) {
-                /* ps 2.0 texldp instruction always divides by the fourth component. */
-                projected = TRUE;
-                mask = WINED3DSP_WRITEMASK_3;
-        } else {
-            projected = FALSE;
+        if (ins->flags & WINED3DSI_TEXLD_PROJECT)
+        {
+            /* ps 2.0 texldp instruction always divides by the fourth component. */
+            sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED;
+            mask = WINED3DSP_WRITEMASK_3;
         }
     }
@@ -2155,103 +2548,126 @@
     if(deviceImpl->stateBlock->textures[sampler_idx] &&
        IWineD3DBaseTexture_GetTextureDimensions(deviceImpl->stateBlock->textures[sampler_idx]) == GL_TEXTURE_RECTANGLE_ARB) {
-        texrect = TRUE;
-    }
-
-    shader_glsl_get_sample_function(sampler_type, projected, texrect, &sample_function);
+        sample_flags |= WINED3D_GLSL_SAMPLE_RECT;
+    }
+
+    shader_glsl_get_sample_function(sampler_type, sample_flags, &sample_function);
     mask |= sample_function.coord_mask;
 
-    if (hex_version < WINED3DPS_VERSION(2,0)) {
-        shader_glsl_get_write_mask(arg->dst, dst_swizzle);
-    } else {
-        shader_glsl_get_swizzle(arg->src[1], FALSE, arg->dst, dst_swizzle);
-    }
+    if (shader_version < WINED3D_SHADER_VERSION(2,0)) swizzle = WINED3DSP_NOSWIZZLE;
+    else swizzle = ins->src[1].swizzle;
 
     /* 1.0-1.3: Use destination register as coordinate source.
        1.4+: Use provided coordinate source register. */
-    if (hex_version < WINED3DPS_VERSION(1,4)) {
+    if (shader_version < WINED3D_SHADER_VERSION(1,4))
+    {
         char coord_mask[6];
-        shader_glsl_get_write_mask(mask, coord_mask);
-        shader_addline(arg->buffer, "%s(Psampler%u, T%u%s)%s);\n",
-                sample_function.name, sampler_idx, sampler_idx, coord_mask, dst_swizzle);
+        shader_glsl_write_mask_to_str(mask, coord_mask);
+        shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, swizzle, NULL, NULL, NULL,
+                "T%u%s", sampler_idx, coord_mask);
     } else {
         glsl_src_param_t coord_param;
-        shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], mask, &coord_param);
-        if(arg->opcode_token & WINED3DSI_TEXLD_BIAS) {
+        shader_glsl_add_src_param(ins, &ins->src[0], mask, &coord_param);
+        if (ins->flags & WINED3DSI_TEXLD_BIAS)
+        {
             glsl_src_param_t bias;
-            shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &bias);
-
-            shader_addline(arg->buffer, "%s(Psampler%u, %s, %s)%s);\n",
-                    sample_function.name, sampler_idx, coord_param.param_str,
-                    bias.param_str, dst_swizzle);
+            shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &bias);
+            shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, swizzle, NULL, NULL, bias.param_str,
+                    "%s", coord_param.param_str);
         } else {
-            shader_addline(arg->buffer, "%s(Psampler%u, %s)%s);\n",
-                    sample_function.name, sampler_idx, coord_param.param_str, dst_swizzle);
-        }
-    }
-}
-
-static void shader_glsl_texldl(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*)arg->shader;
+            shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, swizzle, NULL, NULL, NULL,
+                    "%s", coord_param.param_str);
+        }
+    }
+}
+
+static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
+    IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
+    const WineD3D_GL_Info* gl_info = &deviceImpl->adapter->gl_info;
+    glsl_sample_function_t sample_function;
+    glsl_src_param_t coord_param, dx_param, dy_param;
+    DWORD sample_flags = WINED3D_GLSL_SAMPLE_GRAD;
+    DWORD sampler_type;
+    DWORD sampler_idx;
+    DWORD swizzle = ins->src[1].swizzle;
+
+    if(!GL_SUPPORT(ARB_SHADER_TEXTURE_LOD)) {
+        FIXME("texldd used, but not supported by hardware. Falling back to regular tex\n");
+        return pshader_glsl_tex(ins);
+    }
+
+    sampler_idx = ins->src[1].reg.idx;
+    sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
+    if(deviceImpl->stateBlock->textures[sampler_idx] &&
+       IWineD3DBaseTexture_GetTextureDimensions(deviceImpl->stateBlock->textures[sampler_idx]) == GL_TEXTURE_RECTANGLE_ARB) {
+        sample_flags |= WINED3D_GLSL_SAMPLE_RECT;
+    }
+
+    shader_glsl_get_sample_function(sampler_type, sample_flags, &sample_function);
+    shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &coord_param);
+    shader_glsl_add_src_param(ins, &ins->src[2], sample_function.coord_mask, &dx_param);
+    shader_glsl_add_src_param(ins, &ins->src[3], sample_function.coord_mask, &dy_param);
+
+    shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, swizzle, dx_param.param_str, dy_param.param_str, NULL,
+                                "%s", coord_param.param_str);
+}
+
+static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
     glsl_sample_function_t sample_function;
     glsl_src_param_t coord_param, lod_param;
-    char dst_swizzle[6];
+    DWORD sample_flags = WINED3D_GLSL_SAMPLE_LOD;
     DWORD sampler_type;
     DWORD sampler_idx;
-    BOOL texrect = FALSE;
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_swizzle(arg->src[1], FALSE, arg->dst, dst_swizzle);
-
-    sampler_idx = arg->src[1] & WINED3DSP_REGNUM_MASK;
-    sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK;
+    DWORD swizzle = ins->src[1].swizzle;
+
+    sampler_idx = ins->src[1].reg.idx;
+    sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
     if(deviceImpl->stateBlock->textures[sampler_idx] &&
        IWineD3DBaseTexture_GetTextureDimensions(deviceImpl->stateBlock->textures[sampler_idx]) == GL_TEXTURE_RECTANGLE_ARB) {
-        texrect = TRUE;
-    }
-    shader_glsl_get_sample_function(sampler_type, FALSE, texrect, &sample_function);    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], sample_function.coord_mask, &coord_param);
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &lod_param);
-
-    if (shader_is_pshader_version(This->baseShader.hex_version)) {
+        sample_flags |= WINED3D_GLSL_SAMPLE_RECT;
+    }
+    shader_glsl_get_sample_function(sampler_type, sample_flags, &sample_function);
+    shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &coord_param);
+
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &lod_param);
+
+    if (shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type))
+    {
         /* The GLSL spec claims the Lod sampling functions are only supported in vertex shaders.
          * However, they seem to work just fine in fragment shaders as well. */
-        WARN("Using %sLod in fragment shader.\n", sample_function.name);
-        shader_addline(arg->buffer, "%sLod(Psampler%u, %s, %s)%s);\n",
-                sample_function.name, sampler_idx, coord_param.param_str, lod_param.param_str, dst_swizzle);
+        WARN("Using %s in fragment shader.\n", sample_function.name);
+    }
+    shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, swizzle, NULL, NULL, lod_param.param_str,
+            "%s", coord_param.param_str);
+}
+
+static void pshader_glsl_texcoord(const struct wined3d_shader_instruction *ins)
+{
+    /* FIXME: Make this work for more than just 2D textures */
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
+    DWORD write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
+
+    if (!(ins->ctx->reg_maps->shader_version.major == 1 && ins->ctx->reg_maps->shader_version.minor == 4))
+    {
+        char dst_mask[6];
+
+        shader_glsl_get_write_mask(&ins->dst[0], dst_mask);
+        shader_addline(buffer, "clamp(gl_TexCoord[%u], 0.0, 1.0)%s);\n",
+                ins->dst[0].reg.idx, dst_mask);
     } else {
-        shader_addline(arg->buffer, "%sLod(Vsampler%u, %s, %s)%s);\n",
-                sample_function.name, sampler_idx, coord_param.param_str, lod_param.param_str, dst_swizzle);
-    }
-}
-
-static void pshader_glsl_texcoord(const SHADER_OPCODE_ARG *arg)
-{
-    /* FIXME: Make this work for more than just 2D textures */
-    
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
-    SHADER_BUFFER* buffer = arg->buffer;
-    DWORD hex_version = This->baseShader.hex_version;
-    DWORD write_mask;
-    char dst_mask[6];
-
-    write_mask = shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(write_mask, dst_mask);
-
-    if (hex_version != WINED3DPS_VERSION(1,4)) {
-        DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-        shader_addline(buffer, "clamp(gl_TexCoord[%u], 0.0, 1.0)%s);\n", reg, dst_mask);
-    } else {
-        DWORD reg = arg->src[0] & WINED3DSP_REGNUM_MASK;
-        DWORD src_mod = arg->src[0] & WINED3DSP_SRCMOD_MASK;
+        DWORD reg = ins->src[0].reg.idx;
+        DWORD src_mod = ins->src[0].modifiers;
         char dst_swizzle[6];
 
-        shader_glsl_get_swizzle(arg->src[0], FALSE, write_mask, dst_swizzle);
+        shader_glsl_get_swizzle(&ins->src[0], FALSE, write_mask, dst_swizzle);
 
         if (src_mod == WINED3DSPSM_DZ) {
             glsl_src_param_t div_param;
             unsigned int mask_size = shader_glsl_get_write_mask_size(write_mask);
-            shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_2, &div_param);
+            shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_2, &div_param);
 
             if (mask_size > 1) {
@@ -2263,5 +2679,5 @@
             glsl_src_param_t div_param;
             unsigned int mask_size = shader_glsl_get_write_mask_size(write_mask);
-            shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_3, &div_param);
+            shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &div_param);
 
             if (mask_size > 1) {
@@ -2279,17 +2695,14 @@
  * Take a 3-component dot product of the TexCoord[dstreg] and src,
  * then perform a 1D texture lookup from stage dstregnum, place into dst. */
-static void pshader_glsl_texdp3tex(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texdp3tex(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
-    char dst_mask[6];
     glsl_sample_function_t sample_function;
-    DWORD sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
+    DWORD sampler_idx = ins->dst[0].reg.idx;
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
-    DWORD sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK;
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
+    UINT mask_size;
+
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
 
     /* Do I have to take care about the projected bit? I don't think so, since the dp3 returns only one
@@ -2298,23 +2711,27 @@
      * It is a dependent read - not valid with conditional NP2 textures
      */
-    shader_glsl_get_sample_function(sampler_type, FALSE, FALSE, &sample_function);
-
-    switch(count_bits(sample_function.coord_mask)) {
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
+    mask_size = shader_glsl_get_write_mask_size(sample_function.coord_mask);
+
+    switch(mask_size)
+    {
         case 1:
-            shader_addline(arg->buffer, "%s(Psampler%u, dot(gl_TexCoord[%u].xyz, %s))%s);\n",
-                           sample_function.name, sampler_idx, sampler_idx, src0_param.param_str, dst_mask);
+            shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL,
+                    "dot(gl_TexCoord[%u].xyz, %s)", sampler_idx, src0_param.param_str);
             break;
 
         case 2:
-            shader_addline(arg->buffer, "%s(Psampler%u, vec2(dot(gl_TexCoord[%u].xyz, %s), 0.0))%s);\n",
-                          sample_function.name, sampler_idx, sampler_idx, src0_param.param_str, dst_mask);
+            shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL,
+                    "vec2(dot(gl_TexCoord[%u].xyz, %s), 0.0)", sampler_idx, src0_param.param_str);
             break;
 
         case 3:
-            shader_addline(arg->buffer, "%s(Psampler%u, vec3(dot(gl_TexCoord[%u].xyz, %s), 0.0, 0.0))%s);\n",
-                           sample_function.name, sampler_idx, sampler_idx, src0_param.param_str, dst_mask);
+            shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL,
+                    "vec3(dot(gl_TexCoord[%u].xyz, %s), 0.0, 0.0)", sampler_idx, src0_param.param_str);
             break;
+
         default:
-            FIXME("Unexpected mask bitcount %d\n", count_bits(sample_function.coord_mask));
+            FIXME("Unexpected mask size %u\n", mask_size);
+            break;
     }
 }
@@ -2322,20 +2739,20 @@
 /** Process the WINED3DSIO_TEXDP3 instruction in GLSL:
  * Take a 3-component dot product of the TexCoord[dstreg] and src. */
-static void pshader_glsl_texdp3(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texdp3(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
-    DWORD dstreg = arg->dst & WINED3DSP_REGNUM_MASK;
+    DWORD dstreg = ins->dst[0].reg.idx;
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
     DWORD dst_mask;
     unsigned int mask_size;
 
-    dst_mask = shader_glsl_append_dst(arg->buffer, arg);
+    dst_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
     mask_size = shader_glsl_get_write_mask_size(dst_mask);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
 
     if (mask_size > 1) {
-        shader_addline(arg->buffer, "vec%d(dot(T%u.xyz, %s)));\n", mask_size, dstreg, src0_param.param_str);
+        shader_addline(ins->ctx->buffer, "vec%d(dot(T%u.xyz, %s)));\n", mask_size, dstreg, src0_param.param_str);
     } else {
-        shader_addline(arg->buffer, "dot(T%u.xyz, %s));\n", dstreg, src0_param.param_str);
+        shader_addline(ins->ctx->buffer, "dot(T%u.xyz, %s));\n", dstreg, src0_param.param_str);
     }
 }
@@ -2343,9 +2760,9 @@
 /** Process the WINED3DSIO_TEXDEPTH instruction in GLSL:
  * Calculate the depth as dst.x / dst.y   */
-static void pshader_glsl_texdepth(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texdepth(const struct wined3d_shader_instruction *ins)
 {
     glsl_dst_param_t dst_param;
 
-    shader_glsl_add_dst_param(arg, arg->dst, 0, &dst_param);
+    shader_glsl_add_dst_param(ins, &ins->dst[0], &dst_param);
 
     /* Tests show that texdepth never returns anything below 0.0, and that r5.y is clamped to 1.0.
@@ -2355,5 +2772,6 @@
      * >= 1.0 or < 0.0
      */
-    shader_addline(arg->buffer, "gl_FragDepth = clamp((%s.x / min(%s.y, 1.0)), 0.0, 1.0);\n", dst_param.reg_name, dst_param.reg_name);
+    shader_addline(ins->ctx->buffer, "gl_FragDepth = clamp((%s.x / min(%s.y, 1.0)), 0.0, 1.0);\n",
+            dst_param.reg_name, dst_param.reg_name);
 }
 
@@ -2363,26 +2781,26 @@
  * depth = (tmp0.y == 0.0) ? 1.0 : tmp0.x / tmp0.y
  */
-static void pshader_glsl_texm3x2depth(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texm3x2depth(const struct wined3d_shader_instruction *ins)
 {
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
-    DWORD dstreg = arg->dst & WINED3DSP_REGNUM_MASK;
+    DWORD dstreg = ins->dst[0].reg.idx;
     glsl_src_param_t src0_param;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
-
-    shader_addline(arg->buffer, "tmp0.y = dot(T%u.xyz, %s);\n", dstreg, src0_param.param_str);
-    shader_addline(arg->buffer, "gl_FragDepth = (tmp0.y == 0.0) ? 1.0 : clamp(tmp0.x / tmp0.y, 0.0, 1.0);\n");
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
+
+    shader_addline(ins->ctx->buffer, "tmp0.y = dot(T%u.xyz, %s);\n", dstreg, src0_param.param_str);
+    shader_addline(ins->ctx->buffer, "gl_FragDepth = (tmp0.y == 0.0) ? 1.0 : clamp(tmp0.x / tmp0.y, 0.0, 1.0);\n");
 }
 
 /** Process the WINED3DSIO_TEXM3X2PAD instruction in GLSL
  * Calculate the 1st of a 2-row matrix multiplication. */
-static void pshader_glsl_texm3x2pad(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texm3x2pad(const struct wined3d_shader_instruction *ins)
 {
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src0_param;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
     shader_addline(buffer, "tmp0.x = dot(T%u.xyz, %s);\n", reg, src0_param.param_str);
 }
@@ -2390,79 +2808,76 @@
 /** Process the WINED3DSIO_TEXM3X3PAD instruction in GLSL
  * Calculate the 1st or 2nd row of a 3-row matrix multiplication. */
-static void pshader_glsl_texm3x3pad(const SHADER_OPCODE_ARG* arg)
-{
-    IWineD3DPixelShaderImpl* shader = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_glsl_texm3x3pad(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *shader = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     SHADER_PARSE_STATE* current_state = &shader->baseShader.parse_state;
     glsl_src_param_t src0_param;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
     shader_addline(buffer, "tmp0.%c = dot(T%u.xyz, %s);\n", 'x' + current_state->current_row, reg, src0_param.param_str);
     current_state->texcoord_w[current_state->current_row++] = reg;
 }
 
-static void pshader_glsl_texm3x2tex(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texm3x2tex(const struct wined3d_shader_instruction *ins)
 {
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     glsl_src_param_t src0_param;
-    char dst_mask[6];
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[reg];
+    glsl_sample_function_t sample_function;
+
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
     shader_addline(buffer, "tmp0.y = dot(T%u.xyz, %s);\n", reg, src0_param.param_str);
 
-    shader_glsl_append_dst(buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
 
     /* Sample the texture using the calculated coordinates */
-    shader_addline(buffer, "texture2D(Psampler%u, tmp0.xy)%s);\n", reg, dst_mask);
+    shader_glsl_gen_sample_code(ins, reg, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL, "tmp0.xy");
 }
 
 /** Process the WINED3DSIO_TEXM3X3TEX instruction in GLSL
  * Perform the 3rd row of a 3x3 matrix multiply, then sample the texture using the calculated coordinates */
-static void pshader_glsl_texm3x3tex(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins)
+{
+    DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
+    glsl_src_param_t src0_param;
+    DWORD reg = ins->dst[0].reg.idx;
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+    SHADER_PARSE_STATE* current_state = &This->baseShader.parse_state;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[reg];
+    glsl_sample_function_t sample_function;
+
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
+    shader_addline(ins->ctx->buffer, "tmp0.z = dot(T%u.xyz, %s);\n", reg, src0_param.param_str);
+
+    /* Dependent read, not valid with conditional NP2 */
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
+
+    /* Sample the texture using the calculated coordinates */
+    shader_glsl_gen_sample_code(ins, reg, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL, "tmp0.xyz");
+
+    current_state->current_row = 0;
+}
+
+/** Process the WINED3DSIO_TEXM3X3 instruction in GLSL
+ * Perform the 3rd row of a 3x3 matrix multiply */
+static void pshader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
 {
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
     glsl_src_param_t src0_param;
     char dst_mask[6];
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+    DWORD reg = ins->dst[0].reg.idx;
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     SHADER_PARSE_STATE* current_state = &This->baseShader.parse_state;
-    DWORD sampler_type = arg->reg_maps->samplers[reg] & WINED3DSP_TEXTURETYPE_MASK;
-    glsl_sample_function_t sample_function;
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
-    shader_addline(arg->buffer, "tmp0.z = dot(T%u.xyz, %s);\n", reg, src0_param.param_str);
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
-    /* Dependent read, not valid with conditional NP2 */
-    shader_glsl_get_sample_function(sampler_type, FALSE, FALSE, &sample_function);
-
-    /* Sample the texture using the calculated coordinates */
-    shader_addline(arg->buffer, "%s(Psampler%u, tmp0.xyz)%s);\n", sample_function.name, reg, dst_mask);
-
-    current_state->current_row = 0;
-}
-
-/** Process the WINED3DSIO_TEXM3X3 instruction in GLSL
- * Perform the 3rd row of a 3x3 matrix multiply */
-static void pshader_glsl_texm3x3(const SHADER_OPCODE_ARG *arg)
-{
-    DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
-    glsl_src_param_t src0_param;
-    char dst_mask[6];
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
-    SHADER_PARSE_STATE* current_state = &This->baseShader.parse_state;
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
-    shader_addline(arg->buffer, "vec4(tmp0.xy, dot(T%u.xyz, %s), 1.0)%s);\n", reg, src0_param.param_str, dst_mask);
+
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
+
+    shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_glsl_get_write_mask(&ins->dst[0], dst_mask);
+    shader_addline(ins->ctx->buffer, "vec4(tmp0.xy, dot(T%u.xyz, %s), 1.0)%s);\n", reg, src0_param.param_str, dst_mask);
 
     current_state->current_row = 0;
@@ -2471,19 +2886,18 @@
 /** Process the WINED3DSIO_TEXM3X3SPEC instruction in GLSL 
  * Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */
-static void pshader_glsl_texm3x3spec(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* shader = (IWineD3DPixelShaderImpl*) arg->shader;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
+static void pshader_glsl_texm3x3spec(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *shader = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+    DWORD reg = ins->dst[0].reg.idx;
     glsl_src_param_t src0_param;
     glsl_src_param_t src1_param;
-    char dst_mask[6];
-    SHADER_BUFFER* buffer = arg->buffer;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     SHADER_PARSE_STATE* current_state = &shader->baseShader.parse_state;
-    DWORD stype = arg->reg_maps->samplers[reg] & WINED3DSP_TEXTURETYPE_MASK;
+    WINED3DSAMPLER_TEXTURE_TYPE stype = ins->ctx->reg_maps->sampler_type[reg];
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
     glsl_sample_function_t sample_function;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], src_mask, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], src_mask, &src1_param);
 
     /* Perform the last matrix multiply operation */
@@ -2492,11 +2906,9 @@
     shader_addline(buffer, "tmp0.xyz = -reflect((%s), normalize(tmp0.xyz));\n", src1_param.param_str);
 
-    shader_glsl_append_dst(buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
     /* Dependent read, not valid with conditional NP2 */
-    shader_glsl_get_sample_function(stype, FALSE, FALSE, &sample_function);
+    shader_glsl_get_sample_function(stype, 0, &sample_function);
 
     /* Sample the texture */
-    shader_addline(buffer, "%s(Psampler%u, tmp0.xyz)%s);\n", sample_function.name, reg, dst_mask);
+    shader_glsl_gen_sample_code(ins, reg, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL, "tmp0.xyz");
 
     current_state->current_row = 0;
@@ -2505,17 +2917,16 @@
 /** Process the WINED3DSIO_TEXM3X3VSPEC instruction in GLSL 
  * Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */
-static void pshader_glsl_texm3x3vspec(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* shader = (IWineD3DPixelShaderImpl*) arg->shader;
-    DWORD reg = arg->dst & WINED3DSP_REGNUM_MASK;
-    SHADER_BUFFER* buffer = arg->buffer;
+static void pshader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *shader = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
+    DWORD reg = ins->dst[0].reg.idx;
+    SHADER_BUFFER *buffer = ins->ctx->buffer;
     SHADER_PARSE_STATE* current_state = &shader->baseShader.parse_state;
     glsl_src_param_t src0_param;
-    char dst_mask[6];
     DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
-    DWORD sampler_type = arg->reg_maps->samplers[reg] & WINED3DSP_TEXTURETYPE_MASK;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[reg];
     glsl_sample_function_t sample_function;
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], src_mask, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param);
 
     /* Perform the last matrix multiply operation */
@@ -2527,11 +2938,9 @@
     shader_addline(buffer, "tmp0.xyz = -reflect(tmp1.xyz, normalize(tmp0.xyz));\n");
 
-    shader_glsl_append_dst(buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
     /* Dependent read, not valid with conditional NP2 */
-    shader_glsl_get_sample_function(sampler_type, FALSE, FALSE, &sample_function);
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
 
     /* Sample the texture using the calculated coordinates */
-    shader_addline(buffer, "%s(Psampler%u, tmp0.xyz)%s);\n", sample_function.name, reg, dst_mask);
+    shader_glsl_gen_sample_code(ins, reg, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL, "tmp0.xyz");
 
     current_state->current_row = 0;
@@ -2542,12 +2951,11 @@
  * texbem is pshader <= 1.3 only, this saves a few version checks
  */
-static void pshader_glsl_texbem(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
+static void pshader_glsl_texbem(const struct wined3d_shader_instruction *ins)
+{
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)ins->ctx->shader;
     IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
-    char dst_swizzle[6];
     glsl_sample_function_t sample_function;
     glsl_src_param_t coord_param;
-    DWORD sampler_type;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type;
     DWORD sampler_idx;
     DWORD mask;
@@ -2555,15 +2963,13 @@
     char coord_mask[6];
 
-    sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
+    sampler_idx = ins->dst[0].reg.idx;
     flags = deviceImpl->stateBlock->textureState[sampler_idx][WINED3DTSS_TEXTURETRANSFORMFLAGS];
 
-    sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK;
+    sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
     /* Dependent read, not valid with conditional NP2 */
-    shader_glsl_get_sample_function(sampler_type, FALSE, FALSE, &sample_function);
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
     mask = sample_function.coord_mask;
 
-    shader_glsl_get_write_mask(arg->dst, dst_swizzle);
-
-    shader_glsl_get_write_mask(mask, coord_mask);
+    shader_glsl_write_mask_to_str(mask, coord_mask);
 
     /* with projective textures, texbem only divides the static texture coord, not the displacement,
@@ -2580,97 +2986,102 @@
             case WINED3DTTFF_DISABLE: div_mask = WINED3DSP_WRITEMASK_3; break;
         }
-        shader_glsl_get_write_mask(div_mask, coord_div_mask);
-        shader_addline(arg->buffer, "T%u%s /= T%u%s;\n", sampler_idx, coord_mask, sampler_idx, coord_div_mask);
-    }
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0|WINED3DSP_WRITEMASK_1, &coord_param);
-    if(arg->opcode->opcode == WINED3DSIO_TEXBEML) {
+        shader_glsl_write_mask_to_str(div_mask, coord_div_mask);
+        shader_addline(ins->ctx->buffer, "T%u%s /= T%u%s;\n", sampler_idx, coord_mask, sampler_idx, coord_div_mask);
+    }
+
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1, &coord_param);
+
+    shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL,
+            "T%u%s + vec4(bumpenvmat%d * %s, 0.0, 0.0)%s", sampler_idx, coord_mask, sampler_idx,
+            coord_param.param_str, coord_mask);
+
+    if (ins->handler_idx == WINED3DSIH_TEXBEML)
+    {
         glsl_src_param_t luminance_param;
-        shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_2, &luminance_param);
-        shader_addline(arg->buffer, "(%s(Psampler%u, T%u%s + vec4(bumpenvmat%d * %s, 0.0, 0.0)%s )*(%s * luminancescale%d + luminanceoffset%d))%s);\n",
-                       sample_function.name, sampler_idx, sampler_idx, coord_mask, sampler_idx, coord_param.param_str, coord_mask,
-                       luminance_param.param_str, sampler_idx, sampler_idx, dst_swizzle);
-    } else {
-        shader_addline(arg->buffer, "%s(Psampler%u, T%u%s + vec4(bumpenvmat%d * %s, 0.0, 0.0)%s )%s);\n",
-                       sample_function.name, sampler_idx, sampler_idx, coord_mask, sampler_idx, coord_param.param_str, coord_mask, dst_swizzle);
-    }
-}
-
-static void pshader_glsl_bem(const SHADER_OPCODE_ARG *arg)
+        glsl_dst_param_t dst_param;
+
+        shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_2, &luminance_param);
+        shader_glsl_add_dst_param(ins, &ins->dst[0], &dst_param);
+
+        shader_addline(ins->ctx->buffer, "%s%s *= (%s * luminancescale%d + luminanceoffset%d);\n",
+                dst_param.reg_name, dst_param.mask_str,
+                luminance_param.param_str, sampler_idx, sampler_idx);
+    }
+}
+
+static void pshader_glsl_bem(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param, src1_param;
-    DWORD sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
-
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0|WINED3DSP_WRITEMASK_1, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_0|WINED3DSP_WRITEMASK_1, &src1_param);
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_addline(arg->buffer, "%s + bumpenvmat%d * %s);\n",
-                   src0_param.param_str, sampler_idx, src1_param.param_str);
+    DWORD sampler_idx = ins->dst[0].reg.idx;
+
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1, &src1_param);
+
+    shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_addline(ins->ctx->buffer, "%s + bumpenvmat%d * %s);\n",
+            src0_param.param_str, sampler_idx, src1_param.param_str);
 }
 
 /** Process the WINED3DSIO_TEXREG2AR instruction in GLSL
  * Sample 2D texture at dst using the alpha & red (wx) components of src as texture coordinates */
-static void pshader_glsl_texreg2ar(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texreg2ar(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
-    DWORD sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
-    char dst_mask[6];
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_ALL, &src0_param);
-
-    shader_addline(arg->buffer, "texture2D(Psampler%u, %s.wx)%s);\n", sampler_idx, src0_param.reg_name, dst_mask);
+    DWORD sampler_idx = ins->dst[0].reg.idx;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
+    glsl_sample_function_t sample_function;
+
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_ALL, &src0_param);
+
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
+    shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL,
+            "%s.wx", src0_param.reg_name);
 }
 
 /** Process the WINED3DSIO_TEXREG2GB instruction in GLSL
  * Sample 2D texture at dst using the green & blue (yz) components of src as texture coordinates */
-static void pshader_glsl_texreg2gb(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texreg2gb(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
-    DWORD sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
-    char dst_mask[6];
-
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_ALL, &src0_param);
-
-    shader_addline(arg->buffer, "texture2D(Psampler%u, %s.yz)%s);\n", sampler_idx, src0_param.reg_name, dst_mask);
+    DWORD sampler_idx = ins->dst[0].reg.idx;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
+    glsl_sample_function_t sample_function;
+
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_ALL, &src0_param);
+
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
+    shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL,
+            "%s.yz", src0_param.reg_name);
 }
 
 /** Process the WINED3DSIO_TEXREG2RGB instruction in GLSL
  * Sample texture at dst using the rgb (xyz) components of src as texture coordinates */
-static void pshader_glsl_texreg2rgb(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_texreg2rgb(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
-    char dst_mask[6];
-    DWORD sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK;
-    DWORD sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK;
+    DWORD sampler_idx = ins->dst[0].reg.idx;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
     glsl_sample_function_t sample_function;
 
-    shader_glsl_append_dst(arg->buffer, arg);
-    shader_glsl_get_write_mask(arg->dst, dst_mask);
     /* Dependent read, not valid with conditional NP2 */
-    shader_glsl_get_sample_function(sampler_type, FALSE, FALSE, &sample_function);
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], sample_function.coord_mask, &src0_param);
-
-    shader_addline(arg->buffer, "%s(Psampler%u, %s)%s);\n", sample_function.name, sampler_idx, src0_param.param_str, dst_mask);
+    shader_glsl_get_sample_function(sampler_type, 0, &sample_function);
+    shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &src0_param);
+
+    shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL,
+            "%s", src0_param.param_str);
 }
 
 /** Process the WINED3DSIO_TEXKILL instruction in GLSL.
  * If any of the first 3 components are < 0, discard this pixel */
-static void pshader_glsl_texkill(const SHADER_OPCODE_ARG *arg)
-{
-    IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
-    DWORD hex_version = This->baseShader.hex_version;
+static void pshader_glsl_texkill(const struct wined3d_shader_instruction *ins)
+{
     glsl_dst_param_t dst_param;
 
     /* The argument is a destination parameter, and no writemasks are allowed */
-    shader_glsl_add_dst_param(arg, arg->dst, 0, &dst_param);
-    if((hex_version >= WINED3DPS_VERSION(2,0))) {
+    shader_glsl_add_dst_param(ins, &ins->dst[0], &dst_param);
+    if (ins->ctx->reg_maps->shader_version.major >= 2)
+    {
         /* 2.0 shaders compare all 4 components in texkill */
-        shader_addline(arg->buffer, "if (any(lessThan(%s.xyzw, vec4(0.0)))) discard;\n", dst_param.reg_name);
+        shader_addline(ins->ctx->buffer, "if (any(lessThan(%s.xyzw, vec4(0.0)))) discard;\n", dst_param.reg_name);
     } else {
         /* 1.X shaders only compare the first 3 components, probably due to the nature of the texkill
@@ -2678,5 +3089,5 @@
          * 4 components are defined, only the first 3 are used
          */
-        shader_addline(arg->buffer, "if (any(lessThan(%s.xyz, vec3(0.0)))) discard;\n", dst_param.reg_name);
+        shader_addline(ins->ctx->buffer, "if (any(lessThan(%s.xyz, vec3(0.0)))) discard;\n", dst_param.reg_name);
     }
 }
@@ -2684,5 +3095,5 @@
 /** Process the WINED3DSIO_DP2ADD instruction in GLSL.
  * dst = dot2(src0, src1) + src2 */
-static void pshader_glsl_dp2add(const SHADER_OPCODE_ARG *arg)
+static void pshader_glsl_dp2add(const struct wined3d_shader_instruction *ins)
 {
     glsl_src_param_t src0_param;
@@ -2692,64 +3103,66 @@
     unsigned int mask_size;
 
-    write_mask = shader_glsl_append_dst(arg->buffer, arg);
+    write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
     mask_size = shader_glsl_get_write_mask_size(write_mask);
 
-    shader_glsl_add_src_param(arg, arg->src[0], arg->src_addr[0], WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1, &src0_param);
-    shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1, &src1_param);
-    shader_glsl_add_src_param(arg, arg->src[2], arg->src_addr[2], WINED3DSP_WRITEMASK_0, &src2_param);
+    shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1, &src0_param);
+    shader_glsl_add_src_param(ins, &ins->src[1], WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1, &src1_param);
+    shader_glsl_add_src_param(ins, &ins->src[2], WINED3DSP_WRITEMASK_0, &src2_param);
 
     if (mask_size > 1) {
-        shader_addline(arg->buffer, "vec%d(dot(%s, %s) + %s));\n", mask_size, src0_param.param_str, src1_param.param_str, src2_param.param_str);
+        shader_addline(ins->ctx->buffer, "vec%d(dot(%s, %s) + %s));\n",
+                mask_size, src0_param.param_str, src1_param.param_str, src2_param.param_str);
     } else {
-        shader_addline(arg->buffer, "dot(%s, %s) + %s);\n", src0_param.param_str, src1_param.param_str, src2_param.param_str);
-    }
-}
-
-static void pshader_glsl_input_pack(SHADER_BUFFER* buffer, const struct semantic* semantics_in,
-        IWineD3DPixelShader *iface, enum vertexprocessing_mode vertexprocessing)
-{
-   unsigned int i;
-   IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *) iface;
-
-   for (i = 0; i < MAX_REG_INPUT; i++) {
-
-       DWORD usage_token = semantics_in[i].usage;
-       DWORD register_token = semantics_in[i].reg;
-       DWORD usage, usage_idx;
-       char reg_mask[6];
-
-       /* Uninitialized */
-       if (!usage_token) continue;
-       usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-       usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-       shader_glsl_get_write_mask(register_token, reg_mask);
-
-       switch(usage) {
-
-           case WINED3DDECLUSAGE_TEXCOORD:
-               if(usage_idx < 8 && vertexprocessing == pretransformed) {
-                   shader_addline(buffer, "IN[%u]%s = gl_TexCoord[%u]%s;\n",
-                                  This->input_reg_map[i], reg_mask, usage_idx, reg_mask);
-               } else {
-                   shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n",
-                                  This->input_reg_map[i], reg_mask, reg_mask);
-               }
-               break;
-
-           case WINED3DDECLUSAGE_COLOR:
-               if (usage_idx == 0)
-                   shader_addline(buffer, "IN[%u]%s = vec4(gl_Color)%s;\n",
-                       This->input_reg_map[i], reg_mask, reg_mask);
-               else if (usage_idx == 1)
-                   shader_addline(buffer, "IN[%u]%s = vec4(gl_SecondaryColor)%s;\n",
-                       This->input_reg_map[i], reg_mask, reg_mask);
-               else
-                   shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n",
-                       This->input_reg_map[i], reg_mask, reg_mask);
-               break;
-
-           default:
-               shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n",
-                   This->input_reg_map[i], reg_mask, reg_mask);
+        shader_addline(ins->ctx->buffer, "dot(%s, %s) + %s);\n",
+                src0_param.param_str, src1_param.param_str, src2_param.param_str);
+    }
+}
+
+static void pshader_glsl_input_pack(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer,
+        const struct wined3d_shader_semantic *semantics_in, const struct shader_reg_maps *reg_maps,
+        enum vertexprocessing_mode vertexprocessing)
+{
+    unsigned int i;
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
+
+    for (i = 0; i < MAX_REG_INPUT; ++i)
+    {
+        DWORD usage, usage_idx;
+        char reg_mask[6];
+
+        /* Unused */
+        if (!reg_maps->packed_input[i]) continue;
+
+        usage = semantics_in[i].usage;
+        usage_idx = semantics_in[i].usage_idx;
+        shader_glsl_get_write_mask(&semantics_in[i].reg, reg_mask);
+
+        switch (usage)
+        {
+            case WINED3DDECLUSAGE_TEXCOORD:
+                if (usage_idx < 8 && vertexprocessing == pretransformed)
+                    shader_addline(buffer, "IN[%u]%s = gl_TexCoord[%u]%s;\n",
+                            This->input_reg_map[i], reg_mask, usage_idx, reg_mask);
+                else
+                    shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n",
+                            This->input_reg_map[i], reg_mask, reg_mask);
+                break;
+
+            case WINED3DDECLUSAGE_COLOR:
+                if (usage_idx == 0)
+                    shader_addline(buffer, "IN[%u]%s = vec4(gl_Color)%s;\n",
+                            This->input_reg_map[i], reg_mask, reg_mask);
+                else if (usage_idx == 1)
+                    shader_addline(buffer, "IN[%u]%s = vec4(gl_SecondaryColor)%s;\n",
+                            This->input_reg_map[i], reg_mask, reg_mask);
+                else
+                    shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n",
+                            This->input_reg_map[i], reg_mask, reg_mask);
+                break;
+
+            default:
+                shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n",
+                        This->input_reg_map[i], reg_mask, reg_mask);
+                break;
         }
     }
@@ -2766,4 +3179,5 @@
     key->vshader = entry->vshader;
     key->pshader = entry->pshader;
+    key->vs_args = entry->vs_args;
     key->ps_args = entry->ps_args;
 
@@ -2772,12 +3186,14 @@
 
 static struct glsl_shader_prog_link *get_glsl_program_entry(struct shader_glsl_priv *priv,
-        GLhandleARB vshader, IWineD3DPixelShader *pshader, struct ps_compile_args *ps_args) {
+        IWineD3DVertexShader *vshader, IWineD3DPixelShader *pshader, struct vs_compile_args *vs_args,
+        struct ps_compile_args *ps_args) {
     glsl_program_key_t key;
 
     key.vshader = vshader;
     key.pshader = pshader;
+    key.vs_args = *vs_args;
     key.ps_args = *ps_args;
 
-    return (struct glsl_shader_prog_link *)hash_table_get(priv->glsl_program_lookup, &key);
+    return hash_table_get(priv->glsl_program_lookup, &key);
 }
 
@@ -2790,4 +3206,5 @@
     key->vshader = entry->vshader;
     key->pshader = entry->pshader;
+    key->vs_args = entry->vs_args;
     key->ps_args = entry->ps_args;
     hash_table_remove(priv->glsl_program_lookup, key);
@@ -2801,10 +3218,9 @@
 }
 
-static void handle_ps3_input(SHADER_BUFFER *buffer, const struct semantic *semantics_in,
-        const struct semantic *semantics_out, const WineD3D_GL_Info *gl_info, const DWORD *map)
+static void handle_ps3_input(SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_info, const DWORD *map,
+        const struct wined3d_shader_semantic *semantics_in, const struct shader_reg_maps *reg_maps_in,
+        const struct wined3d_shader_semantic *semantics_out, const struct shader_reg_maps *reg_maps_out)
 {
     unsigned int i, j;
-    DWORD usage_token, usage_token_out;
-    DWORD register_token, register_token_out;
     DWORD usage, usage_idx, usage_out, usage_idx_out;
     DWORD *set;
@@ -2823,6 +3239,5 @@
 
     for(i = 0; i < MAX_REG_INPUT; i++) {
-        usage_token = semantics_in[i].usage;
-        if (!usage_token) continue;
+        if (!reg_maps_in->packed_input[i]) continue;
 
         in_idx = map[i];
@@ -2830,5 +3245,7 @@
             FIXME("More input varyings declared than supported, expect issues\n");
             continue;
-        } else if(map[i] == -1) {
+        }
+        else if (map[i] == ~0U)
+        {
             /* Declared, but not read register */
             continue;
@@ -2843,9 +3260,7 @@
         }
 
-        register_token = semantics_in[i].reg;
-
-        usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-        usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-        set[map[i]] = shader_glsl_get_write_mask(register_token, reg_mask);
+        usage = semantics_in[i].usage;
+        usage_idx = semantics_in[i].usage_idx;
+        set[map[i]] = shader_glsl_get_write_mask(&semantics_in[i].reg, reg_mask);
 
         if(!semantics_out) {
@@ -2885,11 +3300,9 @@
             BOOL found = FALSE;
             for(j = 0; j < MAX_REG_OUTPUT; j++) {
-                usage_token_out = semantics_out[j].usage;
-                if (!usage_token_out) continue;
-                register_token_out = semantics_out[j].reg;
-
-                usage_out = (usage_token_out & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-                usage_idx_out = (usage_token_out & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-                shader_glsl_get_write_mask(register_token_out, reg_mask_out);
+                if (!reg_maps_out->packed_output[j]) continue;
+
+                usage_out = semantics_out[j].usage;
+                usage_idx_out = semantics_out[j].usage_idx;
+                shader_glsl_get_write_mask(&semantics_out[j].reg, reg_mask_out);
 
                 if(usage == usage_out &&
@@ -2958,18 +3371,13 @@
     IWineD3DPixelShaderImpl *ps = (IWineD3DPixelShaderImpl *) pixelshader;
     IWineD3DDeviceImpl *device;
-    DWORD vs_major = WINED3DSHADER_VERSION_MAJOR(vs->baseShader.hex_version);
-    DWORD ps_major = ps ? WINED3DSHADER_VERSION_MAJOR(ps->baseShader.hex_version) : 0;
+    DWORD vs_major = vs->baseShader.reg_maps.shader_version.major;
+    DWORD ps_major = ps ? ps->baseShader.reg_maps.shader_version.major : 0;
     unsigned int i;
     SHADER_BUFFER buffer;
-    DWORD usage_token;
-    DWORD register_token;
     DWORD usage, usage_idx, writemask;
     char reg_mask[6];
-    const struct semantic *semantics_out, *semantics_in;
-
-    buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
-    buffer.bsize = 0;
-    buffer.lineNo = 0;
-    buffer.newline = TRUE;
+    const struct wined3d_shader_semantic *semantics_out;
+
+    shader_buffer_init(&buffer);
 
     shader_addline(&buffer, "#version 120\n");
@@ -2999,11 +3407,9 @@
         shader_addline(&buffer, "void order_ps_input(in vec4 OUT[%u]) {\n", MAX_REG_OUTPUT);
         for(i = 0; i < MAX_REG_OUTPUT; i++) {
-            usage_token = semantics_out[i].usage;
-            if (!usage_token) continue;
-            register_token = semantics_out[i].reg;
-
-            usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-            usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-            writemask = shader_glsl_get_write_mask(register_token, reg_mask);
+            if (!vs->baseShader.reg_maps.packed_output[i]) continue;
+
+            usage = semantics_out[i].usage;
+            usage_idx = semantics_out[i].usage_idx;
+            writemask = shader_glsl_get_write_mask(&semantics_out[i].reg, reg_mask);
 
             switch(usage) {
@@ -3047,5 +3453,4 @@
     } else if(ps_major >= 3 && vs_major >= 3) {
         semantics_out = vs->semantics_out;
-        semantics_in = ps->semantics_in;
 
         /* This one is tricky: a 3.0 pixel shader reads from a 3.0 vertex shader */
@@ -3055,11 +3460,9 @@
         /* First, sort out position and point size. Those are not passed to the pixel shader */
         for(i = 0; i < MAX_REG_OUTPUT; i++) {
-            usage_token = semantics_out[i].usage;
-            if (!usage_token) continue;
-            register_token = semantics_out[i].reg;
-
-            usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-            usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-            shader_glsl_get_write_mask(register_token, reg_mask);
+            if (!vs->baseShader.reg_maps.packed_output[i]) continue;
+
+            usage = semantics_out[i].usage;
+            usage_idx = semantics_out[i].usage_idx;
+            shader_glsl_get_write_mask(&semantics_out[i].reg, reg_mask);
 
             switch(usage) {
@@ -3078,10 +3481,9 @@
 
         /* Then, fix the pixel shader input */
-        handle_ps3_input(&buffer, semantics_in, semantics_out, gl_info, ps->input_reg_map);
+        handle_ps3_input(&buffer, gl_info, ps->input_reg_map,
+                ps->semantics_in, &ps->baseShader.reg_maps, semantics_out, &vs->baseShader.reg_maps);
 
         shader_addline(&buffer, "}\n");
     } else if(ps_major >= 3 && vs_major < 3) {
-        semantics_in = ps->semantics_in;
-
         shader_addline(&buffer, "varying vec4 IN[%u];\n", GL_LIMITS(glsl_varyings) / 4);
         shader_addline(&buffer, "void order_ps_input() {\n");
@@ -3090,5 +3492,5 @@
          * read gl_TexCoord and gl_ColorX, otherwise we'll run out of varyings
          */
-        handle_ps3_input(&buffer, semantics_in, NULL, gl_info, ps->input_reg_map);
+        handle_ps3_input(&buffer, gl_info, ps->input_reg_map, ps->semantics_in, &ps->baseShader.reg_maps, NULL, NULL);
         shader_addline(&buffer, "}\n");
     } else {
@@ -3099,9 +3501,9 @@
     checkGLcall("glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB)");
     GL_EXTCALL(glShaderSourceARB(ret, 1, (const char**)&buffer.buffer, NULL));
-    checkGLcall("glShaderSourceARB(ret, 1, (const char**)&buffer.buffer, NULL)");
+    checkGLcall("glShaderSourceARB(ret, 1, &buffer.buffer, NULL)");
     GL_EXTCALL(glCompileShaderARB(ret));
     checkGLcall("glCompileShaderARB(ret)");
 
-    HeapFree(GetProcessHeap(), 0, buffer.buffer);
+    shader_buffer_free(&buffer);
     return ret;
 }
@@ -3111,5 +3513,5 @@
 {
     const local_constant *lconst;
-    GLuint tmp_loc;
+    GLint tmp_loc;
     const float *value;
     char glsl_name[8];
@@ -3134,5 +3536,5 @@
 static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use_vs) {
     IWineD3DDeviceImpl *This               = (IWineD3DDeviceImpl *)iface;
-    struct shader_glsl_priv *priv          = (struct shader_glsl_priv *)This->shader_priv;
+    struct shader_glsl_priv *priv          = This->shader_priv;
     const WineD3D_GL_Info *gl_info         = &This->adapter->gl_info;
     IWineD3DPixelShader  *pshader          = This->stateBlock->pixelShader;
@@ -3141,22 +3543,23 @@
     GLhandleARB programId                  = 0;
     GLhandleARB reorder_shader_id          = 0;
-    int i;
+    unsigned int i;
     char glsl_name[8];
     GLhandleARB vshader_id, pshader_id;
-    struct ps_compile_args compile_args;
+    struct ps_compile_args ps_compile_args;
+    struct vs_compile_args vs_compile_args;
 
     if(use_vs) {
-        IWineD3DVertexShaderImpl_CompileShader(vshader);
-        vshader_id = ((IWineD3DVertexShaderImpl*)vshader)->prgId;
-    } else {
-        vshader_id = 0;
-    }
-    if(use_ps) {
-        find_ps_compile_args((IWineD3DPixelShaderImpl*)This->stateBlock->pixelShader, This->stateBlock, &compile_args);
+        find_vs_compile_args((IWineD3DVertexShaderImpl*)This->stateBlock->vertexShader, This->stateBlock, &vs_compile_args);
     } else {
         /* FIXME: Do we really have to spend CPU cycles to generate a few zeroed bytes? */
-        memset(&compile_args, 0, sizeof(compile_args));
-    }
-    entry = get_glsl_program_entry(priv, vshader_id, pshader, &compile_args);
+        memset(&vs_compile_args, 0, sizeof(vs_compile_args));
+    }
+    if(use_ps) {
+        find_ps_compile_args((IWineD3DPixelShaderImpl*)This->stateBlock->pixelShader, This->stateBlock, &ps_compile_args);
+    } else {
+        /* FIXME: Do we really have to spend CPU cycles to generate a few zeroed bytes? */
+        memset(&ps_compile_args, 0, sizeof(ps_compile_args));
+    }
+    entry = get_glsl_program_entry(priv, vshader, pshader, &vs_compile_args, &ps_compile_args);
     if (entry) {
         priv->glsl_program = entry;
@@ -3171,7 +3574,9 @@
     entry = HeapAlloc(GetProcessHeap(), 0, sizeof(struct glsl_shader_prog_link));
     entry->programId = programId;
-    entry->vshader = vshader_id;
+    entry->vshader = vshader;
     entry->pshader = pshader;
-    entry->ps_args = compile_args;
+    entry->vs_args = vs_compile_args;
+    entry->ps_args = ps_compile_args;
+    entry->constant_version = 0;
     /* Add the hash table entry */
     add_glsl_program_entry(priv, entry);
@@ -3180,7 +3585,13 @@
     priv->glsl_program = entry;
 
+    if(use_vs) {
+        vshader_id = find_gl_vshader((IWineD3DVertexShaderImpl *) vshader, &vs_compile_args);
+    } else {
+        vshader_id = 0;
+    }
+
     /* Attach GLSL vshader */
     if (vshader_id) {
-        int max_attribs = 16;   /* TODO: Will this always be the case? It is at the moment... */
+        const unsigned int max_attribs = 16;   /* TODO: Will this always be the case? It is at the moment... */
         char tmp_name[10];
 
@@ -3219,5 +3630,5 @@
 
     if(use_ps) {
-        pshader_id = find_gl_pshader((IWineD3DPixelShaderImpl *) pshader, &compile_args);
+        pshader_id = find_gl_pshader((IWineD3DPixelShaderImpl *) pshader, &ps_compile_args);
     } else {
         pshader_id = 0;
@@ -3269,4 +3680,15 @@
     }
 
+    if (use_ps && ps_compile_args.np2_fixup) {
+        char name[32];
+        for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) {
+            if (ps_compile_args.np2_fixup & (1 << i)) {
+                sprintf(name, "PsamplerNP2Fixup%u", i);
+                entry->np2Fixup_location[i] = GL_EXTCALL(glGetUniformLocationARB(programId, name));
+            } else {
+                entry->np2Fixup_location[i] = -1;
+            }
+        }
+    }
 
     entry->posFixup_location = GL_EXTCALL(glGetUniformLocationARB(programId, "posFixup"));
@@ -3274,6 +3696,8 @@
     checkGLcall("Find glsl program uniform locations");
 
-    if (pshader && WINED3DSHADER_VERSION_MAJOR(((IWineD3DPixelShaderImpl *)pshader)->baseShader.hex_version) >= 3
-            && ((IWineD3DPixelShaderImpl *)pshader)->declared_in_count > GL_LIMITS(glsl_varyings) / 4) {
+    if (pshader
+            && ((IWineD3DPixelShaderImpl *)pshader)->baseShader.reg_maps.shader_version.major >= 3
+            && ((IWineD3DPixelShaderImpl *)pshader)->declared_in_count > GL_LIMITS(glsl_varyings) / 4)
+    {
         TRACE("Shader %d needs vertex color clamping disabled\n", programId);
         entry->vertex_color_clamp = GL_FALSE;
@@ -3296,9 +3720,9 @@
     if(vshader_id) {
         /* Load vertex shader samplers */
-        shader_glsl_load_vsamplers(gl_info, (IWineD3DStateBlock*)This->stateBlock, programId);
+        shader_glsl_load_vsamplers(gl_info, This->texUnitMap, programId);
     }
     if(pshader_id) {
         /* Load pixel shader samplers */
-        shader_glsl_load_psamplers(gl_info, (IWineD3DStateBlock*)This->stateBlock, programId);
+        shader_glsl_load_psamplers(gl_info, This->texUnitMap, programId);
     }
 
@@ -3319,5 +3743,6 @@
     GLhandleARB program_id;
     GLhandleARB vshader_id, pshader_id;
-    const char *blt_vshader[] = {
+    static const char *blt_vshader[] =
+    {
         "#version 120\n"
         "void main(void)\n"
@@ -3329,5 +3754,6 @@
     };
 
-    const char *blt_pshaders[tex_type_count] = {
+    static const char *blt_pshaders[tex_type_count] =
+    {
         /* tex_1d */
         NULL,
@@ -3389,5 +3815,5 @@
 static void shader_glsl_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    struct shader_glsl_priv *priv = (struct shader_glsl_priv *)This->shader_priv;
+    struct shader_glsl_priv *priv = This->shader_priv;
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
     GLhandleARB program_id = 0;
@@ -3419,9 +3845,9 @@
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
-    struct shader_glsl_priv *priv = (struct shader_glsl_priv *) This->shader_priv;
+    struct shader_glsl_priv *priv = This->shader_priv;
     GLhandleARB *blt_program = &priv->depth_blt_program[tex_type];
 
     if (!*blt_program) {
-        GLhandleARB loc;
+        GLint loc;
         *blt_program = create_glsl_blt_shader(gl_info, tex_type);
         loc = GL_EXTCALL(glGetUniformLocationARB(*blt_program, "sampler"));
@@ -3436,5 +3862,5 @@
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
-    struct shader_glsl_priv *priv = (struct shader_glsl_priv *) This->shader_priv;
+    struct shader_glsl_priv *priv = This->shader_priv;
     GLhandleARB program_id;
 
@@ -3444,10 +3870,4 @@
     GL_EXTCALL(glUseProgramObjectARB(program_id));
     checkGLcall("glUseProgramObjectARB");
-}
-
-static void shader_glsl_cleanup(IWineD3DDevice *iface) {
-    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
-    const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
-    GL_EXTCALL(glUseProgramObjectARB(0));
 }
 
@@ -3456,5 +3876,5 @@
     IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) iface;
     IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device;
-    struct shader_glsl_priv *priv = (struct shader_glsl_priv *)device->shader_priv;
+    struct shader_glsl_priv *priv = device->shader_priv;
     const WineD3D_GL_Info *gl_info = &device->adapter->gl_info;
     IWineD3DPixelShaderImpl *ps = NULL;
@@ -3464,12 +3884,16 @@
      * can be called from IWineD3DBaseShader::Release
      */
-    char pshader = shader_is_pshader_version(This->baseShader.hex_version);
+    char pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
 
     if(pshader) {
         ps = (IWineD3DPixelShaderImpl *) This;
         if(ps->num_gl_shaders == 0) return;
+        if (priv->glsl_program && (IWineD3DBaseShader *)priv->glsl_program->pshader == iface)
+            shader_glsl_select(This->baseShader.device, FALSE, FALSE);
     } else {
         vs = (IWineD3DVertexShaderImpl *) This;
-        if(vs->prgId == 0) return;
+        if(vs->num_gl_shaders == 0) return;
+        if (priv->glsl_program && (IWineD3DBaseShader *)priv->glsl_program->vshader == iface)
+            shader_glsl_select(This->baseShader.device, FALSE, FALSE);
     }
 
@@ -3504,12 +3928,19 @@
         ps->gl_shaders = NULL;
         ps->num_gl_shaders = 0;
+        ps->shader_array_size = 0;
     } else {
-        TRACE("Deleting shader object %u\n", vs->prgId);
+        UINT i;
+
         ENTER_GL();
-        GL_EXTCALL(glDeleteObjectARB(vs->prgId));
-        checkGLcall("glDeleteObjectARB");
+        for(i = 0; i < vs->num_gl_shaders; i++) {
+            TRACE("deleting vshader %u\n", vs->gl_shaders[i].prgId);
+            GL_EXTCALL(glDeleteObjectARB(vs->gl_shaders[i].prgId));
+            checkGLcall("glDeleteObjectARB");
+        }
         LEAVE_GL();
-        vs->prgId = 0;
-        vs->baseShader.is_compiled = FALSE;
+        HeapFree(GetProcessHeap(), 0, vs->gl_shaders);
+        vs->gl_shaders = NULL;
+        vs->num_gl_shaders = 0;
+        vs->shader_array_size = 0;
     }
 }
@@ -3517,7 +3948,7 @@
 static unsigned int glsl_program_key_hash(const void *key)
 {
-    const glsl_program_key_t *k = (const glsl_program_key_t *)key;
-
-    unsigned int hash = k->vshader | ((DWORD_PTR) k->pshader) << 16;
+    const glsl_program_key_t *k = key;
+
+    unsigned int hash = ((DWORD_PTR) k->vshader) | ((DWORD_PTR) k->pshader) << 16;
     hash += ~(hash << 15);
     hash ^=  (hash >> 10);
@@ -3532,15 +3963,70 @@
 static BOOL glsl_program_key_compare(const void *keya, const void *keyb)
 {
-    const glsl_program_key_t *ka = (const glsl_program_key_t *)keya;
-    const glsl_program_key_t *kb = (const glsl_program_key_t *)keyb;
+    const glsl_program_key_t *ka = keya;
+    const glsl_program_key_t *kb = keyb;
 
     return ka->vshader == kb->vshader && ka->pshader == kb->pshader &&
-           (memcmp(&ka->ps_args, &kb->ps_args, sizeof(kb->ps_args)) == 0);
+           (memcmp(&ka->ps_args, &kb->ps_args, sizeof(kb->ps_args)) == 0) &&
+           (memcmp(&ka->vs_args, &kb->vs_args, sizeof(kb->vs_args)) == 0);
+}
+
+static BOOL constant_heap_init(struct constant_heap *heap, unsigned int constant_count)
+{
+    SIZE_T size = (constant_count + 1) * sizeof(*heap->entries) + constant_count * sizeof(*heap->positions);
+    void *mem = HeapAlloc(GetProcessHeap(), 0, size);
+
+    if (!mem)
+    {
+        ERR("Failed to allocate memory\n");
+        return FALSE;
+    }
+
+    heap->entries = mem;
+    heap->entries[1].version = 0;
+    heap->positions = (unsigned int *)(heap->entries + constant_count + 1);
+    heap->size = 1;
+
+    return TRUE;
+}
+
+static void constant_heap_free(struct constant_heap *heap)
+{
+    HeapFree(GetProcessHeap(), 0, heap->entries);
 }
 
 static HRESULT shader_glsl_alloc(IWineD3DDevice *iface) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
     struct shader_glsl_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_glsl_priv));
+    SIZE_T stack_size = wined3d_log2i(max(GL_LIMITS(vshader_constantsF), GL_LIMITS(pshader_constantsF))) + 1;
+
+    priv->stack = HeapAlloc(GetProcessHeap(), 0, stack_size * sizeof(*priv->stack));
+    if (!priv->stack)
+    {
+        ERR("Failed to allocate memory.\n");
+        HeapFree(GetProcessHeap(), 0, priv);
+        return E_OUTOFMEMORY;
+    }
+
+    if (!constant_heap_init(&priv->vconst_heap, GL_LIMITS(vshader_constantsF)))
+    {
+        ERR("Failed to initialize vertex shader constant heap\n");
+        HeapFree(GetProcessHeap(), 0, priv->stack);
+        HeapFree(GetProcessHeap(), 0, priv);
+        return E_OUTOFMEMORY;
+    }
+
+    if (!constant_heap_init(&priv->pconst_heap, GL_LIMITS(pshader_constantsF)))
+    {
+        ERR("Failed to initialize pixel shader constant heap\n");
+        constant_heap_free(&priv->vconst_heap);
+        HeapFree(GetProcessHeap(), 0, priv->stack);
+        HeapFree(GetProcessHeap(), 0, priv);
+        return E_OUTOFMEMORY;
+    }
+
     priv->glsl_program_lookup = hash_table_create(glsl_program_key_hash, glsl_program_key_compare);
+    priv->next_constant_version = 1;
+
     This->shader_priv = priv;
     return WINED3D_OK;
@@ -3550,5 +4036,5 @@
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
-    struct shader_glsl_priv *priv = (struct shader_glsl_priv *)This->shader_priv;
+    struct shader_glsl_priv *priv = This->shader_priv;
     int i;
 
@@ -3562,4 +4048,6 @@
 
     hash_table_destroy(priv->glsl_program_lookup, NULL, NULL);
+    constant_heap_free(&priv->pconst_heap);
+    constant_heap_free(&priv->vconst_heap);
 
     HeapFree(GetProcessHeap(), 0, This->shader_priv);
@@ -3572,5 +4060,7 @@
 }
 
-static GLuint shader_glsl_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer) {
+static GLuint shader_glsl_generate_pshader(IWineD3DPixelShader *iface,
+        SHADER_BUFFER *buffer, const struct ps_compile_args *args)
+{
     IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
     const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
@@ -3587,4 +4077,7 @@
         shader_addline(buffer, "#extension GL_ARB_draw_buffers : enable\n");
     }
+    if(GL_SUPPORT(ARB_SHADER_TEXTURE_LOD) && reg_maps->usestexldd) {
+        shader_addline(buffer, "#extension GL_ARB_shader_texture_lod : enable\n");
+    }
     if (GL_SUPPORT(ARB_TEXTURE_RECTANGLE)) {
         /* The spec says that it doesn't have to be explicitly enabled, but the nvidia
@@ -3595,21 +4088,18 @@
 
     /* Base Declarations */
-    shader_generate_glsl_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION);
+    shader_generate_glsl_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION, args);
 
     /* Pack 3.0 inputs */
-    if (This->baseShader.hex_version >= WINED3DPS_VERSION(3,0)) {
-
-        if(((IWineD3DDeviceImpl *) This->baseShader.device)->strided_streams.u.s.position_transformed) {
-            pshader_glsl_input_pack(buffer, This->semantics_in, iface, pretransformed);
-        } else if(!use_vs((IWineD3DDeviceImpl *) This->baseShader.device)) {
-            pshader_glsl_input_pack(buffer, This->semantics_in, iface, fixedfunction);
-        }
+    if (reg_maps->shader_version.major >= 3 && args->vp_mode != vertexshader)
+    {
+        pshader_glsl_input_pack(iface, buffer, This->semantics_in, reg_maps, args->vp_mode);
     }
 
     /* Base Shader Body */
-    shader_generate_main( (IWineD3DBaseShader*) This, buffer, reg_maps, function);
+    shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function);
 
     /* Pixel shaders < 2.0 place the resulting color in R0 implicitly */
-    if (This->baseShader.hex_version < WINED3DPS_VERSION(2,0)) {
+    if (reg_maps->shader_version.major < 2)
+    {
         /* Some older cards like GeforceFX ones don't support multiple buffers, so also not gl_FragData */
         if(GL_SUPPORT(ARB_DRAW_BUFFERS))
@@ -3624,5 +4114,5 @@
         fragcolor = "gl_FragColor";
     }
-    if(((IWineD3DDeviceImpl *)This->baseShader.device)->stateBlock->renderState[WINED3DRS_SRGBWRITEENABLE]) {
+    if(args->srgb_correction) {
         shader_addline(buffer, "tmp0.xyz = pow(%s.xyz, vec3(%f, %f, %f)) * vec3(%f, %f, %f) - vec3(%f, %f, %f);\n",
                         fragcolor, srgb_pow, srgb_pow, srgb_pow, srgb_mul_high, srgb_mul_high, srgb_mul_high,
@@ -3640,7 +4130,27 @@
      * -1/(e-s) and e/(e-s) respectively.
      */
-    if(This->baseShader.hex_version < WINED3DPS_VERSION(3,0)) {
-        shader_addline(buffer, "float Fog = clamp(gl_FogFragCoord * gl_Fog.start + gl_Fog.end, 0.0, 1.0);\n");
-        shader_addline(buffer, "%s.xyz = mix(gl_Fog.color.xyz, %s.xyz, Fog);\n", fragcolor, fragcolor);
+    if (reg_maps->shader_version.major < 3)
+    {
+        switch(args->fog) {
+            case FOG_OFF: break;
+            case FOG_LINEAR:
+                shader_addline(buffer, "float fogstart = -1.0 / (gl_Fog.end - gl_Fog.start);\n");
+                shader_addline(buffer, "float fogend = gl_Fog.end * -fogstart;\n");
+                shader_addline(buffer, "float Fog = clamp(gl_FogFragCoord * fogstart + fogend, 0.0, 1.0);\n");
+                shader_addline(buffer, "%s.xyz = mix(gl_Fog.color.xyz, %s.xyz, Fog);\n", fragcolor, fragcolor);
+                break;
+            case FOG_EXP:
+                /* Fog = e^(-gl_Fog.density * gl_FogFragCoord) */
+                shader_addline(buffer, "float Fog = exp(-gl_Fog.density * gl_FogFragCoord);\n");
+                shader_addline(buffer, "Fog = clamp(Fog, 0.0, 1.0);\n");
+                shader_addline(buffer, "%s.xyz = mix(gl_Fog.color.xyz, %s.xyz, Fog);\n", fragcolor, fragcolor);
+                break;
+            case FOG_EXP2:
+                /* Fog = e^(-(gl_Fog.density * gl_FogFragCoord)^2) */
+                shader_addline(buffer, "float Fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord);\n");
+                shader_addline(buffer, "Fog = clamp(Fog, 0.0, 1.0);\n");
+                shader_addline(buffer, "%s.xyz = mix(gl_Fog.color.xyz, %s.xyz, Fog);\n", fragcolor, fragcolor);
+                break;
+        }
     }
 
@@ -3656,5 +4166,7 @@
 }
 
-static void shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer) {
+static GLuint shader_glsl_generate_vshader(IWineD3DVertexShader *iface,
+        SHADER_BUFFER *buffer, const struct vs_compile_args *args)
+{
     IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
     const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
@@ -3668,19 +4180,23 @@
 
     /* Base Declarations */
-    shader_generate_glsl_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION);
+    shader_generate_glsl_declarations( (IWineD3DBaseShader*) This, reg_maps, buffer, &GLINFO_LOCATION, NULL);
 
     /* Base Shader Body */
-    shader_generate_main( (IWineD3DBaseShader*) This, buffer, reg_maps, function);
+    shader_generate_main((IWineD3DBaseShader*)This, buffer, reg_maps, function);
 
     /* Unpack 3.0 outputs */
-    if (This->baseShader.hex_version >= WINED3DVS_VERSION(3,0)) {
-        shader_addline(buffer, "order_ps_input(OUT);\n");
-    } else {
-        shader_addline(buffer, "order_ps_input();\n");
-    }
-
-    /* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
-    if (!reg_maps->fog)
+    if (reg_maps->shader_version.major >= 3) shader_addline(buffer, "order_ps_input(OUT);\n");
+    else shader_addline(buffer, "order_ps_input();\n");
+
+    /* The D3DRS_FOGTABLEMODE render state defines if the shader-generated fog coord is used
+     * or if the fragment depth is used. If the fragment depth is used(FOGTABLEMODE != NONE),
+     * the fog frag coord is thrown away. If the fog frag coord is used, but not written by
+     * the shader, it is set to 0.0(fully fogged, since start = 1.0, end = 0.0)
+     */
+    if(args->fog_src == VS_FOG_Z) {
         shader_addline(buffer, "gl_FogFragCoord = gl_Position.z;\n");
+    } else if (!reg_maps->fog) {
+        shader_addline(buffer, "gl_FogFragCoord = 0.0;\n");
+    }
 
     /* Write the final position.
@@ -3709,6 +4225,5 @@
     print_glsl_info_log(&GLINFO_LOCATION, shader_obj);
 
-    /* Store the shader object */
-    This->prgId = shader_obj;
+    return shader_obj;
 }
 
@@ -3745,4 +4260,6 @@
     else
         pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
+
+    pCaps->MaxPixelShaderConst = GL_LIMITS(pshader_constantsF);
 
     /* FIXME: The following line is card dependent. -8.0 to 8.0 is the
@@ -3852,5 +4369,5 @@
     /* WINED3DSIH_TEXDP3TEX     */ pshader_glsl_texdp3tex,
     /* WINED3DSIH_TEXKILL       */ pshader_glsl_texkill,
-    /* WINED3DSIH_TEXLDD        */ NULL,
+    /* WINED3DSIH_TEXLDD        */ shader_glsl_texldd,
     /* WINED3DSIH_TEXLDL        */ shader_glsl_texldl,
     /* WINED3DSIH_TEXM3x2DEPTH  */ pshader_glsl_texm3x2depth,
@@ -3873,7 +4390,8 @@
     shader_glsl_select_depth_blt,
     shader_glsl_deselect_depth_blt,
+    shader_glsl_update_float_vertex_constants,
+    shader_glsl_update_float_pixel_constants,
     shader_glsl_load_constants,
-    shader_glsl_cleanup,
-    shader_glsl_color_correction,
+    shader_glsl_load_np2fixup_constants,
     shader_glsl_destroy,
     shader_glsl_alloc,
@@ -3884,3 +4402,4 @@
     shader_glsl_get_caps,
     shader_glsl_color_fixup_supported,
+    shader_glsl_add_instruction_modifiers,
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/indexbuffer.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/indexbuffer.c	(revision 19677)
+++ 	(revision )
@@ -1,241 +1,0 @@
-/*
- * IWineD3DIndexBuffer Implementation
- *
- * Copyright 2002-2004 Jason Edmeades
- * Copyright 2003-2004 Raphael Junqueira
- * Copyright 2004 Christian Costa
- * Copyright 2005 Oliver Stieber
- * Copyright 2007 Stefan Dösinger for CodeWeavers
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/*
- * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
- * other than GPL or LGPL is available it will apply instead, Sun elects to use only
- * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
- * a choice of LGPL license versions is made available with the language indicating
- * that LGPLv2 or any later version may be used, or where a choice of which version
- * of the LGPL is applied is otherwise unspecified.
- */
-
-#include "config.h"
-#include "wined3d_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION This->resource.wineD3DDevice->adapter->gl_info
-
-/* *******************************************
-   IWineD3DIndexBuffer IUnknown parts follow
-   ******************************************* */
-static HRESULT WINAPI IWineD3DIndexBufferImpl_QueryInterface(IWineD3DIndexBuffer *iface, REFIID riid, LPVOID *ppobj)
-{
-    IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
-    TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
-    if (IsEqualGUID(riid, &IID_IUnknown)
-        || IsEqualGUID(riid, &IID_IWineD3DBase)
-        || IsEqualGUID(riid, &IID_IWineD3DResource)
-        || IsEqualGUID(riid, &IID_IWineD3DIndexBuffer)){
-        IUnknown_AddRef(iface);
-        *ppobj = This;
-        return S_OK;
-    }
-    *ppobj = NULL;
-    return E_NOINTERFACE;
-}
-
-static ULONG WINAPI IWineD3DIndexBufferImpl_AddRef(IWineD3DIndexBuffer *iface) {
-    IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
-    ULONG ref = InterlockedIncrement(&This->resource.ref);
-    TRACE("(%p) : AddRef increasing from %d\n", This, ref - 1);
-    return ref;
-}
-
-static ULONG WINAPI IWineD3DIndexBufferImpl_Release(IWineD3DIndexBuffer *iface) {
-    IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
-    ULONG ref = InterlockedDecrement(&This->resource.ref);
-    TRACE("(%p) : Releasing from %d\n", This, ref + 1);
-    if (ref == 0) {
-        if(This->vbo) {
-            IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-
-            ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-            ENTER_GL();
-            /* No need to manually unset the buffer. glDeleteBuffers unsets it for the current context,
-             * but not for other contexts. However, because the d3d buffer is destroyed the app has to
-             * unset it before doing the next draw, thus dirtifying the index buffer state and forcing
-             * binding a new buffer
-             */
-            GL_EXTCALL(glDeleteBuffersARB(1, &This->vbo));
-            checkGLcall("glDeleteBuffersARB");
-            LEAVE_GL();
-        }
-
-        resource_cleanup((IWineD3DResource *)iface);
-        HeapFree(GetProcessHeap(), 0, This);
-    }
-    return ref;
-}
-
-/* ****************************************************
-   IWineD3DIndexBuffer IWineD3DResource parts follow
-   **************************************************** */
-static HRESULT WINAPI IWineD3DIndexBufferImpl_GetDevice(IWineD3DIndexBuffer *iface, IWineD3DDevice** ppDevice) {
-    return resource_get_device((IWineD3DResource *)iface, ppDevice);
-}
-
-static HRESULT WINAPI IWineD3DIndexBufferImpl_SetPrivateData(IWineD3DIndexBuffer *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
-    return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
-}
-
-static HRESULT WINAPI IWineD3DIndexBufferImpl_GetPrivateData(IWineD3DIndexBuffer *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
-    return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
-}
-
-static HRESULT WINAPI IWineD3DIndexBufferImpl_FreePrivateData(IWineD3DIndexBuffer *iface, REFGUID refguid) {
-    return resource_free_private_data((IWineD3DResource *)iface, refguid);
-}
-
-static DWORD WINAPI IWineD3DIndexBufferImpl_SetPriority(IWineD3DIndexBuffer *iface, DWORD PriorityNew) {
-    return resource_set_priority((IWineD3DResource *)iface, PriorityNew);
-}
-
-static DWORD WINAPI IWineD3DIndexBufferImpl_GetPriority(IWineD3DIndexBuffer *iface) {
-    return resource_get_priority((IWineD3DResource *)iface);
-}
-
-static void WINAPI IWineD3DIndexBufferImpl_PreLoad(IWineD3DIndexBuffer *iface) {
-    FIXME("iface %p stub!\n", iface);
-}
-
-static void WINAPI IWineD3DIndexBufferImpl_UnLoad(IWineD3DIndexBuffer *iface) {
-    IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *) iface;
-    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    TRACE("(%p)\n", This);
-
-    /* This is easy: The whole content is shadowed in This->resource.allocatedMemory,
-     * so we only have to destroy the vbo. Only do it if we have a vbo, which implies
-     * that vbos are supported.
-     * (TODO: Make a IWineD3DBuffer base class for index and vertex buffers and share
-     * this code. Also needed for D3D10)
-     */
-    if(This->vbo) {
-        ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-        ENTER_GL();
-        GL_EXTCALL(glDeleteBuffersARB(1, &This->vbo));
-        checkGLcall("glDeleteBuffersARB");
-        LEAVE_GL();
-        This->vbo = 0;
-    }
-}
-
-static WINED3DRESOURCETYPE WINAPI IWineD3DIndexBufferImpl_GetType(IWineD3DIndexBuffer *iface) {
-    return resource_get_type((IWineD3DResource *)iface);
-}
-
-static HRESULT WINAPI IWineD3DIndexBufferImpl_GetParent(IWineD3DIndexBuffer *iface, IUnknown **pParent) {
-    return resource_get_parent((IWineD3DResource *)iface, pParent);
-}
-
-/* ******************************************************
-   IWineD3DIndexBuffer IWineD3DIndexBuffer parts follow
-   ****************************************************** */
-static HRESULT WINAPI IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffer *iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags) {
-    IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
-    TRACE("(%p) : offset %d, size %d, Flags=%x\n", This, OffsetToLock, SizeToLock, Flags);
-
-    InterlockedIncrement(&This->lockcount);
-    *ppbData = This->resource.allocatedMemory + OffsetToLock;
-
-    if(Flags & (WINED3DLOCK_READONLY | WINED3DLOCK_NO_DIRTY_UPDATE) || This->vbo == 0) {
-        return WINED3D_OK;
-    }
-
-    if(This->dirtystart != This->dirtyend) {
-        if(This->dirtystart > OffsetToLock) This->dirtystart = OffsetToLock;
-        if(SizeToLock) {
-            if(This->dirtyend < OffsetToLock + SizeToLock) This->dirtyend = OffsetToLock + SizeToLock;
-        } else {
-            This->dirtyend = This->resource.size;
-        }
-    } else {
-        This->dirtystart = OffsetToLock;
-        if(SizeToLock)
-            This->dirtyend = OffsetToLock + SizeToLock;
-        else
-            This->dirtyend = This->resource.size;
-    }
-
-    return WINED3D_OK;
-}
-static HRESULT WINAPI IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface) {
-    IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
-    unsigned long locks = InterlockedDecrement(&This->lockcount);
-    TRACE("(%p)\n", This);
-
-    /* For now load in unlock */
-    if(locks == 0 && This->vbo && (This->dirtyend - This->dirtystart) > 0) {
-        IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-
-        ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-
-        ENTER_GL();
-        GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, This->vbo));
-        checkGLcall("glBindBufferARB");
-        GL_EXTCALL(glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB,
-                This->dirtystart, This->dirtyend - This->dirtystart, This->resource.allocatedMemory + This->dirtystart));
-        checkGLcall("glBufferSubDataARB");
-        LEAVE_GL();
-        This->dirtystart = 0;
-        This->dirtyend = 0;
-        /* TODO: Move loading into preload when the buffer is used, that avoids dirtifying the state */
-        IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER);
-    }
-    return WINED3D_OK;
-}
-static HRESULT WINAPI IWineD3DIndexBufferImpl_GetDesc(IWineD3DIndexBuffer *iface, WINED3DINDEXBUFFER_DESC *pDesc) {
-    IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
-
-    TRACE("(%p)\n", This);
-    pDesc->Format = This->resource.format;
-    pDesc->Type   = This->resource.resourceType;
-    pDesc->Usage  = This->resource.usage;
-    pDesc->Pool   = This->resource.pool;
-    pDesc->Size   = This->resource.size;
-    return WINED3D_OK;
-}
-
-const IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl =
-{
-    /* IUnknown */
-    IWineD3DIndexBufferImpl_QueryInterface,
-    IWineD3DIndexBufferImpl_AddRef,
-    IWineD3DIndexBufferImpl_Release,
-    /* IWineD3DResource */
-    IWineD3DIndexBufferImpl_GetParent,
-    IWineD3DIndexBufferImpl_GetDevice,
-    IWineD3DIndexBufferImpl_SetPrivateData,
-    IWineD3DIndexBufferImpl_GetPrivateData,
-    IWineD3DIndexBufferImpl_FreePrivateData,
-    IWineD3DIndexBufferImpl_SetPriority,
-    IWineD3DIndexBufferImpl_GetPriority,
-    IWineD3DIndexBufferImpl_PreLoad,
-    IWineD3DIndexBufferImpl_UnLoad,
-    IWineD3DIndexBufferImpl_GetType,
-    /* IWineD3DIndexBuffer */
-    IWineD3DIndexBufferImpl_Lock,
-    IWineD3DIndexBufferImpl_Unlock,
-    IWineD3DIndexBufferImpl_GetDesc
-};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/nvidia_texture_shader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/nvidia_texture_shader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/nvidia_texture_shader.c	(revision 19678)
@@ -29,4 +29,5 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #include "config.h"
 
@@ -51,5 +52,5 @@
 
     if(stateblock->textures[stage]) {
-        switch(stateblock->textureDimensions[stage]) {
+        switch(IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[stage])) {
             case GL_TEXTURE_2D:
                 glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, bumpmap ? GL_OFFSET_TEXTURE_2D_NV : GL_TEXTURE_2D);
@@ -461,30 +462,23 @@
 
 static void nvrc_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage];
-    BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map[stage];
+    BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map & (1 << stage);
 
     TRACE("Setting color op for stage %d\n", stage);
 
-    if (stateblock->pixelShader && stateblock->wineD3DDevice->ps_selected_mode != SHADER_NONE &&
-        ((IWineD3DPixelShaderImpl *)stateblock->pixelShader)->baseShader.function) {
-        /* Using a pixel shader? Don't care for anything here, the shader applying does it */
-        return;
-    }
+    /* Using a pixel shader? Don't care for anything here, the shader applying does it */
+    if (use_ps(stateblock)) return;
 
     if (stage != mapped_stage) WARN("Using non 1:1 mapping: %d -> %d!\n", stage, mapped_stage);
 
-    if (mapped_stage != -1) {
-        if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-            if (tex_used && mapped_stage >= GL_LIMITS(textures)) {
-                FIXME("Attempt to enable unsupported stage!\n");
-                return;
-            }
-            GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
-            checkGLcall("glActiveTextureARB");
-        } else if (stage > 0) {
-            WARN("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
+    if (mapped_stage != WINED3D_UNMAPPED_STAGE)
+    {
+        if (tex_used && mapped_stage >= GL_LIMITS(textures)) {
+            FIXME("Attempt to enable unsupported stage!\n");
             return;
         }
+        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
+        checkGLcall("glActiveTextureARB");
     }
 
@@ -497,5 +491,6 @@
     if(stage >= stateblock->lowest_disabled_stage) {
         TRACE("Stage disabled\n");
-        if (mapped_stage != -1) {
+        if (mapped_stage != WINED3D_UNMAPPED_STAGE)
+        {
             /* Disable everything here */
             glDisable(GL_TEXTURE_2D);
@@ -566,5 +561,5 @@
     * will take care of this business
     */
-    if(mapped_stage == -1 || mapped_stage >= GL_LIMITS(textures)) return;
+    if(mapped_stage == WINED3D_UNMAPPED_STAGE || mapped_stage >= GL_LIMITS(textures)) return;
     if(sampler >= stateblock->lowest_disabled_stage) return;
     if(isStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP))) return;
@@ -574,5 +569,5 @@
 
 static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage + 1];
     float mat[2][2];
@@ -810,4 +805,11 @@
     { STATE_RENDER(WINED3DRS_SRGBWRITEENABLE),            { STATE_PIXELSHADER,                                  apply_pixelshader   }, 0                               },
     { STATE_RENDER(WINED3DRS_TEXTUREFACTOR),              { STATE_RENDER(WINED3DRS_TEXTUREFACTOR),              nvrc_texfactor      }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGCOLOR),                   { STATE_RENDER(WINED3DRS_FOGCOLOR),                   state_fogcolor      }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGDENSITY),                 { STATE_RENDER(WINED3DRS_FOGDENSITY),                 state_fogdensity    }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGENABLE),                  { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart  }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGTABLEMODE),               { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart  }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGVERTEXMODE),              { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart  }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGSTART),                   { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend   }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGEND),                     { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend   }, 0                               },
     { STATE_SAMPLER(0),                                   { STATE_SAMPLER(0),                                   nvts_texdim         }, NV_TEXTURE_SHADER2              },
     { STATE_SAMPLER(0),                                   { STATE_SAMPLER(0),                                   sampler_texdim      }, 0                               },
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/palette.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/palette.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/palette.c	(revision 19678)
@@ -1,3 +1,3 @@
-/*		DirectDraw - IDirectPalette base interface
+/*              DirectDraw - IDirectPalette base interface
  *
  * Copyright 1997-2000 Marcus Meissner
@@ -28,4 +28,5 @@
  * of the LGPL is applied is otherwise unspecified.
  */
+
 #include "config.h"
 #include "winerror.h"
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/pixelshader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/pixelshader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/pixelshader.c	(revision 19678)
@@ -44,16 +44,45 @@
 #define GLINFO_LOCATION ((IWineD3DDeviceImpl *) This->baseShader.device)->adapter->gl_info
 
-#define GLNAME_REQUIRE_GLSL  ((const char *)1)
-
 static HRESULT  WINAPI IWineD3DPixelShaderImpl_QueryInterface(IWineD3DPixelShader *iface, REFIID riid, LPVOID *ppobj) {
-    return IWineD3DBaseShaderImpl_QueryInterface((IWineD3DBaseShader *) iface, riid, ppobj);
+    TRACE("iface %p, riid %s, ppobj %p\n", iface, debugstr_guid(riid), ppobj);
+
+    if (IsEqualGUID(riid, &IID_IWineD3DPixelShader)
+            || IsEqualGUID(riid, &IID_IWineD3DBaseShader)
+            || IsEqualGUID(riid, &IID_IWineD3DBase)
+            || IsEqualGUID(riid, &IID_IUnknown))
+    {
+        IUnknown_AddRef(iface);
+        *ppobj = iface;
+        return S_OK;
+    }
+
+    WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
+
+    *ppobj = NULL;
+    return E_NOINTERFACE;
 }
 
 static ULONG  WINAPI IWineD3DPixelShaderImpl_AddRef(IWineD3DPixelShader *iface) {
-    return IWineD3DBaseShaderImpl_AddRef((IWineD3DBaseShader *) iface);
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
+    ULONG refcount = InterlockedIncrement(&This->baseShader.ref);
+
+    TRACE("%p increasing refcount to %u\n", This, refcount);
+
+    return refcount;
 }
 
 static ULONG  WINAPI IWineD3DPixelShaderImpl_Release(IWineD3DPixelShader *iface) {
-    return IWineD3DBaseShaderImpl_Release((IWineD3DBaseShader *) iface);
+    IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
+    ULONG refcount = InterlockedDecrement(&This->baseShader.ref);
+
+    TRACE("%p decreasing refcount to %u\n", This, refcount);
+
+    if (!refcount)
+    {
+        shader_cleanup((IWineD3DBaseShader *)iface);
+        HeapFree(GetProcessHeap(), 0, This);
+    }
+
+    return refcount;
 }
 
@@ -94,202 +123,93 @@
     return WINED3DERR_INVALIDCALL;
   }
-  if (NULL == This->baseShader.function) { /* no function defined */
-    TRACE("(%p) : GetFunction no User Function defined using NULL to %p\n", This, pData);
-    (*(DWORD **) pData) = NULL;
-  } else {
-    if (This->baseShader.functionLength == 0) {
-
-    }
-    TRACE("(%p) : GetFunction copying to %p\n", This, pData);
-    memcpy(pData, This->baseShader.function, This->baseShader.functionLength);
-  }
+
+  TRACE("(%p) : GetFunction copying to %p\n", This, pData);
+  memcpy(pData, This->baseShader.function, This->baseShader.functionLength);
+
   return WINED3D_OK;
 }
 
-CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
-    /* Arithmetic */
-    {WINED3DSIO_NOP,          "nop",          "NOP",               0, 0, WINED3DSIH_NOP,          0,                      0                     },
-    {WINED3DSIO_MOV,          "mov",          "MOV",               1, 2, WINED3DSIH_MOV,          0,                      0                     },
-    {WINED3DSIO_ADD,          "add",          "ADD",               1, 3, WINED3DSIH_ADD,          0,                      0                     },
-    {WINED3DSIO_SUB,          "sub",          "SUB",               1, 3, WINED3DSIH_SUB,          0,                      0                     },
-    {WINED3DSIO_MAD,          "mad",          "MAD",               1, 4, WINED3DSIH_MAD,          0,                      0                     },
-    {WINED3DSIO_MUL,          "mul",          "MUL",               1, 3, WINED3DSIH_MUL,          0,                      0                     },
-    {WINED3DSIO_RCP,          "rcp",          "RCP",               1, 2, WINED3DSIH_RCP,          0,                      0                     },
-    {WINED3DSIO_RSQ,          "rsq",          "RSQ",               1, 2, WINED3DSIH_RSQ,          0,                      0                     },
-    {WINED3DSIO_DP3,          "dp3",          "DP3",               1, 3, WINED3DSIH_DP3,          0,                      0                     },
-    {WINED3DSIO_DP4,          "dp4",          "DP4",               1, 3, WINED3DSIH_DP4,          0,                      0                     },
-    {WINED3DSIO_MIN,          "min",          "MIN",               1, 3, WINED3DSIH_MIN,          0,                      0                     },
-    {WINED3DSIO_MAX,          "max",          "MAX",               1, 3, WINED3DSIH_MAX,          0,                      0                     },
-    {WINED3DSIO_SLT,          "slt",          "SLT",               1, 3, WINED3DSIH_SLT,          0,                      0                     },
-    {WINED3DSIO_SGE,          "sge",          "SGE",               1, 3, WINED3DSIH_SGE,          0,                      0                     },
-    {WINED3DSIO_ABS,          "abs",          "ABS",               1, 2, WINED3DSIH_ABS,          0,                      0                     },
-    {WINED3DSIO_EXP,          "exp",          "EX2",               1, 2, WINED3DSIH_EXP,          0,                      0                     },
-    {WINED3DSIO_LOG,          "log",          "LG2",               1, 2, WINED3DSIH_LOG,          0,                      0                     },
-    {WINED3DSIO_EXPP,         "expp",         "EXP",               1, 2, WINED3DSIH_EXPP,         0,                      0                     },
-    {WINED3DSIO_LOGP,         "logp",         "LOG",               1, 2, WINED3DSIH_LOGP,         0,                      0                     },
-    {WINED3DSIO_DST,          "dst",          "DST",               1, 3, WINED3DSIH_DST,          0,                      0                     },
-    {WINED3DSIO_LRP,          "lrp",          "LRP",               1, 4, WINED3DSIH_LRP,          0,                      0                     },
-    {WINED3DSIO_FRC,          "frc",          "FRC",               1, 2, WINED3DSIH_FRC,          0,                      0                     },
-    {WINED3DSIO_CND,          "cnd",          NULL,                1, 4, WINED3DSIH_CND,          WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,4)},
-    {WINED3DSIO_CMP,          "cmp",          NULL,                1, 4, WINED3DSIH_CMP,          WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(3,0)},
-    {WINED3DSIO_POW,          "pow",          "POW",               1, 3, WINED3DSIH_POW,          0,                      0                     },
-    {WINED3DSIO_CRS,          "crs",          "XPD",               1, 3, WINED3DSIH_CRS,          0,                      0                     },
-    {WINED3DSIO_NRM,          "nrm",          NULL,                1, 2, WINED3DSIH_NRM,          0,                      0                     },
-    {WINED3DSIO_SINCOS,       "sincos",       NULL,                1, 4, WINED3DSIH_SINCOS,       WINED3DPS_VERSION(2,0), WINED3DPS_VERSION(2,1)},
-    {WINED3DSIO_SINCOS,       "sincos",       "SCS",               1, 2, WINED3DSIH_SINCOS,       WINED3DPS_VERSION(3,0), -1                    },
-    {WINED3DSIO_DP2ADD,       "dp2add",       NULL,                1, 4, WINED3DSIH_DP2ADD,       WINED3DPS_VERSION(2,0), -1                    },
-    /* Matrix */
-    {WINED3DSIO_M4x4,         "m4x4",         "undefined",         1, 3, WINED3DSIH_M4x4,         0,                      0                     },
-    {WINED3DSIO_M4x3,         "m4x3",         "undefined",         1, 3, WINED3DSIH_M4x3,         0,                      0                     },
-    {WINED3DSIO_M3x4,         "m3x4",         "undefined",         1, 3, WINED3DSIH_M3x4,         0,                      0                     },
-    {WINED3DSIO_M3x3,         "m3x3",         "undefined",         1, 3, WINED3DSIH_M3x3,         0,                      0                     },
-    {WINED3DSIO_M3x2,         "m3x2",         "undefined",         1, 3, WINED3DSIH_M3x2,         0,                      0                     },
-    /* Register declarations */
-    {WINED3DSIO_DCL,          "dcl",          NULL,                0, 2, WINED3DSIH_DCL,          0,                      0                     },
-    /* Flow control - requires GLSL or software shaders */
-    {WINED3DSIO_REP ,         "rep",          NULL,                0, 1, WINED3DSIH_REP,          WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_ENDREP,       "endrep",       NULL,                0, 0, WINED3DSIH_ENDREP,       WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_IF,           "if",           NULL,                0, 1, WINED3DSIH_IF,           WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_IFC,          "ifc",          NULL,                0, 2, WINED3DSIH_IFC,          WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_ELSE,         "else",         NULL,                0, 0, WINED3DSIH_ELSE,         WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_ENDIF,        "endif",        NULL,                0, 0, WINED3DSIH_ENDIF,        WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_BREAK,        "break",        NULL,                0, 0, WINED3DSIH_BREAK,        WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_BREAKC,       "breakc",       NULL,                0, 2, WINED3DSIH_BREAKC,       WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_BREAKP,       "breakp",       GLNAME_REQUIRE_GLSL, 0, 1, WINED3DSIH_BREAKP,       0,                      0                     },
-    {WINED3DSIO_CALL,         "call",         NULL,                0, 1, WINED3DSIH_CALL,         WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_CALLNZ,       "callnz",       NULL,                0, 2, WINED3DSIH_CALLNZ,       WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_LOOP,         "loop",         NULL,                0, 2, WINED3DSIH_LOOP,         WINED3DPS_VERSION(3,0), -1                    },
-    {WINED3DSIO_RET,          "ret",          NULL,                0, 0, WINED3DSIH_RET,          WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_ENDLOOP,      "endloop",      NULL,                0, 0, WINED3DSIH_ENDLOOP,      WINED3DPS_VERSION(3,0), -1                    },
-    {WINED3DSIO_LABEL,        "label",        NULL,                0, 1, WINED3DSIH_LABEL,        WINED3DPS_VERSION(2,1), -1                    },
-    /* Constant definitions */
-    {WINED3DSIO_DEF,          "def",          "undefined",         1, 5, WINED3DSIH_DEF,          0,                      0                     },
-    {WINED3DSIO_DEFB,         "defb",         GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_DEFB,         0,                      0                     },
-    {WINED3DSIO_DEFI,         "defi",         GLNAME_REQUIRE_GLSL, 1, 5, WINED3DSIH_DEFI,         0,                      0                     },
-    /* Texture */
-    {WINED3DSIO_TEXCOORD,     "texcoord",     "undefined",         1, 1, WINED3DSIH_TEXCOORD,     0,                      WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXCOORD,     "texcrd",       "undefined",         1, 2, WINED3DSIH_TEXCOORD,     WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)},
-    {WINED3DSIO_TEXKILL,      "texkill",      "KIL",               1, 1, WINED3DSIH_TEXKILL,      WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(3,0)},
-    {WINED3DSIO_TEX,          "tex",          "undefined",         1, 1, WINED3DSIH_TEX,          0,                      WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEX,          "texld",        "undefined",         1, 2, WINED3DSIH_TEX,          WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)},
-    {WINED3DSIO_TEX,          "texld",        "undefined",         1, 3, WINED3DSIH_TEX,          WINED3DPS_VERSION(2,0), -1                    },
-    {WINED3DSIO_TEXBEM,       "texbem",       "undefined",         1, 2, WINED3DSIH_TEXBEM,       0,                      WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXBEML,      "texbeml",      GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_TEXBEML,      WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXREG2AR,    "texreg2ar",    "undefined",         1, 2, WINED3DSIH_TEXREG2AR,    WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXREG2GB,    "texreg2gb",    "undefined",         1, 2, WINED3DSIH_TEXREG2GB,    WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXREG2RGB,   "texreg2rgb",   "undefined",         1, 2, WINED3DSIH_TEXREG2RGB,   WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x2PAD,   "texm3x2pad",   "undefined",         1, 2, WINED3DSIH_TEXM3x2PAD,   WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x2TEX,   "texm3x2tex",   "undefined",         1, 2, WINED3DSIH_TEXM3x2TEX,   WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x3PAD,   "texm3x3pad",   "undefined",         1, 2, WINED3DSIH_TEXM3x3PAD,   WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x3DIFF,  "texm3x3diff",  GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_TEXM3x3DIFF,  WINED3DPS_VERSION(0,0), WINED3DPS_VERSION(0,0)},
-    {WINED3DSIO_TEXM3x3SPEC,  "texm3x3spec",  "undefined",         1, 3, WINED3DSIH_TEXM3x3SPEC,  WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x3VSPEC, "texm3x3vspec", "undefined",         1, 2, WINED3DSIH_TEXM3x3VSPEC, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x3TEX,   "texm3x3tex",   "undefined",         1, 2, WINED3DSIH_TEXM3x3TEX,   WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXDP3TEX,    "texdp3tex",    NULL,                1, 2, WINED3DSIH_TEXDP3TEX,    WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x2DEPTH, "texm3x2depth", GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_TEXM3x2DEPTH, WINED3DPS_VERSION(1,3), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXDP3,       "texdp3",       NULL,                1, 2, WINED3DSIH_TEXDP3,       WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXM3x3,      "texm3x3",      NULL,                1, 2, WINED3DSIH_TEXM3x3,      WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)},
-    {WINED3DSIO_TEXDEPTH,     "texdepth",     NULL,                1, 1, WINED3DSIH_TEXDEPTH,     WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)},
-    {WINED3DSIO_BEM,          "bem",          "undefined",         1, 3, WINED3DSIH_BEM,          WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)},
-    {WINED3DSIO_DSX,          "dsx",          NULL,                1, 2, WINED3DSIH_DSX,          WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_DSY,          "dsy",          NULL,                1, 2, WINED3DSIH_DSY,          WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_TEXLDD,       "texldd",       GLNAME_REQUIRE_GLSL, 1, 5, WINED3DSIH_TEXLDD,       WINED3DPS_VERSION(2,1), -1                    },
-    {WINED3DSIO_SETP,         "setp",         GLNAME_REQUIRE_GLSL, 1, 3, WINED3DSIH_SETP,         0,                      0                     },
-    {WINED3DSIO_TEXLDL,       "texldl",       NULL,                1, 3, WINED3DSIH_TEXLDL,       WINED3DPS_VERSION(3,0), -1                    },
-    {WINED3DSIO_PHASE,        "phase",        GLNAME_REQUIRE_GLSL, 0, 0, WINED3DSIH_PHASE,        0,                      0                     },
-    {0,                       NULL,           NULL,                0, 0, 0,                       0,                      0                     }
-};
-
-static void pshader_set_limits(
-      IWineD3DPixelShaderImpl *This) { 
-
-      This->baseShader.limits.attributes = 0;
-      This->baseShader.limits.address = 0;
-      This->baseShader.limits.packed_output = 0;
-
-      switch (This->baseShader.hex_version) {
-          case WINED3DPS_VERSION(1,0):
-          case WINED3DPS_VERSION(1,1):
-          case WINED3DPS_VERSION(1,2):
-          case WINED3DPS_VERSION(1,3): 
-                   This->baseShader.limits.temporary = 2;
-                   This->baseShader.limits.constant_float = 8;
-                   This->baseShader.limits.constant_int = 0;
-                   This->baseShader.limits.constant_bool = 0;
-                   This->baseShader.limits.texcoord = 4;
-                   This->baseShader.limits.sampler = 4;
-                   This->baseShader.limits.packed_input = 0;
-                   This->baseShader.limits.label = 0;
-                   break;
-
-          case WINED3DPS_VERSION(1,4):
-                   This->baseShader.limits.temporary = 6;
-                   This->baseShader.limits.constant_float = 8;
-                   This->baseShader.limits.constant_int = 0;
-                   This->baseShader.limits.constant_bool = 0;
-                   This->baseShader.limits.texcoord = 6;
-                   This->baseShader.limits.sampler = 6;
-                   This->baseShader.limits.packed_input = 0;
-                   This->baseShader.limits.label = 0;
-                   break;
-               
-          /* FIXME: temporaries must match D3DPSHADERCAPS2_0.NumTemps */ 
-          case WINED3DPS_VERSION(2,0):
-                   This->baseShader.limits.temporary = 32;
-                   This->baseShader.limits.constant_float = 32;
-                   This->baseShader.limits.constant_int = 16;
-                   This->baseShader.limits.constant_bool = 16;
-                   This->baseShader.limits.texcoord = 8;
-                   This->baseShader.limits.sampler = 16;
-                   This->baseShader.limits.packed_input = 0;
-                   break;
-
-          case WINED3DPS_VERSION(2,1):
-                   This->baseShader.limits.temporary = 32;
-                   This->baseShader.limits.constant_float = 32;
-                   This->baseShader.limits.constant_int = 16;
-                   This->baseShader.limits.constant_bool = 16;
-                   This->baseShader.limits.texcoord = 8;
-                   This->baseShader.limits.sampler = 16;
-                   This->baseShader.limits.packed_input = 0;
-                   This->baseShader.limits.label = 16;
-                   break;
-
-          case WINED3DPS_VERSION(3,0):
-                   This->baseShader.limits.temporary = 32;
-                   This->baseShader.limits.constant_float = 224;
-                   This->baseShader.limits.constant_int = 16;
-                   This->baseShader.limits.constant_bool = 16;
-                   This->baseShader.limits.texcoord = 0;
-                   This->baseShader.limits.sampler = 16;
-                   This->baseShader.limits.packed_input = 12;
-                   This->baseShader.limits.label = 16; /* FIXME: 2048 */
-                   break;
-
-          default: This->baseShader.limits.temporary = 32;
-                   This->baseShader.limits.constant_float = 32;
-                   This->baseShader.limits.constant_int = 16;
-                   This->baseShader.limits.constant_bool = 16;
-                   This->baseShader.limits.texcoord = 8;
-                   This->baseShader.limits.sampler = 16;
-                   This->baseShader.limits.packed_input = 0;
-                   This->baseShader.limits.label = 0;
-                   FIXME("Unrecognized pixel shader version %#x\n", 
-                       This->baseShader.hex_version);
-      }
-}
-
-/** Generate a pixel shader string using either GL_FRAGMENT_PROGRAM_ARB
-    or GLSL and send it to the card */
-static inline GLuint IWineD3DPixelShaderImpl_GenerateShader(
-    IWineD3DPixelShaderImpl *This) {
-    SHADER_BUFFER buffer;
-
-    buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
-    buffer.bsize = 0;
-    buffer.lineNo = 0;
-    buffer.newline = TRUE;
-
-    return ((IWineD3DDeviceImpl *)This->baseShader.device)->shader_backend->shader_generate_pshader((IWineD3DPixelShader *) This, &buffer);
+static void pshader_set_limits(IWineD3DPixelShaderImpl *This)
+{
+    DWORD shader_version = WINED3D_SHADER_VERSION(This->baseShader.reg_maps.shader_version.major,
+            This->baseShader.reg_maps.shader_version.minor);
+
+    This->baseShader.limits.attributes = 0;
+    This->baseShader.limits.address = 0;
+    This->baseShader.limits.packed_output = 0;
+
+    switch (shader_version)
+    {
+        case WINED3D_SHADER_VERSION(1,0):
+        case WINED3D_SHADER_VERSION(1,1):
+        case WINED3D_SHADER_VERSION(1,2):
+        case WINED3D_SHADER_VERSION(1,3):
+            This->baseShader.limits.temporary = 2;
+            This->baseShader.limits.constant_float = 8;
+            This->baseShader.limits.constant_int = 0;
+            This->baseShader.limits.constant_bool = 0;
+            This->baseShader.limits.texcoord = 4;
+            This->baseShader.limits.sampler = 4;
+            This->baseShader.limits.packed_input = 0;
+            This->baseShader.limits.label = 0;
+            break;
+
+        case WINED3D_SHADER_VERSION(1,4):
+            This->baseShader.limits.temporary = 6;
+            This->baseShader.limits.constant_float = 8;
+            This->baseShader.limits.constant_int = 0;
+            This->baseShader.limits.constant_bool = 0;
+            This->baseShader.limits.texcoord = 6;
+            This->baseShader.limits.sampler = 6;
+            This->baseShader.limits.packed_input = 0;
+            This->baseShader.limits.label = 0;
+            break;
+
+        /* FIXME: temporaries must match D3DPSHADERCAPS2_0.NumTemps */
+        case WINED3D_SHADER_VERSION(2,0):
+            This->baseShader.limits.temporary = 32;
+            This->baseShader.limits.constant_float = 32;
+            This->baseShader.limits.constant_int = 16;
+            This->baseShader.limits.constant_bool = 16;
+            This->baseShader.limits.texcoord = 8;
+            This->baseShader.limits.sampler = 16;
+            This->baseShader.limits.packed_input = 0;
+            break;
+
+        case WINED3D_SHADER_VERSION(2,1):
+            This->baseShader.limits.temporary = 32;
+            This->baseShader.limits.constant_float = 32;
+            This->baseShader.limits.constant_int = 16;
+            This->baseShader.limits.constant_bool = 16;
+            This->baseShader.limits.texcoord = 8;
+            This->baseShader.limits.sampler = 16;
+            This->baseShader.limits.packed_input = 0;
+            This->baseShader.limits.label = 16;
+            break;
+
+        case WINED3D_SHADER_VERSION(3,0):
+            This->baseShader.limits.temporary = 32;
+            This->baseShader.limits.constant_float = 224;
+            This->baseShader.limits.constant_int = 16;
+            This->baseShader.limits.constant_bool = 16;
+            This->baseShader.limits.texcoord = 0;
+            This->baseShader.limits.sampler = 16;
+            This->baseShader.limits.packed_input = 12;
+            This->baseShader.limits.label = 16; /* FIXME: 2048 */
+            break;
+
+        default:
+            This->baseShader.limits.temporary = 32;
+            This->baseShader.limits.constant_float = 32;
+            This->baseShader.limits.constant_int = 16;
+            This->baseShader.limits.constant_bool = 16;
+            This->baseShader.limits.texcoord = 8;
+            This->baseShader.limits.sampler = 16;
+            This->baseShader.limits.packed_input = 0;
+            This->baseShader.limits.label = 0;
+            FIXME("Unrecognized pixel shader version %u.%u\n",
+                    This->baseShader.reg_maps.shader_version.major,
+                    This->baseShader.reg_maps.shader_version.minor);
+    }
 }
 
@@ -297,11 +217,27 @@
 
     IWineD3DPixelShaderImpl *This =(IWineD3DPixelShaderImpl *)iface;
-    IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *) This->baseShader.device;
+    unsigned int i, highest_reg_used = 0, num_regs_used = 0;
+    shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
+    const struct wined3d_shader_frontend *fe;
+    HRESULT hr;
 
     TRACE("(%p) : pFunction %p\n", iface, pFunction);
 
+    fe = shader_select_frontend(*pFunction);
+    if (!fe)
+    {
+        FIXME("Unable to find frontend for shader.\n");
+        return WINED3DERR_INVALIDCALL;
+    }
+    This->baseShader.frontend = fe;
+    This->baseShader.frontend_data = fe->shader_init(pFunction);
+    if (!This->baseShader.frontend_data)
+    {
+        FIXME("Failed to initialize frontend.\n");
+        return WINED3DERR_INVALIDCALL;
+    }
+
     /* First pass: trace shader */
-    shader_trace_init((IWineD3DBaseShader*) This, pFunction);
-    pshader_set_limits(This);
+    if (TRACE_ON(d3d_shader)) shader_trace_init(fe, This->baseShader.frontend_data, pFunction);
 
     /* Initialize immediate constant lists */
@@ -310,70 +246,103 @@
     list_init(&This->baseShader.constantsI);
 
-    if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) > 1) {
-        shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
-        HRESULT hr;
-        unsigned int i, j, highest_reg_used = 0, num_regs_used = 0;
-
-        /* Second pass: figure out which registers are used, what the semantics are, etc.. */
-        memset(reg_maps, 0, sizeof(shader_reg_maps));
-        hr = shader_get_registers_used((IWineD3DBaseShader*) This, reg_maps,
-            This->semantics_in, NULL, pFunction, NULL);
-        if (FAILED(hr)) return hr;
-        /* FIXME: validate reg_maps against OpenGL */
-
-        for(i = 0; i < MAX_REG_INPUT; i++) {
-            if(This->input_reg_used[i]) {
-                num_regs_used++;
-                highest_reg_used = i;
-            }
-        }
-
-        /* Don't do any register mapping magic if it is not needed, or if we can't
-         * achieve anything anyway
-         */
-        if(highest_reg_used < (GL_LIMITS(glsl_varyings) / 4) ||
-           num_regs_used > (GL_LIMITS(glsl_varyings) / 4) ) {
-            if(num_regs_used > (GL_LIMITS(glsl_varyings) / 4)) {
-                /* This happens with relative addressing. The input mapper function
-                 * warns about this if the higher registers are declared too, so
-                 * don't write a FIXME here
-                 */
-                WARN("More varying registers used than supported\n");
-            }
-
-            for(i = 0; i < MAX_REG_INPUT; i++) {
-                This->input_reg_map[i] = i;
-            }
-            This->declared_in_count = highest_reg_used + 1;
-        } else {
-            j = 0;
-            for(i = 0; i < MAX_REG_INPUT; i++) {
-                if(This->input_reg_used[i]) {
-                    This->input_reg_map[i] = j;
-                    j++;
-                } else {
-                    This->input_reg_map[i] = -1;
-                }
-            }
-            This->declared_in_count = j;
-        }
-    }
+    /* Second pass: figure out which registers are used, what the semantics are, etc.. */
+    hr = shader_get_registers_used((IWineD3DBaseShader *)This, fe, reg_maps, This->semantics_in, NULL, pFunction,
+                                    GL_LIMITS(pshader_constantsF));
+    if (FAILED(hr)) return hr;
+
+    pshader_set_limits(This);
+
+    for (i = 0; i < MAX_REG_INPUT; ++i)
+    {
+        if (This->input_reg_used[i])
+        {
+            ++num_regs_used;
+            highest_reg_used = i;
+        }
+    }
+
+    /* Don't do any register mapping magic if it is not needed, or if we can't
+     * achieve anything anyway */
+    if (highest_reg_used < (GL_LIMITS(glsl_varyings) / 4)
+            || num_regs_used > (GL_LIMITS(glsl_varyings) / 4))
+    {
+        if (num_regs_used > (GL_LIMITS(glsl_varyings) / 4))
+        {
+            /* This happens with relative addressing. The input mapper function
+             * warns about this if the higher registers are declared too, so
+             * don't write a FIXME here */
+            WARN("More varying registers used than supported\n");
+        }
+
+        for (i = 0; i < MAX_REG_INPUT; ++i)
+        {
+            This->input_reg_map[i] = i;
+        }
+
+        This->declared_in_count = highest_reg_used + 1;
+    }
+    else
+    {
+        This->declared_in_count = 0;
+        for (i = 0; i < MAX_REG_INPUT; ++i)
+        {
+            if (This->input_reg_used[i]) This->input_reg_map[i] = This->declared_in_count++;
+            else This->input_reg_map[i] = ~0U;
+        }
+    }
+
     This->baseShader.load_local_constsF = FALSE;
 
-    This->baseShader.shader_mode = deviceImpl->ps_selected_mode;
-
     TRACE("(%p) : Copying the function\n", This);
-    if (NULL != pFunction) {
-        void *function;
-
-        function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
-        if (!function) return E_OUTOFMEMORY;
-        memcpy(function, pFunction, This->baseShader.functionLength);
-        This->baseShader.function = function;
-    } else {
-        This->baseShader.function = NULL;
-    }
+
+    This->baseShader.function = HeapAlloc(GetProcessHeap(), 0, This->baseShader.functionLength);
+    if (!This->baseShader.function) return E_OUTOFMEMORY;
+    memcpy(This->baseShader.function, pFunction, This->baseShader.functionLength);
 
     return WINED3D_OK;
+}
+
+static void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures)
+{
+    WINED3DSAMPLER_TEXTURE_TYPE *sampler_type = reg_maps->sampler_type;
+    unsigned int i;
+
+    if (reg_maps->shader_version.major != 1) return;
+
+    for (i = 0; i < max(MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS); ++i)
+    {
+        /* We don't sample from this sampler */
+        if (!sampler_type[i]) continue;
+
+        if (!textures[i])
+        {
+            ERR("No texture bound to sampler %u, using 2D\n", i);
+            sampler_type[i] = WINED3DSTT_2D;
+            continue;
+        }
+
+        switch (IWineD3DBaseTexture_GetTextureDimensions(textures[i]))
+        {
+            case GL_TEXTURE_RECTANGLE_ARB:
+            case GL_TEXTURE_2D:
+                /* We have to select between texture rectangles and 2D textures later because 2.0 and
+                 * 3.0 shaders only have WINED3DSTT_2D as well */
+                sampler_type[i] = WINED3DSTT_2D;
+                break;
+
+            case GL_TEXTURE_3D:
+                sampler_type[i] = WINED3DSTT_VOLUME;
+                break;
+
+            case GL_TEXTURE_CUBE_MAP_ARB:
+                sampler_type[i] = WINED3DSTT_CUBE;
+                break;
+
+            default:
+                FIXME("Unrecognized texture type %#x, using 2D\n",
+                        IWineD3DBaseTexture_GetTextureDimensions(textures[i]));
+                sampler_type[i] = WINED3DSTT_2D;
+        }
+    }
 }
 
@@ -381,44 +350,22 @@
 {
     CONST DWORD *function = This->baseShader.function;
-    HRESULT hr;
     GLuint retval;
+    SHADER_BUFFER buffer;
+    IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device;
 
     TRACE("(%p) : function %p\n", This, function);
 
-    hr = IWineD3DPixelShader_UpdateSamplers((IWineD3DPixelShader *) This);
-    if(FAILED(hr)) {
-        ERR("Failed to update sampler information\n");
-        return 0;
-    }
-
-    /* Reset fields tracking stateblock values being hardcoded in the shader */
-    This->baseShader.num_sampled_samplers = 0;
+    pixelshader_update_samplers(&This->baseShader.reg_maps,
+            ((IWineD3DDeviceImpl *)This->baseShader.device)->stateBlock->textures);
 
     /* Generate the HW shader */
     TRACE("(%p) : Generating hardware program\n", This);
-    retval = IWineD3DPixelShaderImpl_GenerateShader(This);
-
-    This->baseShader.is_compiled = TRUE;
+    This->cur_args = args;
+    shader_buffer_init(&buffer);
+    retval = device->shader_backend->shader_generate_pshader((IWineD3DPixelShader *)This, &buffer, args);
+    shader_buffer_free(&buffer);
+    This->cur_args = NULL;
 
     return retval;
-}
-
-static HRESULT WINAPI IWineD3DPixelShaderImpl_UpdateSamplers(IWineD3DPixelShader *iface) {
-    IWineD3DPixelShaderImpl *This =(IWineD3DPixelShaderImpl *)iface;
-
-    if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1) {
-        IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
-        shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
-        HRESULT hr;
-
-        /* Second pass: figure out which registers are used, what the semantics are, etc.. */
-        memset(reg_maps, 0, sizeof(shader_reg_maps));
-        hr = shader_get_registers_used((IWineD3DBaseShader*)This, reg_maps,
-                                        This->semantics_in, NULL, This->baseShader.function, deviceImpl->stateBlock);
-        return hr;
-        /* FIXME: validate reg_maps against OpenGL */
-    } else {
-        return WINED3D_OK;
-    }
 }
 
@@ -434,5 +381,4 @@
     IWineD3DPixelShaderImpl_SetFunction,
     /*** IWineD3DPixelShader methods ***/
-    IWineD3DPixelShaderImpl_UpdateSamplers,
     IWineD3DPixelShaderImpl_GetDevice,
     IWineD3DPixelShaderImpl_GetFunction
@@ -440,29 +386,64 @@
 
 void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct ps_compile_args *args) {
-    UINT i, sampler;
+    UINT i;
     IWineD3DBaseTextureImpl *tex;
 
+    memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set */
     args->srgb_correction = stateblock->renderState[WINED3DRS_SRGBWRITEENABLE] ? 1 : 0;
-
-    memset(args->color_fixup, 0, sizeof(args->color_fixup));
-    for(i = 0; i < shader->baseShader.num_sampled_samplers; i++) {
-        sampler = shader->baseShader.sampled_samplers[i];
-        tex = (IWineD3DBaseTextureImpl *) stateblock->textures[sampler];
+    args->np2_fixup = 0;
+
+    for(i = 0; i < MAX_FRAGMENT_SAMPLERS; i++) {
+        if (!shader->baseShader.reg_maps.sampler_type[i]) continue;
+        tex = (IWineD3DBaseTextureImpl *) stateblock->textures[i];
         if(!tex) {
-            args->color_fixup[sampler] = COLOR_FIXUP_IDENTITY;
+            args->color_fixup[i] = COLOR_FIXUP_IDENTITY;
             continue;
         }
-        args->color_fixup[sampler] = tex->baseTexture.shader_color_fixup;
-    }
-    if(shader->baseShader.hex_version >= WINED3DPS_VERSION(3,0)) {
-        if(((IWineD3DDeviceImpl *) shader->baseShader.device)->strided_streams.u.s.position_transformed) {
+        args->color_fixup[i] = tex->resource.format_desc->color_fixup;
+
+        /* Flag samplers that need NP2 texcoord fixup. */
+        if(!tex->baseTexture.pow2Matrix_identity) {
+            args->np2_fixup |= (1 << i);
+        }
+    }
+    if (shader->baseShader.reg_maps.shader_version.major >= 3)
+    {
+        if (((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.position_transformed)
+        {
             args->vp_mode = pretransformed;
-        } else if(use_vs((IWineD3DDeviceImpl *) shader->baseShader.device)) {
+        }
+        else if (use_vs(stateblock))
+        {
             args->vp_mode = vertexshader;
         } else {
             args->vp_mode = fixedfunction;
         }
+        args->fog = FOG_OFF;
     } else {
         args->vp_mode = vertexshader;
+        if(stateblock->renderState[WINED3DRS_FOGENABLE]) {
+            switch(stateblock->renderState[WINED3DRS_FOGTABLEMODE]) {
+                case WINED3DFOG_NONE:
+                    if (((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.position_transformed
+                            || use_vs(stateblock))
+                    {
+                        args->fog = FOG_LINEAR;
+                        break;
+                    }
+                    switch(stateblock->renderState[WINED3DRS_FOGVERTEXMODE]) {
+                        case WINED3DFOG_NONE: /* Drop through */
+                        case WINED3DFOG_LINEAR: args->fog = FOG_LINEAR; break;
+                        case WINED3DFOG_EXP:    args->fog = FOG_EXP;    break;
+                        case WINED3DFOG_EXP2:   args->fog = FOG_EXP2;   break;
+                    }
+                    break;
+
+                case WINED3DFOG_LINEAR: args->fog = FOG_LINEAR; break;
+                case WINED3DFOG_EXP:    args->fog = FOG_EXP;    break;
+                case WINED3DFOG_EXP2:   args->fog = FOG_EXP2;   break;
+            }
+        } else {
+            args->fog = FOG_OFF;
+        }
     }
 }
@@ -471,8 +452,10 @@
 {
     UINT i;
-    struct ps_compiled_shader *old_array;
+    DWORD new_size;
+    struct ps_compiled_shader *new_array;
 
     /* Usually we have very few GL shaders for each d3d shader(just 1 or maybe 2),
-     * so a linear search is more performant than a hashmap
+     * so a linear search is more performant than a hashmap or a binary search
+     * (cache coherency etc)
      */
     for(i = 0; i < shader->num_gl_shaders; i++) {
@@ -483,15 +466,21 @@
 
     TRACE("No matching GL shader found, compiling a new shader\n");
-    old_array = shader->gl_shaders;
-    if(old_array) {
-        shader->gl_shaders = HeapReAlloc(GetProcessHeap(), 0, old_array,
-                                         (shader->num_gl_shaders + 1) * sizeof(*shader->gl_shaders));
-    } else {
-        shader->gl_shaders = HeapAlloc(GetProcessHeap(), 0, sizeof(*shader->gl_shaders));
-    }
-
-    if(!shader->gl_shaders) {
-        ERR("Out of memory\n");
-        return 0;
+    if(shader->shader_array_size == shader->num_gl_shaders) {
+        if (shader->num_gl_shaders)
+        {
+            new_size = shader->shader_array_size + max(1, shader->shader_array_size / 2);
+            new_array = HeapReAlloc(GetProcessHeap(), 0, shader->gl_shaders,
+                                    new_size * sizeof(*shader->gl_shaders));
+        } else {
+            new_array = HeapAlloc(GetProcessHeap(), 0, sizeof(*shader->gl_shaders));
+            new_size = 1;
+        }
+
+        if(!new_array) {
+            ERR("Out of memory\n");
+            return 0;
+        }
+        shader->gl_shaders = new_array;
+        shader->shader_array_size = new_size;
     }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/query.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/query.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/query.c	(revision 19678)
@@ -29,5 +29,4 @@
  */
 
-
 #include "config.h"
 #include "wined3d_private.h"
@@ -73,6 +72,16 @@
     if (ref == 0) {
         ENTER_GL();
+        /* Queries are specific to the GL context that created them. Not
+         * deleting the query will obviously leak it, but that's still better
+         * than potentially deleting a different query with the same id in this
+         * context, and (still) leaking the actual query. */
         if(This->type == WINED3DQUERYTYPE_EVENT) {
-            if(GL_SUPPORT(APPLE_FENCE)) {
+            if (((WineQueryEventData *)This->extendedData)->ctx != This->wineD3DDevice->activeContext
+                    || This->wineD3DDevice->activeContext->tid != GetCurrentThreadId())
+            {
+                FIXME("Query was created in a different context, skipping deletion\n");
+            }
+            else if(GL_SUPPORT(APPLE_FENCE))
+            {
                 GL_EXTCALL(glDeleteFencesAPPLE(1, &((WineQueryEventData *)(This->extendedData))->fenceId));
                 checkGLcall("glDeleteFencesAPPLE");
@@ -82,6 +91,14 @@
             }
         } else if(This->type == WINED3DQUERYTYPE_OCCLUSION && GL_SUPPORT(ARB_OCCLUSION_QUERY)) {
-            GL_EXTCALL(glDeleteQueriesARB(1, &((WineQueryOcclusionData *)(This->extendedData))->queryId));
-            checkGLcall("glDeleteQueriesARB");
+            if (((WineQueryOcclusionData *)This->extendedData)->ctx != This->wineD3DDevice->activeContext
+                    || This->wineD3DDevice->activeContext->tid != GetCurrentThreadId())
+            {
+                FIXME("Query was created in a different context, skipping deletion\n");
+            }
+            else
+            {
+                GL_EXTCALL(glDeleteQueriesARB(1, &((WineQueryOcclusionData *)(This->extendedData))->queryId));
+                checkGLcall("glDeleteQueriesARB");
+            }
         }
         LEAVE_GL();
@@ -125,5 +142,5 @@
     {
 
-        WINED3DDEVINFO_VCACHE *data = (WINED3DDEVINFO_VCACHE *)pData;
+        WINED3DDEVINFO_VCACHE *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VCACHE\n", This);
         if(pData == NULL || dwSize == 0) break;
@@ -137,5 +154,5 @@
     case WINED3DQUERYTYPE_RESOURCEMANAGER:
     {
-        WINED3DDEVINFO_RESOURCEMANAGER *data = (WINED3DDEVINFO_RESOURCEMANAGER *)pData;
+        WINED3DDEVINFO_RESOURCEMANAGER *data = pData;
         int i;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_RESOURCEMANAGER\n", This);
@@ -161,5 +178,5 @@
     case WINED3DQUERYTYPE_VERTEXSTATS:
     {
-        WINED3DDEVINFO_VERTEXSTATS *data = (WINED3DDEVINFO_VERTEXSTATS *)pData;
+        WINED3DDEVINFO_VERTEXSTATS *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VERTEXSTATS\n", This);
         if(pData == NULL || dwSize == 0) break;
@@ -195,5 +212,5 @@
     case WINED3DQUERYTYPE_PIPELINETIMINGS:
     {
-        WINED3DDEVINFO_PIPELINETIMINGS *data = (WINED3DDEVINFO_PIPELINETIMINGS *)pData;
+        WINED3DDEVINFO_PIPELINETIMINGS *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_PIPELINETIMINGS\n", This);
         if(pData == NULL || dwSize == 0) break;
@@ -207,5 +224,5 @@
     case WINED3DQUERYTYPE_INTERFACETIMINGS:
     {
-        WINED3DDEVINFO_INTERFACETIMINGS *data = (WINED3DDEVINFO_INTERFACETIMINGS *)pData;
+        WINED3DDEVINFO_INTERFACETIMINGS *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_INTERFACETIMINGS\n", This);
 
@@ -221,5 +238,5 @@
     case WINED3DQUERYTYPE_VERTEXTIMINGS:
     {
-        WINED3DDEVINFO_STAGETIMINGS *data = (WINED3DDEVINFO_STAGETIMINGS *)pData;
+        WINED3DDEVINFO_STAGETIMINGS *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VERTEXTIMINGS\n", This);
 
@@ -232,5 +249,5 @@
     case WINED3DQUERYTYPE_PIXELTIMINGS:
     {
-        WINED3DDEVINFO_STAGETIMINGS *data = (WINED3DDEVINFO_STAGETIMINGS *)pData;
+        WINED3DDEVINFO_STAGETIMINGS *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_PIXELTIMINGS\n", This);
 
@@ -242,5 +259,5 @@
     case WINED3DQUERYTYPE_BANDWIDTHTIMINGS:
     {
-        WINED3DDEVINFO_BANDWIDTHTIMINGS *data = (WINED3DDEVINFO_BANDWIDTHTIMINGS *)pData;
+        WINED3DDEVINFO_BANDWIDTHTIMINGS *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_BANDWIDTHTIMINGS\n", This);
 
@@ -255,5 +272,5 @@
     case WINED3DQUERYTYPE_CACHEUTILIZATION:
     {
-        WINED3DDEVINFO_CACHEUTILIZATION *data = (WINED3DDEVINFO_CACHEUTILIZATION *)pData;
+        WINED3DDEVINFO_CACHEUTILIZATION *data = pData;
         FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_CACHEUTILIZATION\n", This);
 
@@ -278,46 +295,66 @@
 static HRESULT  WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
     IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
+    GLuint queryId = ((WineQueryOcclusionData *)This->extendedData)->queryId;
     DWORD* data = pData;
+    GLuint available;
+    GLuint samples;
     HRESULT res;
+
     TRACE("(%p) : type D3DQUERY_OCCLUSION, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags);
 
-    if(This->state == QUERY_CREATED) {
+    if (This->state == QUERY_CREATED)
+    {
         /* D3D allows GetData on a new query, OpenGL doesn't. So just invent the data ourselves */
         TRACE("Query wasn't yet started, returning S_OK\n");
-        res = S_OK;
         if(data) *data = 0;
-    } else if(This->state == QUERY_BUILDING) {
+        return S_OK;
+    }
+
+    if (This->state == QUERY_BUILDING)
+    {
         /* Msdn says this returns an error, but our tests show that S_FALSE is returned */
         TRACE("Query is building, returning S_FALSE\n");
+        return S_FALSE;
+    }
+
+    if (!GL_SUPPORT(ARB_OCCLUSION_QUERY))
+    {
+        WARN("(%p) : Occlusion queries not supported. Returning 1.\n", This);
+        *data = 1;
+        return S_OK;
+    }
+
+    if (((WineQueryOcclusionData *)This->extendedData)->ctx != This->wineD3DDevice->activeContext
+            || This->wineD3DDevice->activeContext->tid != GetCurrentThreadId())
+    {
+        FIXME("%p Wrong context, returning 1.\n", This);
+        *data = 1;
+        return S_OK;
+    }
+
+    ENTER_GL();
+
+    GL_EXTCALL(glGetQueryObjectuivARB(queryId, GL_QUERY_RESULT_AVAILABLE_ARB, &available));
+    checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT_AVAILABLE)\n");
+    TRACE("(%p) : available %d.\n", This, available);
+
+    if (available)
+    {
+        if (data)
+        {
+            GL_EXTCALL(glGetQueryObjectuivARB(queryId, GL_QUERY_RESULT_ARB, &samples));
+            checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT)\n");
+            TRACE("(%p) : Returning %d samples.\n", This, samples);
+            *data = samples;
+        }
+        res = S_OK;
+    }
+    else
+    {
         res = S_FALSE;
-    } else if (GL_SUPPORT(ARB_OCCLUSION_QUERY) &&
-        ((WineQueryOcclusionData *)This->extendedData)->ctx == This->wineD3DDevice->activeContext &&
-                This->wineD3DDevice->activeContext->tid == GetCurrentThreadId()) {
-        GLuint available;
-        GLuint samples;
-        GLuint queryId = ((WineQueryOcclusionData *)This->extendedData)->queryId;
-
-        ENTER_GL();
-        GL_EXTCALL(glGetQueryObjectuivARB(queryId, GL_QUERY_RESULT_AVAILABLE_ARB, &available));
-        checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT_AVAILABLE)\n");
-        TRACE("(%p) : available %d.\n", This, available);
-
-        if (available) {
-            if(data) {
-                GL_EXTCALL(glGetQueryObjectuivARB(queryId, GL_QUERY_RESULT_ARB, &samples));
-                checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT)\n");
-                TRACE("(%p) : Returning %d samples.\n", This, samples);
-                *data = samples;
-            }
-            res = S_OK;
-        } else {
-            res = S_FALSE;
-        }
-        LEAVE_GL();
-    } else {
-        WARN("(%p) : Occlusion queries not supported, or wrong context. Returning 1.\n", This);
-        *data = 1;
-        res = S_OK;
-    }
+    }
+
+    LEAVE_GL();
+
     return res;
 }
@@ -334,5 +371,5 @@
     } if(ctx != This->wineD3DDevice->activeContext || ctx->tid != GetCurrentThreadId()) {
         /* See comment in IWineD3DQuery::Issue, event query codeblock */
-        WARN("Query context not active, reporting GPU idle\n");
+        FIXME("Query context not active, reporting GPU idle\n");
         *data = TRUE;
     } else if(GL_SUPPORT(APPLE_FENCE)) {
@@ -470,5 +507,5 @@
 
         if(ctx != This->wineD3DDevice->activeContext || ctx->tid != GetCurrentThreadId()) {
-            WARN("Not the owning context, can't start query\n");
+            FIXME("Not the owning context, can't start query\n");
         } else {
             ENTER_GL();
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/resource.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/resource.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/resource.c	(revision 19678)
@@ -35,5 +35,49 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION ((IWineD3DImpl *)(((IWineD3DDeviceImpl *)This->resource.wineD3DDevice)->wineD3D))->gl_info
+
+HRESULT resource_init(struct IWineD3DResourceClass *resource, WINED3DRESOURCETYPE resource_type,
+        IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc,
+        WINED3DPOOL pool, IUnknown *parent)
+{
+    resource->wineD3DDevice = device;
+    resource->parent = parent;
+    resource->resourceType = resource_type;
+    resource->ref = 1;
+    resource->pool = pool;
+    resource->format_desc = format_desc;
+    resource->usage = usage;
+    resource->size = size;
+    resource->priority = 0;
+    list_init(&resource->privateData);
+
+    if (size)
+    {
+        resource->heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + RESOURCE_ALIGNMENT);
+        if (!resource->heapMemory)
+        {
+            ERR("Out of memory!\n");
+            return WINED3DERR_OUTOFVIDEOMEMORY;
+        }
+    }
+    else
+    {
+        resource->heapMemory = NULL;
+    }
+    resource->allocatedMemory = (BYTE *)(((ULONG_PTR)resource->heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1));
+
+    /* Check that we have enough video ram left */
+    if (pool == WINED3DPOOL_DEFAULT)
+    {
+        if (size > IWineD3DDevice_GetAvailableTextureMem((IWineD3DDevice *)device))
+        {
+            ERR("Out of adapter memory\n");
+            HeapFree(GetProcessHeap(), 0, resource->heapMemory);
+            return WINED3DERR_OUTOFVIDEOMEMORY;
+        }
+        WineD3DAdapterChangeGLRam(device, size);
+    }
+
+    return WINED3D_OK;
+}
 
 void resource_cleanup(IWineD3DResource *iface)
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader_sm1.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader_sm1.c	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader_sm1.c	(revision 19678)
@@ -0,0 +1,579 @@
+/*
+ * Copyright 2002-2003 Jason Edmeades
+ * Copyright 2002-2003 Raphael Junqueira
+ * Copyright 2004 Christian Costa
+ * Copyright 2005 Oliver Stieber
+ * Copyright 2006 Ivan Gyurdiev
+ * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
+ * Copyright 2009 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include "wined3d_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
+
+/* DCL usage masks */
+#define WINED3DSP_DCL_USAGE_SHIFT               0
+#define WINED3DSP_DCL_USAGE_MASK                (0xf << WINED3DSP_DCL_USAGE_SHIFT)
+#define WINED3DSP_DCL_USAGEINDEX_SHIFT          16
+#define WINED3DSP_DCL_USAGEINDEX_MASK           (0xf << WINED3DSP_DCL_USAGEINDEX_SHIFT)
+
+/* DCL sampler type */
+#define WINED3DSP_TEXTURETYPE_SHIFT             27
+#define WINED3DSP_TEXTURETYPE_MASK              (0xf << WINED3DSP_TEXTURETYPE_SHIFT)
+
+/* Opcode-related masks */
+#define WINED3DSI_OPCODE_MASK                   0x0000ffff
+
+#define WINED3D_OPCODESPECIFICCONTROL_SHIFT     16
+#define WINED3D_OPCODESPECIFICCONTROL_MASK      (0xff << WINED3D_OPCODESPECIFICCONTROL_SHIFT)
+
+#define WINED3DSI_INSTLENGTH_SHIFT              24
+#define WINED3DSI_INSTLENGTH_MASK               (0xf << WINED3DSI_INSTLENGTH_SHIFT)
+
+#define WINED3DSI_COISSUE                       (1 << 30)
+
+#define WINED3DSI_COMMENTSIZE_SHIFT             16
+#define WINED3DSI_COMMENTSIZE_MASK              (0x7fff << WINED3DSI_COMMENTSIZE_SHIFT)
+
+#define WINED3DSHADER_INSTRUCTION_PREDICATED    (1 << 28)
+
+/* Register number mask */
+#define WINED3DSP_REGNUM_MASK                   0x000007ff
+
+/* Register type masks  */
+#define WINED3DSP_REGTYPE_SHIFT                 28
+#define WINED3DSP_REGTYPE_MASK                  (0x7 << WINED3DSP_REGTYPE_SHIFT)
+#define WINED3DSP_REGTYPE_SHIFT2                8
+#define WINED3DSP_REGTYPE_MASK2                 (0x18 << WINED3DSP_REGTYPE_SHIFT2)
+
+/* Relative addressing mask */
+#define WINED3DSHADER_ADDRESSMODE_SHIFT         13
+#define WINED3DSHADER_ADDRESSMODE_MASK          (1 << WINED3DSHADER_ADDRESSMODE_SHIFT)
+
+/* Destination modifier mask */
+#define WINED3DSP_DSTMOD_SHIFT                  20
+#define WINED3DSP_DSTMOD_MASK                   (0xf << WINED3DSP_DSTMOD_SHIFT)
+
+/* Destination shift mask */
+#define WINED3DSP_DSTSHIFT_SHIFT                24
+#define WINED3DSP_DSTSHIFT_MASK                 (0xf << WINED3DSP_DSTSHIFT_SHIFT)
+
+/* Write mask */
+#define WINED3D_SM1_WRITEMASK_SHIFT             16
+#define WINED3D_SM1_WRITEMASK_MASK              (0xf << WINED3D_SM1_WRITEMASK_SHIFT)
+
+/* Swizzle mask */
+#define WINED3DSP_SWIZZLE_SHIFT                 16
+#define WINED3DSP_SWIZZLE_MASK                  (0xff << WINED3DSP_SWIZZLE_SHIFT)
+
+/* Source modifier mask */
+#define WINED3DSP_SRCMOD_SHIFT                  24
+#define WINED3DSP_SRCMOD_MASK                   (0xf << WINED3DSP_SRCMOD_SHIFT)
+
+#define WINED3DSP_END                           0x0000ffff
+
+#define WINED3D_SM1_VERSION_MAJOR(version)      (((version) >> 8) & 0xff)
+#define WINED3D_SM1_VERSION_MINOR(version)      (((version) >> 0) & 0xff)
+
+enum WINED3DSHADER_ADDRESSMODE_TYPE
+{
+    WINED3DSHADER_ADDRMODE_ABSOLUTE = 0 << WINED3DSHADER_ADDRESSMODE_SHIFT,
+    WINED3DSHADER_ADDRMODE_RELATIVE = 1 << WINED3DSHADER_ADDRESSMODE_SHIFT,
+};
+
+struct wined3d_sm1_opcode_info
+{
+    unsigned int opcode;
+    UINT dst_count;
+    UINT param_count;
+    enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+    DWORD min_version;
+    DWORD max_version;
+};
+
+struct wined3d_sm1_data
+{
+    struct wined3d_shader_version shader_version;
+    const struct wined3d_sm1_opcode_info *opcode_table;
+};
+
+/* This table is not order or position dependent. */
+static const struct wined3d_sm1_opcode_info vs_opcode_table[] =
+{
+    /* Arithmetic */
+    {WINED3DSIO_NOP,          0, 0, WINED3DSIH_NOP,          0,                           0                          },
+    {WINED3DSIO_MOV,          1, 2, WINED3DSIH_MOV,          0,                           0                          },
+    {WINED3DSIO_MOVA,         1, 2, WINED3DSIH_MOVA,         WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_ADD,          1, 3, WINED3DSIH_ADD,          0,                           0                          },
+    {WINED3DSIO_SUB,          1, 3, WINED3DSIH_SUB,          0,                           0                          },
+    {WINED3DSIO_MAD,          1, 4, WINED3DSIH_MAD,          0,                           0                          },
+    {WINED3DSIO_MUL,          1, 3, WINED3DSIH_MUL,          0,                           0                          },
+    {WINED3DSIO_RCP,          1, 2, WINED3DSIH_RCP,          0,                           0                          },
+    {WINED3DSIO_RSQ,          1, 2, WINED3DSIH_RSQ,          0,                           0                          },
+    {WINED3DSIO_DP3,          1, 3, WINED3DSIH_DP3,          0,                           0                          },
+    {WINED3DSIO_DP4,          1, 3, WINED3DSIH_DP4,          0,                           0                          },
+    {WINED3DSIO_MIN,          1, 3, WINED3DSIH_MIN,          0,                           0                          },
+    {WINED3DSIO_MAX,          1, 3, WINED3DSIH_MAX,          0,                           0                          },
+    {WINED3DSIO_SLT,          1, 3, WINED3DSIH_SLT,          0,                           0                          },
+    {WINED3DSIO_SGE,          1, 3, WINED3DSIH_SGE,          0,                           0                          },
+    {WINED3DSIO_ABS,          1, 2, WINED3DSIH_ABS,          0,                           0                          },
+    {WINED3DSIO_EXP,          1, 2, WINED3DSIH_EXP,          0,                           0                          },
+    {WINED3DSIO_LOG,          1, 2, WINED3DSIH_LOG,          0,                           0                          },
+    {WINED3DSIO_EXPP,         1, 2, WINED3DSIH_EXPP,         0,                           0                          },
+    {WINED3DSIO_LOGP,         1, 2, WINED3DSIH_LOGP,         0,                           0                          },
+    {WINED3DSIO_LIT,          1, 2, WINED3DSIH_LIT,          0,                           0                          },
+    {WINED3DSIO_DST,          1, 3, WINED3DSIH_DST,          0,                           0                          },
+    {WINED3DSIO_LRP,          1, 4, WINED3DSIH_LRP,          0,                           0                          },
+    {WINED3DSIO_FRC,          1, 2, WINED3DSIH_FRC,          0,                           0                          },
+    {WINED3DSIO_POW,          1, 3, WINED3DSIH_POW,          0,                           0                          },
+    {WINED3DSIO_CRS,          1, 3, WINED3DSIH_CRS,          0,                           0                          },
+    {WINED3DSIO_SGN,          1, 2, WINED3DSIH_SGN,          0,                           0                          },
+    {WINED3DSIO_NRM,          1, 2, WINED3DSIH_NRM,          0,                           0                          },
+    {WINED3DSIO_SINCOS,       1, 4, WINED3DSIH_SINCOS,       WINED3D_SHADER_VERSION(2,0), WINED3D_SHADER_VERSION(2,1)},
+    {WINED3DSIO_SINCOS,       1, 2, WINED3DSIH_SINCOS,       WINED3D_SHADER_VERSION(3,0), -1                         },
+    /* Matrix */
+    {WINED3DSIO_M4x4,         1, 3, WINED3DSIH_M4x4,         0,                           0                          },
+    {WINED3DSIO_M4x3,         1, 3, WINED3DSIH_M4x3,         0,                           0                          },
+    {WINED3DSIO_M3x4,         1, 3, WINED3DSIH_M3x4,         0,                           0                          },
+    {WINED3DSIO_M3x3,         1, 3, WINED3DSIH_M3x3,         0,                           0                          },
+    {WINED3DSIO_M3x2,         1, 3, WINED3DSIH_M3x2,         0,                           0                          },
+    /* Declare registers */
+    {WINED3DSIO_DCL,          0, 2, WINED3DSIH_DCL,          0,                           0                          },
+    /* Constant definitions */
+    {WINED3DSIO_DEF,          1, 5, WINED3DSIH_DEF,          0,                           0                          },
+    {WINED3DSIO_DEFB,         1, 2, WINED3DSIH_DEFB,         0,                           0                          },
+    {WINED3DSIO_DEFI,         1, 5, WINED3DSIH_DEFI,         0,                           0                          },
+    /* Flow control */
+    {WINED3DSIO_REP,          0, 1, WINED3DSIH_REP,          WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_ENDREP,       0, 0, WINED3DSIH_ENDREP,       WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_IF,           0, 1, WINED3DSIH_IF,           WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_IFC,          0, 2, WINED3DSIH_IFC,          WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_ELSE,         0, 0, WINED3DSIH_ELSE,         WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_ENDIF,        0, 0, WINED3DSIH_ENDIF,        WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_BREAK,        0, 0, WINED3DSIH_BREAK,        WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_BREAKC,       0, 2, WINED3DSIH_BREAKC,       WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_BREAKP,       0, 1, WINED3DSIH_BREAKP,       0,                           0                          },
+    {WINED3DSIO_CALL,         0, 1, WINED3DSIH_CALL,         WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_CALLNZ,       0, 2, WINED3DSIH_CALLNZ,       WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_LOOP,         0, 2, WINED3DSIH_LOOP,         WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_RET,          0, 0, WINED3DSIH_RET,          WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_ENDLOOP,      0, 0, WINED3DSIH_ENDLOOP,      WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_LABEL,        0, 1, WINED3DSIH_LABEL,        WINED3D_SHADER_VERSION(2,0), -1                         },
+
+    {WINED3DSIO_SETP,         1, 3, WINED3DSIH_SETP,         0,                           0                          },
+    {WINED3DSIO_TEXLDL,       1, 3, WINED3DSIH_TEXLDL,       WINED3D_SHADER_VERSION(3,0), -1                         },
+    {0,                       0, 0, WINED3DSIH_TABLE_SIZE,   0,                           0                          },
+};
+
+static const struct wined3d_sm1_opcode_info ps_opcode_table[] =
+{
+    /* Arithmetic */
+    {WINED3DSIO_NOP,          0, 0, WINED3DSIH_NOP,          0,                           0                          },
+    {WINED3DSIO_MOV,          1, 2, WINED3DSIH_MOV,          0,                           0                          },
+    {WINED3DSIO_ADD,          1, 3, WINED3DSIH_ADD,          0,                           0                          },
+    {WINED3DSIO_SUB,          1, 3, WINED3DSIH_SUB,          0,                           0                          },
+    {WINED3DSIO_MAD,          1, 4, WINED3DSIH_MAD,          0,                           0                          },
+    {WINED3DSIO_MUL,          1, 3, WINED3DSIH_MUL,          0,                           0                          },
+    {WINED3DSIO_RCP,          1, 2, WINED3DSIH_RCP,          0,                           0                          },
+    {WINED3DSIO_RSQ,          1, 2, WINED3DSIH_RSQ,          0,                           0                          },
+    {WINED3DSIO_DP3,          1, 3, WINED3DSIH_DP3,          0,                           0                          },
+    {WINED3DSIO_DP4,          1, 3, WINED3DSIH_DP4,          0,                           0                          },
+    {WINED3DSIO_MIN,          1, 3, WINED3DSIH_MIN,          0,                           0                          },
+    {WINED3DSIO_MAX,          1, 3, WINED3DSIH_MAX,          0,                           0                          },
+    {WINED3DSIO_SLT,          1, 3, WINED3DSIH_SLT,          0,                           0                          },
+    {WINED3DSIO_SGE,          1, 3, WINED3DSIH_SGE,          0,                           0                          },
+    {WINED3DSIO_ABS,          1, 2, WINED3DSIH_ABS,          0,                           0                          },
+    {WINED3DSIO_EXP,          1, 2, WINED3DSIH_EXP,          0,                           0                          },
+    {WINED3DSIO_LOG,          1, 2, WINED3DSIH_LOG,          0,                           0                          },
+    {WINED3DSIO_EXPP,         1, 2, WINED3DSIH_EXPP,         0,                           0                          },
+    {WINED3DSIO_LOGP,         1, 2, WINED3DSIH_LOGP,         0,                           0                          },
+    {WINED3DSIO_DST,          1, 3, WINED3DSIH_DST,          0,                           0                          },
+    {WINED3DSIO_LRP,          1, 4, WINED3DSIH_LRP,          0,                           0                          },
+    {WINED3DSIO_FRC,          1, 2, WINED3DSIH_FRC,          0,                           0                          },
+    {WINED3DSIO_CND,          1, 4, WINED3DSIH_CND,          WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,4)},
+    {WINED3DSIO_CMP,          1, 4, WINED3DSIH_CMP,          WINED3D_SHADER_VERSION(1,2), WINED3D_SHADER_VERSION(3,0)},
+    {WINED3DSIO_POW,          1, 3, WINED3DSIH_POW,          0,                           0                          },
+    {WINED3DSIO_CRS,          1, 3, WINED3DSIH_CRS,          0,                           0                          },
+    {WINED3DSIO_NRM,          1, 2, WINED3DSIH_NRM,          0,                           0                          },
+    {WINED3DSIO_SINCOS,       1, 4, WINED3DSIH_SINCOS,       WINED3D_SHADER_VERSION(2,0), WINED3D_SHADER_VERSION(2,1)},
+    {WINED3DSIO_SINCOS,       1, 2, WINED3DSIH_SINCOS,       WINED3D_SHADER_VERSION(3,0), -1                         },
+    {WINED3DSIO_DP2ADD,       1, 4, WINED3DSIH_DP2ADD,       WINED3D_SHADER_VERSION(2,0), -1                         },
+    /* Matrix */
+    {WINED3DSIO_M4x4,         1, 3, WINED3DSIH_M4x4,         0,                           0                          },
+    {WINED3DSIO_M4x3,         1, 3, WINED3DSIH_M4x3,         0,                           0                          },
+    {WINED3DSIO_M3x4,         1, 3, WINED3DSIH_M3x4,         0,                           0                          },
+    {WINED3DSIO_M3x3,         1, 3, WINED3DSIH_M3x3,         0,                           0                          },
+    {WINED3DSIO_M3x2,         1, 3, WINED3DSIH_M3x2,         0,                           0                          },
+    /* Register declarations */
+    {WINED3DSIO_DCL,          0, 2, WINED3DSIH_DCL,          0,                           0                          },
+    /* Flow control */
+    {WINED3DSIO_REP,          0, 1, WINED3DSIH_REP,          WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_ENDREP,       0, 0, WINED3DSIH_ENDREP,       WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_IF,           0, 1, WINED3DSIH_IF,           WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_IFC,          0, 2, WINED3DSIH_IFC,          WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_ELSE,         0, 0, WINED3DSIH_ELSE,         WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_ENDIF,        0, 0, WINED3DSIH_ENDIF,        WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_BREAK,        0, 0, WINED3DSIH_BREAK,        WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_BREAKC,       0, 2, WINED3DSIH_BREAKC,       WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_BREAKP,       0, 1, WINED3DSIH_BREAKP,       0,                           0                          },
+    {WINED3DSIO_CALL,         0, 1, WINED3DSIH_CALL,         WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_CALLNZ,       0, 2, WINED3DSIH_CALLNZ,       WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_LOOP,         0, 2, WINED3DSIH_LOOP,         WINED3D_SHADER_VERSION(3,0), -1                         },
+    {WINED3DSIO_RET,          0, 0, WINED3DSIH_RET,          WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_ENDLOOP,      0, 0, WINED3DSIH_ENDLOOP,      WINED3D_SHADER_VERSION(3,0), -1                         },
+    {WINED3DSIO_LABEL,        0, 1, WINED3DSIH_LABEL,        WINED3D_SHADER_VERSION(2,1), -1                         },
+    /* Constant definitions */
+    {WINED3DSIO_DEF,          1, 5, WINED3DSIH_DEF,          0,                           0                          },
+    {WINED3DSIO_DEFB,         1, 2, WINED3DSIH_DEFB,         0,                           0                          },
+    {WINED3DSIO_DEFI,         1, 5, WINED3DSIH_DEFI,         0,                           0                          },
+    /* Texture */
+    {WINED3DSIO_TEXCOORD,     1, 1, WINED3DSIH_TEXCOORD,     0,                           WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXCOORD,     1, 2, WINED3DSIH_TEXCOORD,     WINED3D_SHADER_VERSION(1,4), WINED3D_SHADER_VERSION(1,4)},
+    {WINED3DSIO_TEXKILL,      1, 1, WINED3DSIH_TEXKILL,      WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(3,0)},
+    {WINED3DSIO_TEX,          1, 1, WINED3DSIH_TEX,          0,                           WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEX,          1, 2, WINED3DSIH_TEX,          WINED3D_SHADER_VERSION(1,4), WINED3D_SHADER_VERSION(1,4)},
+    {WINED3DSIO_TEX,          1, 3, WINED3DSIH_TEX,          WINED3D_SHADER_VERSION(2,0), -1                         },
+    {WINED3DSIO_TEXBEM,       1, 2, WINED3DSIH_TEXBEM,       0,                           WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXBEML,      1, 2, WINED3DSIH_TEXBEML,      WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXREG2AR,    1, 2, WINED3DSIH_TEXREG2AR,    WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXREG2GB,    1, 2, WINED3DSIH_TEXREG2GB,    WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXREG2RGB,   1, 2, WINED3DSIH_TEXREG2RGB,   WINED3D_SHADER_VERSION(1,2), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x2PAD,   1, 2, WINED3DSIH_TEXM3x2PAD,   WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x2TEX,   1, 2, WINED3DSIH_TEXM3x2TEX,   WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x3PAD,   1, 2, WINED3DSIH_TEXM3x3PAD,   WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x3DIFF,  1, 2, WINED3DSIH_TEXM3x3DIFF,  WINED3D_SHADER_VERSION(0,0), WINED3D_SHADER_VERSION(0,0)},
+    {WINED3DSIO_TEXM3x3SPEC,  1, 3, WINED3DSIH_TEXM3x3SPEC,  WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x3VSPEC, 1, 2, WINED3DSIH_TEXM3x3VSPEC, WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x3TEX,   1, 2, WINED3DSIH_TEXM3x3TEX,   WINED3D_SHADER_VERSION(1,0), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXDP3TEX,    1, 2, WINED3DSIH_TEXDP3TEX,    WINED3D_SHADER_VERSION(1,2), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x2DEPTH, 1, 2, WINED3DSIH_TEXM3x2DEPTH, WINED3D_SHADER_VERSION(1,3), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXDP3,       1, 2, WINED3DSIH_TEXDP3,       WINED3D_SHADER_VERSION(1,2), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXM3x3,      1, 2, WINED3DSIH_TEXM3x3,      WINED3D_SHADER_VERSION(1,2), WINED3D_SHADER_VERSION(1,3)},
+    {WINED3DSIO_TEXDEPTH,     1, 1, WINED3DSIH_TEXDEPTH,     WINED3D_SHADER_VERSION(1,4), WINED3D_SHADER_VERSION(1,4)},
+    {WINED3DSIO_BEM,          1, 3, WINED3DSIH_BEM,          WINED3D_SHADER_VERSION(1,4), WINED3D_SHADER_VERSION(1,4)},
+    {WINED3DSIO_DSX,          1, 2, WINED3DSIH_DSX,          WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_DSY,          1, 2, WINED3DSIH_DSY,          WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_TEXLDD,       1, 5, WINED3DSIH_TEXLDD,       WINED3D_SHADER_VERSION(2,1), -1                         },
+    {WINED3DSIO_SETP,         1, 3, WINED3DSIH_SETP,         0,                           0                          },
+    {WINED3DSIO_TEXLDL,       1, 3, WINED3DSIH_TEXLDL,       WINED3D_SHADER_VERSION(3,0), -1                         },
+    {WINED3DSIO_PHASE,        0, 0, WINED3DSIH_PHASE,        0,                           0                          },
+    {0,                       0, 0, WINED3DSIH_TABLE_SIZE,   0,                           0                          },
+};
+
+/* Read a parameter opcode from the input stream,
+ * and possibly a relative addressing token.
+ * Return the number of tokens read */
+static int shader_get_param(const struct wined3d_sm1_data *priv, const DWORD *ptr, DWORD *token, DWORD *addr_token)
+{
+    UINT count = 1;
+
+    *token = *ptr;
+
+    /* PS >= 3.0 have relative addressing (with token)
+     * VS >= 2.0 have relative addressing (with token)
+     * VS >= 1.0 < 2.0 have relative addressing (without token)
+     * The version check below should work in general */
+    if (*ptr & WINED3DSHADER_ADDRMODE_RELATIVE)
+    {
+        if (priv->shader_version.major < 2)
+        {
+            *addr_token = (1 << 31)
+                    | ((WINED3DSPR_ADDR << WINED3DSP_REGTYPE_SHIFT2) & WINED3DSP_REGTYPE_MASK2)
+                    | ((WINED3DSPR_ADDR << WINED3DSP_REGTYPE_SHIFT) & WINED3DSP_REGTYPE_MASK)
+                    | (WINED3DSP_NOSWIZZLE << WINED3DSP_SWIZZLE_SHIFT);
+        }
+        else
+        {
+            *addr_token = *(ptr + 1);
+            ++count;
+        }
+    }
+
+    return count;
+}
+
+static const struct wined3d_sm1_opcode_info *shader_get_opcode(const struct wined3d_sm1_data *priv, DWORD code)
+{
+    DWORD shader_version = WINED3D_SHADER_VERSION(priv->shader_version.major, priv->shader_version.minor);
+    const struct wined3d_sm1_opcode_info *opcode_table = priv->opcode_table;
+    DWORD i = 0;
+
+    while (opcode_table[i].handler_idx != WINED3DSIH_TABLE_SIZE)
+    {
+        if ((code & WINED3DSI_OPCODE_MASK) == opcode_table[i].opcode
+                && shader_version >= opcode_table[i].min_version
+                && (!opcode_table[i].max_version || shader_version <= opcode_table[i].max_version))
+        {
+            return &opcode_table[i];
+        }
+        ++i;
+    }
+
+    FIXME("Unsupported opcode %#x(%d) masked %#x, shader version %#x\n",
+            code, code, code & WINED3DSI_OPCODE_MASK, shader_version);
+
+    return NULL;
+}
+
+/* Return the number of parameters to skip for an opcode */
+static int shader_skip_opcode(const struct wined3d_sm1_data *priv,
+        const struct wined3d_sm1_opcode_info *opcode_info, DWORD opcode_token)
+{
+   /* Shaders >= 2.0 may contain address tokens, but fortunately they
+    * have a useful length mask - use it here. Shaders 1.0 contain no such tokens */
+    return (priv->shader_version.major >= 2)
+            ? ((opcode_token & WINED3DSI_INSTLENGTH_MASK) >> WINED3DSI_INSTLENGTH_SHIFT) : opcode_info->param_count;
+}
+
+static void shader_parse_src_param(DWORD param, const struct wined3d_shader_src_param *rel_addr,
+        struct wined3d_shader_src_param *src)
+{
+    src->reg.type = ((param & WINED3DSP_REGTYPE_MASK) >> WINED3DSP_REGTYPE_SHIFT)
+            | ((param & WINED3DSP_REGTYPE_MASK2) >> WINED3DSP_REGTYPE_SHIFT2);
+    src->reg.idx = param & WINED3DSP_REGNUM_MASK;
+    src->swizzle = (param & WINED3DSP_SWIZZLE_MASK) >> WINED3DSP_SWIZZLE_SHIFT;
+    src->modifiers = (param & WINED3DSP_SRCMOD_MASK) >> WINED3DSP_SRCMOD_SHIFT;
+    src->reg.rel_addr = rel_addr;
+}
+
+static void shader_parse_dst_param(DWORD param, const struct wined3d_shader_src_param *rel_addr,
+        struct wined3d_shader_dst_param *dst)
+{
+    dst->reg.type = ((param & WINED3DSP_REGTYPE_MASK) >> WINED3DSP_REGTYPE_SHIFT)
+            | ((param & WINED3DSP_REGTYPE_MASK2) >> WINED3DSP_REGTYPE_SHIFT2);
+    dst->reg.idx = param & WINED3DSP_REGNUM_MASK;
+    dst->write_mask = (param & WINED3D_SM1_WRITEMASK_MASK) >> WINED3D_SM1_WRITEMASK_SHIFT;
+    dst->modifiers = (param & WINED3DSP_DSTMOD_MASK) >> WINED3DSP_DSTMOD_SHIFT;
+    dst->shift = (param & WINED3DSP_DSTSHIFT_MASK) >> WINED3DSP_DSTSHIFT_SHIFT;
+    dst->reg.rel_addr = rel_addr;
+}
+
+/* Read the parameters of an unrecognized opcode from the input stream
+ * Return the number of tokens read.
+ *
+ * Note: This function assumes source or destination token format.
+ * It will not work with specially-formatted tokens like DEF or DCL,
+ * but hopefully those would be recognized */
+static int shader_skip_unrecognized(const struct wined3d_sm1_data *priv, const DWORD *ptr)
+{
+    int tokens_read = 0;
+    int i = 0;
+
+    /* TODO: Think of a good name for 0x80000000 and replace it with a constant */
+    while (*ptr & 0x80000000)
+    {
+        DWORD token, addr_token = 0;
+        struct wined3d_shader_src_param rel_addr;
+
+        tokens_read += shader_get_param(priv, ptr, &token, &addr_token);
+        ptr += tokens_read;
+
+        FIXME("Unrecognized opcode param: token=0x%08x addr_token=0x%08x name=", token, addr_token);
+
+        if (token & WINED3DSHADER_ADDRMODE_RELATIVE) shader_parse_src_param(addr_token, NULL, &rel_addr);
+
+        if (!i)
+        {
+            struct wined3d_shader_dst_param dst;
+
+            shader_parse_dst_param(token, token & WINED3DSHADER_ADDRMODE_RELATIVE ? &rel_addr : NULL, &dst);
+            shader_dump_dst_param(&dst, &priv->shader_version);
+        }
+        else
+        {
+            struct wined3d_shader_src_param src;
+
+            shader_parse_src_param(token, token & WINED3DSHADER_ADDRMODE_RELATIVE ? &rel_addr : NULL, &src);
+            shader_dump_src_param(&src, &priv->shader_version);
+        }
+        FIXME("\n");
+        ++i;
+    }
+    return tokens_read;
+}
+
+static void *shader_sm1_init(const DWORD *byte_code)
+{
+    struct wined3d_sm1_data *priv = HeapAlloc(GetProcessHeap(), 0, sizeof(*priv));
+    if (!priv)
+    {
+        ERR("Failed to allocate private data\n");
+        return NULL;
+    }
+
+    switch (*byte_code >> 16)
+    {
+        case WINED3D_SM1_VS:
+            priv->shader_version.type = WINED3D_SHADER_TYPE_VERTEX;
+            priv->opcode_table = vs_opcode_table;
+            break;
+
+        case WINED3D_SM1_PS:
+            priv->shader_version.type = WINED3D_SHADER_TYPE_PIXEL;
+            priv->opcode_table = ps_opcode_table;
+            break;
+
+        default:
+            FIXME("Unrecognized shader type %#x\n", *byte_code >> 16);
+            HeapFree(GetProcessHeap(), 0, priv);
+            return NULL;
+    }
+
+    return priv;
+}
+
+static void shader_sm1_free(void *data)
+{
+    HeapFree(GetProcessHeap(), 0, data);
+}
+
+static void shader_sm1_read_header(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
+{
+    struct wined3d_sm1_data *priv = data;
+    DWORD version_token;
+
+    version_token = *(*ptr)++;
+    TRACE("version: 0x%08x\n", version_token);
+
+    priv->shader_version.major = WINED3D_SM1_VERSION_MAJOR(version_token);
+    priv->shader_version.minor = WINED3D_SM1_VERSION_MINOR(version_token);
+    *shader_version = priv->shader_version;
+}
+
+static void shader_sm1_read_opcode(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins,
+        UINT *param_size)
+{
+    struct wined3d_sm1_data *priv = data;
+    const struct wined3d_sm1_opcode_info *opcode_info;
+    DWORD opcode_token;
+
+    opcode_token = *(*ptr)++;
+    opcode_info = shader_get_opcode(priv, opcode_token);
+    if (!opcode_info)
+    {
+        FIXME("Unrecognized opcode: token=0x%08x\n", opcode_token);
+        ins->handler_idx = WINED3DSIH_TABLE_SIZE;
+        *param_size = shader_skip_unrecognized(priv, *ptr);
+        return;
+    }
+
+    ins->handler_idx = opcode_info->handler_idx;
+    ins->flags = (opcode_token & WINED3D_OPCODESPECIFICCONTROL_MASK) >> WINED3D_OPCODESPECIFICCONTROL_SHIFT;
+    ins->coissue = opcode_token & WINED3DSI_COISSUE;
+    ins->predicate = opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED;
+    ins->dst_count = opcode_info->dst_count ? 1 : 0;
+    ins->src_count = opcode_info->param_count - opcode_info->dst_count;
+    *param_size = shader_skip_opcode(priv, opcode_info, opcode_token);
+}
+
+static void shader_sm1_read_src_param(void *data, const DWORD **ptr, struct wined3d_shader_src_param *src_param,
+        struct wined3d_shader_src_param *src_rel_addr)
+{
+    struct wined3d_sm1_data *priv = data;
+    DWORD token, addr_token;
+
+    *ptr += shader_get_param(priv, *ptr, &token, &addr_token);
+    if (token & WINED3DSHADER_ADDRMODE_RELATIVE)
+    {
+        shader_parse_src_param(addr_token, NULL, src_rel_addr);
+        shader_parse_src_param(token, src_rel_addr, src_param);
+    }
+    else
+    {
+        shader_parse_src_param(token, NULL, src_param);
+    }
+}
+
+static void shader_sm1_read_dst_param(void *data, const DWORD **ptr, struct wined3d_shader_dst_param *dst_param,
+        struct wined3d_shader_src_param *dst_rel_addr)
+{
+    struct wined3d_sm1_data *priv = data;
+    DWORD token, addr_token;
+
+    *ptr += shader_get_param(priv, *ptr, &token, &addr_token);
+    if (token & WINED3DSHADER_ADDRMODE_RELATIVE)
+    {
+        shader_parse_src_param(addr_token, NULL, dst_rel_addr);
+        shader_parse_dst_param(token, dst_rel_addr, dst_param);
+    }
+    else
+    {
+        shader_parse_dst_param(token, NULL, dst_param);
+    }
+}
+
+static void shader_sm1_read_semantic(const DWORD **ptr, struct wined3d_shader_semantic *semantic)
+{
+    DWORD usage_token = *(*ptr)++;
+    DWORD dst_token = *(*ptr)++;
+
+    semantic->usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
+    semantic->usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
+    semantic->sampler_type = (usage_token & WINED3DSP_TEXTURETYPE_MASK) >> WINED3DSP_TEXTURETYPE_SHIFT;
+    shader_parse_dst_param(dst_token, NULL, &semantic->reg);
+}
+
+static void shader_sm1_read_comment(const DWORD **ptr, const char **comment)
+{
+    DWORD token = **ptr;
+
+    if ((token & WINED3DSI_OPCODE_MASK) != WINED3DSIO_COMMENT)
+    {
+        *comment = NULL;
+        return;
+    }
+
+    *comment = (const char *)++(*ptr);
+    *ptr += (token & WINED3DSI_COMMENTSIZE_MASK) >> WINED3DSI_COMMENTSIZE_SHIFT;
+}
+
+static BOOL shader_sm1_is_end(void *data, const DWORD **ptr)
+{
+    if (**ptr == WINED3DSP_END)
+    {
+        ++(*ptr);
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+const struct wined3d_shader_frontend sm1_shader_frontend =
+{
+    shader_sm1_init,
+    shader_sm1_free,
+    shader_sm1_read_header,
+    shader_sm1_read_opcode,
+    shader_sm1_read_src_param,
+    shader_sm1_read_dst_param,
+    shader_sm1_read_semantic,
+    shader_sm1_read_comment,
+    shader_sm1_is_end,
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader_sm4.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader_sm4.c	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader_sm4.c	(revision 19678)
@@ -0,0 +1,307 @@
+/*
+ * Copyright 2009 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include "wined3d_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
+
+#define WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT    24
+#define WINED3D_SM4_INSTRUCTION_LENGTH_MASK     (0xf << WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT)
+
+#define WINED3D_SM4_OPCODE_MASK                 0xff
+
+#define WINED3D_SM4_REGISTER_TYPE_SHIFT         12
+#define WINED3D_SM4_REGISTER_TYPE_MASK          (0xf << WINED3D_SM4_REGISTER_TYPE_SHIFT)
+
+#define WINED3D_SM4_IMMCONST_TYPE_SHIFT         0
+#define WINED3D_SM4_IMMCONST_TYPE_MASK          (0x3 << WINED3D_SM4_IMMCONST_TYPE_SHIFT)
+
+#define WINED3D_SM4_WRITEMASK_SHIFT             4
+#define WINED3D_SM4_WRITEMASK_MASK              (0xf << WINED3D_SM4_WRITEMASK_SHIFT)
+
+#define WINED3D_SM4_SWIZZLE_SHIFT               4
+#define WINED3D_SM4_SWIZZLE_MASK                (0xff << WINED3D_SM4_SWIZZLE_SHIFT)
+
+#define WINED3D_SM4_VERSION_MAJOR(version)      (((version) >> 4) & 0xf)
+#define WINED3D_SM4_VERSION_MINOR(version)      (((version) >> 0) & 0xf)
+
+enum wined3d_sm4_opcode
+{
+    WINED3D_SM4_OP_ADD      = 0x00,
+    WINED3D_SM4_OP_EXP      = 0x19,
+    WINED3D_SM4_OP_MOV      = 0x36,
+    WINED3D_SM4_OP_MUL      = 0x38,
+    WINED3D_SM4_OP_RET      = 0x3e,
+    WINED3D_SM4_OP_SINCOS   = 0x4d,
+};
+
+enum wined3d_sm4_register_type
+{
+    WINED3D_SM4_RT_TEMP     = 0x0,
+    WINED3D_SM4_RT_INPUT    = 0x1,
+    WINED3D_SM4_RT_OUTPUT   = 0x2,
+    WINED3D_SM4_RT_IMMCONST = 0x4,
+};
+
+enum wined3d_sm4_immconst_type
+{
+    WINED3D_SM4_IMMCONST_FLOAT  = 0x1,
+    WINED3D_SM4_IMMCONST_FLOAT4 = 0x2,
+};
+
+struct wined3d_sm4_data
+{
+    struct wined3d_shader_version shader_version;
+    const DWORD *end;
+};
+
+struct wined3d_sm4_opcode_info
+{
+    enum wined3d_sm4_opcode opcode;
+    enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+    UINT dst_count;
+    UINT src_count;
+};
+
+static const struct wined3d_sm4_opcode_info opcode_table[] =
+{
+    {WINED3D_SM4_OP_ADD,    WINED3DSIH_ADD,         1,  2},
+    {WINED3D_SM4_OP_EXP,    WINED3DSIH_EXP,         1,  1},
+    {WINED3D_SM4_OP_MOV,    WINED3DSIH_MOV,         1,  1},
+    {WINED3D_SM4_OP_MUL,    WINED3DSIH_MUL,         1,  2},
+    {WINED3D_SM4_OP_RET,    WINED3DSIH_RET,         0,  0},
+    {WINED3D_SM4_OP_SINCOS, WINED3DSIH_SINCOS,      1,  2},
+};
+
+static const WINED3DSHADER_PARAM_REGISTER_TYPE register_type_table[] =
+{
+    /* WINED3D_SM4_RT_TEMP */       WINED3DSPR_TEMP,
+    /* WINED3D_SM4_RT_INPUT */      WINED3DSPR_INPUT,
+    /* WINED3D_SM4_RT_OUTPUT */     WINED3DSPR_OUTPUT,
+    /* UNKNOWN */                   0,
+    /* WINED3D_SM4_RT_IMMCONST */   WINED3DSPR_IMMCONST,
+};
+
+static const struct wined3d_sm4_opcode_info *get_opcode_info(enum wined3d_sm4_opcode opcode)
+{
+    unsigned int i;
+
+    for (i = 0; i < sizeof(opcode_table) / sizeof(*opcode_table); ++i)
+    {
+        if (opcode == opcode_table[i].opcode) return &opcode_table[i];
+    }
+
+    return NULL;
+}
+
+static void *shader_sm4_init(const DWORD *byte_code)
+{
+    struct wined3d_sm4_data *priv = HeapAlloc(GetProcessHeap(), 0, sizeof(*priv));
+    if (!priv)
+    {
+        ERR("Failed to allocate private data\n");
+        return NULL;
+    }
+
+    return priv;
+}
+
+static void shader_sm4_free(void *data)
+{
+    HeapFree(GetProcessHeap(), 0, data);
+}
+
+static void shader_sm4_read_header(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
+{
+    struct wined3d_sm4_data *priv = data;
+    DWORD version_token;
+
+    priv->end = *ptr;
+
+    version_token = *(*ptr)++;
+    TRACE("version: 0x%08x\n", version_token);
+
+    TRACE("token count: %u\n", **ptr);
+    priv->end += *(*ptr)++;
+
+    switch (version_token >> 16)
+    {
+        case WINED3D_SM4_PS:
+            priv->shader_version.type = WINED3D_SHADER_TYPE_PIXEL;
+            break;
+
+        case WINED3D_SM4_VS:
+            priv->shader_version.type = WINED3D_SHADER_TYPE_VERTEX;
+            break;
+
+        case WINED3D_SM4_GS:
+            priv->shader_version.type = WINED3D_SHADER_TYPE_GEOMETRY;
+            break;
+
+        default:
+            FIXME("Unrecognized shader type %#x\n", version_token >> 16);
+    }
+    priv->shader_version.major = WINED3D_SM4_VERSION_MAJOR(version_token);
+    priv->shader_version.minor = WINED3D_SM4_VERSION_MINOR(version_token);
+
+    *shader_version = priv->shader_version;
+}
+
+static void shader_sm4_read_opcode(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins,
+        UINT *param_size)
+{
+    const struct wined3d_sm4_opcode_info *opcode_info;
+    DWORD token = *(*ptr)++;
+    DWORD opcode = token & WINED3D_SM4_OPCODE_MASK;
+
+    *param_size = ((token & WINED3D_SM4_INSTRUCTION_LENGTH_MASK) >> WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT) - 1;
+
+    opcode_info = get_opcode_info(opcode);
+    if (!opcode_info)
+    {
+        FIXME("Unrecognized opcode %#x, token 0x%08x\n", opcode, token);
+        ins->handler_idx = WINED3DSIH_TABLE_SIZE;
+        return;
+    }
+
+    ins->handler_idx = opcode_info->handler_idx;
+    ins->flags = 0;
+    ins->coissue = 0;
+    ins->predicate = 0;
+    ins->dst_count = opcode_info->dst_count;
+    ins->src_count = opcode_info->src_count;
+}
+
+static void shader_sm4_read_src_param(void *data, const DWORD **ptr, struct wined3d_shader_src_param *src_param,
+        struct wined3d_shader_src_param *src_rel_addr)
+{
+    DWORD token = *(*ptr)++;
+    enum wined3d_sm4_register_type register_type;
+
+    register_type = (token & WINED3D_SM4_REGISTER_TYPE_MASK) >> WINED3D_SM4_REGISTER_TYPE_SHIFT;
+    if (register_type >= sizeof(register_type_table) / sizeof(*register_type_table))
+    {
+        FIXME("Unhandled register type %#x\n", register_type);
+        src_param->reg.type = WINED3DSPR_TEMP;
+    }
+    else
+    {
+        src_param->reg.type = register_type_table[register_type];
+    }
+
+    if (register_type == WINED3D_SM4_RT_IMMCONST)
+    {
+        enum wined3d_sm4_immconst_type immconst_type =
+                (token & WINED3D_SM4_IMMCONST_TYPE_MASK) >> WINED3D_SM4_IMMCONST_TYPE_SHIFT;
+        src_param->swizzle = WINED3DSP_NOSWIZZLE;
+
+        switch(immconst_type)
+        {
+            case WINED3D_SM4_IMMCONST_FLOAT:
+                src_param->reg.immconst_type = WINED3D_IMMCONST_FLOAT;
+                memcpy(src_param->reg.immconst_data, *ptr, 1 * sizeof(DWORD));
+                *ptr += 1;
+                break;
+
+            case WINED3D_SM4_IMMCONST_FLOAT4:
+                src_param->reg.immconst_type = WINED3D_IMMCONST_FLOAT4;
+                memcpy(src_param->reg.immconst_data, *ptr, 4 * sizeof(DWORD));
+                *ptr += 4;
+                break;
+
+            default:
+                FIXME("Unhandled immediate constant type %#x\n", immconst_type);
+                break;
+        }
+    }
+    else
+    {
+        src_param->reg.idx = *(*ptr)++;
+        src_param->swizzle = (token & WINED3D_SM4_SWIZZLE_MASK) >> WINED3D_SM4_SWIZZLE_SHIFT;
+    }
+
+    src_param->modifiers = 0;
+    src_param->reg.rel_addr = NULL;
+}
+
+static void shader_sm4_read_dst_param(void *data, const DWORD **ptr, struct wined3d_shader_dst_param *dst_param,
+        struct wined3d_shader_src_param *dst_rel_addr)
+{
+    DWORD token = *(*ptr)++;
+    UINT register_idx = *(*ptr)++;
+    enum wined3d_sm4_register_type register_type;
+
+    register_type = (token & WINED3D_SM4_REGISTER_TYPE_MASK) >> WINED3D_SM4_REGISTER_TYPE_SHIFT;
+    if (register_type >= sizeof(register_type_table) / sizeof(*register_type_table))
+    {
+        FIXME("Unhandled register type %#x\n", register_type);
+        dst_param->reg.type = WINED3DSPR_TEMP;
+    }
+    else
+    {
+        dst_param->reg.type = register_type_table[register_type];
+    }
+
+    dst_param->reg.idx = register_idx;
+    dst_param->write_mask = (token & WINED3D_SM4_WRITEMASK_MASK) >> WINED3D_SM4_WRITEMASK_SHIFT;
+    dst_param->modifiers = 0;
+    dst_param->shift = 0;
+    dst_param->reg.rel_addr = NULL;
+}
+
+static void shader_sm4_read_semantic(const DWORD **ptr, struct wined3d_shader_semantic *semantic)
+{
+    FIXME("ptr %p, semantic %p stub!\n", ptr, semantic);
+}
+
+static void shader_sm4_read_comment(const DWORD **ptr, const char **comment)
+{
+    FIXME("ptr %p, comment %p stub!\n", ptr, comment);
+    *comment = NULL;
+}
+
+static BOOL shader_sm4_is_end(void *data, const DWORD **ptr)
+{
+    struct wined3d_sm4_data *priv = data;
+    return *ptr == priv->end;
+}
+
+const struct wined3d_shader_frontend sm4_shader_frontend =
+{
+    shader_sm4_init,
+    shader_sm4_free,
+    shader_sm4_read_header,
+    shader_sm4_read_opcode,
+    shader_sm4_read_src_param,
+    shader_sm4_read_dst_param,
+    shader_sm4_read_semantic,
+    shader_sm4_read_comment,
+    shader_sm4_is_end,
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c	(revision 19678)
@@ -1,3 +1,2 @@
-
 /*
  * Direct3D state management
@@ -92,6 +91,4 @@
 
 static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    BOOL transformed;
-
     /* Lighting is not enabled if transformed vertices are drawn
      * but lighting does not affect the stream sources, so it is not grouped for performance reasons.
@@ -104,9 +101,7 @@
     }
 
-    transformed = ((stateblock->wineD3DDevice->strided_streams.u.s.position.lpData != NULL ||
-                    stateblock->wineD3DDevice->strided_streams.u.s.position.VBO != 0) &&
-                    stateblock->wineD3DDevice->strided_streams.u.s.position_transformed) ? TRUE : FALSE;
-
-    if (stateblock->renderState[WINED3DRS_LIGHTING] && !transformed) {
+    if (stateblock->renderState[WINED3DRS_LIGHTING]
+            && !stateblock->wineD3DDevice->strided_streams.position_transformed)
+    {
         glEnable(GL_LIGHTING);
         checkGLcall("glEnable GL_LIGHTING");
@@ -247,5 +242,4 @@
     int srcBlend = GL_ZERO;
     int dstBlend = GL_ZERO;
-    const StaticPixelFormatDesc *rtFormat;
     IWineD3DSurfaceImpl *target = (IWineD3DSurfaceImpl *) stateblock->wineD3DDevice->render_targets[0];
 
@@ -254,10 +248,9 @@
         stateblock->renderState[WINED3DRS_EDGEANTIALIAS]         ||
         stateblock->renderState[WINED3DRS_ANTIALIASEDLINEENABLE]) {
-        const struct GlPixelFormatDesc *glDesc;
-        getFormatDescEntry(target->resource.format, &GLINFO_LOCATION, &glDesc);
 
         /* Disable blending in all cases even without pixelshaders. With blending on we could face a big performance penalty.
          * The d3d9 visual test confirms the behavior. */
-        if(!(glDesc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) {
+        if (!(target->resource.format_desc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING))
+        {
             glDisable(GL_BLEND);
             checkGLcall("glDisable GL_BLEND");
@@ -290,10 +283,8 @@
          */
         case WINED3DBLEND_DESTALPHA          :
-            rtFormat = getFormatDescEntry(target->resource.format, NULL, NULL);
-            dstBlend = rtFormat->alphaMask ? GL_DST_ALPHA : GL_ONE;
+            dstBlend = target->resource.format_desc->alpha_mask ? GL_DST_ALPHA : GL_ONE;
             break;
         case WINED3DBLEND_INVDESTALPHA       :
-            rtFormat = getFormatDescEntry(target->resource.format, NULL, NULL);
-            dstBlend = rtFormat->alphaMask ? GL_ONE_MINUS_DST_ALPHA : GL_ZERO;
+            dstBlend = target->resource.format_desc->alpha_mask ? GL_ONE_MINUS_DST_ALPHA : GL_ZERO;
             break;
 
@@ -334,10 +325,8 @@
 
         case WINED3DBLEND_DESTALPHA          :
-            rtFormat = getFormatDescEntry(target->resource.format, NULL, NULL);
-            srcBlend = rtFormat->alphaMask ? GL_DST_ALPHA : GL_ONE;
+            srcBlend = target->resource.format_desc->alpha_mask ? GL_DST_ALPHA : GL_ONE;
             break;
         case WINED3DBLEND_INVDESTALPHA       :
-            rtFormat = getFormatDescEntry(target->resource.format, NULL, NULL);
-            srcBlend = rtFormat->alphaMask ? GL_ONE_MINUS_DST_ALPHA : GL_ZERO;
+            srcBlend = target->resource.format_desc->alpha_mask ? GL_ONE_MINUS_DST_ALPHA : GL_ZERO;
             break;
 
@@ -480,5 +469,5 @@
     BOOL enable_ckey = FALSE;
 
-    IWineD3DSurfaceImpl *surf;
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
 
     /* Find out if the texture on the first stage has a ckey set
@@ -488,17 +477,20 @@
      * in case it finds some texture+colorkeyenable combination which needs extra care.
      */
-    if(stateblock->textures[0] && (
-       stateblock->textureDimensions[0] == GL_TEXTURE_2D ||
-       stateblock->textureDimensions[0] == GL_TEXTURE_RECTANGLE_ARB)) {
-        surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *)stateblock->textures[0])->surfaces[0];
-
-        if(surf->CKeyFlags & WINEDDSD_CKSRCBLT) {
-            const StaticPixelFormatDesc *fmt = getFormatDescEntry(surf->resource.format, NULL, NULL);
-            /* The surface conversion does not do color keying conversion for surfaces that have an alpha
-             * channel on their own. Likewise, the alpha test shouldn't be set up for color keying if the
-             * surface has alpha bits
-             */
-            if(fmt->alphaMask == 0x00000000) {
-                enable_ckey = TRUE;
+    if (stateblock->textures[0])
+    {
+        UINT texture_dimensions = IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[0]);
+
+        if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB)
+        {
+            IWineD3DSurfaceImpl *surf;
+
+            surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *)stateblock->textures[0])->surfaces[0];
+
+            if (surf->CKeyFlags & WINEDDSD_CKSRCBLT)
+            {
+                /* The surface conversion does not do color keying conversion for surfaces that have an alpha
+                 * channel on their own. Likewise, the alpha test shouldn't be set up for color keying if the
+                 * surface has alpha bits */
+                if (!surf->resource.format_desc->alpha_mask) enable_ckey = TRUE;
             }
         }
@@ -541,5 +533,6 @@
     DWORD disable = 0x00000000;
 
-    if (use_vs(stateblock->wineD3DDevice)) {
+    if (use_vs(stateblock))
+    {
         /* The spec says that opengl clipping planes are disabled when using shaders. Direct3D planes aren't,
          * so that is an issue. The MacOS ATI driver keeps clipping planes activated with shaders in some
@@ -712,5 +705,5 @@
         }
     } else {
-        const GLfloat black[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+        static const GLfloat black[] = {0.0f, 0.0f, 0.0f, 0.0f};
 
         /* for the case of enabled lighting: */
@@ -761,12 +754,8 @@
     for (i = 0; i < GL_LIMITS(texture_stages); i++) {
         /* Note the WINED3DRS value applies to all textures, but GL has one
-            * per texture, so apply it now ready to be used!
-            */
-        if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-            GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
-            checkGLcall("glActiveTextureARB");
-        } else if (i>0) {
-            FIXME("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
-        }
+         * per texture, so apply it now ready to be used!
+         */
+        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
+        checkGLcall("glActiveTextureARB");
 
         glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, &col[0]);
@@ -908,10 +897,43 @@
 }
 
-static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    BOOL fogenable = stateblock->renderState[WINED3DRS_FOGENABLE];
-    BOOL is_ps3 = use_ps(stateblock->wineD3DDevice)
-                  && ((IWineD3DPixelShaderImpl *)stateblock->pixelShader)->baseShader.hex_version >= WINED3DPS_VERSION(3,0);
+static void state_fog_vertexpart(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
+    if (!stateblock->renderState[WINED3DRS_FOGENABLE]) return;
+
+    /* Table fog on: Never use fog coords, and use per-fragment fog */
+    if(stateblock->renderState[WINED3DRS_FOGTABLEMODE] != WINED3DFOG_NONE) {
+        glHint(GL_FOG_HINT, GL_NICEST);
+        if(context->fog_coord) {
+            glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
+            checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
+            context->fog_coord = FALSE;
+        }
+        return;
+    }
+
+    /* Otherwise use per-vertex fog in any case */
+    glHint(GL_FOG_HINT, GL_FASTEST);
+
+    if(stateblock->renderState[WINED3DRS_FOGVERTEXMODE] == WINED3DFOG_NONE || context->last_was_rhw) {
+        /* No fog at all, or transformed vertices: Use fog coord */
+        if(!context->fog_coord) {
+            glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
+            checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT)");
+            context->fog_coord = TRUE;
+        }
+    } else {
+        /* Otherwise, use the fragment depth */
+        if(context->fog_coord) {
+            glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
+            checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
+            context->fog_coord = FALSE;
+        }
+    }
+}
+
+void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     float fogstart, fogend;
-
     union {
         DWORD d;
@@ -919,26 +941,57 @@
     } tmpvalue;
 
-    if (!fogenable) {
+    switch(context->fog_source) {
+        case FOGSOURCE_VS:
+            fogstart = 1.0;
+            fogend = 0.0;
+            break;
+
+        case FOGSOURCE_COORD:
+            fogstart = 255.0;
+            fogend = 0.0;
+            break;
+
+        case FOGSOURCE_FFP:
+            tmpvalue.d = stateblock->renderState[WINED3DRS_FOGSTART];
+            fogstart = tmpvalue.f;
+            tmpvalue.d = stateblock->renderState[WINED3DRS_FOGEND];
+            fogend = tmpvalue.f;
+            /* In GL, fogstart == fogend disables fog, in D3D everything's fogged.*/
+            if(fogstart == fogend) {
+                unsigned long fNegInf = 0xff800000;
+                fogstart = *(float*)(&fNegInf); /* -1.0/0.0 */
+                fogend = 0.0;
+            }
+            break;
+
+        default:
+            /* This should not happen.context->fog_source is set in wined3d, not the app.
+             * Still this is needed to make the compiler happy
+             */
+            ERR("Unexpected fog coordinate source\n");
+            fogstart = 0.0;
+            fogend = 0.0;
+    }
+
+    glFogf(GL_FOG_START, fogstart);
+    checkGLcall("glFogf(GL_FOG_START, fogstart)");
+    TRACE("Fog Start == %f\n", fogstart);
+
+    glFogf(GL_FOG_END, fogend);
+    checkGLcall("glFogf(GL_FOG_END, fogend)");
+    TRACE("Fog End == %f\n", fogend);
+}
+
+void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+    enum fogsource new_source;
+
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
+    if (!stateblock->renderState[WINED3DRS_FOGENABLE]) {
         /* No fog? Disable it, and we're done :-) */
-        glDisable(GL_FOG);
+        glDisableWINE(GL_FOG);
         checkGLcall("glDisable GL_FOG");
-        if( use_ps(stateblock->wineD3DDevice)
-                && ((IWineD3DPixelShaderImpl *)stateblock->pixelShader)->baseShader.hex_version < WINED3DPS_VERSION(3,0) ) {
-            /* disable fog in the pixel shader
-             * NOTE: For pixel shader, GL_FOG_START and GL_FOG_END don't hold fog start s and end e but
-             * -1/(e-s) and e/(e-s) respectively.
-             */
-            glFogf(GL_FOG_START, 0.0f);
-            checkGLcall("glFogf(GL_FOG_START, fogstart)");
-            glFogf(GL_FOG_END, 1.0f);
-            checkGLcall("glFogf(GL_FOG_END, fogend)");
-        }
         return;
     }
-
-    tmpvalue.d = stateblock->renderState[WINED3DRS_FOGSTART];
-    fogstart = tmpvalue.f;
-    tmpvalue.d = stateblock->renderState[WINED3DRS_FOGEND];
-    fogend = tmpvalue.f;
 
     /* Fog Rules:
@@ -973,4 +1026,11 @@
      * rasterizer) if using a vertex program.
      *
+     * D3D shaders can provide an explicit fog coordinate. This fog coordinate is used with
+     * D3DRS_FOGTABLEMODE==D3DFOG_NONE. The FOGVERTEXMODE is ignored, d3d always uses linear
+     * fog with start=1.0 and end=0.0 in this case. This is similar to fog coordinates in
+     * the specular color, a vertex shader counts as pretransformed geometry in this case.
+     * There are some GL differences between specular fog coords and vertex shaders though.
+     *
+     * With table fog the vertex shader fog coordinate is ignored.
      *
      * If a fogtablemode and a fogvertexmode are specified, table fog is applied (with or
@@ -978,145 +1038,59 @@
      */
 
-    if( is_ps3 ) {
-        if( !use_vs(stateblock->wineD3DDevice)
-                && stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE ) {
-            FIXME("Implement vertex fog for pixel shader >= 3.0 and fixed function pipeline\n");
-        }
-    }
-
-    if (use_vs(stateblock->wineD3DDevice)
-            && ((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog) {
-        if( stateblock->renderState[WINED3DRS_FOGTABLEMODE] != WINED3DFOG_NONE ) {
-            if(!is_ps3) FIXME("Implement table fog for foggy vertex shader\n");
-            /* Disable fog */
-            fogenable = FALSE;
-        } else {
-            /* Set fog computation in the rasterizer to pass through the value (just blend it) */
-            glFogi(GL_FOG_MODE, GL_LINEAR);
-            checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)");
-            fogstart = 1.0;
-            fogend = 0.0;
-        }
-
-        if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-            glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-            checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-            context->fog_coord = FALSE;
-        }
-        context->last_was_foggy_shader = TRUE;
-    }
-    else if( use_ps(stateblock->wineD3DDevice) ) {
-        /* NOTE: For pixel shader, GL_FOG_START and GL_FOG_END don't hold fog start s and end e but
-         * -1/(e-s) and e/(e-s) respectively to simplify fog computation in the shader.
-         */
-        WINED3DFOGMODE mode;
-        context->last_was_foggy_shader = FALSE;
-
-        /* If both fogmodes are set use the table fog mode */
-        if(stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE)
-            mode = stateblock->renderState[WINED3DRS_FOGVERTEXMODE];
-        else
-            mode = stateblock->renderState[WINED3DRS_FOGTABLEMODE];
-
-        switch (mode) {
-            case WINED3DFOG_EXP:
-            case WINED3DFOG_EXP2:
-                if(!is_ps3) FIXME("Implement non linear fog for pixel shader < 3.0\n");
-                /* Disable fog */
-                fogenable = FALSE;
-                break;
-
-            case WINED3DFOG_LINEAR:
-                fogstart = -1.0f/(fogend-fogstart);
-                fogend *= -fogstart;
-                break;
-
-            case WINED3DFOG_NONE:
-                if(!is_ps3) FIXME("Implement software vertex fog for pixel shader < 3.0\n");
-                /* Disable fog */
-                fogenable = FALSE;
-                break;
-            default: FIXME("Unexpected WINED3DRS_FOGVERTEXMODE %d\n", stateblock->renderState[WINED3DRS_FOGVERTEXMODE]);
-        }
-
-        if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-            glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-            checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-            context->fog_coord = FALSE;
-        }
-    }
     /* DX 7 sdk: "If both render states(vertex and table fog) are set to valid modes,
      * the system will apply only pixel(=table) fog effects."
      */
-    else if(stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE) {
-        glHint(GL_FOG_HINT, GL_FASTEST);
-        checkGLcall("glHint(GL_FOG_HINT, GL_FASTEST)");
-        context->last_was_foggy_shader = FALSE;
-
-        switch (stateblock->renderState[WINED3DRS_FOGVERTEXMODE]) {
-            /* If processed vertices are used, fall through to the NONE case */
-            case WINED3DFOG_EXP:  {
-                if(!context->last_was_rhw) {
-                    glFogi(GL_FOG_MODE, GL_EXP);
-                    checkGLcall("glFogi(GL_FOG_MODE, GL_EXP)");
-                    if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-                        glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-                        checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-                        context->fog_coord = FALSE;
+    if(stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE) {
+        if(use_vs(stateblock)) {
+            glFogi(GL_FOG_MODE, GL_LINEAR);
+            checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)");
+            new_source = FOGSOURCE_VS;
+        } else {
+            switch (stateblock->renderState[WINED3DRS_FOGVERTEXMODE]) {
+                /* If processed vertices are used, fall through to the NONE case */
+                case WINED3DFOG_EXP:
+                    if(!context->last_was_rhw) {
+                        glFogi(GL_FOG_MODE, GL_EXP);
+                        checkGLcall("glFogi(GL_FOG_MODE, GL_EXP)");
+                        new_source = FOGSOURCE_FFP;
+                        break;
                     }
-                    break;
-                }
-            }
-            case WINED3DFOG_EXP2: {
-                if(!context->last_was_rhw) {
-                    glFogi(GL_FOG_MODE, GL_EXP2);
-                    checkGLcall("glFogi(GL_FOG_MODE, GL_EXP2)");
-                    if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-                        glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-                        checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-                        context->fog_coord = FALSE;
+                    /* drop through */
+
+                case WINED3DFOG_EXP2:
+                    if(!context->last_was_rhw) {
+                        glFogi(GL_FOG_MODE, GL_EXP2);
+                        checkGLcall("glFogi(GL_FOG_MODE, GL_EXP2)");
+                        new_source = FOGSOURCE_FFP;
+                        break;
                     }
-                    break;
-                }
-            }
-            case WINED3DFOG_LINEAR: {
-                if(!context->last_was_rhw) {
+                    /* drop through */
+
+                case WINED3DFOG_LINEAR:
+                    if(!context->last_was_rhw) {
+                        glFogi(GL_FOG_MODE, GL_LINEAR);
+                        checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)");
+                        new_source = FOGSOURCE_FFP;
+                        break;
+                    }
+                    /* drop through */
+
+                case WINED3DFOG_NONE:
+                    /* Both are none? According to msdn the alpha channel of the specular
+                     * color contains a fog factor. Set it in drawStridedSlow.
+                     * Same happens with Vertexfog on transformed vertices
+                     */
+                    new_source = FOGSOURCE_COORD;
                     glFogi(GL_FOG_MODE, GL_LINEAR);
                     checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)");
-                    if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-                        glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-                        checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-                        context->fog_coord = FALSE;
-                    }
                     break;
-                }
+
+                default:
+                    FIXME("Unexpected WINED3DRS_FOGVERTEXMODE %d\n", stateblock->renderState[WINED3DRS_FOGVERTEXMODE]);
+                    new_source = FOGSOURCE_FFP; /* Make the compiler happy */
             }
-            case WINED3DFOG_NONE: {
-                /* Both are none? According to msdn the alpha channel of the specular
-                 * color contains a fog factor. Set it in drawStridedSlow.
-                 * Same happens with Vertexfog on transformed vertices
-                 */
-                if(GL_SUPPORT(EXT_FOG_COORD)) {
-                    if(context->fog_coord == FALSE) {
-                        glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
-                        checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT)");
-                        context->fog_coord = TRUE;
-                    }
-                    glFogi(GL_FOG_MODE, GL_LINEAR);
-                    checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)");
-                    fogstart = 0xff;
-                    fogend = 0x0;
-                } else {
-                    /* Disable GL fog, handle this in software in drawStridedSlow */
-                    fogenable = FALSE;
-                }
-                break;
-            }
-            default: FIXME("Unexpected WINED3DRS_FOGVERTEXMODE %d\n", stateblock->renderState[WINED3DRS_FOGVERTEXMODE]);
         }
     } else {
-        glHint(GL_FOG_HINT, GL_NICEST);
-        checkGLcall("glHint(GL_FOG_HINT, GL_NICEST)");
-        context->last_was_foggy_shader = FALSE;
+        new_source = FOGSOURCE_FFP;
 
         switch (stateblock->renderState[WINED3DRS_FOGTABLEMODE]) {
@@ -1124,9 +1098,4 @@
                 glFogi(GL_FOG_MODE, GL_EXP);
                 checkGLcall("glFogi(GL_FOG_MODE, GL_EXP)");
-                if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-                    glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-                    checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-                    context->fog_coord = FALSE;
-                }
                 break;
 
@@ -1134,9 +1103,4 @@
                 glFogi(GL_FOG_MODE, GL_EXP2);
                 checkGLcall("glFogi(GL_FOG_MODE, GL_EXP2)");
-                if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-                    glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-                    checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-                    context->fog_coord = FALSE;
-                }
                 break;
 
@@ -1144,9 +1108,4 @@
                 glFogi(GL_FOG_MODE, GL_LINEAR);
                 checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)");
-                if(GL_SUPPORT(EXT_FOG_COORD) && context->fog_coord) {
-                    glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-                    checkGLcall("glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT)");
-                    context->fog_coord = FALSE;
-                }
                 break;
 
@@ -1157,43 +1116,9 @@
     }
 
-    if(fogenable) {
-        glEnable(GL_FOG);
-        checkGLcall("glEnable GL_FOG");
-
-        if(fogstart != fogend)
-        {
-            glFogfv(GL_FOG_START, &fogstart);
-            checkGLcall("glFogf(GL_FOG_START, fogstart)");
-            TRACE("Fog Start == %f\n", fogstart);
-
-            glFogfv(GL_FOG_END, &fogend);
-            checkGLcall("glFogf(GL_FOG_END, fogend)");
-            TRACE("Fog End == %f\n", fogend);
-        }
-        else
-        {
-            unsigned long fMInf = 0xff800000;
-            //glFogf(GL_FOG_START, -1.0 / 0.0);
-            glFogf(GL_FOG_START, *(float*)(&fMInf));
-            checkGLcall("glFogf(GL_FOG_START, fogstart)");
-            TRACE("Fog Start == %f\n", fogstart);
-
-            glFogf(GL_FOG_END, 0.0);
-            checkGLcall("glFogf(GL_FOG_END, fogend)");
-            TRACE("Fog End == %f\n", fogend);
-        }
-    } else {
-        glDisable(GL_FOG);
-        checkGLcall("glDisable GL_FOG");
-        if( use_ps(stateblock->wineD3DDevice) ) {
-            /* disable fog in the pixel shader
-             * NOTE: For pixel shader, GL_FOG_START and GL_FOG_END don't hold fog start s and end e but
-             * -1/(e-s) and e/(e-s) respectively.
-             */
-            glFogf(GL_FOG_START, 0.0f);
-            checkGLcall("glFogf(GL_FOG_START, fogstart)");
-            glFogf(GL_FOG_END, 1.0f);
-            checkGLcall("glFogf(GL_FOG_END, fogend)");
-        }
+    glEnableWINE(GL_FOG);
+    checkGLcall("glEnable GL_FOG");
+    if(new_source != context->fog_source) {
+        context->fog_source = new_source;
+        state_fogstartend(STATE_RENDER(WINED3DRS_FOGSTART), stateblock, context);
     }
 }
@@ -1215,5 +1140,5 @@
 }
 
-static void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     float col[4];
     D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_FOGCOLOR], col);
@@ -1222,5 +1147,5 @@
 }
 
-static void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     union {
         DWORD d;
@@ -1232,9 +1157,8 @@
 }
 
-/* TODO: Merge with primitive type + init_materials()!! */
 static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
     GLenum Parm = 0;
-    const WineDirect3DStridedData *diffuse = &device->strided_streams.u.s.diffuse;
+    const struct wined3d_stream_info_element *diffuse = &device->strided_streams.elements[WINED3D_FFP_DIFFUSE];
     BOOL isDiffuseSupplied;
 
@@ -1247,5 +1171,5 @@
     }
 
-    isDiffuseSupplied = diffuse->lpData || diffuse->VBO;
+    isDiffuseSupplied = diffuse->data || diffuse->buffer_object;
 
     context->num_untracked_materials = 0;
@@ -1335,5 +1259,5 @@
                 checkGLcall("glMaterialfv");
             } else {
-                const GLfloat black[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+                static const GLfloat black[] = {0.0f, 0.0f, 0.0f, 0.0f};
                 glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, &black[0]);
                 checkGLcall("glMaterialfv");
@@ -1401,7 +1325,8 @@
      * by zero and is not properly defined in opengl, so avoid it
      */
-    if (stateblock->renderState[WINED3DRS_NORMALIZENORMALS] && (
-        stateblock->wineD3DDevice->strided_streams.u.s.normal.lpData ||
-        stateblock->wineD3DDevice->strided_streams.u.s.normal.VBO)) {
+    if (stateblock->renderState[WINED3DRS_NORMALIZENORMALS]
+            && (stateblock->wineD3DDevice->strided_streams.elements[WINED3D_FFP_NORMAL].data
+            || stateblock->wineD3DDevice->strided_streams.elements[WINED3D_FFP_NORMAL].buffer_object))
+    {
         glEnable(GL_NORMALIZE);
         checkGLcall("glEnable(GL_NORMALIZE);");
@@ -1589,7 +1514,10 @@
 
 static void state_pointsprite_w(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+    BOOL warned = FALSE;
     /* TODO: NV_POINT_SPRITE */
-    if (stateblock->renderState[WINED3DRS_POINTSPRITEENABLE]) {
-        TRACE("Point sprites not supported\n");
+    if (!warned && stateblock->renderState[WINED3DRS_POINTSPRITEENABLE]) {
+        /* A FIXME, not a WARN because point sprites should be software emulated if not supported by HW */
+        FIXME("Point sprites not supported\n");
+        warned = TRUE;
     }
 }
@@ -1597,4 +1525,12 @@
 static void state_pointsprite(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     if (stateblock->renderState[WINED3DRS_POINTSPRITEENABLE]) {
+        BOOL warned = FALSE;
+        if(GL_LIMITS(point_sprite_units) < GL_LIMITS(textures) && !warned) {
+            if(use_ps(stateblock) || stateblock->lowest_disabled_stage > GL_LIMITS(point_sprite_units)) {
+                FIXME("The app uses point sprite texture coordinates on more units than supported by the driver\n");
+                warned = TRUE;
+            }
+        }
+
         glEnable(GL_POINT_SPRITE_ARB);
         checkGLcall("glEnable(GL_POINT_SPRITE_ARB)");
@@ -1946,8 +1882,4 @@
     }
 
-        /* From MSDN (WINED3DTSS_ALPHAARG1) :
-    The default argument is WINED3DTA_TEXTURE. If no texture is set for this stage,
-    then the default argument is WINED3DTA_DIFFUSE.
-    FIXME? If texture added/removed, may need to reset back as well?    */
     if (isAlpha && This->stateBlock->textures[Stage] == NULL && arg1 == WINED3DTA_TEXTURE) {
         get_src_and_opr(WINED3DTA_DIFFUSE, isAlpha, &src1, &opr1);
@@ -2920,35 +2852,29 @@
 
 static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage];
-    BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map[stage];
+    BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map & (1 << stage);
 
     TRACE("Setting color op for stage %d\n", stage);
 
-    if (stateblock->pixelShader && stateblock->wineD3DDevice->ps_selected_mode != SHADER_NONE &&
-        ((IWineD3DPixelShaderImpl *)stateblock->pixelShader)->baseShader.function) {
-        /* Using a pixel shader? Don't care for anything here, the shader applying does it */
-        return;
-    }
+    /* Using a pixel shader? Don't care for anything here, the shader applying does it */
+    if (use_ps(stateblock)) return;
 
     if (stage != mapped_stage) WARN("Using non 1:1 mapping: %d -> %d!\n", stage, mapped_stage);
 
-    if (mapped_stage != -1) {
-        if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-            if (tex_used && mapped_stage >= GL_LIMITS(textures)) {
-                FIXME("Attempt to enable unsupported stage!\n");
-                return;
-            }
-            GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
-            checkGLcall("glActiveTextureARB");
-        } else if (stage > 0) {
-            WARN("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
+    if (mapped_stage != WINED3D_UNMAPPED_STAGE)
+    {
+        if (tex_used && mapped_stage >= GL_LIMITS(textures)) {
+            FIXME("Attempt to enable unsupported stage!\n");
             return;
         }
+        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
+        checkGLcall("glActiveTextureARB");
     }
 
     if(stage >= stateblock->lowest_disabled_stage) {
         TRACE("Stage disabled\n");
-        if (mapped_stage != -1) {
+        if (mapped_stage != WINED3D_UNMAPPED_STAGE)
+        {
             /* Disable everything here */
             glDisable(GL_TEXTURE_2D);
@@ -2984,24 +2910,19 @@
 
 void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage];
-    BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map[stage];
+    BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map & (1 << stage);
     DWORD op, arg1, arg2, arg0;
 
     TRACE("Setting alpha op for stage %d\n", stage);
     /* Do not care for enabled / disabled stages, just assign the settings. colorop disables / enables required stuff */
-    if (mapped_stage != -1) {
-        if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-            if (tex_used && mapped_stage >= GL_LIMITS(textures)) {
-                FIXME("Attempt to enable unsupported stage!\n");
-                return;
-            }
-            GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
-            checkGLcall("glActiveTextureARB");
-        } else if (stage > 0) {
-            /* We can't do anything here */
-            WARN("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
+    if (mapped_stage != WINED3D_UNMAPPED_STAGE)
+    {
+        if (tex_used && mapped_stage >= GL_LIMITS(textures)) {
+            FIXME("Attempt to enable unsupported stage!\n");
             return;
         }
+        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
+        checkGLcall("glActiveTextureARB");
     }
 
@@ -3011,48 +2932,61 @@
     arg0 = stateblock->textureState[stage][WINED3DTSS_ALPHAARG0];
 
-    if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && stage == 0 &&
-       stateblock->textures[0] &&
-       (stateblock->textureDimensions[0] == GL_TEXTURE_2D || stateblock->textureDimensions[0] == GL_TEXTURE_RECTANGLE_ARB)) {
-        IWineD3DSurfaceImpl *surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *) stateblock->textures[0])->surfaces[0];
-
-        if(surf->CKeyFlags & WINEDDSD_CKSRCBLT &&
-           getFormatDescEntry(surf->resource.format, NULL, NULL)->alphaMask == 0x00000000) {
-
-            /* Color keying needs to pass alpha values from the texture through to have the alpha test work properly.
-             * On the other hand applications can still use texture combiners apparently. This code takes care that apps
-             * cannot remove the texture's alpha channel entirely.
-             *
-             * The fixup is required for Prince of Persia 3D(prison bars), while Moto racer 2 requires D3DTOP_MODULATE to work
-             * on color keyed surfaces. Aliens vs Predator 1 uses color keyed textures and alpha component of diffuse color to
-             * draw things like translucent text and perform other blending effects.
-             *
-             * Aliens vs Predator 1 relies on diffuse alpha having an effect, so it cannot be ignored. To provide the
-             * behavior expected by the game, while emulating the colorkey, diffuse alpha must be modulated with texture alpha.
-             * OTOH, Moto racer 2 at some points sets alphaop/alphaarg to SELECTARG/CURRENT, yet puts garbage in diffuse alpha
-             * (zeroes). This works on native, because the game disables alpha test and alpha blending. Alpha test is overwritten by
-             * wine's for purposes of color-keying though, so this will lead to missing geometry if texture alpha is modulated
-             * (pixels fail alpha test). To get around this, ALPHABLENDENABLE state is checked: if the app enables alpha blending,
-             * it can be expected to provide meaningful values in diffuse alpha, so it should be modulated with texture alpha;
-             * otherwise, selecting diffuse alpha is ignored in favour of texture alpha.
-
-             * What to do with multitexturing? So far no app has been found that uses color keying with multitexturing
-             */
-            if(op == WINED3DTOP_DISABLE) {
-                arg1 = WINED3DTA_TEXTURE;
-                op = WINED3DTOP_SELECTARG1;
-            }
-            else if(op == WINED3DTOP_SELECTARG1 && arg1 != WINED3DTA_TEXTURE) {
-                if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE]) {
-                    arg2 = WINED3DTA_TEXTURE;
-                    op = WINED3DTOP_MODULATE;
+    if (stateblock->renderState[WINED3DRS_COLORKEYENABLE] && stage == 0 && stateblock->textures[0])
+    {
+        UINT texture_dimensions = IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[0]);
+
+        if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB)
+        {
+            IWineD3DSurfaceImpl *surf;
+
+            surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *) stateblock->textures[0])->surfaces[0];
+
+            if (surf->CKeyFlags & WINEDDSD_CKSRCBLT && !surf->resource.format_desc->alpha_mask)
+            {
+                /* Color keying needs to pass alpha values from the texture through to have the alpha test work
+                 * properly. On the other hand applications can still use texture combiners apparently. This code
+                 * takes care that apps cannot remove the texture's alpha channel entirely.
+                 *
+                 * The fixup is required for Prince of Persia 3D(prison bars), while Moto racer 2 requires
+                 * D3DTOP_MODULATE to work on color keyed surfaces. Aliens vs Predator 1 uses color keyed textures
+                 * and alpha component of diffuse color to draw things like translucent text and perform other
+                 * blending effects.
+                 *
+                 * Aliens vs Predator 1 relies on diffuse alpha having an effect, so it cannot be ignored. To
+                 * provide the behavior expected by the game, while emulating the colorkey, diffuse alpha must be
+                 * modulated with texture alpha. OTOH, Moto racer 2 at some points sets alphaop/alphaarg to
+                 * SELECTARG/CURRENT, yet puts garbage in diffuse alpha (zeroes). This works on native, because the
+                 * game disables alpha test and alpha blending. Alpha test is overwritten by wine's for purposes of
+                 * color-keying though, so this will lead to missing geometry if texture alpha is modulated (pixels
+                 * fail alpha test). To get around this, ALPHABLENDENABLE state is checked: if the app enables alpha
+                 * blending, it can be expected to provide meaningful values in diffuse alpha, so it should be
+                 * modulated with texture alpha; otherwise, selecting diffuse alpha is ignored in favour of texture
+                 * alpha.
+                 *
+                 * What to do with multitexturing? So far no app has been found that uses color keying with
+                 * multitexturing */
+                if (op == WINED3DTOP_DISABLE)
+                {
+                    arg1 = WINED3DTA_TEXTURE;
+                    op = WINED3DTOP_SELECTARG1;
                 }
-                else arg1 = WINED3DTA_TEXTURE;
-            }
-            else if(op == WINED3DTOP_SELECTARG2 && arg2 != WINED3DTA_TEXTURE) {
-                if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE]) {
-                    arg1 = WINED3DTA_TEXTURE;
-                    op = WINED3DTOP_MODULATE;
+                else if(op == WINED3DTOP_SELECTARG1 && arg1 != WINED3DTA_TEXTURE)
+                {
+                    if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE])
+                    {
+                        arg2 = WINED3DTA_TEXTURE;
+                        op = WINED3DTOP_MODULATE;
+                    }
+                    else arg1 = WINED3DTA_TEXTURE;
                 }
-                else arg2 = WINED3DTA_TEXTURE;
+                else if(op == WINED3DTOP_SELECTARG2 && arg2 != WINED3DTA_TEXTURE)
+                {
+                    if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE])
+                    {
+                        arg1 = WINED3DTA_TEXTURE;
+                        op = WINED3DTOP_MODULATE;
+                    }
+                    else arg2 = WINED3DTA_TEXTURE;
+                }
             }
         }
@@ -3075,5 +3009,5 @@
 
 static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD texUnit = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD texUnit = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[texUnit];
     BOOL generated;
@@ -3081,47 +3015,44 @@
 
     /* Ignore this when a vertex shader is used, or if the streams aren't sorted out yet */
-    if(use_vs(stateblock->wineD3DDevice) ||
-       isStateDirty(context, STATE_VDECL)) {
+    if (use_vs(stateblock) || isStateDirty(context, STATE_VDECL))
+    {
         TRACE("Using a vertex shader, or stream sources not sorted out yet, skipping\n");
         return;
     }
 
-    if (mapped_stage == -1) return;
-
-    if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-        if(mapped_stage >= GL_LIMITS(textures)) {
-            return;
-        }
-        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
-        checkGLcall("glActiveTextureARB");
-    } else if (mapped_stage > 0) {
-        /* We can't do anything here */
-        WARN("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
+    if (mapped_stage == WINED3D_UNMAPPED_STAGE) return;
+
+    if(mapped_stage >= GL_LIMITS(textures)) {
         return;
     }
+    GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
+    checkGLcall("glActiveTextureARB");
     generated = (stateblock->textureState[texUnit][WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) != WINED3DTSS_TCI_PASSTHRU;
     coordIdx = min(stateblock->textureState[texUnit][WINED3DTSS_TEXCOORDINDEX & 0x0000FFFF], MAX_TEXTURES - 1);
 
     set_texture_matrix(&stateblock->transforms[WINED3DTS_TEXTURE0 + texUnit].u.m[0][0],
-                        stateblock->textureState[texUnit][WINED3DTSS_TEXTURETRANSFORMFLAGS],
-                        generated,
-                        context->last_was_rhw,
-                        stateblock->wineD3DDevice->strided_streams.u.s.texCoords[coordIdx].dwStride ?
-                            stateblock->wineD3DDevice->strided_streams.u.s.texCoords[coordIdx].dwType:
-                            WINED3DDECLTYPE_UNUSED,
-                        stateblock->wineD3DDevice->frag_pipe->ffp_proj_control);
+            stateblock->textureState[texUnit][WINED3DTSS_TEXTURETRANSFORMFLAGS], generated, context->last_was_rhw,
+            stateblock->wineD3DDevice->strided_streams.elements[WINED3D_FFP_TEXCOORD0 + coordIdx].stride
+            ? stateblock->wineD3DDevice->strided_streams.elements[WINED3D_FFP_TEXCOORD0 + coordIdx].format_desc->format
+            : WINED3DFMT_UNKNOWN,
+            stateblock->wineD3DDevice->frag_pipe->ffp_proj_control);
 
     /* The sampler applying function calls us if this changes */
-    if(context->lastWasPow2Texture[texUnit] && stateblock->textures[texUnit]) {
+    if ((context->lastWasPow2Texture & (1 << texUnit)) && stateblock->textures[texUnit])
+    {
         if(generated) {
             FIXME("Non-power2 texture being used with generated texture coords\n");
         }
-        TRACE("Non power two matrix multiply fixup\n");
-        glMultMatrixf(((IWineD3DTextureImpl *) stateblock->textures[texUnit])->baseTexture.pow2Matrix);
+        /* NP2 texcoord fixup is implemented for pixelshaders (currently only in GLSL backend) so
+           only enable the fixed-function-pipeline fixup via pow2Matrix when no PS is used. */
+        if (!use_ps(stateblock)) {
+            TRACE("Non power two matrix multiply fixup\n");
+            glMultMatrixf(((IWineD3DTextureImpl *) stateblock->textures[texUnit])->baseTexture.pow2Matrix);
+        }
     }
 }
 
 static void unloadTexCoords(IWineD3DStateBlockImpl *stateblock) {
-    int texture_idx;
+    unsigned int texture_idx;
 
     for (texture_idx = 0; texture_idx < GL_LIMITS(texture_stages); ++texture_idx) {
@@ -3131,5 +3062,5 @@
 }
 
-static void loadTexCoords(IWineD3DStateBlockImpl *stateblock, const WineDirect3DVertexStridedData *sd, GLint *curVBO)
+static void loadTexCoords(IWineD3DStateBlockImpl *stateblock, const struct wined3d_stream_info *si, GLuint *curVBO)
 {
     const UINT *offset = stateblock->streamOffset;
@@ -3137,25 +3068,22 @@
     unsigned int textureNo = 0;
 
-    /* The code below uses glClientActiveTexture and glMultiTexCoord* which are all part of the GL_ARB_multitexture extension. */
-    /* Abort if we don't support the extension. */
-    if (!GL_SUPPORT(ARB_MULTITEXTURE)) {
-        FIXME("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
-        return;
-    }
-
     for (textureNo = 0; textureNo < GL_LIMITS(texture_stages); ++textureNo) {
         int coordIdx = stateblock->textureState[textureNo][WINED3DTSS_TEXCOORDINDEX];
+        const struct wined3d_stream_info_element *e;
 
         mapped_stage = stateblock->wineD3DDevice->texUnitMap[textureNo];
-        if (mapped_stage == -1) continue;
-
-        if (coordIdx < MAX_TEXTURES && (sd->u.s.texCoords[coordIdx].lpData || sd->u.s.texCoords[coordIdx].VBO)) {
+        if (mapped_stage == WINED3D_UNMAPPED_STAGE) continue;
+
+        e = &si->elements[WINED3D_FFP_TEXCOORD0 + coordIdx];
+        if (coordIdx < MAX_TEXTURES && (e->data || e->buffer_object))
+        {
             TRACE("Setting up texture %u, idx %d, cordindx %u, data %p\n",
-                    textureNo, mapped_stage, coordIdx, sd->u.s.texCoords[coordIdx].lpData);
-
-            if (*curVBO != sd->u.s.texCoords[coordIdx].VBO) {
-                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, sd->u.s.texCoords[coordIdx].VBO));
+                    textureNo, mapped_stage, coordIdx, e->data);
+
+            if (*curVBO != e->buffer_object)
+            {
+                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->buffer_object));
                 checkGLcall("glBindBufferARB");
-                *curVBO = sd->u.s.texCoords[coordIdx].VBO;
+                *curVBO = e->buffer_object;
             }
 
@@ -3164,9 +3092,6 @@
 
             /* The coords to supply depend completely on the fvf / vertex shader */
-            glTexCoordPointer(
-                    WINED3D_ATR_SIZE(sd->u.s.texCoords[coordIdx].dwType),
-                    WINED3D_ATR_GLTYPE(sd->u.s.texCoords[coordIdx].dwType),
-                    sd->u.s.texCoords[coordIdx].dwStride,
-                    sd->u.s.texCoords[coordIdx].lpData + stateblock->loadBaseVertexIndex * sd->u.s.texCoords[coordIdx].dwStride + offset[sd->u.s.texCoords[coordIdx].streamNo]);
+            glTexCoordPointer(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride,
+                    e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]);
             glEnableClientState(GL_TEXTURE_COORD_ARRAY);
         } else {
@@ -3185,33 +3110,27 @@
 
 static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage];
-    const GLfloat s_plane[] = { 1.0, 0.0, 0.0, 0.0 };
-    const GLfloat t_plane[] = { 0.0, 1.0, 0.0, 0.0 };
-    const GLfloat r_plane[] = { 0.0, 0.0, 1.0, 0.0 };
-    const GLfloat q_plane[] = { 0.0, 0.0, 0.0, 1.0 };
-
-    if (mapped_stage == -1) {
+    static const GLfloat s_plane[] = { 1.0, 0.0, 0.0, 0.0 };
+    static const GLfloat t_plane[] = { 0.0, 1.0, 0.0, 0.0 };
+    static const GLfloat r_plane[] = { 0.0, 0.0, 1.0, 0.0 };
+    static const GLfloat q_plane[] = { 0.0, 0.0, 0.0, 1.0 };
+
+    if (mapped_stage == WINED3D_UNMAPPED_STAGE)
+    {
         TRACE("No texture unit mapped to stage %d. Skipping texture coordinates.\n", stage);
         return;
     }
 
-    if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-        if(mapped_stage >= GL_LIMITS(fragment_samplers)) {
-            return;
-        }
-        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
-        checkGLcall("glActiveTextureARB");
-    } else if (stage > 0) {
-        /* We can't do anything here */
-        WARN("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
+    if(mapped_stage >= GL_LIMITS(fragment_samplers)) {
+        WARN("stage %u not mapped to a valid texture unit (%u)\n", stage, mapped_stage);
         return;
     }
+    GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
+    checkGLcall("glActiveTextureARB");
 
     /* Values 0-7 are indexes into the FVF tex coords - See comments in DrawPrimitive
      *
-     * FIXME: From MSDN: The WINED3DTSS_TCI_* flags are mutually exclusive. If you include
-     * one flag, you can still specify an index value, which the system uses to
-     * determine the texture wrapping mode.
+     * FIXME: When using generated texture coordinates, the index value is used to specify the wrapping mode.
      * eg. SetTextureStageState( 0, WINED3DTSS_TEXCOORDINDEX, WINED3DTSS_TCI_CAMERASPACEPOSITION | 1 );
      * means use the vertex position (camera-space) as the input texture coordinates
@@ -3220,25 +3139,20 @@
      * to the TEXCOORDINDEX value
      */
-
-    /*
-     * Be careful the value of the mask 0xF0000 come from d3d8types.h infos
-     */
-    switch (stateblock->textureState[stage][WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) {
-    case WINED3DTSS_TCI_PASSTHRU:
-        /*Use the specified texture coordinates contained within the vertex format. This value resolves to zero.*/
-        glDisable(GL_TEXTURE_GEN_S);
-        glDisable(GL_TEXTURE_GEN_T);
-        glDisable(GL_TEXTURE_GEN_R);
-        glDisable(GL_TEXTURE_GEN_Q);
-        checkGLcall("glDisable(GL_TEXTURE_GEN_S,T,R,Q)");
-        break;
-
-    case WINED3DTSS_TCI_CAMERASPACEPOSITION:
-        /* CameraSpacePosition means use the vertex position, transformed to camera space,
-         * as the input texture coordinates for this stage's texture transformation. This
-         * equates roughly to EYE_LINEAR
-         */
-        {
-            TRACE("WINED3DTSS_TCI_CAMERASPACEPOSITION - Set eye plane\n");
+    switch (stateblock->textureState[stage][WINED3DTSS_TEXCOORDINDEX] & 0xffff0000)
+    {
+        case WINED3DTSS_TCI_PASSTHRU:
+            /* Use the specified texture coordinates contained within the
+             * vertex format. This value resolves to zero. */
+            glDisable(GL_TEXTURE_GEN_S);
+            glDisable(GL_TEXTURE_GEN_T);
+            glDisable(GL_TEXTURE_GEN_R);
+            glDisable(GL_TEXTURE_GEN_Q);
+            checkGLcall("WINED3DTSS_TCI_PASSTHRU - Disable texgen.");
+            break;
+
+        case WINED3DTSS_TCI_CAMERASPACEPOSITION:
+            /* CameraSpacePosition means use the vertex position, transformed to camera space,
+             * as the input texture coordinates for this stage's texture transformation. This
+             * equates roughly to EYE_LINEAR */
 
             glMatrixMode(GL_MODELVIEW);
@@ -3250,55 +3164,26 @@
             glTexGenfv(GL_Q, GL_EYE_PLANE, q_plane);
             glPopMatrix();
-
-            TRACE("WINED3DTSS_TCI_CAMERASPACEPOSITION - Set GL_TEXTURE_GEN_x and GL_x, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR\n");
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACEPOSITION - Set eye plane.");
+
+            glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
+            glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
+            glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACEPOSITION - Set texgen mode.");
+
             glEnable(GL_TEXTURE_GEN_S);
-            checkGLcall("glEnable(GL_TEXTURE_GEN_S)");
-            glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
-            checkGLcall("glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR)");
             glEnable(GL_TEXTURE_GEN_T);
-            checkGLcall("glEnable(GL_TEXTURE_GEN_T)");
-            glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
-            checkGLcall("glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR)");
             glEnable(GL_TEXTURE_GEN_R);
-            checkGLcall("glEnable(GL_TEXTURE_GEN_R)");
-            glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
-            checkGLcall("glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR)");
-        }
-        break;
-
-    case WINED3DTSS_TCI_CAMERASPACENORMAL:
-        {
-            if (GL_SUPPORT(NV_TEXGEN_REFLECTION)) {
-                TRACE("WINED3DTSS_TCI_CAMERASPACENORMAL - Set eye plane\n");
-
-                glMatrixMode(GL_MODELVIEW);
-                glPushMatrix();
-                glLoadIdentity();
-                glTexGenfv(GL_S, GL_EYE_PLANE, s_plane);
-                glTexGenfv(GL_T, GL_EYE_PLANE, t_plane);
-                glTexGenfv(GL_R, GL_EYE_PLANE, r_plane);
-                glTexGenfv(GL_Q, GL_EYE_PLANE, q_plane);
-                glPopMatrix();
-
-                glEnable(GL_TEXTURE_GEN_S);
-                checkGLcall("glEnable(GL_TEXTURE_GEN_S)");
-                glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
-                checkGLcall("glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV)");
-                glEnable(GL_TEXTURE_GEN_T);
-                checkGLcall("glEnable(GL_TEXTURE_GEN_T)");
-                glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
-                checkGLcall("glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV)");
-                glEnable(GL_TEXTURE_GEN_R);
-                checkGLcall("glEnable(GL_TEXTURE_GEN_R)");
-                glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
-                checkGLcall("glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV)");
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACEPOSITION - Enable texgen.");
+
+            break;
+
+        case WINED3DTSS_TCI_CAMERASPACENORMAL:
+            /* Note that NV_TEXGEN_REFLECTION support is implied when
+             * ARB_TEXTURE_CUBE_MAP is supported */
+            if (!GL_SUPPORT(NV_TEXGEN_REFLECTION))
+            {
+                FIXME("WINED3DTSS_TCI_CAMERASPACENORMAL not supported.\n");
+                break;
             }
-        }
-        break;
-
-    case WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR:
-        {
-            if (GL_SUPPORT(NV_TEXGEN_REFLECTION)) {
-            TRACE("WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR - Set eye plane\n");
 
             glMatrixMode(GL_MODELVIEW);
@@ -3310,31 +3195,71 @@
             glTexGenfv(GL_Q, GL_EYE_PLANE, q_plane);
             glPopMatrix();
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACENORMAL - Set eye plane.");
+
+            glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
+            glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
+            glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACENORMAL - Set texgen mode.");
 
             glEnable(GL_TEXTURE_GEN_S);
-            checkGLcall("glEnable(GL_TEXTURE_GEN_S)");
+            glEnable(GL_TEXTURE_GEN_T);
+            glEnable(GL_TEXTURE_GEN_R);
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACENORMAL - Enable texgen.");
+
+            break;
+
+        case WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR:
+            /* Note that NV_TEXGEN_REFLECTION support is implied when
+             * ARB_TEXTURE_CUBE_MAP is supported */
+            if (!GL_SUPPORT(NV_TEXGEN_REFLECTION))
+            {
+                FIXME("WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR not supported.\n");
+                break;
+            }
+
+            glMatrixMode(GL_MODELVIEW);
+            glPushMatrix();
+            glLoadIdentity();
+            glTexGenfv(GL_S, GL_EYE_PLANE, s_plane);
+            glTexGenfv(GL_T, GL_EYE_PLANE, t_plane);
+            glTexGenfv(GL_R, GL_EYE_PLANE, r_plane);
+            glTexGenfv(GL_Q, GL_EYE_PLANE, q_plane);
+            glPopMatrix();
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR - Set eye plane.");
+
             glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV);
-            checkGLcall("glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV)");
+            glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV);
+            glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV);
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR - Set texgen mode.");
+
+            glEnable(GL_TEXTURE_GEN_S);
             glEnable(GL_TEXTURE_GEN_T);
-            checkGLcall("glEnable(GL_TEXTURE_GEN_T)");
-            glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV);
-            checkGLcall("glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV)");
             glEnable(GL_TEXTURE_GEN_R);
-            checkGLcall("glEnable(GL_TEXTURE_GEN_R)");
-            glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV);
-            checkGLcall("glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV)");
-            }
-        }
-        break;
-
-    /* Unhandled types: */
-    default:
-        /* Todo: */
-        /* ? disable GL_TEXTURE_GEN_n ? */
-        glDisable(GL_TEXTURE_GEN_S);
-        glDisable(GL_TEXTURE_GEN_T);
-        glDisable(GL_TEXTURE_GEN_R);
-        glDisable(GL_TEXTURE_GEN_Q);
-        FIXME("Unhandled WINED3DTSS_TEXCOORDINDEX %x\n", stateblock->textureState[stage][WINED3DTSS_TEXCOORDINDEX]);
-        break;
+            checkGLcall("WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR - Enable texgen.");
+
+            break;
+
+        case WINED3DTSS_TCI_SPHEREMAP:
+            glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
+            glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
+            checkGLcall("WINED3DTSS_TCI_SPHEREMAP - Set texgen mode.");
+
+            glEnable(GL_TEXTURE_GEN_S);
+            glEnable(GL_TEXTURE_GEN_T);
+            glDisable(GL_TEXTURE_GEN_R);
+            checkGLcall("WINED3DTSS_TCI_SPHEREMAP - Enable texgen.");
+
+            break;
+
+        default:
+            FIXME("Unhandled WINED3DTSS_TEXCOORDINDEX %#x\n",
+                    stateblock->textureState[stage][WINED3DTSS_TEXCOORDINDEX]);
+            glDisable(GL_TEXTURE_GEN_S);
+            glDisable(GL_TEXTURE_GEN_T);
+            glDisable(GL_TEXTURE_GEN_R);
+            glDisable(GL_TEXTURE_GEN_Q);
+            checkGLcall("Disable texgen.");
+
+            break;
     }
 
@@ -3350,5 +3275,5 @@
          * TODO: Tidy that up to reload only the arrays of the changed unit
          */
-        GLint curVBO = GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) ? -1 : 0;
+        GLuint curVBO = GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) ? ~0U : 0;
 
         unloadTexCoords(stateblock);
@@ -3368,9 +3293,9 @@
     }
 
-    device->shader_backend->shader_load_constants((IWineD3DDevice *) device, use_ps(device), use_vs(device));
+    device->shader_backend->shader_load_constants((IWineD3DDevice *)device, use_ps(stateblock), use_vs(stateblock));
 }
 
 static void tex_bumpenvlscale(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
 
     if(stateblock->pixelShader && stage != 0 &&
@@ -3387,7 +3312,8 @@
 
 static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    BOOL texIsPow2 = FALSE;
-    DWORD sampler = state - STATE_SAMPLER(0);
+    const DWORD sampler = state - STATE_SAMPLER(0);
     IWineD3DBaseTexture *texture = stateblock->textures[sampler];
+
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
 
     if(!texture) return;
@@ -3400,18 +3326,10 @@
      */
     if(sampler < MAX_TEXTURES) {
-        if(stateblock->textureDimensions[sampler] == GL_TEXTURE_2D ||
-           stateblock->textureDimensions[sampler] == GL_TEXTURE_RECTANGLE_ARB) {
-            if(((IWineD3DTextureImpl *)texture)->baseTexture.pow2Matrix[0] != 1.0 ||
-               ((IWineD3DTextureImpl *)texture)->baseTexture.pow2Matrix[5] != 1.0 ) {
-                texIsPow2 = TRUE;
-            }
-        } else if(stateblock->textureDimensions[sampler] == GL_TEXTURE_CUBE_MAP_ARB) {
-            if(((IWineD3DCubeTextureImpl *)texture)->baseTexture.pow2Matrix[0] != 1.0) {
-                texIsPow2 = TRUE;
-            }
-        }
-
-        if(texIsPow2 || context->lastWasPow2Texture[sampler]) {
-            context->lastWasPow2Texture[sampler] = texIsPow2;
+        const BOOL texIsPow2 = !((IWineD3DBaseTextureImpl *)texture)->baseTexture.pow2Matrix_identity;
+
+        if (texIsPow2 || (context->lastWasPow2Texture & (1 << sampler)))
+        {
+            if (texIsPow2) context->lastWasPow2Texture |= 1 << sampler;
+            else context->lastWasPow2Texture &= ~(1 << sampler);
             transform_texture(STATE_TEXTURESTAGE(stateblock->wineD3DDevice->texUnitMap[sampler], WINED3DTSS_TEXTURETRANSFORMFLAGS), stateblock, context);
         }
@@ -3432,24 +3350,21 @@
      */
 
-    if (mapped_stage == -1) {
+    if (mapped_stage == WINED3D_UNMAPPED_STAGE)
+    {
         TRACE("No sampler mapped to stage %d. Returning.\n", sampler);
         return;
     }
 
-    if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-        if (mapped_stage >= GL_LIMITS(combined_samplers)) {
-            return;
-        }
-        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
-        checkGLcall("glActiveTextureARB");
-    } else if (sampler > 0) {
-        /* We can't do anything here */
-        WARN("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
+    if (mapped_stage >= GL_LIMITS(combined_samplers)) {
         return;
     }
+    GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
+    checkGLcall("glActiveTextureARB");
 
     if(stateblock->textures[sampler]) {
-        IWineD3DBaseTexture_PreLoad(stateblock->textures[sampler]);
-        IWineD3DBaseTexture_BindTexture(stateblock->textures[sampler]);
+        BOOL srgb = stateblock->samplerState[sampler][WINED3DSAMP_SRGBTEXTURE];
+        IWineD3DBaseTextureImpl *tex_impl = (IWineD3DBaseTextureImpl *) stateblock->textures[sampler];
+        tex_impl->baseTexture.internal_preload(stateblock->textures[sampler], srgb ? SRGB_SRGB : SRGB_RGB);
+        IWineD3DBaseTexture_BindTexture(stateblock->textures[sampler], srgb);
         IWineD3DBaseTexture_ApplyStateChanges(stateblock->textures[sampler], stateblock->textureState[sampler], stateblock->samplerState[sampler]);
 
@@ -3462,5 +3377,6 @@
         }
 
-        if(!use_ps(stateblock->wineD3DDevice) && sampler < stateblock->lowest_disabled_stage) {
+        if (!use_ps(stateblock) && sampler < stateblock->lowest_disabled_stage)
+        {
             if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && sampler == 0) {
                 /* If color keying is enabled update the alpha test, it depends on the existence
@@ -3469,4 +3385,12 @@
                 state_alpha(WINED3DRS_COLORKEYENABLE, stateblock, context);
             }
+        }
+
+        /* Trigger shader constant reloading (for NP2 texcoord fixup)
+         * Only do this if pshaders are used (note: fixup is currently only implemented in GLSL). */
+        if (!tex_impl->baseTexture.pow2Matrix_identity) {
+            IWineD3DDeviceImpl* d3ddevice = stateblock->wineD3DDevice;
+            d3ddevice->shader_backend->shader_load_np2fixup_constants(
+                (IWineD3DDevice*)d3ddevice, use_ps(stateblock), use_vs(stateblock));
         }
     } else if(mapped_stage < GL_LIMITS(textures)) {
@@ -3485,24 +3409,8 @@
 }
 
-static void apply_pshader_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
-
-    if (use_ps(device)) {
-        if(!context->last_was_pshader) {
-            state_fog(state, stateblock, context);
-        }
-        context->last_was_pshader = TRUE;
-    } else {
-        if(context->last_was_pshader) {
-            state_fog(state, stateblock, context);
-        }
-        context->last_was_pshader = FALSE;
-    }
-}
-
 void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
-    BOOL use_pshader = use_ps(device);
-    BOOL use_vshader = use_vs(device);
+    BOOL use_pshader = use_ps(stateblock);
+    BOOL use_vshader = use_vs(stateblock);
     int i;
 
@@ -3518,4 +3426,5 @@
                 }
             }
+            context->last_was_pshader = TRUE;
         } else {
            /* Otherwise all samplers were activated by the code above in earlier draws, or by sampler()
@@ -3533,4 +3442,5 @@
             }
         }
+        context->last_was_pshader = FALSE;
     }
 
@@ -3545,5 +3455,5 @@
 
 static void shader_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
+    DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     if(stateblock->pixelShader && stage != 0 &&
        ((IWineD3DPixelShaderImpl *) stateblock->pixelShader)->baseShader.reg_maps.bumpmat[stage]) {
@@ -3683,5 +3593,5 @@
 
             if(!stateblock->wineD3DDevice->vertexBlendUsed) {
-                int i;
+                unsigned int i;
                 for(i = 1; i < GL_LIMITS(blends); i++) {
                     if(!isStateDirty(context, STATE_TRANSFORM(WINED3DTS_WORLDMATRIX(i)))) {
@@ -3909,8 +3819,25 @@
 }
 
+static inline void unload_numbered_array(IWineD3DStateBlockImpl *stateblock, WineD3DContext *context, int i)
+{
+    GL_EXTCALL(glDisableVertexAttribArrayARB(i));
+    checkGLcall("glDisableVertexAttribArrayARB(reg)");
+    /* Some Windows drivers(NV GF 7) use the latest value that was used when drawing with the now
+     * deactivated stream disabled, some other drivers(ATI, NV GF 8) set the undefined values to 0x00.
+     * Let's set them to 0x00 to avoid hitting some undefined aspects of OpenGL. All that is really
+     * important here is the glDisableVertexAttribArrayARB call above. The test shows that the refrast
+     * keeps dereferencing the pointers, which would cause crashes in some games like Half Life 2: Episode Two.
+     */
+    GL_EXTCALL(glVertexAttrib4NubARB(i, 0, 0, 0, 0));
+    checkGLcall("glVertexAttrib4NubARB(i, 0, 0, 0, 0)");
+
+    context->numbered_array_mask &= ~(1 << i);
+}
+
 /* This should match any arrays loaded in loadNumberedArrays
  * TODO: Only load / unload arrays if we have to.
  */
-static inline void unloadNumberedArrays(IWineD3DStateBlockImpl *stateblock) {
+static inline void unloadNumberedArrays(IWineD3DStateBlockImpl *stateblock, WineD3DContext *context)
+{
     /* disable any attribs (this is the same for both GLSL and ARB modes) */
     GLint maxAttribs = 16;
@@ -3923,23 +3850,15 @@
         maxAttribs = 16;
     for (i = 0; i < maxAttribs; ++i) {
-        GL_EXTCALL(glDisableVertexAttribArrayARB(i));
-        checkGLcall("glDisableVertexAttribArrayARB(reg)");
-        /* Some Windows drivers(NV GF 7) use the latest value that was used when drawing with the now
-         * deactivated stream disabled, some other drivers(ATI, NV GF 8) set the undefined values to 0x00.
-         * Let's set them to 0x00 to avoid hitting some undefined aspects of OpenGL. All that is really
-         * important here is the glDisableVertexAttribArrayARB call above. The test shows that the refrast
-         * keeps dereferencing the pointers, which would cause crashes in some games like Half Life 2: Episode Two.
-         */
-        GL_EXTCALL(glVertexAttrib4NubARB(i, 0, 0, 0, 0));
-        checkGLcall("glVertexAttrib4NubARB(i, 0, 0, 0, 0)");
-    }
-}
-
-static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock, const WineDirect3DVertexStridedData *strided)
+        unload_numbered_array(stateblock, context, i);
+    }
+}
+
+static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock,
+        const struct wined3d_stream_info *stream_info, WineD3DContext *context)
 {
-    GLint curVBO = GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) ? -1 : 0;
+    GLuint curVBO = GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) ? ~0U : 0;
     int i;
     const UINT *offset = stateblock->streamOffset;
-    IWineD3DVertexBufferImpl *vb;
+    struct wined3d_buffer *vb;
     DWORD_PTR shift_index;
 
@@ -3948,98 +3867,118 @@
 
     for (i = 0; i < MAX_ATTRIBS; i++) {
-
-        if (!strided->u.input[i].lpData && !strided->u.input[i].VBO)
+        if (!(stream_info->use_map & (1 << i)))
+        {
+            if (context->numbered_array_mask & (1 << i)) unload_numbered_array(stateblock, context, i);
             continue;
+        }
 
         /* Do not load instance data. It will be specified using glTexCoord by drawprim */
-        if(stateblock->streamFlags[strided->u.input[i].streamNo] & WINED3DSTREAMSOURCE_INSTANCEDATA) {
-            GL_EXTCALL(glDisableVertexAttribArrayARB(i));
+        if (stateblock->streamFlags[stream_info->elements[i].stream_idx] & WINED3DSTREAMSOURCE_INSTANCEDATA)
+        {
+            if (context->numbered_array_mask & (1 << i)) unload_numbered_array(stateblock, context, i);
             stateblock->wineD3DDevice->instancedDraw = TRUE;
             continue;
         }
 
-        TRACE_(d3d_shader)("Loading array %u [VBO=%u]\n", i, strided->u.input[i].VBO);
-
-        if(strided->u.input[i].dwStride) {
-            if(curVBO != strided->u.input[i].VBO) {
-                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, strided->u.input[i].VBO));
+        TRACE_(d3d_shader)("Loading array %u [VBO=%u]\n", i, stream_info->elements[i].buffer_object);
+
+        if (stream_info->elements[i].stride)
+        {
+            if (curVBO != stream_info->elements[i].buffer_object)
+            {
+                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, stream_info->elements[i].buffer_object));
                 checkGLcall("glBindBufferARB");
-                curVBO = strided->u.input[i].VBO;
+                curVBO = stream_info->elements[i].buffer_object;
             }
-            vb = (IWineD3DVertexBufferImpl *) stateblock->streamSource[strided->u.input[i].streamNo];
+            vb = (struct wined3d_buffer *)stateblock->streamSource[stream_info->elements[i].stream_idx];
             /* Use the VBO to find out if a vertex buffer exists, not the vb pointer. vb can point to a
              * user pointer data blob. In that case curVBO will be 0. If there is a vertex buffer but no
              * vbo we won't be load converted attributes anyway
              */
-            if(curVBO && vb->conv_shift) {
+            if (curVBO && vb->conversion_shift)
+            {
                 TRACE("Loading attribute from shifted buffer\n");
-                TRACE("Attrib %d has original stride %d, new stride %d\n", i, strided->u.input[i].dwStride, vb->conv_stride);
-                TRACE("Original offset %p, additional offset 0x%08x\n",strided->u.input[i].lpData, vb->conv_shift[(DWORD_PTR) strided->u.input[i].lpData]);
-                TRACE("Opengl type %x\n", WINED3D_ATR_GLTYPE(strided->u.input[i].dwType));
-                shift_index = ((DWORD_PTR) strided->u.input[i].lpData + offset[strided->u.input[i].streamNo]);
-                shift_index = shift_index % strided->u.input[i].dwStride;
-                GL_EXTCALL(glVertexAttribPointerARB(i,
-                                WINED3D_ATR_SIZE(strided->u.input[i].dwType),
-                                WINED3D_ATR_GLTYPE(strided->u.input[i].dwType),
-                                WINED3D_ATR_NORMALIZED(strided->u.input[i].dwType),
-                                vb->conv_stride,
-
-                                strided->u.input[i].lpData + vb->conv_shift[shift_index] +
-                                stateblock->loadBaseVertexIndex * strided->u.input[i].dwStride +
-                                offset[strided->u.input[i].streamNo]));
+                TRACE("Attrib %d has original stride %d, new stride %d\n",
+                        i, stream_info->elements[i].stride, vb->conversion_stride);
+                TRACE("Original offset %p, additional offset 0x%08x\n",
+                        stream_info->elements[i].data, vb->conversion_shift[(DWORD_PTR)stream_info->elements[i].data]);
+                TRACE("Opengl type %#x\n", stream_info->elements[i].format_desc->gl_vtx_type);
+                shift_index = ((DWORD_PTR)stream_info->elements[i].data + offset[stream_info->elements[i].stream_idx]);
+                shift_index = shift_index % stream_info->elements[i].stride;
+                GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format_desc->gl_vtx_format,
+                        stream_info->elements[i].format_desc->gl_vtx_type,
+                        stream_info->elements[i].format_desc->gl_normalized,
+                        vb->conversion_stride, stream_info->elements[i].data + vb->conversion_shift[shift_index]
+                        + stateblock->loadBaseVertexIndex * stream_info->elements[i].stride
+                        + offset[stream_info->elements[i].stream_idx]));
 
             } else {
-                GL_EXTCALL(glVertexAttribPointerARB(i,
-                                WINED3D_ATR_SIZE(strided->u.input[i].dwType),
-                                WINED3D_ATR_GLTYPE(strided->u.input[i].dwType),
-                                WINED3D_ATR_NORMALIZED(strided->u.input[i].dwType),
-                                strided->u.input[i].dwStride,
-
-                                strided->u.input[i].lpData +
-                                stateblock->loadBaseVertexIndex * strided->u.input[i].dwStride +
-                                offset[strided->u.input[i].streamNo]) );
-                }
-            GL_EXTCALL(glEnableVertexAttribArrayARB(i));
+                GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format_desc->gl_vtx_format,
+                        stream_info->elements[i].format_desc->gl_vtx_type,
+                        stream_info->elements[i].format_desc->gl_normalized,
+                        stream_info->elements[i].stride, stream_info->elements[i].data
+                        + stateblock->loadBaseVertexIndex * stream_info->elements[i].stride
+                        + offset[stream_info->elements[i].stream_idx]));
+            }
+
+            if (!(context->numbered_array_mask & (1 << i)))
+            {
+                GL_EXTCALL(glEnableVertexAttribArrayARB(i));
+                context->numbered_array_mask |= (1 << i);
+            }
         } else {
             /* Stride = 0 means always the same values. glVertexAttribPointerARB doesn't do that. Instead disable the pointer and
              * set up the attribute statically. But we have to figure out the system memory address.
              */
-            const BYTE *ptr = strided->u.input[i].lpData + offset[strided->u.input[i].streamNo];
-            if(strided->u.input[i].VBO) {
-                vb = (IWineD3DVertexBufferImpl *) stateblock->streamSource[strided->u.input[i].streamNo];
-                ptr += (long) vb->resource.allocatedMemory;
+            const BYTE *ptr = stream_info->elements[i].data + offset[stream_info->elements[i].stream_idx];
+            if (stream_info->elements[i].buffer_object)
+            {
+                vb = (struct wined3d_buffer *)stateblock->streamSource[stream_info->elements[i].stream_idx];
+                ptr += (long) buffer_get_sysmem(vb);
             }
-            GL_EXTCALL(glDisableVertexAttribArrayARB(i));
-
-            switch(strided->u.input[i].dwType) {
-                case WINED3DDECLTYPE_FLOAT1:
+
+            if (context->numbered_array_mask & (1 << i)) unload_numbered_array(stateblock, context, i);
+
+            switch (stream_info->elements[i].format_desc->format)
+            {
+                case WINED3DFMT_R32_FLOAT:
                     GL_EXTCALL(glVertexAttrib1fvARB(i, (const GLfloat *)ptr));
                     break;
-                case WINED3DDECLTYPE_FLOAT2:
+                case WINED3DFMT_R32G32_FLOAT:
                     GL_EXTCALL(glVertexAttrib2fvARB(i, (const GLfloat *)ptr));
                     break;
-                case WINED3DDECLTYPE_FLOAT3:
+                case WINED3DFMT_R32G32B32_FLOAT:
                     GL_EXTCALL(glVertexAttrib3fvARB(i, (const GLfloat *)ptr));
                     break;
-                case WINED3DDECLTYPE_FLOAT4:
+                case WINED3DFMT_R32G32B32A32_FLOAT:
                     GL_EXTCALL(glVertexAttrib4fvARB(i, (const GLfloat *)ptr));
                     break;
 
-                case WINED3DDECLTYPE_UBYTE4:
+                case WINED3DFMT_R8G8B8A8_UINT:
                     GL_EXTCALL(glVertexAttrib4NubvARB(i, ptr));
                     break;
-                case WINED3DDECLTYPE_UBYTE4N:
-                case WINED3DDECLTYPE_D3DCOLOR:
+                case WINED3DFMT_A8R8G8B8:
+                    if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
+                    {
+                        const DWORD *src = (const DWORD *)ptr;
+                        DWORD c = *src & 0xff00ff00;
+                        c |= (*src & 0xff0000) >> 16;
+                        c |= (*src & 0xff) << 16;
+                        GL_EXTCALL(glVertexAttrib4NubvARB(i, (GLubyte *)&c));
+                        break;
+                    }
+                    /* else fallthrough */
+                case WINED3DFMT_R8G8B8A8_UNORM:
                     GL_EXTCALL(glVertexAttrib4NubvARB(i, ptr));
                     break;
 
-                case WINED3DDECLTYPE_SHORT2:
+                case WINED3DFMT_R16G16_SINT:
                     GL_EXTCALL(glVertexAttrib4svARB(i, (const GLshort *)ptr));
                     break;
-                case WINED3DDECLTYPE_SHORT4:
+                case WINED3DFMT_R16G16B16A16_SINT:
                     GL_EXTCALL(glVertexAttrib4svARB(i, (const GLshort *)ptr));
                     break;
 
-                case WINED3DDECLTYPE_SHORT2N:
+                case WINED3DFMT_R16G16_SNORM:
                 {
                     const GLshort s[4] = {((const GLshort *)ptr)[0], ((const GLshort *)ptr)[1], 0, 1};
@@ -4047,5 +3986,5 @@
                     break;
                 }
-                case WINED3DDECLTYPE_USHORT2N:
+                case WINED3DFMT_R16G16_UNORM:
                 {
                     const GLushort s[4] = {((const GLushort *)ptr)[0], ((const GLushort *)ptr)[1], 0, 1};
@@ -4053,21 +3992,21 @@
                     break;
                 }
-                case WINED3DDECLTYPE_SHORT4N:
+                case WINED3DFMT_R16G16B16A16_SNORM:
                     GL_EXTCALL(glVertexAttrib4NsvARB(i, (const GLshort *)ptr));
                     break;
-                case WINED3DDECLTYPE_USHORT4N:
+                case WINED3DFMT_R16G16B16A16_UNORM:
                     GL_EXTCALL(glVertexAttrib4NusvARB(i, (const GLushort *)ptr));
                     break;
 
-                case WINED3DDECLTYPE_UDEC3:
+                case WINED3DFMT_R10G10B10A2_UINT:
                     FIXME("Unsure about WINED3DDECLTYPE_UDEC3\n");
                     /*glVertexAttrib3usvARB(i, (const GLushort *)ptr); Does not exist */
                     break;
-                case WINED3DDECLTYPE_DEC3N:
+                case WINED3DFMT_R10G10B10A2_SNORM:
                     FIXME("Unsure about WINED3DDECLTYPE_DEC3N\n");
                     /*glVertexAttrib3NusvARB(i, (const GLushort *)ptr); Does not exist */
                     break;
 
-                case WINED3DDECLTYPE_FLOAT16_2:
+                case WINED3DFMT_R16G16_FLOAT:
                     /* Are those 16 bit floats. C doesn't have a 16 bit float type. I could read the single bits and calculate a 4
                      * byte float according to the IEEE standard
@@ -4075,9 +4014,8 @@
                     FIXME("Unsupported WINED3DDECLTYPE_FLOAT16_2\n");
                     break;
-                case WINED3DDECLTYPE_FLOAT16_4:
+                case WINED3DFMT_R16G16B16A16_FLOAT:
                     FIXME("Unsupported WINED3DDECLTYPE_FLOAT16_4\n");
                     break;
 
-                case WINED3DDECLTYPE_UNUSED:
                 default:
                     ERR("Unexpected declaration in stride 0 attributes\n");
@@ -4091,8 +4029,9 @@
 
 /* Used from 2 different functions, and too big to justify making it inlined */
-static void loadVertexData(IWineD3DStateBlockImpl *stateblock, const WineDirect3DVertexStridedData *sd)
+static void loadVertexData(IWineD3DStateBlockImpl *stateblock, const struct wined3d_stream_info *si)
 {
     const UINT *offset = stateblock->streamOffset;
-    GLint curVBO = GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) ? -1 : 0;
+    GLuint curVBO = GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) ? ~0U : 0;
+    const struct wined3d_stream_info_element *e;
 
     TRACE("Using fast vertex array code\n");
@@ -4102,36 +4041,38 @@
 
     /* Blend Data ---------------------------------------------- */
-    if( (sd->u.s.blendWeights.lpData) || (sd->u.s.blendWeights.VBO) ||
-        (sd->u.s.blendMatrixIndices.lpData) || (sd->u.s.blendMatrixIndices.VBO) ) {
-
+    e = &si->elements[WINED3D_FFP_BLENDWEIGHT];
+    if (e->data || e->buffer_object
+            || si->elements[WINED3D_FFP_BLENDINDICES].data
+            || si->elements[WINED3D_FFP_BLENDINDICES].buffer_object)
+    {
         if (GL_SUPPORT(ARB_VERTEX_BLEND)) {
-            TRACE("Blend %d %p %d\n", WINED3D_ATR_SIZE(sd->u.s.blendWeights.dwType),
-                sd->u.s.blendWeights.lpData + stateblock->loadBaseVertexIndex * sd->u.s.blendWeights.dwStride, sd->u.s.blendWeights.dwStride + offset[sd->u.s.blendWeights.streamNo]);
+            TRACE("Blend %d %p %d\n", e->format_desc->component_count,
+                    e->data + stateblock->loadBaseVertexIndex * e->stride, e->stride + offset[e->stream_idx]);
 
             glEnableClientState(GL_WEIGHT_ARRAY_ARB);
             checkGLcall("glEnableClientState(GL_WEIGHT_ARRAY_ARB)");
 
-            GL_EXTCALL(glVertexBlendARB(WINED3D_ATR_SIZE(sd->u.s.blendWeights.dwType) + 1));
+            GL_EXTCALL(glVertexBlendARB(e->format_desc->component_count + 1));
 
             VTRACE(("glWeightPointerARB(%d, GL_FLOAT, %d, %p)\n",
-                WINED3D_ATR_SIZE(sd->u.s.blendWeights.dwType) ,
+                WINED3D_ATR_FORMAT(sd->u.s.blendWeights.dwType) ,
                 sd->u.s.blendWeights.dwStride,
                 sd->u.s.blendWeights.lpData + stateblock->loadBaseVertexIndex * sd->u.s.blendWeights.dwStride + offset[sd->u.s.blendWeights.streamNo]));
 
-            if(curVBO != sd->u.s.blendWeights.VBO) {
-                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, sd->u.s.blendWeights.VBO));
+            if (curVBO != e->buffer_object)
+            {
+                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->buffer_object));
                 checkGLcall("glBindBufferARB");
-                curVBO = sd->u.s.blendWeights.VBO;
+                curVBO = e->buffer_object;
             }
 
-            GL_EXTCALL(glWeightPointerARB)(
-                WINED3D_ATR_SIZE(sd->u.s.blendWeights.dwType),
-                WINED3D_ATR_GLTYPE(sd->u.s.blendWeights.dwType),
-                sd->u.s.blendWeights.dwStride,
-                sd->u.s.blendWeights.lpData + stateblock->loadBaseVertexIndex * sd->u.s.blendWeights.dwStride + offset[sd->u.s.blendWeights.streamNo]);
+            GL_EXTCALL(glWeightPointerARB)(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride,
+                e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]);
 
             checkGLcall("glWeightPointerARB");
 
-            if((sd->u.s.blendMatrixIndices.lpData) || (sd->u.s.blendMatrixIndices.VBO)){
+            if (si->elements[WINED3D_FFP_BLENDINDICES].data
+                    || (si->elements[WINED3D_FFP_BLENDINDICES].buffer_object))
+            {
                 static BOOL warned;
                 if (!warned)
@@ -4156,27 +4097,26 @@
 
     /* Point Size ----------------------------------------------*/
-    if (sd->u.s.pSize.lpData || sd->u.s.pSize.VBO) {
-
+    e = &si->elements[WINED3D_FFP_PSIZE];
+    if (e->data || e->buffer_object)
+    {
         /* no such functionality in the fixed function GL pipeline */
         TRACE("Cannot change ptSize here in openGl\n");
         /* TODO: Implement this function in using shaders if they are available */
-
     }
 
     /* Vertex Pointers -----------------------------------------*/
-    if (sd->u.s.position.lpData != NULL || sd->u.s.position.VBO != 0) {
-        /* Note dwType == float3 or float4 == 2 or 3 */
-        VTRACE(("glVertexPointer(%d, GL_FLOAT, %d, %p)\n",
-                sd->u.s.position.dwStride,
-                sd->u.s.position.dwType + 1,
-                sd->u.s.position.lpData));
-
-        if(curVBO != sd->u.s.position.VBO) {
-            GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, sd->u.s.position.VBO));
+    e = &si->elements[WINED3D_FFP_POSITION];
+    if (e->data || e->buffer_object)
+    {
+        VTRACE(("glVertexPointer(%d, GL_FLOAT, %d, %p)\n", e->stride, e->size, e->data));
+
+        if (curVBO != e->buffer_object)
+        {
+            GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->buffer_object));
             checkGLcall("glBindBufferARB");
-            curVBO = sd->u.s.position.VBO;
-        }
-
-        /* min(WINED3D_ATR_SIZE(position),3) to Disable RHW mode as 'w' coord
+            curVBO = e->buffer_object;
+        }
+
+        /* min(WINED3D_ATR_FORMAT(position),3) to Disable RHW mode as 'w' coord
            handling for rhw mode should not impact screen position whereas in GL it does.
            This may result in very slightly distorted textures in rhw mode.
@@ -4186,13 +4126,11 @@
            This only applies to user pointer sources, in VBOs the vertices are fixed up
          */
-        if(sd->u.s.position.VBO == 0) {
-            glVertexPointer(3 /* min(WINED3D_ATR_SIZE(sd->u.s.position.dwType),3) */,
-                WINED3D_ATR_GLTYPE(sd->u.s.position.dwType),
-                sd->u.s.position.dwStride, sd->u.s.position.lpData + stateblock->loadBaseVertexIndex * sd->u.s.position.dwStride + offset[sd->u.s.position.streamNo]);
+        if (!e->buffer_object)
+        {
+            glVertexPointer(3 /* min(e->format_desc->gl_vtx_format, 3) */, e->format_desc->gl_vtx_type, e->stride,
+                    e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]);
         } else {
-            glVertexPointer(
-                WINED3D_ATR_SIZE(sd->u.s.position.dwType),
-                WINED3D_ATR_GLTYPE(sd->u.s.position.dwType),
-                sd->u.s.position.dwStride, sd->u.s.position.lpData + stateblock->loadBaseVertexIndex * sd->u.s.position.dwStride + offset[sd->u.s.position.streamNo]);
+            glVertexPointer(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride,
+                    e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]);
         }
         checkGLcall("glVertexPointer(...)");
@@ -4202,18 +4140,16 @@
 
     /* Normals -------------------------------------------------*/
-    if (sd->u.s.normal.lpData || sd->u.s.normal.VBO) {
-        /* Note dwType == float3 or float4 == 2 or 3 */
-        VTRACE(("glNormalPointer(GL_FLOAT, %d, %p)\n",
-                sd->u.s.normal.dwStride,
-                sd->u.s.normal.lpData));
-        if(curVBO != sd->u.s.normal.VBO) {
-            GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, sd->u.s.normal.VBO));
+    e = &si->elements[WINED3D_FFP_NORMAL];
+    if (e->data || e->buffer_object)
+    {
+        VTRACE(("glNormalPointer(GL_FLOAT, %d, %p)\n", e->stride, e->data));
+        if (curVBO != e->buffer_object)
+        {
+            GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->buffer_object));
             checkGLcall("glBindBufferARB");
-            curVBO = sd->u.s.normal.VBO;
-        }
-        glNormalPointer(
-            WINED3D_ATR_GLTYPE(sd->u.s.normal.dwType),
-            sd->u.s.normal.dwStride,
-            sd->u.s.normal.lpData + stateblock->loadBaseVertexIndex * sd->u.s.normal.dwStride + offset[sd->u.s.normal.streamNo]);
+            curVBO = e->buffer_object;
+        }
+        glNormalPointer(e->format_desc->gl_vtx_type, e->stride,
+                e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]);
         checkGLcall("glNormalPointer(...)");
         glEnableClientState(GL_NORMAL_ARRAY);
@@ -4234,20 +4170,18 @@
     /* , or the user doesn't care and wants the speed advantage   */
 
-    if (sd->u.s.diffuse.lpData || sd->u.s.diffuse.VBO) {
-        /* Note dwType == float3 or float4 == 2 or 3 */
-        VTRACE(("glColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n",
-                sd->u.s.diffuse.dwStride,
-                sd->u.s.diffuse.lpData));
-
-        if(curVBO != sd->u.s.diffuse.VBO) {
-            GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, sd->u.s.diffuse.VBO));
+    e = &si->elements[WINED3D_FFP_DIFFUSE];
+    if (e->data || e->buffer_object)
+    {
+        VTRACE(("glColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n", e->stride, e->data));
+
+        if (curVBO != e->buffer_object)
+        {
+            GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->buffer_object));
             checkGLcall("glBindBufferARB");
-            curVBO = sd->u.s.diffuse.VBO;
-        }
-
-        glColorPointer(WINED3D_ATR_SIZE(sd->u.s.diffuse.dwType),
-                       WINED3D_ATR_GLTYPE(sd->u.s.diffuse.dwType),
-                       sd->u.s.diffuse.dwStride,
-                       sd->u.s.diffuse.lpData + stateblock->loadBaseVertexIndex * sd->u.s.diffuse.dwStride + offset[sd->u.s.diffuse.streamNo]);
+            curVBO = e->buffer_object;
+        }
+
+        glColorPointer(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type, e->stride,
+                e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]);
         checkGLcall("glColorPointer(4, GL_UNSIGNED_BYTE, ...)");
         glEnableClientState(GL_COLOR_ARRAY);
@@ -4260,20 +4194,19 @@
 
     /* Specular Colour ------------------------------------------*/
-    if (sd->u.s.specular.lpData || sd->u.s.specular.VBO) {
+    e = &si->elements[WINED3D_FFP_SPECULAR];
+    if (e->data || e->buffer_object)
+    {
         TRACE("setting specular colour\n");
-        /* Note dwType == float3 or float4 == 2 or 3 */
-        VTRACE(("glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n",
-                sd->u.s.specular.dwStride,
-                sd->u.s.specular.lpData));
+        VTRACE(("glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n", e->stride, e->data));
+
         if (GL_SUPPORT(EXT_SECONDARY_COLOR)) {
-            if(curVBO != sd->u.s.specular.VBO) {
-                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, sd->u.s.specular.VBO));
+            if (curVBO != e->buffer_object)
+            {
+                GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, e->buffer_object));
                 checkGLcall("glBindBufferARB");
-                curVBO = sd->u.s.specular.VBO;
+                curVBO = e->buffer_object;
             }
-            GL_EXTCALL(glSecondaryColorPointerEXT)(WINED3D_ATR_SIZE(sd->u.s.specular.dwType),
-                                                   WINED3D_ATR_GLTYPE(sd->u.s.specular.dwType),
-                                                   sd->u.s.specular.dwStride,
-                                                   sd->u.s.specular.lpData + stateblock->loadBaseVertexIndex * sd->u.s.specular.dwStride + offset[sd->u.s.specular.streamNo]);
+            GL_EXTCALL(glSecondaryColorPointerEXT)(e->format_desc->gl_vtx_format, e->format_desc->gl_vtx_type,
+                    e->stride, e->data + stateblock->loadBaseVertexIndex * e->stride + offset[e->stream_idx]);
             checkGLcall("glSecondaryColorPointerEXT(4, GL_UNSIGNED_BYTE, ...)");
             glEnableClientState(GL_SECONDARY_COLOR_ARRAY_EXT);
@@ -4297,34 +4230,26 @@
 
     /* Texture coords -------------------------------------------*/
-    loadTexCoords(stateblock, sd, &curVBO);
-}
-
-static inline void drawPrimitiveTraceDataLocations(const WineDirect3DVertexStridedData *dataLocations)
+    loadTexCoords(stateblock, si, &curVBO);
+}
+
+static inline void drawPrimitiveTraceDataLocations(const struct wined3d_stream_info *dataLocations)
 {
     /* Dump out what parts we have supplied */
     TRACE("Strided Data:\n");
-    TRACE_STRIDED((dataLocations), position);
-    TRACE_STRIDED((dataLocations), blendWeights);
-    TRACE_STRIDED((dataLocations), blendMatrixIndices);
-    TRACE_STRIDED((dataLocations), normal);
-    TRACE_STRIDED((dataLocations), pSize);
-    TRACE_STRIDED((dataLocations), diffuse);
-    TRACE_STRIDED((dataLocations), specular);
-    TRACE_STRIDED((dataLocations), texCoords[0]);
-    TRACE_STRIDED((dataLocations), texCoords[1]);
-    TRACE_STRIDED((dataLocations), texCoords[2]);
-    TRACE_STRIDED((dataLocations), texCoords[3]);
-    TRACE_STRIDED((dataLocations), texCoords[4]);
-    TRACE_STRIDED((dataLocations), texCoords[5]);
-    TRACE_STRIDED((dataLocations), texCoords[6]);
-    TRACE_STRIDED((dataLocations), texCoords[7]);
-    TRACE_STRIDED((dataLocations), position2);
-    TRACE_STRIDED((dataLocations), normal2);
-    TRACE_STRIDED((dataLocations), tangent);
-    TRACE_STRIDED((dataLocations), binormal);
-    TRACE_STRIDED((dataLocations), tessFactor);
-    TRACE_STRIDED((dataLocations), fog);
-    TRACE_STRIDED((dataLocations), depth);
-    TRACE_STRIDED((dataLocations), sample);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_POSITION);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_BLENDWEIGHT);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_BLENDINDICES);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_NORMAL);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_PSIZE);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_DIFFUSE);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_SPECULAR);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD0);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD1);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD2);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD3);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD4);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD5);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD6);
+    TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD7);
 
     return;
@@ -4334,19 +4259,15 @@
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
     BOOL fixup = FALSE;
-    WineDirect3DVertexStridedData *dataLocations = &device->strided_streams;
+    struct wined3d_stream_info *dataLocations = &device->strided_streams;
     BOOL useVertexShaderFunction;
-
-    if (device->vs_selected_mode != SHADER_NONE && stateblock->vertexShader &&
-        ((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.function != NULL) {
-        useVertexShaderFunction = TRUE;
-    } else {
-        useVertexShaderFunction = FALSE;
-    }
-
+    BOOL load_numbered = FALSE;
+    BOOL load_named = FALSE;
+
+    useVertexShaderFunction = (device->vs_selected_mode != SHADER_NONE && stateblock->vertexShader) ? TRUE : FALSE;
 
     if(device->up_strided) {
         /* Note: this is a ddraw fixed-function code path */
         TRACE("================ Strided Input ===================\n");
-        memcpy(dataLocations, device->up_strided, sizeof(*dataLocations));
+        device_stream_info_from_strided(device, device->up_strided, dataLocations);
 
         if(TRACE_ON(d3d)) {
@@ -4360,22 +4281,8 @@
          */
         TRACE("================ Vertex Declaration  ===================\n");
-        memset(dataLocations, 0, sizeof(*dataLocations));
-        primitiveDeclarationConvertToStridedData((IWineD3DDevice *) device,
-                useVertexShaderFunction, dataLocations, &fixup);
-    }
-
-    if (dataLocations->u.s.position_transformed) {
-        useVertexShaderFunction = FALSE;
-    }
-
-    /* Unload the old arrays before loading the new ones to get old junk out */
-    if(context->numberedArraysLoaded) {
-        unloadNumberedArrays(stateblock);
-        context->numberedArraysLoaded = FALSE;
-    }
-    if(context->namedArraysLoaded) {
-        unloadVertexData(stateblock);
-        context->namedArraysLoaded = FALSE;
-    }
+        device_stream_info_from_declaration(device, useVertexShaderFunction, dataLocations, &fixup);
+    }
+
+    if (dataLocations->position_transformed) useVertexShaderFunction = FALSE;
 
     if(useVertexShaderFunction) {
@@ -4383,20 +4290,18 @@
             TRACE("Using drawStridedSlow with vertex shaders for FLOAT16 conversion\n");
             device->useDrawStridedSlow = TRUE;
-            context->numberedArraysLoaded = FALSE;
         } else {
-            TRACE("Loading numbered arrays\n");
-            loadNumberedArrays(stateblock, dataLocations);
+            load_numbered = TRUE;
             device->useDrawStridedSlow = FALSE;
-            context->numberedArraysLoaded = TRUE;
-        }
-    } else if (fixup ||
-               (dataLocations->u.s.pSize.lpData == NULL &&
-                dataLocations->u.s.diffuse.lpData == NULL &&
-                dataLocations->u.s.specular.lpData == NULL)) {
+        }
+    }
+    else if (fixup || (!dataLocations->elements[WINED3D_FFP_PSIZE].data
+            && !dataLocations->position_transformed
+            && (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA)
+            || (!dataLocations->elements[WINED3D_FFP_DIFFUSE].data
+            && !dataLocations->elements[WINED3D_FFP_SPECULAR].data))))
+    {
         /* Load the vertex data using named arrays */
-        TRACE("Loading vertex data\n");
-        loadVertexData(stateblock, dataLocations);
+        load_named = TRUE;
         device->useDrawStridedSlow = FALSE;
-        context->namedArraysLoaded = TRUE;
     } else {
         TRACE("Not loading vertex data\n");
@@ -4404,23 +4309,34 @@
     }
 
-/* Generate some fixme's if unsupported functionality is being used */
-#define BUFFER_OR_DATA(_attribute) dataLocations->u.s._attribute.lpData
-    /* TODO: Either support missing functionality in fixupVertices or by creating a shader to replace the pipeline. */
-    if (!useVertexShaderFunction && (BUFFER_OR_DATA(position2) || BUFFER_OR_DATA(normal2))) {
-        FIXME("Tweening is only valid with vertex shaders\n");
-    }
-    if (!useVertexShaderFunction && BUFFER_OR_DATA(binormal)) {
-        FIXME("Binormal bump mapping is only valid with vertex shaders\n");
-    }
-    if (!useVertexShaderFunction && (BUFFER_OR_DATA(tessFactor) || BUFFER_OR_DATA(fog) || BUFFER_OR_DATA(depth) || BUFFER_OR_DATA(sample))) {
-        FIXME("Extended attributes are only valid with vertex shaders\n");
-    }
-#undef BUFFER_OR_DATA
+    if (context->numberedArraysLoaded && !load_numbered)
+    {
+        unloadNumberedArrays(stateblock, context);
+        context->numberedArraysLoaded = FALSE;
+        context->numbered_array_mask = 0;
+    }
+    else if (context->namedArraysLoaded)
+    {
+        unloadVertexData(stateblock);
+        context->namedArraysLoaded = FALSE;
+    }
+
+    if (load_numbered)
+    {
+        TRACE("Loading numbered arrays\n");
+        loadNumberedArrays(stateblock, dataLocations, context);
+        context->numberedArraysLoaded = TRUE;
+    }
+    else if (load_named)
+    {
+        TRACE("Loading vertex data\n");
+        loadVertexData(stateblock, dataLocations);
+        context->namedArraysLoaded = TRUE;
+    }
 }
 
 static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    BOOL useVertexShaderFunction = FALSE, updateFog = FALSE;
-    BOOL usePixelShaderFunction = stateblock->wineD3DDevice->ps_selected_mode != SHADER_NONE && stateblock->pixelShader
-            && ((IWineD3DPixelShaderImpl *)stateblock->pixelShader)->baseShader.function;
+    BOOL updateFog = FALSE;
+    BOOL useVertexShaderFunction = use_vs(stateblock);
+    BOOL usePixelShaderFunction = use_ps(stateblock);
     BOOL transformed;
     /* Some stuff is in the device until we have per context tracking */
@@ -4428,20 +4344,5 @@
     BOOL wasrhw = context->last_was_rhw;
 
-    /* Shaders can be implemented using ARB_PROGRAM, GLSL, or software -
-     * here simply check whether a shader was set, or the user disabled shaders
-     */
-    if (use_vs(device)) {
-        useVertexShaderFunction = TRUE;
-
-        if(((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog != context->last_was_foggy_shader) {
-            updateFog = TRUE;
-        }
-    } else if(context->last_was_foggy_shader) {
-        updateFog = TRUE;
-    }
-
-    transformed = device->strided_streams.u.s.position_transformed;
-    if (transformed) useVertexShaderFunction = FALSE;
-
+    transformed = device->strided_streams.position_transformed;
     if(transformed != context->last_was_rhw && !useVertexShaderFunction) {
         updateFog = TRUE;
@@ -4508,6 +4409,9 @@
         }
 
-        if(context->last_was_vshader && !isStateDirty(context, STATE_RENDER(WINED3DRS_CLIPPLANEENABLE))) {
-            state_clipping(STATE_RENDER(WINED3DRS_CLIPPLANEENABLE), stateblock, context);
+        if(context->last_was_vshader) {
+            updateFog = TRUE;
+            if(!isStateDirty(context, STATE_RENDER(WINED3DRS_CLIPPLANEENABLE))) {
+                state_clipping(STATE_RENDER(WINED3DRS_CLIPPLANEENABLE), stateblock, context);
+            }
         }
         if(!isStateDirty(context, STATE_RENDER(WINED3DRS_NORMALIZENORMALS))) {
@@ -4516,5 +4420,5 @@
     } else {
         if(!context->last_was_vshader) {
-            int i;
+            unsigned int i;
             static BOOL warned = FALSE;
             /* Disable all clip planes to get defined results on all drivers. See comment in the
@@ -4543,4 +4447,5 @@
                 }
             }
+            updateFog = TRUE;
         }
     }
@@ -4560,5 +4465,5 @@
 
     if(updateFog) {
-        state_fog(STATE_RENDER(WINED3DRS_FOGENABLE), stateblock, context);
+        device->StateTable[STATE_RENDER(WINED3DRS_FOGVERTEXMODE)].apply(STATE_RENDER(WINED3DRS_FOGVERTEXMODE), stateblock, context);
     }
     if(!useVertexShaderFunction) {
@@ -4747,6 +4652,6 @@
         GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0));
     } else {
-        IWineD3DIndexBufferImpl *ib = (IWineD3DIndexBufferImpl *) stateblock->pIndexData;
-        GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, ib->vbo));
+        struct wined3d_buffer *ib = (struct wined3d_buffer *) stateblock->pIndexData;
+        GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, ib->buffer_object));
     }
 }
@@ -5276,11 +5181,7 @@
     { STATE_TEXTURESTAGE(7, WINED3DTSS_TEXCOORDINDEX),    { STATE_TEXTURESTAGE(7, WINED3DTSS_TEXCOORDINDEX),    tex_coordindex      }, 0                               },
       /* Fog */
-    { STATE_RENDER(WINED3DRS_FOGENABLE),                  { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog           }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGTABLEMODE),               { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog           }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGSTART),                   { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog           }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGEND),                     { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog           }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGVERTEXMODE),              { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog           }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGCOLOR),                   { STATE_RENDER(WINED3DRS_FOGCOLOR),                   state_fogcolor      }, 0                               },
-    { STATE_RENDER(WINED3DRS_FOGDENSITY),                 { STATE_RENDER(WINED3DRS_FOGDENSITY),                 state_fogdensity    }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGENABLE),                  { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_vertexpart}, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGTABLEMODE),               { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_vertexpart}, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGVERTEXMODE),              { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_vertexpart}, 0                               },
     { STATE_RENDER(WINED3DRS_RANGEFOGENABLE),             { STATE_RENDER(WINED3DRS_RANGEFOGENABLE),             state_rangefog      }, NV_FOG_DISTANCE                 },
     { STATE_RENDER(WINED3DRS_RANGEFOGENABLE),             { STATE_RENDER(WINED3DRS_RANGEFOGENABLE),             state_rangefog_w    }, 0                               },
@@ -5311,6 +5212,4 @@
     { STATE_RENDER(WINED3DRS_POINTSIZE_MAX),              { STATE_RENDER(WINED3DRS_POINTSIZE_MIN),              state_psizemin_ext  }, EXT_POINT_PARAMETERS            },
     { STATE_RENDER(WINED3DRS_POINTSIZE_MAX),              { STATE_RENDER(WINED3DRS_POINTSIZE_MIN),              state_psizemin_w    }, 0                               },
-    /* pixel shaders need a different fog input */
-    { STATE_PIXELSHADER,                                  { STATE_PIXELSHADER,                                  apply_pshader_fog   }, 0                               },
     /* Samplers for NP2 texture matrix adjustions. They are not needed if GL_ARB_texture_non_power_of_two is supported,
      * so register a NULL state handler in that case to get the vertex part of sampler() skipped(VTF is handled in the misc states.
@@ -5429,4 +5328,11 @@
     { STATE_RENDER(WINED3DRS_BORDERCOLOR),                { STATE_RENDER(WINED3DRS_BORDERCOLOR),                state_bordercolor   }, 0                               },
     { STATE_RENDER(WINED3DRS_TEXTUREFACTOR),              { STATE_RENDER(WINED3DRS_TEXTUREFACTOR),              state_texfactor     }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGCOLOR),                   { STATE_RENDER(WINED3DRS_FOGCOLOR),                   state_fogcolor      }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGDENSITY),                 { STATE_RENDER(WINED3DRS_FOGDENSITY),                 state_fogdensity    }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGENABLE),                  { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart  }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGTABLEMODE),               { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart  }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGVERTEXMODE),              { STATE_RENDER(WINED3DRS_FOGENABLE),                  state_fog_fragpart  }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGSTART),                   { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend   }, 0                               },
+    { STATE_RENDER(WINED3DRS_FOGEND),                     { STATE_RENDER(WINED3DRS_FOGSTART),                   state_fogstartend   }, 0                               },
     { STATE_SAMPLER(0),                                   { STATE_SAMPLER(0),                                   sampler_texdim      }, 0                               },
     { STATE_SAMPLER(1),                                   { STATE_SAMPLER(1),                                   sampler_texdim      }, 0                               },
@@ -5530,5 +5436,5 @@
 }
 
-void compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs,
+HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs,
         const WineD3D_GL_Info *gl_info, const struct StateEntryTemplate *vertex,
         const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc)
@@ -5562,4 +5468,5 @@
 
         for(i = 0; cur[i].state; i++) {
+            APPLYSTATEFUNC *funcs_array;
 
             /* Only use the first matching state with the available extension from one template.
@@ -5594,4 +5501,8 @@
                                                                    0,
                                                                    sizeof(**dev_multistate_funcs) * 2);
+                    if (!dev_multistate_funcs[cur[i].state]) {
+                        goto out_of_mem;
+                    }
+
                     dev_multistate_funcs[cur[i].state][0] = multistate_funcs[cur[i].state][0];
                     dev_multistate_funcs[cur[i].state][1] = multistate_funcs[cur[i].state][1];
@@ -5599,10 +5510,13 @@
                 case 2:
                     StateTable[cur[i].state].apply = multistate_apply_3;
-                    HeapFree(GetProcessHeap(), 0, multistate_funcs[cur[i].state]);
-                    dev_multistate_funcs[cur[i].state] = HeapAlloc(GetProcessHeap(),
-                                                                   0,
-                                                                   sizeof(**dev_multistate_funcs) * 3);
-                    dev_multistate_funcs[cur[i].state][0] = multistate_funcs[cur[i].state][0];
-                    dev_multistate_funcs[cur[i].state][1] = multistate_funcs[cur[i].state][1];
+                    funcs_array = HeapReAlloc(GetProcessHeap(),
+                                              0,
+                                              dev_multistate_funcs[cur[i].state],
+                                              sizeof(**dev_multistate_funcs) * 3);
+                    if (!funcs_array) {
+                        goto out_of_mem;
+                    }
+
+                    dev_multistate_funcs[cur[i].state] = funcs_array;
                     dev_multistate_funcs[cur[i].state][2] = multistate_funcs[cur[i].state][2];
                     break;
@@ -5620,4 +5534,15 @@
         }
     }
+
+    return WINED3D_OK;
+
+out_of_mem:
+    for (i = 0; i <= STATE_HIGHEST; ++i) {
+        HeapFree(GetProcessHeap(), 0, dev_multistate_funcs[i]);
+    }
+
+    memset(dev_multistate_funcs, 0, (STATE_HIGHEST + 1)*sizeof(*dev_multistate_funcs));
+
+    return E_OUTOFMEMORY;
 }
 #undef GLINFO_LOCATION
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/stateblock.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/stateblock.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/stateblock.c	(revision 19678)
@@ -48,26 +48,34 @@
     IWineD3DStateBlockImpl *This = object;
 
-#define WINED3D_MEMCHECK(_object) if (NULL == _object) { FIXME("Out of memory!\n"); return E_OUTOFMEMORY; }
-
     /* Allocate space for floating point constants */
     object->pixelShaderConstantF = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(float) * GL_LIMITS(pshader_constantsF) * 4);
-    WINED3D_MEMCHECK(object->pixelShaderConstantF);
+    if (!object->pixelShaderConstantF) goto fail;
+
     object->changed.pixelShaderConstantsF = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOL) * GL_LIMITS(pshader_constantsF));
-    WINED3D_MEMCHECK(object->changed.pixelShaderConstantsF);
+    if (!object->changed.pixelShaderConstantsF) goto fail;
+
     object->vertexShaderConstantF = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(float) * GL_LIMITS(vshader_constantsF) * 4);
-    WINED3D_MEMCHECK(object->vertexShaderConstantF);
+    if (!object->vertexShaderConstantF) goto fail;
+
     object->changed.vertexShaderConstantsF = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOL) * GL_LIMITS(vshader_constantsF));
-    WINED3D_MEMCHECK(object->changed.vertexShaderConstantsF);
+    if (!object->changed.vertexShaderConstantsF) goto fail;
+
     object->contained_vs_consts_f = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * GL_LIMITS(vshader_constantsF));
-    WINED3D_MEMCHECK(object->contained_vs_consts_f);
+    if (!object->contained_vs_consts_f) goto fail;
+
     object->contained_ps_consts_f = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * GL_LIMITS(pshader_constantsF));
-    WINED3D_MEMCHECK(object->contained_ps_consts_f);
-
-    list_init(&object->set_vconstantsF);
-    list_init(&object->set_pconstantsF);
-
-#undef WINED3D_MEMCHECK
+    if (!object->contained_ps_consts_f) goto fail;
 
     return WINED3D_OK;
+
+fail:
+    ERR("Failed to allocate memory\n");
+    HeapFree(GetProcessHeap(), 0, object->pixelShaderConstantF);
+    HeapFree(GetProcessHeap(), 0, object->changed.pixelShaderConstantsF);
+    HeapFree(GetProcessHeap(), 0, object->vertexShaderConstantF);
+    HeapFree(GetProcessHeap(), 0, object->changed.vertexShaderConstantsF);
+    HeapFree(GetProcessHeap(), 0, object->contained_vs_consts_f);
+    HeapFree(GetProcessHeap(), 0, object->contained_ps_consts_f);
+    return E_OUTOFMEMORY;
 }
 
@@ -79,7 +87,7 @@
 
     /* Single values */
+    dest->primitive_type = source->primitive_type;
     dest->indices = source->indices;
     dest->material = source->material;
-    dest->fvf = source->fvf;
     dest->viewport = source->viewport;
     dest->vertexDecl = source->vertexDecl;
@@ -89,12 +97,12 @@
 
     /* Fixed size arrays */
-    memcpy(dest->streamSource, source->streamSource, bsize * MAX_STREAMS);
-    memcpy(dest->streamFreq, source->streamFreq, bsize * MAX_STREAMS);
-    memcpy(dest->textures, source->textures, bsize * MAX_COMBINED_SAMPLERS);
-    memcpy(dest->transform, source->transform, bsize * (HIGHEST_TRANSFORMSTATE + 1));
-    memcpy(dest->renderState, source->renderState, bsize * (WINEHIGHEST_RENDER_STATE + 1));
-    memcpy(dest->textureState, source->textureState, bsize * MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1));
-    memcpy(dest->samplerState, source->samplerState, bsize * MAX_COMBINED_SAMPLERS * (WINED3D_HIGHEST_SAMPLER_STATE + 1));
-    memcpy(dest->clipplane, source->clipplane, bsize * MAX_CLIPPLANES);
+    dest->streamSource = source->streamSource;
+    dest->streamFreq = source->streamFreq;
+    dest->textures = source->textures;
+    memcpy(dest->transform, source->transform, sizeof(source->transform));
+    memcpy(dest->renderState, source->renderState, sizeof(source->renderState));
+    memcpy(dest->textureState, source->textureState, sizeof(source->textureState));
+    memcpy(dest->samplerState, source->samplerState, sizeof(source->samplerState));
+    dest->clipplane = source->clipplane;
     dest->pixelShaderConstantsB = source->pixelShaderConstantsB;
     dest->pixelShaderConstantsI = source->pixelShaderConstantsI;
@@ -105,4 +113,11 @@
     memcpy(dest->pixelShaderConstantsF, source->pixelShaderConstantsF, bsize * GL_LIMITS(pshader_constantsF));
     memcpy(dest->vertexShaderConstantsF, source->vertexShaderConstantsF, bsize * GL_LIMITS(vshader_constantsF));
+}
+
+static inline void stateblock_set_bits(DWORD *map, UINT map_size)
+{
+    DWORD mask = (1 << (map_size & 0x1f)) - 1;
+    memset(map, 0xff, (map_size >> 5) * sizeof(*map));
+    if (mask) map[map_size >> 5] = mask;
 }
 
@@ -117,7 +132,7 @@
 
     /* Single values */
+    states->primitive_type = value;
     states->indices = value;
     states->material = value;
-    states->fvf = value;
     states->viewport = value;
     states->vertexDecl = value;
@@ -127,16 +142,35 @@
 
     /* Fixed size arrays */
-    memset(states->streamSource, value, bsize * MAX_STREAMS);
-    memset(states->streamFreq, value, bsize * MAX_STREAMS);
-    memset(states->textures, value, bsize * MAX_COMBINED_SAMPLERS);
-    memset(states->transform, value, bsize * (HIGHEST_TRANSFORMSTATE + 1));
-    memset(states->renderState, value, bsize * (WINEHIGHEST_RENDER_STATE + 1));
-    memset(states->textureState, value, bsize * MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1));
-    memset(states->samplerState, value, bsize * MAX_COMBINED_SAMPLERS * (WINED3D_HIGHEST_SAMPLER_STATE + 1));
-    memset(states->clipplane, value, bsize * MAX_CLIPPLANES);
-    states->pixelShaderConstantsB = value ? 0xffff : 0;
-    states->pixelShaderConstantsI = value ? 0xffff : 0;
-    states->vertexShaderConstantsB = value ? 0xffff : 0;
-    states->vertexShaderConstantsI = value ? 0xffff : 0;
+    if (value)
+    {
+        int i;
+        states->streamSource = 0xffff;
+        states->streamFreq = 0xffff;
+        states->textures = 0xfffff;
+        stateblock_set_bits(states->transform, HIGHEST_TRANSFORMSTATE + 1);
+        stateblock_set_bits(states->renderState, WINEHIGHEST_RENDER_STATE + 1);
+        for (i = 0; i < MAX_TEXTURES; ++i) states->textureState[i] = 0x3ffff;
+        for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = 0x3fff;
+        states->clipplane = 0xffffffff;
+        states->pixelShaderConstantsB = 0xffff;
+        states->pixelShaderConstantsI = 0xffff;
+        states->vertexShaderConstantsB = 0xffff;
+        states->vertexShaderConstantsI = 0xffff;
+    }
+    else
+    {
+        states->streamSource = 0;
+        states->streamFreq = 0;
+        states->textures = 0;
+        memset(states->transform, 0, sizeof(states->transform));
+        memset(states->renderState, 0, sizeof(states->renderState));
+        memset(states->textureState, 0, sizeof(states->textureState));
+        memset(states->samplerState, 0, sizeof(states->samplerState));
+        states->clipplane = 0;
+        states->pixelShaderConstantsB = 0;
+        states->pixelShaderConstantsI = 0;
+        states->vertexShaderConstantsB = 0;
+        states->vertexShaderConstantsI = 0;
+    }
 
     /* Dynamically sized arrays */
@@ -166,9 +200,10 @@
 
     /* Single items */
-    Dest->fvf = This->fvf;
+    Dest->gl_primitive_type = This->gl_primitive_type;
     Dest->vertexDecl = This->vertexDecl;
     Dest->vertexShader = This->vertexShader;
     Dest->streamIsUP = This->streamIsUP;
     Dest->pIndexData = This->pIndexData;
+    Dest->IndexFmt = This->IndexFmt;
     Dest->baseVertexIndex = This->baseVertexIndex;
     /* Dest->lights = This->lights; */
@@ -206,5 +241,5 @@
     memcpy(Dest->streamStride, This->streamStride, sizeof(UINT) * MAX_STREAMS);
     memcpy(Dest->streamOffset, This->streamOffset, sizeof(UINT) * MAX_STREAMS);
-    memcpy(Dest->streamSource, This->streamSource, sizeof(IWineD3DVertexBuffer*) * MAX_STREAMS);
+    memcpy(Dest->streamSource, This->streamSource, sizeof(IWineD3DBuffer *) * MAX_STREAMS);
     memcpy(Dest->streamFreq,   This->streamFreq,   sizeof(UINT) * MAX_STREAMS);
     memcpy(Dest->streamFlags,  This->streamFlags,  sizeof(UINT) * MAX_STREAMS);
@@ -213,5 +248,4 @@
     memcpy(Dest->renderState,  This->renderState,  sizeof(DWORD) * (WINEHIGHEST_RENDER_STATE + 1));
     memcpy(Dest->textures,     This->textures,     sizeof(IWineD3DBaseTexture*) * MAX_COMBINED_SAMPLERS);
-    memcpy(Dest->textureDimensions, This->textureDimensions, sizeof(int) * MAX_COMBINED_SAMPLERS);
     memcpy(Dest->textureState, This->textureState, sizeof(DWORD) * MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1));
     memcpy(Dest->samplerState, This->samplerState, sizeof(DWORD) * MAX_COMBINED_SAMPLERS * (WINED3D_HIGHEST_SAMPLER_STATE + 1));
@@ -255,5 +289,4 @@
 
     if (!refCount) {
-        constants_entry *constant, *constant2;
         int counter;
 
@@ -273,10 +306,11 @@
         for (counter = 0; counter < MAX_STREAMS; counter++) {
             if(This->streamSource[counter]) {
-                if(0 != IWineD3DVertexBuffer_Release(This->streamSource[counter])) {
+                if (IWineD3DBuffer_Release(This->streamSource[counter]))
+                {
                     TRACE("Vertex buffer still referenced by stateblock, applications has leaked Stream %u, buffer %p\n", counter, This->streamSource[counter]);
                 }
             }
         }
-        if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData);
+        if(This->pIndexData) IWineD3DBuffer_Release(This->pIndexData);
         if(This->vertexShader) IWineD3DVertexShader_Release(This->vertexShader);
         if(This->pixelShader) IWineD3DPixelShader_Release(This->pixelShader);
@@ -297,13 +331,4 @@
         HeapFree(GetProcessHeap(), 0, This->contained_vs_consts_f);
         HeapFree(GetProcessHeap(), 0, This->contained_ps_consts_f);
-
-        LIST_FOR_EACH_ENTRY_SAFE(constant, constant2, &This->set_vconstantsF, constants_entry, entry) {
-            HeapFree(GetProcessHeap(), 0, constant);
-        }
-
-        LIST_FOR_EACH_ENTRY_SAFE(constant, constant2, &This->set_pconstantsF, constants_entry, entry) {
-            HeapFree(GetProcessHeap(), 0, constant);
-        }
-
         HeapFree(GetProcessHeap(), 0, This);
     }
@@ -388,4 +413,5 @@
     IWineD3DStateBlockImpl *targetStateBlock = This->wineD3DDevice->stateBlock;
     unsigned int i, j;
+    DWORD map;
 
     TRACE("(%p) : Updating state block %p ------------------v\n", targetStateBlock, This);
@@ -406,9 +432,9 @@
         for (j = 0; j < This->num_contained_vs_consts_f; ++j) {
             i = This->contained_vs_consts_f[j];
-            TRACE("Setting %p from %p %d to { %f, %f, %f, %f }\n", This, targetStateBlock, i,
-                targetStateBlock->vertexShaderConstantF[i * 4],
-                targetStateBlock->vertexShaderConstantF[i * 4 + 1],
-                targetStateBlock->vertexShaderConstantF[i * 4 + 2],
-                targetStateBlock->vertexShaderConstantF[i * 4 + 3]);
+            TRACE("Setting %p from %p %u to {%f, %f, %f, %f}\n", This, targetStateBlock, i,
+                    targetStateBlock->vertexShaderConstantF[i * 4],
+                    targetStateBlock->vertexShaderConstantF[i * 4 + 1],
+                    targetStateBlock->vertexShaderConstantF[i * 4 + 2],
+                    targetStateBlock->vertexShaderConstantF[i * 4 + 3]);
 
             This->vertexShaderConstantF[i * 4]      = targetStateBlock->vertexShaderConstantF[i * 4];
@@ -421,9 +447,9 @@
         for (j = 0; j < This->num_contained_vs_consts_i; ++j) {
             i = This->contained_vs_consts_i[j];
-            TRACE("Setting %p from %p %d to { %d, %d, %d, %d }\n", This, targetStateBlock, i,
-                targetStateBlock->vertexShaderConstantI[i * 4],
-                targetStateBlock->vertexShaderConstantI[i * 4 + 1],
-                targetStateBlock->vertexShaderConstantI[i * 4 + 2],
-                targetStateBlock->vertexShaderConstantI[i * 4 + 3]);
+            TRACE("Setting %p from %p %u to {%d, %d, %d, %d}\n", This, targetStateBlock, i,
+                    targetStateBlock->vertexShaderConstantI[i * 4],
+                    targetStateBlock->vertexShaderConstantI[i * 4 + 1],
+                    targetStateBlock->vertexShaderConstantI[i * 4 + 2],
+                    targetStateBlock->vertexShaderConstantI[i * 4 + 3]);
 
             This->vertexShaderConstantI[i * 4]      = targetStateBlock->vertexShaderConstantI[i * 4];
@@ -436,6 +462,6 @@
         for (j = 0; j < This->num_contained_vs_consts_b; ++j) {
             i = This->contained_vs_consts_b[j];
-            TRACE("Setting %p from %p %d to %s\n", This, targetStateBlock, i,
-                targetStateBlock->vertexShaderConstantB[i]? "TRUE":"FALSE");
+            TRACE("Setting %p from %p %u to %s\n", This, targetStateBlock, i,
+                    targetStateBlock->vertexShaderConstantB[i] ? "TRUE" : "FALSE");
 
             This->vertexShaderConstantB[i] =  targetStateBlock->vertexShaderConstantB[i];
@@ -445,9 +471,9 @@
         for (j = 0; j < This->num_contained_ps_consts_f; ++j) {
             i = This->contained_ps_consts_f[j];
-            TRACE("Setting %p from %p %d to { %f, %f, %f, %f }\n", This, targetStateBlock, i,
-                targetStateBlock->pixelShaderConstantF[i * 4],
-                targetStateBlock->pixelShaderConstantF[i * 4 + 1],
-                targetStateBlock->pixelShaderConstantF[i * 4 + 2],
-                targetStateBlock->pixelShaderConstantF[i * 4 + 3]);
+            TRACE("Setting %p from %p %u to {%f, %f, %f, %f}\n", This, targetStateBlock, i,
+                    targetStateBlock->pixelShaderConstantF[i * 4],
+                    targetStateBlock->pixelShaderConstantF[i * 4 + 1],
+                    targetStateBlock->pixelShaderConstantF[i * 4 + 2],
+                    targetStateBlock->pixelShaderConstantF[i * 4 + 3]);
 
             This->pixelShaderConstantF[i * 4]      = targetStateBlock->pixelShaderConstantF[i * 4];
@@ -460,9 +486,9 @@
         for (j = 0; j < This->num_contained_ps_consts_i; ++j) {
             i = This->contained_ps_consts_i[j];
-            TRACE("Setting %p from %p %d to { %d, %d, %d, %d }\n", This, targetStateBlock, i,
-                targetStateBlock->pixelShaderConstantI[i * 4],
-                targetStateBlock->pixelShaderConstantI[i * 4 + 1],
-                targetStateBlock->pixelShaderConstantI[i * 4 + 2],
-                targetStateBlock->pixelShaderConstantI[i * 4 + 3]);
+            TRACE("Setting %p from %p %u to {%d, %d, %d, %d}\n", This, targetStateBlock, i,
+                    targetStateBlock->pixelShaderConstantI[i * 4],
+                    targetStateBlock->pixelShaderConstantI[i * 4 + 1],
+                    targetStateBlock->pixelShaderConstantI[i * 4 + 2],
+                    targetStateBlock->pixelShaderConstantI[i * 4 + 3]);
 
             This->pixelShaderConstantI[i * 4]      = targetStateBlock->pixelShaderConstantI[i * 4];
@@ -475,6 +501,6 @@
         for (j = 0; j < This->num_contained_ps_consts_b; ++j) {
             i = This->contained_ps_consts_b[j];
-            TRACE("Setting %p from %p %d to %s\n", This, targetStateBlock, i,
-                targetStateBlock->pixelShaderConstantB[i]? "TRUE":"FALSE");
+            TRACE("Setting %p from %p %u to %s\n", This, targetStateBlock, i,
+                    targetStateBlock->pixelShaderConstantB[i] ? "TRUE" : "FALSE");
 
             This->pixelShaderConstantB[i] =  targetStateBlock->pixelShaderConstantB[i];
@@ -483,17 +509,21 @@
         /* Others + Render & Texture */
         for (i = 0; i < This->num_contained_transform_states; i++) {
-            TRACE("Updating transform %d\n", i);
+            TRACE("Updating transform %u\n", i);
             This->transforms[This->contained_transform_states[i]] =
                 targetStateBlock->transforms[This->contained_transform_states[i]];
         }
 
+        if (This->changed.primitive_type) This->gl_primitive_type = targetStateBlock->gl_primitive_type;
+
         if (This->changed.indices && ((This->pIndexData != targetStateBlock->pIndexData)
-                        || (This->baseVertexIndex != targetStateBlock->baseVertexIndex))) {
-            TRACE("Updating pindexData to %p, baseVertexIndex to %d\n",
-                  targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex);
-            if(targetStateBlock->pIndexData) IWineD3DIndexBuffer_AddRef(targetStateBlock->pIndexData);
-            if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData);
+                        || (This->baseVertexIndex != targetStateBlock->baseVertexIndex)
+                        || (This->IndexFmt != targetStateBlock->IndexFmt))) {
+            TRACE("Updating pIndexData to %p, baseVertexIndex to %d\n",
+                    targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex);
+            if(targetStateBlock->pIndexData) IWineD3DBuffer_AddRef(targetStateBlock->pIndexData);
+            if(This->pIndexData) IWineD3DBuffer_Release(This->pIndexData);
             This->pIndexData = targetStateBlock->pIndexData;
             This->baseVertexIndex = targetStateBlock->baseVertexIndex;
+            This->IndexFmt = targetStateBlock->IndexFmt;
         }
 
@@ -502,8 +532,4 @@
 
             This->vertexDecl = targetStateBlock->vertexDecl;
-        }
-
-        if(This->changed.fvf && This->fvf != targetStateBlock->fvf){
-            This->fvf = targetStateBlock->fvf;
         }
 
@@ -530,34 +556,45 @@
         }
 
-        for (i = 0; i < MAX_STREAMS; i++) {
-            if (This->changed.streamSource[i] &&
-                            ((This->streamStride[i] != targetStateBlock->streamStride[i]) ||
-                            (This->streamSource[i] != targetStateBlock->streamSource[i]))) {
-                TRACE("Updating stream source %d to %p, stride to %d\n", i, targetStateBlock->streamSource[i],
-                                                                            targetStateBlock->streamStride[i]);
+        map = This->changed.streamSource;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            if (!(map & 1)) continue;
+
+            if (This->streamStride[i] != targetStateBlock->streamStride[i]
+                    || This->streamSource[i] != targetStateBlock->streamSource[i])
+            {
+                TRACE("Updating stream source %u to %p, stride to %u\n",
+                        i, targetStateBlock->streamSource[i], targetStateBlock->streamStride[i]);
                 This->streamStride[i] = targetStateBlock->streamStride[i];
-                if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]);
-                if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]);
+                if (targetStateBlock->streamSource[i]) IWineD3DBuffer_AddRef(targetStateBlock->streamSource[i]);
+                if (This->streamSource[i]) IWineD3DBuffer_Release(This->streamSource[i]);
                 This->streamSource[i] = targetStateBlock->streamSource[i];
             }
-
-            if (This->changed.streamFreq[i] &&
-            (This->streamFreq[i] != targetStateBlock->streamFreq[i]
-            || This->streamFlags[i] != targetStateBlock->streamFlags[i])){
-                    TRACE("Updating stream frequency %d to %d flags to %d\n", i ,  targetStateBlock->streamFreq[i] ,
-                                                                                   targetStateBlock->streamFlags[i]);
-                    This->streamFreq[i]  =  targetStateBlock->streamFreq[i];
-                    This->streamFlags[i] =  targetStateBlock->streamFlags[i];
-            }
-        }
-
-        for (i = 0; i < GL_LIMITS(clipplanes); i++) {
-            if (This->changed.clipplane[i] && memcmp(&targetStateBlock->clipplane[i],
-                                                        &This->clipplane[i],
-                                                        sizeof(This->clipplane)) != 0) {
-
-                TRACE("Updating clipplane %d\n", i);
-                memcpy(&This->clipplane[i], &targetStateBlock->clipplane[i],
-                                        sizeof(This->clipplane));
+        }
+
+        map = This->changed.streamFreq;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            if (!(map & 1)) continue;
+
+            if (This->streamFreq[i] != targetStateBlock->streamFreq[i]
+                    || This->streamFlags[i] != targetStateBlock->streamFlags[i])
+            {
+                TRACE("Updating stream frequency %u to %u flags to %#x\n",
+                        i, targetStateBlock->streamFreq[i], targetStateBlock->streamFlags[i]);
+                This->streamFreq[i] = targetStateBlock->streamFreq[i];
+                This->streamFlags[i] = targetStateBlock->streamFlags[i];
+            }
+        }
+
+        map = This->changed.clipplane;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            if (!(map & 1)) continue;
+
+            if (memcmp(targetStateBlock->clipplane[i], This->clipplane[i], sizeof(*This->clipplane)))
+            {
+                TRACE("Updating clipplane %u\n", i);
+                memcpy(This->clipplane[i], targetStateBlock->clipplane[i], sizeof(*This->clipplane));
             }
         }
@@ -565,6 +602,6 @@
         /* Render */
         for (i = 0; i < This->num_contained_render_states; i++) {
-            TRACE("Updating renderState %d to %d\n",
-                  This->contained_render_states[i], targetStateBlock->renderState[This->contained_render_states[i]]);
+            TRACE("Updating renderState %u to %u\n", This->contained_render_states[i],
+                    targetStateBlock->renderState[This->contained_render_states[i]]);
             This->renderState[This->contained_render_states[i]] = targetStateBlock->renderState[This->contained_render_states[i]];
         }
@@ -575,16 +612,18 @@
             DWORD state = This->contained_tss_states[j].state;
 
-            TRACE("Updating texturestagestate %d,%d to %d (was %d)\n", stage,state,
-                  targetStateBlock->textureState[stage][state], This->textureState[stage][state]);
-                    This->textureState[stage][state] =  targetStateBlock->textureState[stage][state];
+            TRACE("Updating texturestage state %u, %u to %u (was %u)\n", stage, state,
+                    targetStateBlock->textureState[stage][state], This->textureState[stage][state]);
+            This->textureState[stage][state] = targetStateBlock->textureState[stage][state];
         }
 
         /* Samplers */
         /* TODO: move over to using memcpy */
-        for (j = 0; j < MAX_COMBINED_SAMPLERS; j++) {
-            if (This->changed.textures[j]) {
-                TRACE("Updating texture %d to %p (was %p)\n", j, targetStateBlock->textures[j],  This->textures[j]);
-                This->textures[j] = targetStateBlock->textures[j];
-            }
+        map = This->changed.textures;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            if (!(map & 1)) continue;
+
+            TRACE("Updating texture %u to %p (was %p)\n", i, targetStateBlock->textures[i], This->textures[i]);
+            This->textures[i] = targetStateBlock->textures[i];
         }
 
@@ -592,7 +631,6 @@
             DWORD stage = This->contained_sampler_states[j].stage;
             DWORD state = This->contained_sampler_states[j].state;
-            TRACE("Updating sampler state %d,%d to %d (was %d)\n",
-                stage, state, targetStateBlock->samplerState[stage][state],
-                This->samplerState[stage][state]);
+            TRACE("Updating sampler state %u, %u to %u (was %u)\n", stage, state,
+                    targetStateBlock->samplerState[stage][state], This->samplerState[stage][state]);
             This->samplerState[stage][state] = targetStateBlock->samplerState[stage][state];
         }
@@ -609,4 +647,5 @@
         memcpy(This->vertexShaderConstantI, targetStateBlock->vertexShaderConstantI, sizeof(This->vertexShaderConstantF));
         memcpy(This->vertexShaderConstantF, targetStateBlock->vertexShaderConstantF, sizeof(float) * GL_LIMITS(vshader_constantsF) * 4);
+        This->gl_primitive_type = targetStateBlock->gl_primitive_type;
         memcpy(This->streamStride, targetStateBlock->streamStride, sizeof(This->streamStride));
         memcpy(This->streamOffset, targetStateBlock->streamOffset, sizeof(This->streamOffset));
@@ -625,18 +664,19 @@
         memcpy(This->renderState, targetStateBlock->renderState, sizeof(This->renderState));
         memcpy(This->textures, targetStateBlock->textures, sizeof(This->textures));
-        memcpy(This->textureDimensions, targetStateBlock->textureDimensions, sizeof(This->textureDimensions));
         memcpy(This->textureState, targetStateBlock->textureState, sizeof(This->textureState));
         memcpy(This->samplerState, targetStateBlock->samplerState, sizeof(This->samplerState));
         This->scissorRect = targetStateBlock->scissorRect;
 
-        if(targetStateBlock->pIndexData != This->pIndexData) {
-            if(targetStateBlock->pIndexData) IWineD3DIndexBuffer_AddRef(targetStateBlock->pIndexData);
-            if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData);
+        if(targetStateBlock->pIndexData != This->pIndexData ||
+           targetStateBlock->IndexFmt != This->IndexFmt) {
+            if (targetStateBlock->pIndexData) IWineD3DBuffer_AddRef(targetStateBlock->pIndexData);
+            if (This->pIndexData) IWineD3DBuffer_Release(This->pIndexData);
             This->pIndexData = targetStateBlock->pIndexData;
+            This->IndexFmt = targetStateBlock->IndexFmt;
         }
         for(i = 0; i < MAX_STREAMS; i++) {
             if(targetStateBlock->streamSource[i] != This->streamSource[i]) {
-                if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]);
-                if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]);
+                if(targetStateBlock->streamSource[i]) IWineD3DBuffer_AddRef(targetStateBlock->streamSource[i]);
+                if(This->streamSource[i]) IWineD3DBuffer_Release(This->streamSource[i]);
                 This->streamSource[i] = targetStateBlock->streamSource[i];
             }
@@ -672,6 +712,6 @@
         for(i = 0; i < MAX_STREAMS; i++) {
             if(targetStateBlock->streamSource[i] != This->streamSource[i]) {
-                if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]);
-                if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]);
+                if (targetStateBlock->streamSource[i]) IWineD3DBuffer_AddRef(targetStateBlock->streamSource[i]);
+                if (This->streamSource[i]) IWineD3DBuffer_Release(This->streamSource[i]);
                 This->streamSource[i] = targetStateBlock->streamSource[i];
             }
@@ -738,4 +778,5 @@
     UINT i;
     UINT j;
+    DWORD map;
 
     TRACE("(%p) : Applying state block %p ------------------v\n", This, pDevice);
@@ -790,5 +831,5 @@
             DWORD state = This->contained_tss_states[i].state;
             ((IWineD3DDeviceImpl *)pDevice)->stateBlock->textureState[stage][state]         = This->textureState[stage][state];
-            ((IWineD3DDeviceImpl *)pDevice)->stateBlock->changed.textureState[stage][state] = TRUE;
+            ((IWineD3DDeviceImpl *)pDevice)->stateBlock->changed.textureState[stage] |= 1 << state;
             /* TODO: Record a display list to apply all gl states. For now apply by brute force */
             IWineD3DDeviceImpl_MarkStateDirty((IWineD3DDeviceImpl *)pDevice, STATE_TEXTURESTAGE(stage, state));
@@ -799,5 +840,5 @@
             DWORD state = This->contained_sampler_states[i].state;
             ((IWineD3DDeviceImpl *)pDevice)->stateBlock->samplerState[stage][state]         = This->samplerState[stage][state];
-            ((IWineD3DDeviceImpl *)pDevice)->stateBlock->changed.samplerState[stage][state] = TRUE;
+            ((IWineD3DDeviceImpl *)pDevice)->stateBlock->changed.samplerState[stage] |= 1 << state;
             IWineD3DDeviceImpl_MarkStateDirty((IWineD3DDeviceImpl *)pDevice, STATE_SAMPLER(stage));
         }
@@ -808,11 +849,13 @@
         }
 
+        if (This->changed.primitive_type)
+        {
+                This->wineD3DDevice->updateStateBlock->changed.primitive_type = TRUE;
+                This->wineD3DDevice->updateStateBlock->gl_primitive_type = This->gl_primitive_type;
+        }
+
         if (This->changed.indices) {
-            IWineD3DDevice_SetIndices(pDevice, This->pIndexData);
+            IWineD3DDevice_SetIndices(pDevice, This->pIndexData, This->IndexFmt);
             IWineD3DDevice_SetBaseVertexIndex(pDevice, This->baseVertexIndex);
-        }
-
-        if (This->changed.fvf) {
-            IWineD3DDevice_SetFVF(pDevice, This->fvf);
         }
 
@@ -834,33 +877,39 @@
 
         /* TODO: Proper implementation using SetStreamSource offset (set to 0 for the moment)\n") */
-        for (i=0; i<MAX_STREAMS; i++) {
-            if (This->changed.streamSource[i])
-                IWineD3DDevice_SetStreamSource(pDevice, i, This->streamSource[i], 0, This->streamStride[i]);
-
-            if (This->changed.streamFreq[i])
-                IWineD3DDevice_SetStreamSourceFreq(pDevice, i, This->streamFreq[i] | This->streamFlags[i]);
-        }
-        for (j = 0 ; j < MAX_COMBINED_SAMPLERS; j++){
-            if (This->changed.textures[j]) {
-                if (j < MAX_FRAGMENT_SAMPLERS) {
-                    IWineD3DDevice_SetTexture(pDevice, j, This->textures[j]);
-                } else {
-                    IWineD3DDevice_SetTexture(pDevice, WINED3DVERTEXTEXTURESAMPLER0 + j - MAX_FRAGMENT_SAMPLERS, This->textures[j]);
-                }
-            }
-        }
-
-        for (i = 0; i < GL_LIMITS(clipplanes); i++) {
-            if (This->changed.clipplane[i]) {
-                float clip[4];
-
-                clip[0] = This->clipplane[i][0];
-                clip[1] = This->clipplane[i][1];
-                clip[2] = This->clipplane[i][2];
-                clip[3] = This->clipplane[i][3];
-                IWineD3DDevice_SetClipPlane(pDevice, i, clip);
-            }
-        }
-
+        map = This->changed.streamSource;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            if (map & 1) IWineD3DDevice_SetStreamSource(pDevice, i, This->streamSource[i], 0, This->streamStride[i]);
+        }
+
+        map = This->changed.streamFreq;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            if (map & 1) IWineD3DDevice_SetStreamSourceFreq(pDevice, i, This->streamFreq[i] | This->streamFlags[i]);
+        }
+
+        map = This->changed.textures;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            if (!(map & 1)) continue;
+
+            if (i < MAX_FRAGMENT_SAMPLERS) IWineD3DDevice_SetTexture(pDevice, i, This->textures[i]);
+            else IWineD3DDevice_SetTexture(pDevice, WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS,
+                    This->textures[i]);
+        }
+
+        map = This->changed.clipplane;
+        for (i = 0; map; map >>= 1, ++i)
+        {
+            float clip[4];
+
+            if (!(map & 1)) continue;
+
+            clip[0] = This->clipplane[i][0];
+            clip[1] = This->clipplane[i][1];
+            clip[2] = This->clipplane[i][2];
+            clip[3] = This->clipplane[i][3];
+            IWineD3DDevice_SetClipPlane(pDevice, i, clip);
+        }
     } else if(This->blockType == WINED3DSBT_VERTEXSTATE) {
         IWineD3DDevice_SetVertexShader(pDevice, This->vertexShader);
@@ -978,5 +1027,6 @@
         }
         for(j = 0; j < MAX_TEXTURES; j++) {
-            for(i = 1; i <= WINED3D_HIGHEST_TEXTURE_STATE; i++) {
+            for (i = 0; i <= WINED3D_HIGHEST_TEXTURE_STATE; ++i)
+            {
                 IWineD3DDevice_SetTextureStageState(pDevice, j, i, This->textureState[j][i]);
             }
@@ -987,7 +1037,7 @@
             IWineD3DDevice_SetTransform(pDevice, i, &This->transforms[i]);
         }
-        IWineD3DDevice_SetIndices(pDevice, This->pIndexData);
+        This->wineD3DDevice->updateStateBlock->gl_primitive_type = This->gl_primitive_type;
+        IWineD3DDevice_SetIndices(pDevice, This->pIndexData, This->IndexFmt);
         IWineD3DDevice_SetBaseVertexIndex(pDevice, This->baseVertexIndex);
-        IWineD3DDevice_SetFVF(pDevice, This->fvf);
         IWineD3DDevice_SetVertexDeclaration(pDevice, This->vertexDecl);
         IWineD3DDevice_SetMaterial(pDevice, &This->material);
@@ -1004,5 +1054,6 @@
 
             IWineD3DDevice_SetTexture(pDevice, sampler, This->textures[j]);
-            for(i = 1; i < WINED3D_HIGHEST_SAMPLER_STATE; i++) {
+            for (i = 1; i <= WINED3D_HIGHEST_SAMPLER_STATE; ++i)
+            {
                 IWineD3DDevice_SetSamplerState(pDevice, sampler, i, This->samplerState[j][i]);
             }
@@ -1135,5 +1186,5 @@
     tmpfloat.f = 1.0f;
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE,                tmpfloat.d);
-    tmpfloat.f = 1.0f;
+    tmpfloat.f = ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion < 9 ? 0.0f : 1.0f;
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE_MIN,            tmpfloat.d);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSPRITEENABLE,        FALSE);
@@ -1151,5 +1202,5 @@
     IWineD3DDevice_SetRenderState(device, WINED3DRS_PATCHSEGMENTS,            tmpfloat.d);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_DEBUGMONITORTOKEN,        0xbaadcafe);
-    tmpfloat.f = 64.0f;
+    tmpfloat.f = GL_LIMITS(pointsize);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE_MAX,            tmpfloat.d);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
@@ -1221,5 +1272,4 @@
         This->textureState[i][WINED3DTSS_BUMPENVLOFFSET        ] = 0;
         This->textureState[i][WINED3DTSS_TEXTURETRANSFORMFLAGS ] = WINED3DTTFF_DISABLE;
-        This->textureState[i][WINED3DTSS_ADDRESSW              ] = WINED3DTADDRESS_WRAP;
         This->textureState[i][WINED3DTSS_COLORARG0             ] = WINED3DTA_CURRENT;
         This->textureState[i][WINED3DTSS_ALPHAARG0             ] = WINED3DTA_CURRENT;
@@ -1248,5 +1298,5 @@
     for(i = 0; i < GL_LIMITS(textures); i++) {
         /* Note: This avoids calling SetTexture, so pretend it has been called */
-        This->changed.textures[i] = TRUE;
+        This->changed.textures |= 1 << i;
         This->textures[i]         = NULL;
     }
@@ -1259,4 +1309,6 @@
     hr = IWineD3DDevice_GetSwapChain(device, 0, &swapchain);
     if( hr == WINED3D_OK && swapchain != NULL) {
+        WINED3DVIEWPORT vp;
+
         hr = IWineD3DSwapChain_GetBackBuffer(swapchain, 0, WINED3DBACKBUFFER_TYPE_MONO, &backbuffer);
         if( hr == WINED3D_OK && backbuffer != NULL) {
@@ -1273,4 +1325,14 @@
             }
         }
+
+        /* Set the default viewport */
+        vp.X      = 0;
+        vp.Y      = 0;
+        vp.Width  = ((IWineD3DSwapChainImpl *)swapchain)->presentParms.BackBufferWidth;
+        vp.Height = ((IWineD3DSwapChainImpl *)swapchain)->presentParms.BackBufferHeight;
+        vp.MinZ   = 0.0f;
+        vp.MaxZ   = 1.0f;
+        IWineD3DDevice_SetViewport(device, &vp);
+
         IWineD3DSwapChain_Release(swapchain);
     }
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c	(revision 19678)
@@ -52,23 +52,36 @@
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
 
-    This->Flags &= ~SFLAG_ALLOCATED;
-}
-
-void surface_set_texture_name(IWineD3DSurface *iface, GLuint name)
+    This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
+}
+
+void surface_set_texture_name(IWineD3DSurface *iface, GLuint new_name, BOOL srgb)
 {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
-
-    TRACE("(%p) : setting texture name %u\n", This, name);
-
-    if (!This->glDescription.textureName && name)
+    GLuint *name;
+    DWORD flag;
+
+    if(srgb)
+    {
+        name = &This->glDescription.srgbTextureName;
+        flag = SFLAG_INSRGBTEX;
+    }
+    else
+    {
+        name = &This->glDescription.textureName;
+        flag = SFLAG_INTEXTURE;
+    }
+
+    TRACE("(%p) : setting texture name %u\n", This, new_name);
+
+    if (!*name && new_name)
     {
         /* FIXME: We shouldn't need to remove SFLAG_INTEXTURE if the
          * surface has no texture name yet. See if we can get rid of this. */
-        if (This->Flags & SFLAG_INTEXTURE)
+        if (This->Flags & flag)
             ERR("Surface has SFLAG_INTEXTURE set, but no texture name\n");
-        IWineD3DSurface_ModifyLocation(iface, SFLAG_INTEXTURE, FALSE);
-    }
-
-    This->glDescription.textureName = name;
+        IWineD3DSurface_ModifyLocation(iface, flag, FALSE);
+    }
+
+    *name = new_name;
     surface_force_reload(iface);
 }
@@ -95,5 +108,5 @@
 }
 
-static void surface_bind_and_dirtify(IWineD3DSurfaceImpl *This) {
+static void surface_bind_and_dirtify(IWineD3DSurfaceImpl *This, BOOL srgb) {
     int active_sampler;
 
@@ -109,18 +122,14 @@
      * TODO: Track the current active texture per GL context instead of using glGet
      */
-    if (GL_SUPPORT(ARB_MULTITEXTURE)) {
-        GLint active_texture;
-        ENTER_GL();
-        glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture);
-        LEAVE_GL();
-        active_sampler = This->resource.wineD3DDevice->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB];
-    } else {
-        active_sampler = 0;
-    }
+    GLint active_texture;
+    ENTER_GL();
+    glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture);
+    LEAVE_GL();
+    active_sampler = This->resource.wineD3DDevice->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB];
 
     if (active_sampler != -1) {
         IWineD3DDeviceImpl_MarkStateDirty(This->resource.wineD3DDevice, STATE_SAMPLER(active_sampler));
     }
-    IWineD3DSurface_BindTexture((IWineD3DSurface *)This);
+    IWineD3DSurface_BindTexture((IWineD3DSurface *)This, srgb);
 }
 
@@ -130,5 +139,6 @@
     if (device->render_targets && device->render_targets[0]) {
         IWineD3DSurfaceImpl* render_target = (IWineD3DSurfaceImpl*)device->render_targets[0];
-        if((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET) && (render_target->resource.format == WINED3DFMT_P8))
+        if ((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET)
+                && (render_target->resource.format_desc->format == WINED3DFMT_P8))
             return TRUE;
     }
@@ -139,26 +149,25 @@
  * right context and binding the correct texture. */
 static void surface_download_data(IWineD3DSurfaceImpl *This) {
-    if (0 == This->glDescription.textureName) {
-        ERR("Surface does not have a texture, but SFLAG_INTEXTURE is set\n");
+    const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
+
+    /* Only support read back of converted P8 surfaces */
+    if (This->Flags & SFLAG_CONVERTED && format_desc->format != WINED3DFMT_P8)
+    {
+        FIXME("Read back converted textures unsupported, format=%s\n", debug_d3dformat(format_desc->format));
         return;
     }
 
-    /* Only support read back of converted P8 surfaces */
-    if(This->Flags & SFLAG_CONVERTED && (This->resource.format != WINED3DFMT_P8)) {
-        FIXME("Read back converted textures unsupported, format=%s\n", debug_d3dformat(This->resource.format));
-        return;
-    }
-
     ENTER_GL();
 
-    if (This->resource.format == WINED3DFMT_DXT1 ||
-            This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 ||
-            This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5 ||
-            This->resource.format == WINED3DFMT_ATI2N) {
+    if (format_desc->format == WINED3DFMT_DXT1 || format_desc->format == WINED3DFMT_DXT2
+            || format_desc->format == WINED3DFMT_DXT3 || format_desc->format == WINED3DFMT_DXT4
+            || format_desc->format == WINED3DFMT_DXT5 || format_desc->format == WINED3DFMT_ATI2N)
+    {
         if (!GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) { /* We can assume this as the texture would not have been created otherwise */
             FIXME("(%p) : Attempting to lock a compressed texture when texture compression isn't supported by opengl\n", This);
         } else {
-            TRACE("(%p) : Calling glGetCompressedTexImageARB level %d, format %#x, type %#x, data %p\n", This, This->glDescription.level,
-                This->glDescription.glFormat, This->glDescription.glType, This->resource.allocatedMemory);
+            TRACE("(%p) : Calling glGetCompressedTexImageARB level %d, format %#x, type %#x, data %p\n",
+                    This, This->glDescription.level, format_desc->glFormat, format_desc->glType,
+                    This->resource.allocatedMemory);
 
             if(This->Flags & SFLAG_PBO) {
@@ -177,11 +186,12 @@
     } else {
         void *mem;
-        GLenum format = This->glDescription.glFormat;
-        GLenum type = This->glDescription.glType;
+        GLenum format = format_desc->glFormat;
+        GLenum type = format_desc->glType;
         int src_pitch = 0;
         int dst_pitch = 0;
 
         /* In case of P8 the index is stored in the alpha component if the primary render target uses P8 */
-        if(This->resource.format == WINED3DFMT_P8 && primary_render_target_is_p8(This->resource.wineD3DDevice)) {
+        if (format_desc->format == WINED3DFMT_P8 && primary_render_target_is_p8(This->resource.wineD3DDevice))
+        {
             format = GL_ALPHA;
             type = GL_UNSIGNED_BYTE;
@@ -190,5 +200,5 @@
         if (This->Flags & SFLAG_NONPOW2) {
             unsigned char alignment = This->resource.wineD3DDevice->surface_alignment;
-            src_pitch = This->bytesPerPixel * This->pow2Width;
+            src_pitch = format_desc->byte_count * This->pow2Width;
             dst_pitch = IWineD3DSurface_GetPitch((IWineD3DSurface *) This);
             src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
@@ -293,11 +303,12 @@
  * right context and binding the correct texture. */
 static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data) {
-
-    if(This->heightscale != 1.0 && This->heightscale != 0.0) height *= This->heightscale;
-
-    if (This->resource.format == WINED3DFMT_DXT1 ||
-            This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 ||
-            This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5 ||
-            This->resource.format == WINED3DFMT_ATI2N) {
+    const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
+
+    if (format_desc->heightscale != 1.0 && format_desc->heightscale != 0.0) height *= format_desc->heightscale;
+
+    if (format_desc->format == WINED3DFMT_DXT1 || format_desc->format == WINED3DFMT_DXT2
+            || format_desc->format == WINED3DFMT_DXT3 || format_desc->format == WINED3DFMT_DXT4
+            || format_desc->format == WINED3DFMT_DXT5 || format_desc->format == WINED3DFMT_ATI2N)
+    {
         if (!GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
             FIXME("Using DXT1/3/5 without advertized support\n");
@@ -355,16 +366,18 @@
  * activating the right context and binding the correct texture. */
 static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal, GLsizei width, GLsizei height, GLenum format, GLenum type) {
+    const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
     BOOL enable_client_storage = FALSE;
     const BYTE *mem = NULL;
 
-    if(This->heightscale != 1.0 && This->heightscale != 0.0) height *= This->heightscale;
-
-    TRACE("(%p) : Creating surface (target %#x)  level %d, d3d format %s, internal format %#x, width %d, height %d, gl format %#x, gl type=%#x\n", This,
-            This->glDescription.target, This->glDescription.level, debug_d3dformat(This->resource.format), internal, width, height, format, type);
-
-    if (This->resource.format == WINED3DFMT_DXT1 ||
-            This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 ||
-            This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5 ||
-            This->resource.format == WINED3DFMT_ATI2N) {
+    if (format_desc->heightscale != 1.0 && format_desc->heightscale != 0.0) height *= format_desc->heightscale;
+
+    TRACE("(%p) : Creating surface (target %#x)  level %d, d3d format %s, internal format %#x, width %d, height %d, gl format %#x, gl type=%#x\n",
+            This, This->glDescription.target, This->glDescription.level, debug_d3dformat(format_desc->format),
+            internal, width, height, format, type);
+
+    if (format_desc->format == WINED3DFMT_DXT1 || format_desc->format == WINED3DFMT_DXT2
+            || format_desc->format == WINED3DFMT_DXT3 || format_desc->format == WINED3DFMT_DXT4
+            || format_desc->format == WINED3DFMT_DXT5 || format_desc->format == WINED3DFMT_ATI2N)
+    {
         /* glCompressedTexImage2D does not accept NULL pointers, so we cannot allocate a compressed texture without uploading data */
         TRACE("Not allocating compressed surfaces, surface_upload_data will specify them\n");
@@ -418,6 +431,4 @@
     }
     LEAVE_GL();
-
-    This->Flags |= SFLAG_ALLOCATED;
 }
 
@@ -453,10 +464,8 @@
 
     if (!renderbuffer) {
-        const struct GlPixelFormatDesc *glDesc;
-        getFormatDescEntry(This->resource.format, &GLINFO_LOCATION, &glDesc);
-
         GL_EXTCALL(glGenRenderbuffersEXT(1, &renderbuffer));
         GL_EXTCALL(glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffer));
-        GL_EXTCALL(glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, glDesc->glInternal, width, height));
+        GL_EXTCALL(glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,
+                This->resource.format_desc->glInternal, width, height));
 
         entry = HeapAlloc(GetProcessHeap(), 0, sizeof(renderbuffer_entry_t));
@@ -488,4 +497,41 @@
     FIXME("Higher back buffer, returning GL_BACK\n");
     return GL_BACK;
+}
+
+/* Slightly inefficient way to handle multiple dirty rects but it works :) */
+void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect)
+{
+    IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
+    IWineD3DBaseTexture *baseTexture = NULL;
+
+    if (!(This->Flags & SFLAG_INSYSMEM) && (This->Flags & SFLAG_INTEXTURE))
+        IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL /* no partial locking for textures yet */);
+
+    IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE);
+    if (dirty_rect)
+    {
+        This->dirtyRect.left = min(This->dirtyRect.left, dirty_rect->left);
+        This->dirtyRect.top = min(This->dirtyRect.top, dirty_rect->top);
+        This->dirtyRect.right = max(This->dirtyRect.right, dirty_rect->right);
+        This->dirtyRect.bottom = max(This->dirtyRect.bottom, dirty_rect->bottom);
+    }
+    else
+    {
+        This->dirtyRect.left = 0;
+        This->dirtyRect.top = 0;
+        This->dirtyRect.right = This->currentDesc.Width;
+        This->dirtyRect.bottom = This->currentDesc.Height;
+    }
+
+    TRACE("(%p) : Dirty: yes, Rect:(%d, %d, %d, %d)\n", This, This->dirtyRect.left,
+            This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom);
+
+    /* if the container is a basetexture then mark it dirty. */
+    if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture)))
+    {
+        TRACE("Passing to container\n");
+        IWineD3DBaseTexture_SetDirty(baseTexture, TRUE);
+        IWineD3DBaseTexture_Release(baseTexture);
+    }
 }
 
@@ -555,5 +601,5 @@
    **************************************************** */
 
-static void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface)
+void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb)
 {
     /* TODO: check for locks */
@@ -564,6 +610,7 @@
     TRACE("(%p)Checking to see if the container is a base texture\n", This);
     if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) {
+        IWineD3DBaseTextureImpl *tex_impl = (IWineD3DBaseTextureImpl *) baseTexture;
         TRACE("Passing to container\n");
-        IWineD3DBaseTexture_PreLoad(baseTexture);
+        tex_impl->baseTexture.internal_preload(baseTexture, SRGB_RGB);
         IWineD3DBaseTexture_Release(baseTexture);
     } else {
@@ -574,5 +621,7 @@
         }
 
-        if (This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8) {
+        if (This->resource.format_desc->format == WINED3DFMT_P8
+                || This->resource.format_desc->format == WINED3DFMT_A8P8)
+        {
             if(palette9_changed(This)) {
                 TRACE("Reloading surface because the d3d8/9 palette was changed\n");
@@ -584,5 +633,5 @@
         }
 
-        IWineD3DSurface_LoadTexture(iface, FALSE);
+        IWineD3DSurface_LoadTexture(iface, srgb == SRGB_SRGB ? TRUE : FALSE);
 
         if (This->resource.pool == WINED3DPOOL_DEFAULT) {
@@ -596,4 +645,8 @@
     }
     return;
+}
+
+static void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
+    surface_internal_preload(iface, SRGB_ANY);
 }
 
@@ -646,5 +699,5 @@
     }
     IWineD3DSurface_ModifyLocation(iface, SFLAG_INTEXTURE, FALSE);
-    This->Flags &= ~SFLAG_ALLOCATED;
+    This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
 
     /* Destroy PBOs, but load them into real sysmem before */
@@ -705,4 +758,7 @@
     RECT local_rect;
     BOOL srcIsUpsideDown;
+    GLint rowLen = 0;
+    GLint skipPix = 0;
+    GLint skipRow = 0;
 
     if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) {
@@ -756,5 +812,5 @@
     /* TODO: Get rid of the extra GetPitch call, LockRect does that too. Cache the pitch */
 
-    switch(This->resource.format)
+    switch(This->resource.format_desc->format)
     {
         case WINED3DFMT_P8:
@@ -765,5 +821,5 @@
                 type = GL_UNSIGNED_BYTE;
                 mem = dest;
-                bpp = This->bytesPerPixel;
+                bpp = This->resource.format_desc->byte_count;
             } else {
                 /* GL can't return palettized data, so read ARGB pixels into a
@@ -785,5 +841,5 @@
                     return;
                 }
-                bpp = This->bytesPerPixel * 3;
+                bpp = This->resource.format_desc->byte_count * 3;
             }
         }
@@ -792,7 +848,7 @@
         default:
             mem = dest;
-            fmt = This->glDescription.glFormat;
-            type = This->glDescription.glType;
-            bpp = This->bytesPerPixel;
+            fmt = This->resource.format_desc->glFormat;
+            type = This->resource.format_desc->glType;
+            bpp = This->resource.format_desc->byte_count;
     }
 
@@ -800,11 +856,39 @@
         GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, This->pbo));
         checkGLcall("glBindBufferARB");
-    }
-
-    glReadPixels(local_rect.left, local_rect.top,
+        if(mem != NULL) {
+            ERR("mem not null for pbo -- unexpected\n");
+            mem = NULL;
+        }
+    }
+
+    /* Save old pixel store pack state */
+    glGetIntegerv(GL_PACK_ROW_LENGTH, &rowLen);
+    checkGLcall("glIntegerv");
+    glGetIntegerv(GL_PACK_SKIP_PIXELS, &skipPix);
+    checkGLcall("glIntegerv");
+    glGetIntegerv(GL_PACK_SKIP_ROWS, &skipRow);
+    checkGLcall("glIntegerv");
+
+    /* Setup pixel store pack state -- to glReadPixels into the correct place */
+    glPixelStorei(GL_PACK_ROW_LENGTH, This->currentDesc.Width);
+    checkGLcall("glPixelStorei");
+    glPixelStorei(GL_PACK_SKIP_PIXELS, local_rect.left);
+    checkGLcall("glPixelStorei");
+    glPixelStorei(GL_PACK_SKIP_ROWS, local_rect.top);
+    checkGLcall("glPixelStorei");
+
+    glReadPixels(local_rect.left, (!srcIsUpsideDown) ? (This->currentDesc.Height - local_rect.bottom) : local_rect.top ,
                  local_rect.right - local_rect.left,
                  local_rect.bottom - local_rect.top,
                  fmt, type, mem);
     checkGLcall("glReadPixels");
+
+    /* Reset previous pixel store pack state */
+    glPixelStorei(GL_PACK_ROW_LENGTH, rowLen);
+    checkGLcall("glPixelStorei");
+    glPixelStorei(GL_PACK_SKIP_PIXELS, skipPix);
+    checkGLcall("glPixelStorei");
+    glPixelStorei(GL_PACK_SKIP_ROWS, skipRow);
+    checkGLcall("glPixelStorei");
 
     if(This->Flags & SFLAG_PBO) {
@@ -836,5 +920,5 @@
         if(!row) {
             ERR("Out of memory\n");
-            if(This->resource.format == WINED3DFMT_P8) HeapFree(GetProcessHeap(), 0, mem);
+            if (This->resource.format_desc->format == WINED3DFMT_P8) HeapFree(GetProcessHeap(), 0, mem);
             LEAVE_GL();
             return;
@@ -842,5 +926,5 @@
 
         top = mem + pitch * local_rect.top;
-        bottom = mem + pitch * ( local_rect.bottom - local_rect.top - 1);
+        bottom = mem + pitch * (local_rect.bottom - 1);
         for(i = 0; i < (local_rect.bottom - local_rect.top) / 2; i++) {
             memcpy(row, top + off, len);
@@ -866,5 +950,6 @@
      * In case of P8 render targets, the index is stored in the alpha component so no conversion is needed.
      */
-    if((This->resource.format == WINED3DFMT_P8) && !primary_render_target_is_p8(myDevice)) {
+    if ((This->resource.format_desc->format == WINED3DFMT_P8) && !primary_render_target_is_p8(myDevice))
+    {
         const PALETTEENTRY *pal = NULL;
         DWORD width = pitch / 3;
@@ -902,5 +987,5 @@
 
 /* Read the framebuffer contents into a texture */
-static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This)
+static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
 {
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
@@ -910,6 +995,7 @@
     CONVERT_TYPES convert;
     GLint prevRead;
-
-    d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, This->srgb);
+    BOOL alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED;
+
+    d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, srgb);
 
     /* Activate the surface to read from. In some situations it isn't the currently active target(e.g. backbuffer
@@ -918,5 +1004,5 @@
      */
     ActivateContext(device, (IWineD3DSurface *) This, CTXUSAGE_RESOURCELOAD);
-    surface_bind_and_dirtify(This);
+    surface_bind_and_dirtify(This, srgb);
 
     ENTER_GL();
@@ -946,10 +1032,12 @@
         ENTER_GL();
         glReadBuffer(device->offscreenBuffer);
+        checkGLcall("glReadBuffer");
         LEAVE_GL();
     }
 
-    if(!(This->Flags & SFLAG_ALLOCATED)) {
+    if(!(This->Flags & alloc_flag)) {
         surface_allocate_surface(This, internal, This->pow2Width,
                                  This->pow2Height, format, type);
+        This->Flags |= alloc_flag;
     }
 
@@ -1042,5 +1130,4 @@
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
     IWineD3DDeviceImpl  *myDevice = This->resource.wineD3DDevice;
-    IWineD3DSwapChain *swapchain = NULL;
 
     TRACE("(%p) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
@@ -1079,6 +1166,6 @@
      * Offscreen targets which are not active at the moment or are higher targets(FBOs) can be locked with the texture path
      */
-    IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain);
-    if(swapchain || iface == myDevice->render_targets[0]) {
+    if ((This->Flags & SFLAG_SWAPCHAIN) || iface == myDevice->render_targets[0])
+    {
         const RECT *pass_rect = pRect;
 
@@ -1116,6 +1203,4 @@
                 break;
         }
-        if(swapchain) IWineD3DSwapChain_Release(swapchain);
-
     } else if(iface == myDevice->stencilBufferTarget) {
         /** the depth stencil in openGL has a format of GL_FLOAT
@@ -1175,5 +1260,5 @@
          * as seen in msdn docs
          */
-        IWineD3DSurface_AddDirtyRect(iface, pRect);
+        surface_add_dirty_rect(iface, pRect);
 
         /** Dirtify Container if needed */
@@ -1298,10 +1383,9 @@
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
     IWineD3DDeviceImpl  *myDevice = This->resource.wineD3DDevice;
-    IWineD3DSwapChainImpl *swapchain = NULL;
     BOOL fullsurface;
 
     if (!(This->Flags & SFLAG_LOCKED)) {
         WARN("trying to Unlock an unlocked surf@%p\n", This);
-        return WINED3DERR_INVALIDCALL;
+        return WINEDDERR_NOTLOCKED;
     }
 
@@ -1325,8 +1409,6 @@
     }
 
-    IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain);
-    if(swapchain || (myDevice->render_targets && iface == myDevice->render_targets[0])) {
-        if(swapchain) IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
-
+    if ((This->Flags & SFLAG_SWAPCHAIN) || (myDevice->render_targets && iface == myDevice->render_targets[0]))
+    {
         if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) {
             static BOOL warned = FALSE;
@@ -1430,8 +1512,9 @@
     /* According to Direct3D9 docs, only these formats are supported */
     if (((IWineD3DImpl *)This->resource.wineD3DDevice->wineD3D)->dxVersion > 7) {
-        if (This->resource.format != WINED3DFMT_R5G6B5 &&
-            This->resource.format != WINED3DFMT_X1R5G5B5 &&
-            This->resource.format != WINED3DFMT_R8G8B8 &&
-            This->resource.format != WINED3DFMT_X8R8G8B8) return WINED3DERR_INVALIDCALL;
+        if (This->resource.format_desc->format != WINED3DFMT_R5G6B5
+                && This->resource.format_desc->format != WINED3DFMT_X1R5G5B5
+                && This->resource.format_desc->format != WINED3DFMT_R8G8B8
+                && This->resource.format_desc->format != WINED3DFMT_X8R8G8B8)
+            return WINED3DERR_INVALIDCALL;
     }
 
@@ -1442,5 +1525,5 @@
         IWineD3DBaseSurfaceImpl_CreateDIBSection(iface);
         if(This->Flags & SFLAG_CLIENT) {
-            IWineD3DSurface_PreLoad(iface);
+            surface_internal_preload(iface, SRGB_RGB);
         }
 
@@ -1467,6 +1550,7 @@
     }
 
-    if(This->resource.format == WINED3DFMT_P8 ||
-        This->resource.format == WINED3DFMT_A8P8) {
+    if (This->resource.format_desc->format == WINED3DFMT_P8
+            || This->resource.format_desc->format == WINED3DFMT_A8P8)
+    {
         /* GetDC on palettized formats is unsupported in D3D9, and the method is missing in
             D3D8, so this should only be used for DX <=7 surfaces (with non-device palettes) */
@@ -1510,9 +1594,9 @@
 
     if (!(This->Flags & SFLAG_DCINUSE))
-        return WINED3DERR_INVALIDCALL;
+        return WINEDDERR_NODC;
 
     if (This->hDC !=hDC) {
         WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC);
-        return WINED3DERR_INVALIDCALL;
+        return WINEDDERR_NODC;
     }
 
@@ -1536,7 +1620,6 @@
 HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_texturing, GLenum *format, GLenum *internal, GLenum *type, CONVERT_TYPES *convert, int *target_bpp, BOOL srgb_mode) {
     BOOL colorkey_active = need_alpha_ck && (This->CKeyFlags & WINEDDSD_CKSRCBLT);
-    const struct GlPixelFormatDesc *glDesc;
+    const struct GlPixelFormatDesc *glDesc = This->resource.format_desc;
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    getFormatDescEntry(This->resource.format, &GLINFO_LOCATION, &glDesc);
 
     /* Default values: From the surface */
@@ -1544,9 +1627,12 @@
     *type = glDesc->glType;
     *convert = NO_CONVERSION;
-    *target_bpp = This->bytesPerPixel;
+    *target_bpp = glDesc->byte_count;
 
     if(srgb_mode) {
         *internal = glDesc->glGammaInternal;
-    } else if(This->resource.usage & WINED3DUSAGE_RENDERTARGET) {
+    }
+    else if (This->resource.usage & WINED3DUSAGE_RENDERTARGET
+            && !(This->Flags & SFLAG_SWAPCHAIN))
+    {
         *internal = glDesc->rtInternal;
     } else {
@@ -1555,5 +1641,6 @@
 
     /* Ok, now look if we have to do any conversion */
-    switch(This->resource.format) {
+    switch(This->resource.format_desc->format)
+    {
         case WINED3DFMT_P8:
             /* ****************
@@ -1640,5 +1727,5 @@
             break;
 
-        case WINED3DFMT_V8U8:
+        case WINED3DFMT_R8G8_SNORM:
             if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break;
             *convert = CONVERT_V8U8;
@@ -1680,5 +1767,5 @@
             break;
 
-        case WINED3DFMT_Q8W8V8U8:
+        case WINED3DFMT_R8G8B8A8_SNORM:
             if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break;
             *convert = CONVERT_Q8W8V8U8;
@@ -1689,5 +1776,5 @@
             break;
 
-        case WINED3DFMT_V16U16:
+        case WINED3DFMT_R16G16_SNORM:
             if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break;
             *convert = CONVERT_V16U16;
@@ -1708,4 +1795,28 @@
             *type = GL_UNSIGNED_BYTE;
             *target_bpp = 2;
+            break;
+
+        case WINED3DFMT_R16G16_UNORM:
+            *convert = CONVERT_G16R16;
+            *format = GL_RGB;
+            *internal = GL_RGB16_EXT;
+            *type = GL_UNSIGNED_SHORT;
+            *target_bpp = 6;
+            break;
+
+        case WINED3DFMT_R16G16_FLOAT:
+            *convert = CONVERT_R16G16F;
+            *format = GL_RGB;
+            *internal = GL_RGB16F_ARB;
+            *type = GL_HALF_FLOAT_ARB;
+            *target_bpp = 6;
+            break;
+
+        case WINED3DFMT_R32G32_FLOAT:
+            *convert = CONVERT_R32G32F;
+            *format = GL_RGB;
+            *internal = GL_RGB32F_ARB;
+            *type = GL_FLOAT;
+            *target_bpp = 12;
             break;
 
@@ -1805,5 +1916,5 @@
                 for (x = 0; x < width; x++ ) {
                     WORD color = *Source++;
-		    *Dest = color;
+                    *Dest = color;
                     if ((color < This->SrcBltCKey.dwColorSpaceLowValue) ||
                         (color > This->SrcBltCKey.dwColorSpaceHighValue)) {
@@ -2037,4 +2148,49 @@
         }
 
+        case CONVERT_G16R16:
+        case CONVERT_R16G16F:
+        {
+            unsigned int x, y;
+            const WORD *Source;
+            WORD *Dest;
+
+            for(y = 0; y < height; y++) {
+                Source = (const WORD *)(src + y * pitch);
+                Dest = (WORD *) (dst + y * outpitch);
+                for (x = 0; x < width; x++ ) {
+                    WORD green = (*Source++);
+                    WORD red = (*Source++);
+                    Dest[0] = green;
+                    Dest[1] = red;
+                    /* Strictly speaking not correct for R16G16F, but it doesn't matter because the
+                     * shader overwrites it anyway
+                     */
+                    Dest[2] = 0xffff;
+                    Dest += 3;
+                }
+            }
+            break;
+        }
+
+        case CONVERT_R32G32F:
+        {
+            unsigned int x, y;
+            const float *Source;
+            float *Dest;
+            for(y = 0; y < height; y++) {
+                Source = (const float *)(src + y * pitch);
+                Dest = (float *) (dst + y * outpitch);
+                for (x = 0; x < width; x++ ) {
+                    float green = (*Source++);
+                    float red = (*Source++);
+                    Dest[0] = green;
+                    Dest[1] = red;
+                    Dest[2] = 1.0;
+                    Dest += 3;
+                }
+            }
+            break;
+        }
+
         default:
             ERR("Unsupported conversation type %d\n", convert);
@@ -2144,5 +2300,5 @@
             GL_EXTCALL(glGenProgramsARB(1, &device->paletteConversionShader));
             GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, device->paletteConversionShader));
-            GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(fragment_palette_conversion), (const GLbyte *)fragment_palette_conversion));
+            GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(fragment_palette_conversion), fragment_palette_conversion));
             glDisable(GL_FRAGMENT_PROGRAM_ARB);
         }
@@ -2170,5 +2326,7 @@
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
 
-    if(This->palette || (This->resource.format != WINED3DFMT_P8 && This->resource.format != WINED3DFMT_A8P8)) {
+    if (This->palette || (This->resource.format_desc->format != WINED3DFMT_P8
+            && This->resource.format_desc->format != WINED3DFMT_A8P8))
+    {
         /* If a ddraw-style palette is attached assume no d3d9 palette change.
          * Also the palette isn't interesting if the surface format isn't P8 or A8P8
@@ -2190,6 +2348,7 @@
 static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BOOL srgb_mode) {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
-
-    if (!(This->Flags & SFLAG_INTEXTURE)) {
+    DWORD flag = srgb_mode ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE;
+
+    if (!(This->Flags & flag)) {
         TRACE("Reloading because surface is dirty\n");
     } else if(/* Reload: gl texture has ck, now no ckey is set OR */
@@ -2226,6 +2385,5 @@
     }
 
-    This->srgb = srgb_mode;
-    IWineD3DSurface_LoadLocation(iface, SFLAG_INTEXTURE, NULL /* no partial locking for textures yet */);
+    IWineD3DSurface_LoadLocation(iface, flag, NULL /* no partial locking for textures yet */);
 
 #if 0
@@ -2258,5 +2416,5 @@
 }
 
-static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface) {
+static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) {
     /* TODO: check for locks */
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
@@ -2267,9 +2425,11 @@
     if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) {
         TRACE("Passing to container\n");
-        IWineD3DBaseTexture_BindTexture(baseTexture);
+        IWineD3DBaseTexture_BindTexture(baseTexture, srgb);
         IWineD3DBaseTexture_Release(baseTexture);
     } else {
+        GLuint *name;
         TRACE("(%p) : Binding surface\n", This);
 
+        name = srgb ? &This->glDescription.srgbTextureName : &This->glDescription.textureName;
         if(!device->isInDraw) {
             ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
@@ -2279,10 +2439,10 @@
 
         if (!This->glDescription.level) {
-            if (!This->glDescription.textureName) {
-                glGenTextures(1, &This->glDescription.textureName);
+            if (!*name) {
+                glGenTextures(1, name);
                 checkGLcall("glGenTextures");
-                TRACE("Surface %p given name %d\n", This, This->glDescription.textureName);
-
-                glBindTexture(This->glDescription.target, This->glDescription.textureName);
+                TRACE("Surface %p given name %d\n", This, *name);
+
+                glBindTexture(This->glDescription.target, *name);
                 checkGLcall("glBindTexture");
                 glTexParameteri(This->glDescription.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -2298,5 +2458,5 @@
             }
             /* This is where we should be reducing the amount of GLMemoryUsed */
-        } else if (This->glDescription.textureName) {
+        } else if (*name) {
             /* Mipmap surfaces should have a base texture container */
             ERR("Mipmap surface has a glTexture bound to it!\n");
@@ -2381,6 +2541,6 @@
 
     } else { /* bind the real texture, and make sure it up to date */
-        IWineD3DSurface_PreLoad(iface);
-        surface_bind_and_dirtify(This);
+        surface_internal_preload(iface, SRGB_RGB);
+        surface_bind_and_dirtify(This, FALSE);
     }
     allocatedMemory = HeapAlloc(GetProcessHeap(), 0, width  * height * 4);
@@ -2405,5 +2565,5 @@
     }
 /* Save the data out to a TGA file because 1: it's an easy raw format, 2: it supports an alpha channel */
-    TRACE("(%p) opened %s with format %s\n", This, filename, debug_d3dformat(This->resource.format));
+    TRACE("(%p) opened %s with format %s\n", This, filename, debug_d3dformat(This->resource.format_desc->format));
 /* TGA header */
     fputc(0,f);
@@ -2456,55 +2616,14 @@
 }
 
-/**
- *   Slightly inefficient way to handle multiple dirty rects but it works :)
- */
-static HRESULT WINAPI IWineD3DSurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, CONST RECT* pDirtyRect)
-{
-    IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
-    IWineD3DBaseTexture *baseTexture = NULL;
-
-    if (!(This->Flags & SFLAG_INSYSMEM) && (This->Flags & SFLAG_INTEXTURE))
-        IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL /* no partial locking for textures yet */);
-
-    IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE);
-    if (NULL != pDirtyRect) {
-        This->dirtyRect.left   = min(This->dirtyRect.left,   pDirtyRect->left);
-        This->dirtyRect.top    = min(This->dirtyRect.top,    pDirtyRect->top);
-        This->dirtyRect.right  = max(This->dirtyRect.right,  pDirtyRect->right);
-        This->dirtyRect.bottom = max(This->dirtyRect.bottom, pDirtyRect->bottom);
-    } else {
-        This->dirtyRect.left   = 0;
-        This->dirtyRect.top    = 0;
-        This->dirtyRect.right  = This->currentDesc.Width;
-        This->dirtyRect.bottom = This->currentDesc.Height;
-    }
-    TRACE("(%p) : Dirty: yes, Rect:(%d,%d,%d,%d)\n", This, This->dirtyRect.left,
-          This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom);
-    /* if the container is a basetexture then mark it dirty. */
-    if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) {
-        TRACE("Passing to container\n");
-        IWineD3DBaseTexture_SetDirty(baseTexture, TRUE);
-        IWineD3DBaseTexture_Release(baseTexture);
-    }
-    return WINED3D_OK;
-}
-
 static HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
     HRESULT hr;
-    const struct GlPixelFormatDesc *glDesc;
-    getFormatDescEntry(format, &GLINFO_LOCATION, &glDesc);
 
     TRACE("(%p) : Calling base function first\n", This);
     hr = IWineD3DBaseSurfaceImpl_SetFormat(iface, format);
     if(SUCCEEDED(hr)) {
-        /* Setup some glformat defaults */
-        This->glDescription.glFormat         = glDesc->glFormat;
-        This->glDescription.glFormatInternal = glDesc->glInternal;
-        This->glDescription.glType           = glDesc->glType;
-
-        This->Flags &= ~SFLAG_ALLOCATED;
-        TRACE("(%p) : glFormat %d, glFotmatInternal %d, glType %d\n", This,
-              This->glDescription.glFormat, This->glDescription.glFormatInternal, This->glDescription.glType);
+        This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
+        TRACE("(%p) : glFormat %d, glFormatInternal %d, glType %d\n", This, This->resource.format_desc->glFormat,
+                This->resource.format_desc->glInternal, This->resource.format_desc->glType);
     }
     return hr;
@@ -2548,6 +2667,8 @@
         /* For client textures opengl has to be notified */
         if(This->Flags & SFLAG_CLIENT) {
-            This->Flags &= ~SFLAG_ALLOCATED;
-            IWineD3DSurface_PreLoad(iface);
+            DWORD oldFlags = This->Flags;
+            This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
+            if(oldFlags & SFLAG_ALLOCATED) surface_internal_preload(iface, SRGB_RGB);
+            if(oldFlags & SFLAG_SRGBALLOCATED) surface_internal_preload(iface, SRGB_SRGB);
             /* And hope that the app behaves correctly and did not free the old surface memory before setting a new pointer */
         }
@@ -2563,7 +2684,9 @@
 
         if(This->Flags & SFLAG_CLIENT) {
-            This->Flags &= ~SFLAG_ALLOCATED;
+            DWORD oldFlags = This->Flags;
+            This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
             /* This respecifies an empty texture and opengl knows that the old memory is gone */
-            IWineD3DSurface_PreLoad(iface);
+            if(oldFlags & SFLAG_ALLOCATED) surface_internal_preload(iface, SRGB_RGB);
+            if(oldFlags & SFLAG_SRGBALLOCATED) surface_internal_preload(iface, SRGB_SRGB);
         }
     }
@@ -2715,5 +2838,5 @@
 
     ActivateContext(myDevice, SrcSurface, CTXUSAGE_BLIT);
-    IWineD3DSurface_PreLoad((IWineD3DSurface *) This);
+    surface_internal_preload((IWineD3DSurface *) This, SRGB_RGB);
     ENTER_GL();
 
@@ -2808,10 +2931,10 @@
     /* Activate the Proper context for reading from the source surface, set it up for blitting */
     ActivateContext(myDevice, SrcSurface, CTXUSAGE_BLIT);
-    IWineD3DSurface_PreLoad((IWineD3DSurface *) This);
+    surface_internal_preload((IWineD3DSurface *) This, SRGB_RGB);
 
     noBackBufferBackup = !swapchain && wined3d_settings.offscreen_rendering_mode == ORM_FBO;
     if(!noBackBufferBackup && Src->glDescription.textureName == 0) {
         /* Get it a description */
-        IWineD3DSurface_PreLoad(SrcSurface);
+        surface_internal_preload(SrcSurface, SRGB_RGB);
     }
     ENTER_GL();
@@ -3249,5 +3372,6 @@
         /* When blitting from a render target a texture, the texture isn't required to have a palette.
          * In this case grab the palette from the render target. */
-        if((This->resource.format == WINED3DFMT_P8) && (This->palette == NULL)) {
+        if ((This->resource.format_desc->format == WINED3DFMT_P8) && (This->palette == NULL))
+        {
             paletteOverride = TRUE;
             TRACE("Source surface (%p) lacks palette, overriding palette with palette %p of destination surface (%p)\n", Src, This->palette, This);
@@ -3325,5 +3449,6 @@
          * code further down the road retrieves the palette from the surface, so
          * it must have a palette set. */
-        if((Src->resource.format == WINED3DFMT_P8) && (Src->palette == NULL)) {
+        if ((Src->resource.format_desc->format == WINED3DFMT_P8) && (Src->palette == NULL))
+        {
             paletteOverride = TRUE;
             TRACE("Source surface (%p) lacks palette, overriding palette with palette %p of destination surface (%p)\n", Src, This->palette, This);
@@ -3373,5 +3498,5 @@
 
         /* Now load the surface */
-        IWineD3DSurface_PreLoad((IWineD3DSurface *) Src);
+        surface_internal_preload((IWineD3DSurface *) Src, SRGB_RGB);
 
         /* Activate the destination context, set it up for blitting */
@@ -3396,6 +3521,6 @@
         }
 
-        myDevice->blitter->set_shader((IWineD3DDevice *) myDevice, Src->resource.format,
-                                       Src->glDescription.target, Src->pow2Width, Src->pow2Height);
+        myDevice->blitter->set_shader((IWineD3DDevice *) myDevice, Src->resource.format_desc,
+                Src->glDescription.target, Src->pow2Width, Src->pow2Height);
 
         ENTER_GL();
@@ -3512,5 +3637,6 @@
              * 'clear' expect it in ARGB format => we need to do some conversion :-)
              */
-            if (This->resource.format == WINED3DFMT_P8) {
+            if (This->resource.format_desc->format == WINED3DFMT_P8)
+            {
                 DWORD alpha;
 
@@ -3527,5 +3653,6 @@
                 }
             }
-            else if (This->resource.format == WINED3DFMT_R5G6B5) {
+            else if (This->resource.format_desc->format == WINED3DFMT_R5G6B5)
+            {
                 if (DDBltFx->u5.dwFillColor == 0xFFFF) {
                     color = 0xFFFFFFFF;
@@ -3537,9 +3664,11 @@
                 }
             }
-            else if ((This->resource.format == WINED3DFMT_R8G8B8) ||
-                    (This->resource.format == WINED3DFMT_X8R8G8B8) ) {
+            else if ((This->resource.format_desc->format == WINED3DFMT_R8G8B8)
+                    || (This->resource.format_desc->format == WINED3DFMT_X8R8G8B8))
+            {
                 color = 0xFF000000 | DDBltFx->u5.dwFillColor;
             }
-            else if (This->resource.format == WINED3DFMT_A8R8G8B8) {
+            else if (This->resource.format_desc->format == WINED3DFMT_A8R8G8B8)
+            {
                 color = DDBltFx->u5.dwFillColor;
             }
@@ -3571,6 +3700,7 @@
 
     if (Flags & WINEDDBLT_DEPTHFILL) {
-        switch(This->resource.format) {
-            case WINED3DFMT_D16:
+        switch(This->resource.format_desc->format)
+        {
+            case WINED3DFMT_D16_UNORM:
                 depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x0000ffff;
                 break;
@@ -3587,5 +3717,5 @@
             default:
                 depth = 0.0;
-                ERR("Unexpected format for depth fill: %s\n", debug_d3dformat(This->resource.format));
+                ERR("Unexpected format for depth fill: %s\n", debug_d3dformat(This->resource.format_desc->format));
         }
 
@@ -3715,6 +3845,6 @@
     if (!pal) return WINED3D_OK;
 
-    if(This->resource.format == WINED3DFMT_P8 ||
-       This->resource.format == WINED3DFMT_A8P8)
+    if (This->resource.format_desc->format == WINED3DFMT_P8
+            || This->resource.format_desc->format == WINED3DFMT_A8P8)
     {
         int bpp;
@@ -3726,5 +3856,5 @@
 
         /* Check if we have hardware palette conversion if we have convert is set to NO_CONVERSION */
-        d3dfmt_get_conv(This, TRUE, use_texture, &format, &internal, &type, &convert, &bpp, This->srgb);
+        d3dfmt_get_conv(This, TRUE, use_texture, &format, &internal, &type, &convert, &bpp, FALSE);
 
         if((This->resource.usage & WINED3DUSAGE_RENDERTARGET) && (convert == NO_CONVERSION))
@@ -3770,11 +3900,4 @@
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
     unsigned int pow2Width, pow2Height;
-    const struct GlPixelFormatDesc *glDesc;
-
-    getFormatDescEntry(This->resource.format, &GLINFO_LOCATION, &glDesc);
-    /* Setup some glformat defaults */
-    This->glDescription.glFormat         = glDesc->glFormat;
-    This->glDescription.glFormatInternal = glDesc->glInternal;
-    This->glDescription.glType           = glDesc->glType;
 
     This->glDescription.textureName      = 0;
@@ -3795,9 +3918,10 @@
 
     if (pow2Width > This->currentDesc.Width || pow2Height > This->currentDesc.Height) {
-        WINED3DFORMAT Format = This->resource.format;
+        WINED3DFORMAT Format = This->resource.format_desc->format;
         /** TODO: add support for non power two compressed textures **/
         if (Format == WINED3DFMT_DXT1 || Format == WINED3DFMT_DXT2 || Format == WINED3DFMT_DXT3
             || Format == WINED3DFMT_DXT4 || Format == WINED3DFMT_DXT5
-            || This->resource.format == WINED3DFMT_ATI2N) {
+            || Format == WINED3DFMT_ATI2N)
+        {
             FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n",
                   This, This->currentDesc.Width, This->currentDesc.Height);
@@ -3819,5 +3943,6 @@
         4: Create the surface, but allow it to be used only for DirectDraw Blts. Some apps(e.g. Swat 3) create textures with a Height of 16 and a Width > 3000 and blt 16x16 letter areas from them to the render target.
         */
-        WARN("(%p) Creating an oversized surface\n", This);
+        WARN("(%p) Creating an oversized surface: %ux%u (texture is %ux%u)\n",
+             This, This->pow2Width, This->pow2Height, This->currentDesc.Width, This->currentDesc.Height);
         This->Flags |= SFLAG_OVERSIZE;
 
@@ -3833,6 +3958,8 @@
            doesn't work in combination with ARB_TEXTURE_RECTANGLE.
         */
-        if(This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE) &&
-           !((This->resource.format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE) && (wined3d_settings.rendertargetlock_mode == RTL_READTEX || wined3d_settings.rendertargetlock_mode == RTL_TEXTEX)))
+        if(This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE)
+                && !((This->resource.format_desc->format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE)
+                && (wined3d_settings.rendertargetlock_mode == RTL_READTEX
+                || wined3d_settings.rendertargetlock_mode == RTL_TEXTEX)))
         {
             This->glDescription.target = GL_TEXTURE_RECTANGLE_ARB;
@@ -4058,5 +4185,5 @@
             glCopyTexImage2D(bind_target,
                     This->glDescription.level,
-                    This->glDescription.glFormatInternal,
+                    This->resource.format_desc->glInternal,
                     0,
                     0,
@@ -4136,15 +4263,11 @@
     IWineD3DSurfaceImpl *overlay;
 
-    TRACE("(%p)->(%s, %s)\n", iface,
-          flag == SFLAG_INSYSMEM ? "SFLAG_INSYSMEM" : flag == SFLAG_INDRAWABLE ? "SFLAG_INDRAWABLE" : "SFLAG_INTEXTURE",
+    TRACE("(%p)->(%s, %s)\n", iface, debug_surflocation(flag),
           persistent ? "TRUE" : "FALSE");
 
     if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) {
-        IWineD3DSwapChain *swapchain = NULL;
-
-        if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain))) {
+        if (This->Flags & SFLAG_SWAPCHAIN)
+        {
             TRACE("Surface %p is an onscreen surface\n", iface);
-
-            IWineD3DSwapChain_Release(swapchain);
         } else {
             /* With ORM_FBO, SFLAG_INTEXTURE and SFLAG_INDRAWABLE are the same for offscreen targets. */
@@ -4154,5 +4277,6 @@
 
     if(persistent) {
-        if((This->Flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE)) {
+        if(((This->Flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE)) ||
+           ((This->Flags & SFLAG_INSRGBTEX) && !(flag & SFLAG_INSRGBTEX))) {
             if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) {
                 TRACE("Passing to container\n");
@@ -4171,5 +4295,5 @@
         }
     } else {
-        if((This->Flags & SFLAG_INTEXTURE) && (flag & SFLAG_INTEXTURE)) {
+        if((This->Flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX))) {
             if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) {
                 TRACE("Passing to container\n");
@@ -4179,4 +4303,8 @@
         }
         This->Flags &= ~flag;
+    }
+
+    if(!(This->Flags & SFLAG_LOCATIONS)) {
+        ERR("%p: Surface does not have any up to date location\n", This);
     }
 }
@@ -4394,5 +4522,4 @@
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    IWineD3DSwapChain *swapchain = NULL;
     GLenum format, internal, type;
     CONVERT_TYPES convert;
@@ -4400,20 +4527,19 @@
     int width, pitch, outpitch;
     BYTE *mem;
+    BOOL drawable_read_ok = TRUE;
 
     if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) {
-        if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain))) {
+        if (This->Flags & SFLAG_SWAPCHAIN)
+        {
             TRACE("Surface %p is an onscreen surface\n", iface);
-
-            IWineD3DSwapChain_Release(swapchain);
         } else {
             /* With ORM_FBO, SFLAG_INTEXTURE and SFLAG_INDRAWABLE are the same for offscreen targets.
              * Prefer SFLAG_INTEXTURE. */
             if (flag == SFLAG_INDRAWABLE) flag = SFLAG_INTEXTURE;
-        }
-    }
-
-    TRACE("(%p)->(%s, %p)\n", iface,
-          flag == SFLAG_INSYSMEM ? "SFLAG_INSYSMEM" : flag == SFLAG_INDRAWABLE ? "SFLAG_INDRAWABLE" : "SFLAG_INTEXTURE",
-          rect);
+            drawable_read_ok = FALSE;
+        }
+    }
+
+    TRACE("(%p)->(%s, %p)\n", iface, debug_surflocation(flag), rect);
     if(rect) {
         TRACE("Rectangle: (%d,%d)-(%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
@@ -4426,5 +4552,5 @@
 
     if(!(This->Flags & SFLAG_LOCATIONS)) {
-        ERR("Surface does not have any up to date location\n");
+        ERR("%p: Surface does not have any up to date location\n", This);
         This->Flags |= SFLAG_LOST;
         return WINED3DERR_DEVICELOST;
@@ -4435,7 +4561,7 @@
 
         /* Download the surface to system memory */
-        if(This->Flags & SFLAG_INTEXTURE) {
+        if(This->Flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) {
             if(!device->isInDraw) ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-            surface_bind_and_dirtify(This);
+            surface_bind_and_dirtify(This, !(This->Flags & SFLAG_INTEXTURE));
 
             surface_download_data(This);
@@ -4449,5 +4575,13 @@
             surface_blt_to_drawable(This, rect);
         } else {
-            d3dfmt_get_conv(This, TRUE /* We need color keying */, FALSE /* We won't use textures */, &format, &internal, &type, &convert, &bpp, This->srgb);
+            if((This->Flags & SFLAG_LOCATIONS) == SFLAG_INSRGBTEX) {
+                /* This needs a shader to convert the srgb data sampled from the GL texture into RGB
+                 * values, otherwise we get incorrect values in the target. For now go the slow way
+                 * via a system memory copy
+                 */
+                IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INSYSMEM, rect);
+            }
+
+            d3dfmt_get_conv(This, TRUE /* We need color keying */, FALSE /* We won't use textures */, &format, &internal, &type, &convert, &bpp, FALSE);
 
             /* The width is in 'length' not in bytes */
@@ -4488,20 +4622,28 @@
                 HeapFree(GetProcessHeap(), 0, mem);
         }
-    } else /* if(flag == SFLAG_INTEXTURE) */ {
-        if (This->Flags & SFLAG_INDRAWABLE) {
-            read_from_framebuffer_texture(This);
+    } else /* if(flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) */ {
+        if (drawable_read_ok && (This->Flags & SFLAG_INDRAWABLE)) {
+            read_from_framebuffer_texture(This, flag == SFLAG_INSRGBTEX);
         } else { /* Upload from system memory */
-            d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, This->srgb);
+            BOOL srgb = flag == SFLAG_INSRGBTEX;
+            DWORD alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED;
+            d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, srgb);
+
+            if(srgb) {
+                if((This->Flags & (SFLAG_INTEXTURE | SFLAG_INSYSMEM)) == SFLAG_INTEXTURE) {
+                    /* Performance warning ... */
+                    FIXME("%p: Downloading rgb texture to reload it as srgb\n", This);
+                    IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INSYSMEM, rect);
+                }
+            } else {
+                if((This->Flags & SFLAG_LOCATIONS) == SFLAG_INSRGBTEX) {
+                    /* Performance warning ... */
+                    FIXME("%p: Downloading srgb texture to reload it as rgb\n", This);
+                    IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INSYSMEM, rect);
+                }
+            }
 
             if(!device->isInDraw) ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-            surface_bind_and_dirtify(This);
-
-            /* The only place where LoadTexture() might get called when isInDraw=1
-             * is ActivateContext where lastActiveRenderTarget is preloaded.
-             */
-            if(iface == device->lastActiveRenderTarget && device->isInDraw)
-                ERR("Reading back render target but SFLAG_INDRAWABLE not set\n");
-
-            /* Otherwise: System memory copy must be most up to date */
+            surface_bind_and_dirtify(This, srgb);
 
             if(This->CKeyFlags & WINEDDSD_CKSRCBLT) {
@@ -4537,5 +4679,8 @@
 
                 This->Flags |= SFLAG_CONVERTED;
-            } else if( (This->resource.format == WINED3DFMT_P8) && (GL_SUPPORT(EXT_PALETTED_TEXTURE) || GL_SUPPORT(ARB_FRAGMENT_PROGRAM)) ) {
+            }
+            else if ((This->resource.format_desc->format == WINED3DFMT_P8)
+                    && (GL_SUPPORT(EXT_PALETTED_TEXTURE) || GL_SUPPORT(ARB_FRAGMENT_PROGRAM)))
+            {
                 d3dfmt_p8_upload_palette(iface, convert);
                 This->Flags &= ~SFLAG_CONVERTED;
@@ -4553,6 +4698,7 @@
             if ((This->Flags & SFLAG_NONPOW2) && !(This->Flags & SFLAG_OVERSIZE)) {
                 TRACE("non power of two support\n");
-                if(!(This->Flags & SFLAG_ALLOCATED)) {
+                if(!(This->Flags & alloc_flag)) {
                     surface_allocate_surface(This, internal, This->pow2Width, This->pow2Height, format, type);
+                    This->Flags |= alloc_flag;
                 }
                 if (mem || (This->Flags & SFLAG_PBO)) {
@@ -4563,6 +4709,7 @@
                  * changed. So also keep track of memory changes. In this case the texture has to be reallocated
                  */
-                if(!(This->Flags & SFLAG_ALLOCATED)) {
+                if(!(This->Flags & alloc_flag)) {
                     surface_allocate_surface(This, internal, This->glRect.right - This->glRect.left, This->glRect.bottom - This->glRect.top, format, type);
+                    This->Flags |= alloc_flag;
                 }
                 if (mem || (This->Flags & SFLAG_PBO)) {
@@ -4586,5 +4733,5 @@
     }
 
-    if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && !swapchain
+    if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && !(This->Flags & SFLAG_SWAPCHAIN)
             && (This->Flags & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE))) {
         /* With ORM_FBO, SFLAG_INTEXTURE and SFLAG_INDRAWABLE are the same for offscreen targets. */
@@ -4688,5 +4835,4 @@
     IWineD3DBaseSurfaceImpl_GetClipper,
     /* Internal use: */
-    IWineD3DSurfaceImpl_AddDirtyRect,
     IWineD3DSurfaceImpl_LoadTexture,
     IWineD3DSurfaceImpl_BindTexture,
@@ -4708,5 +4854,7 @@
 static void ffp_blit_free(IWineD3DDevice *iface) { }
 
-static HRESULT ffp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum textype, UINT width, UINT height) {
+static HRESULT ffp_blit_set(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc,
+        GLenum textype, UINT width, UINT height)
+{
     glEnable(textype);
     checkGLcall("glEnable(textype)");
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface_base.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface_base.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface_base.c	(revision 19678)
@@ -176,9 +176,5 @@
     }
 
-    /** From MSDN:
-     * If the surface is created using CreateImageSurface/CreateOffscreenPlainSurface, CreateRenderTarget,
-     * or CreateDepthStencilSurface, the surface is considered stand alone. In this case,
-     * GetContainer will return the Direct3D device used to create the surface.
-     */
+    /* Standalone surfaces return the device as container. */
     if (This->container) {
         container = This->container;
@@ -195,5 +191,5 @@
 
     TRACE("(%p) : copying into %p\n", This, pDesc);
-    if(pDesc->Format != NULL)             *(pDesc->Format) = This->resource.format;
+    if(pDesc->Format != NULL)             *(pDesc->Format) = This->resource.format_desc->format;
     if(pDesc->Type != NULL)               *(pDesc->Type)   = This->resource.resourceType;
     if(pDesc->Usage != NULL)              *(pDesc->Usage)              = This->resource.usage;
@@ -346,4 +342,5 @@
 DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
+    WINED3DFORMAT format = This->resource.format_desc->format;
     DWORD ret;
     TRACE("(%p)\n", This);
@@ -352,12 +349,12 @@
     where each block is 4x4 pixels, 8 bytes (dxt1) and 16 bytes (dxt2/3/4/5)
     ie pitch = (width/4) * bytes per block                                  */
-    if (This->resource.format == WINED3DFMT_DXT1) /* DXT1 is 8 bytes per block */
+    if (format == WINED3DFMT_DXT1) /* DXT1 is 8 bytes per block */
         ret = ((This->currentDesc.Width + 3) >> 2) << 3;
-    else if (This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 ||
-             This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5) /* DXT2/3/4/5 is 16 bytes per block */
+    else if (format == WINED3DFMT_DXT2 || format == WINED3DFMT_DXT3 ||
+             format == WINED3DFMT_DXT4 || format == WINED3DFMT_DXT5) /* DXT2/3/4/5 is 16 bytes per block */
         ret = ((This->currentDesc.Width + 3) >> 2) << 4;
     else {
         unsigned char alignment = This->resource.wineD3DDevice->surface_alignment;
-        ret = This->bytesPerPixel * This->currentDesc.Width;  /* Bytes / row */
+        ret = This->resource.format_desc->byte_count * This->currentDesc.Width;  /* Bytes / row */
         ret = (ret + alignment - 1) & ~(alignment - 1);
     }
@@ -522,7 +519,9 @@
 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
-    const StaticPixelFormatDesc *formatEntry = getFormatDescEntry(format, NULL, NULL);
-
-    if (This->resource.format != WINED3DFMT_UNKNOWN) {
+    const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format,
+            &This->resource.wineD3DDevice->adapter->gl_info);
+
+    if (This->resource.format_desc->format != WINED3DFMT_UNKNOWN)
+    {
         FIXME("(%p) : The format of the surface must be WINED3DFORMAT_UNKNOWN\n", This);
         return WINED3DERR_INVALIDCALL;
@@ -534,26 +533,20 @@
     } else if (format == WINED3DFMT_DXT1) {
         /* DXT1 is half byte per pixel */
-        This->resource.size = ((max(This->pow2Width, 4) * formatEntry->bpp) * max(This->pow2Height, 4)) >> 1;
+        This->resource.size = ((max(This->pow2Width, 4) * format_desc->byte_count) * max(This->pow2Height, 4)) >> 1;
 
     } else if (format == WINED3DFMT_DXT2 || format == WINED3DFMT_DXT3 ||
                format == WINED3DFMT_DXT4 || format == WINED3DFMT_DXT5) {
-        This->resource.size = ((max(This->pow2Width, 4) * formatEntry->bpp) * max(This->pow2Height, 4));
+        This->resource.size = ((max(This->pow2Width, 4) * format_desc->byte_count) * max(This->pow2Height, 4));
     } else {
         unsigned char alignment = This->resource.wineD3DDevice->surface_alignment;
-        This->resource.size = ((This->pow2Width * formatEntry->bpp) + alignment - 1) & ~(alignment - 1);
+        This->resource.size = ((This->pow2Width * format_desc->byte_count) + alignment - 1) & ~(alignment - 1);
         This->resource.size *= This->pow2Height;
     }
 
-    if (format != WINED3DFMT_UNKNOWN) {
-        This->bytesPerPixel = formatEntry->bpp;
-    } else {
-        This->bytesPerPixel = 0;
-    }
-
     This->Flags |= (WINED3DFMT_D16_LOCKABLE == format) ? SFLAG_LOCKABLE : 0;
 
-    This->resource.format = format;
-
-    TRACE("(%p) : Size %d, bytesPerPixel %d\n", This, This->resource.size, This->bytesPerPixel);
+    This->resource.format_desc = format_desc;
+
+    TRACE("(%p) : Size %d, bytesPerPixel %d\n", This, This->resource.size, format_desc->byte_count);
 
     return WINED3D_OK;
@@ -562,4 +555,5 @@
 HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
+    const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
     int extraline = 0;
     SYSTEM_INFO sysInfo;
@@ -567,8 +561,8 @@
     HDC ddc;
     DWORD *masks;
-    const StaticPixelFormatDesc *formatEntry = getFormatDescEntry(This->resource.format, NULL, NULL);
     UINT usage;
 
-    switch (This->bytesPerPixel) {
+    switch (format_desc->byte_count)
+    {
         case 2:
         case 4:
@@ -584,7 +578,5 @@
             /* Allocate extra space for a palette. */
             b_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
-                               sizeof(BITMAPINFOHEADER)
-                               + sizeof(RGBQUAD)
-                               * (1 << (This->bytesPerPixel * 8)));
+                    sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << (format_desc->byte_count * 8)));
             break;
     }
@@ -606,9 +598,9 @@
     b_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
     /* TODO: Is there a nicer way to force a specific alignment? (8 byte for ddraw) */
-    b_info->bmiHeader.biWidth = IWineD3DSurface_GetPitch(iface) / This->bytesPerPixel;
+    b_info->bmiHeader.biWidth = IWineD3DSurface_GetPitch(iface) / format_desc->byte_count;
     b_info->bmiHeader.biHeight = -This->currentDesc.Height -extraline;
     b_info->bmiHeader.biSizeImage = ( This->currentDesc.Height + extraline) * IWineD3DSurface_GetPitch(iface);
     b_info->bmiHeader.biPlanes = 1;
-    b_info->bmiHeader.biBitCount = This->bytesPerPixel * 8;
+    b_info->bmiHeader.biBitCount = format_desc->byte_count * 8;
 
     b_info->bmiHeader.biXPelsPerMeter = 0;
@@ -619,5 +611,6 @@
     /* Get the bit masks */
     masks = (DWORD *)b_info->bmiColors;
-    switch (This->resource.format) {
+    switch (This->resource.format_desc->format)
+    {
         case WINED3DFMT_R8G8B8:
             usage = DIB_RGB_COLORS;
@@ -631,15 +624,15 @@
         case WINED3DFMT_R3G3B2:
         case WINED3DFMT_A8R3G3B2:
-        case WINED3DFMT_A2B10G10R10:
-        case WINED3DFMT_A8B8G8R8:
+        case WINED3DFMT_R10G10B10A2_UNORM:
+        case WINED3DFMT_R8G8B8A8_UNORM:
         case WINED3DFMT_X8B8G8R8:
         case WINED3DFMT_A2R10G10B10:
         case WINED3DFMT_R5G6B5:
-        case WINED3DFMT_A16B16G16R16:
+        case WINED3DFMT_R16G16B16A16_UNORM:
             usage = 0;
             b_info->bmiHeader.biCompression = BI_BITFIELDS;
-            masks[0] = formatEntry->redMask;
-            masks[1] = formatEntry->greenMask;
-            masks[2] = formatEntry->blueMask;
+            masks[0] = format_desc->red_mask;
+            masks[1] = format_desc->green_mask;
+            masks[2] = format_desc->blue_mask;
             break;
 
@@ -695,5 +688,5 @@
 }
 
-static void convert_r32f_r16f(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
+static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
                               unsigned int w, unsigned int h)
 {
@@ -712,4 +705,44 @@
 }
 
+static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst,
+        DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h)
+{
+    static const unsigned char convert_5to8[] =
+    {
+        0x00, 0x08, 0x10, 0x19, 0x21, 0x29, 0x31, 0x3a,
+        0x42, 0x4a, 0x52, 0x5a, 0x63, 0x6b, 0x73, 0x7b,
+        0x84, 0x8c, 0x94, 0x9c, 0xa5, 0xad, 0xb5, 0xbd,
+        0xc5, 0xce, 0xd6, 0xde, 0xe6, 0xef, 0xf7, 0xff,
+    };
+    static const unsigned char convert_6to8[] =
+    {
+        0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, 0x18, 0x1c,
+        0x20, 0x24, 0x28, 0x2d, 0x31, 0x35, 0x39, 0x3d,
+        0x41, 0x45, 0x49, 0x4d, 0x51, 0x55, 0x59, 0x5d,
+        0x61, 0x65, 0x69, 0x6d, 0x71, 0x75, 0x79, 0x7d,
+        0x82, 0x86, 0x8a, 0x8e, 0x92, 0x96, 0x9a, 0x9e,
+        0xa2, 0xa6, 0xaa, 0xae, 0xb2, 0xb6, 0xba, 0xbe,
+        0xc2, 0xc6, 0xca, 0xce, 0xd2, 0xd7, 0xdb, 0xdf,
+        0xe3, 0xe7, 0xeb, 0xef, 0xf3, 0xf7, 0xfb, 0xff,
+    };
+    unsigned int x, y;
+
+    TRACE("Converting %ux%u pixels, pitches %u %u\n", w, h, pitch_in, pitch_out);
+
+    for (y = 0; y < h; ++y)
+    {
+        const WORD *src_line = (const WORD *)(src + y * pitch_in);
+        DWORD *dst_line = (DWORD *)(dst + y * pitch_out);
+        for (x = 0; x < w; ++x)
+        {
+            WORD pixel = src_line[x];
+            dst_line[x] = 0xff000000
+                    | convert_5to8[(pixel & 0xf800) >> 11] << 16
+                    | convert_6to8[(pixel & 0x07e0) >> 5] << 8
+                    | convert_5to8[(pixel & 0x001f)];
+        }
+    }
+}
+
 struct d3dfmt_convertor_desc {
     WINED3DFORMAT from, to;
@@ -719,5 +752,6 @@
 static const struct d3dfmt_convertor_desc convertors[] =
 {
-    {WINED3DFMT_R32F,       WINED3DFMT_R16F,        convert_r32f_r16f},
+    {WINED3DFMT_R32_FLOAT,  WINED3DFMT_R16_FLOAT,   convert_r32_float_r16_float},
+    {WINED3DFMT_R5G6B5,     WINED3DFMT_X8R8G8B8,    convert_r5g6b5_x8r8g8b8},
 };
 
@@ -750,27 +784,16 @@
     HRESULT hr;
 
-    conv = find_convertor(source->resource.format, to_fmt);
+    conv = find_convertor(source->resource.format_desc->format, to_fmt);
     if(!conv) {
         FIXME("Cannot find a conversion function from format %s to %s\n",
-              debug_d3dformat(source->resource.format), debug_d3dformat(to_fmt));
+              debug_d3dformat(source->resource.format_desc->format), debug_d3dformat(to_fmt));
         return NULL;
     }
 
-    IWineD3DDevice_CreateSurface((IWineD3DDevice *) source->resource.wineD3DDevice,
-                                 source->currentDesc.Width,
-                                 source->currentDesc.Height,
-                                 to_fmt,
-                                 TRUE,  /* lockable */
-                                 TRUE,  /* discard  */
-                                 0,     /* level */
-                                 &ret,
-                                 WINED3DRTYPE_SURFACE,
-                                 0,     /* usage */
-                                 WINED3DPOOL_SCRATCH,
-                                 WINED3DMULTISAMPLE_NONE,   /* TODO: Multisampled conversion */
-                                 0,     /* MultiSampleQuality */
-                                 NULL,  /* SharedHandle */
-                                 IWineD3DSurface_GetImplType((IWineD3DSurface *) source),
-                                 NULL); /* parent */
+    IWineD3DDevice_CreateSurface((IWineD3DDevice *)source->resource.wineD3DDevice,
+            source->currentDesc.Width, source->currentDesc.Height, to_fmt, TRUE /* lockable */,
+            TRUE /* discard  */, 0 /* level */, &ret, WINED3DRTYPE_SURFACE, 0 /* usage */,
+            WINED3DPOOL_SCRATCH, WINED3DMULTISAMPLE_NONE /* TODO: Multisampled conversion */,
+            0 /* MultiSampleQuality */, IWineD3DSurface_GetImplType((IWineD3DSurface *) source), NULL /* parent */);
     if(!ret) {
         ERR("Failed to create a destination surface for conversion\n");
@@ -887,8 +910,7 @@
     HRESULT     ret = WINED3D_OK;
     WINED3DLOCKED_RECT  dlock, slock;
-    WINED3DFORMAT       dfmt = WINED3DFMT_UNKNOWN, sfmt = WINED3DFMT_UNKNOWN;
     int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
+    const struct GlPixelFormatDesc *sEntry, *dEntry;
     int x, y;
-    const StaticPixelFormatDesc *sEntry, *dEntry;
     const BYTE *sbuf;
     BYTE *dbuf;
@@ -1066,18 +1088,16 @@
     {
         IWineD3DSurface_LockRect(iface, &dlock, NULL, 0);
-        dfmt = This->resource.format;
         slock = dlock;
-        sfmt = dfmt;
-        sEntry = getFormatDescEntry(sfmt, NULL, NULL);
+        sEntry = This->resource.format_desc;
         dEntry = sEntry;
     }
     else
     {
-        dfmt = This->resource.format;
-        dEntry = getFormatDescEntry(dfmt, NULL, NULL);
+        dEntry = This->resource.format_desc;
         if (Src)
         {
-            if(This->resource.format != Src->resource.format) {
-                Src = surface_convert_format(Src, dfmt);
+            if (This->resource.format_desc->format != Src->resource.format_desc->format)
+            {
+                Src = surface_convert_format(Src, dEntry->format);
                 if(!Src) {
                     /* The conv function writes a FIXME */
@@ -1087,7 +1107,10 @@
             }
             IWineD3DSurface_LockRect((IWineD3DSurface *) Src, &slock, NULL, WINED3DLOCK_READONLY);
-            sfmt = Src->resource.format;
-        }
-        sEntry = getFormatDescEntry(sfmt, NULL, NULL);
+            sEntry = Src->resource.format_desc;
+        }
+        else
+        {
+            sEntry = dEntry;
+        }
         if (DestRect)
             IWineD3DSurface_LockRect(iface, &dlock, &xdst, 0);
@@ -1098,5 +1121,5 @@
     if (!DDBltFx || !(DDBltFx->dwDDFX)) Flags &= ~WINEDDBLT_DDFX;
 
-    if (sEntry->isFourcc && dEntry->isFourcc)
+    if (sEntry->Flags & dEntry->Flags & WINED3DFMT_FLAG_FOURCC)
     {
         if (!DestRect || Src == This)
@@ -1107,5 +1130,5 @@
     }
 
-    bpp = This->bytesPerPixel;
+    bpp = This->resource.format_desc->byte_count;
     srcheight = xsrc.bottom - xsrc.top;
     srcwidth = xsrc.right - xsrc.left;
@@ -1117,5 +1140,5 @@
 
     if (DestRect && Src != This)
-        dbuf = (BYTE*)dlock.pBits;
+        dbuf = dlock.pBits;
     else
         dbuf = (BYTE*)dlock.pBits+(xdst.top*dlock.Pitch)+(xdst.left*bpp);
@@ -1339,7 +1362,7 @@
                 else
                 {
-                    keymask = sEntry->redMask   |
-                            sEntry->greenMask |
-                            sEntry->blueMask;
+                    keymask = sEntry->red_mask
+                            | sEntry->green_mask
+                            | sEntry->blue_mask;
                 }
                 Flags &= ~(WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE);
@@ -1533,5 +1556,5 @@
     const BYTE          *sbuf;
     BYTE                *dbuf;
-    const StaticPixelFormatDesc *sEntry, *dEntry;
+    const struct GlPixelFormatDesc *sEntry, *dEntry;
 
     if (TRACE_ON(d3d_surface))
@@ -1599,5 +1622,5 @@
     lock_dst.bottom = dsty + h;
 
-    bpp = This->bytesPerPixel;
+    bpp = This->resource.format_desc->byte_count;
 
     /* We need to lock the surfaces, or we won't get refreshes when done. */
@@ -1619,5 +1642,5 @@
         sbuf = This->resource.allocatedMemory + lock_src.top * pitch + lock_src.left * bpp;
         dbuf = This->resource.allocatedMemory + lock_dst.top * pitch + lock_dst.left * bpp;
-        sEntry = getFormatDescEntry(Src->resource.format, NULL, NULL);
+        sEntry = Src->resource.format_desc;
         dEntry = sEntry;
     }
@@ -1633,11 +1656,15 @@
         TRACE("Dst is at %p, Src is at %p\n", dbuf, sbuf);
 
-        sEntry = getFormatDescEntry(Src->resource.format, NULL, NULL);
-        dEntry = getFormatDescEntry(This->resource.format, NULL, NULL);
+        sEntry = Src->resource.format_desc;
+        dEntry = This->resource.format_desc;
     }
 
     /* Handle first the FOURCC surfaces... */
-    if (sEntry->isFourcc && dEntry->isFourcc)
-    {
+    if (sEntry->Flags & dEntry->Flags & WINED3DFMT_FLAG_FOURCC)
+    {
+        UINT block_width;
+        UINT block_height;
+        UINT block_byte_size;
+
         TRACE("Fourcc -> Fourcc copy\n");
         if (trans)
@@ -1645,5 +1672,5 @@
         if (dstx || dsty)
             FIXME("offset for destination surface is not supported\n");
-        if (Src->resource.format != This->resource.format)
+        if (Src->resource.format_desc->format != This->resource.format_desc->format)
         {
             FIXME("FOURCC->FOURCC copy only supported for the same type of surface\n");
@@ -1651,9 +1678,38 @@
             goto error;
         }
-        /* FIXME: Watch out that the size is correct for FOURCC surfaces */
-        memcpy(dbuf, sbuf, This->resource.size);
+
+        if (This->resource.format_desc->format == WINED3DFMT_DXT1)
+        {
+            block_width = 4;
+            block_height = 4;
+            block_byte_size = 8;
+        }
+        else if (This->resource.format_desc->format == WINED3DFMT_DXT2
+                || This->resource.format_desc->format == WINED3DFMT_DXT3
+                || This->resource.format_desc->format == WINED3DFMT_DXT4
+                || This->resource.format_desc->format == WINED3DFMT_DXT5)
+        {
+            block_width = 4;
+            block_height = 4;
+            block_byte_size = 16;
+        }
+        else
+        {
+            FIXME("Unsupported FourCC format %s.\n", debug_d3dformat(This->resource.format_desc->format));
+            block_width = 1;
+            block_height = 1;
+            block_byte_size = This->resource.format_desc->byte_count;
+        }
+
+        for (y = 0; y < h; y += block_height)
+        {
+            memcpy(dbuf, sbuf, (w / block_width) * block_byte_size);
+            dbuf += dlock.Pitch;
+            sbuf += slock.Pitch;
+        }
+
         goto error;
     }
-    if (sEntry->isFourcc && !dEntry->isFourcc)
+    if ((sEntry->Flags & WINED3DFMT_FLAG_FOURCC) && !(dEntry->Flags & WINED3DFMT_FLAG_FOURCC))
     {
         /* TODO: Use the libtxc_dxtn.so shared library to do
@@ -1808,10 +1864,12 @@
          * pixels to the right actually moves an entire 4x4 block to right, ie
          * 16 bytes (8 in case of DXT1). */
-        if (This->resource.format == WINED3DFMT_DXT1)
+        if (This->resource.format_desc->format == WINED3DFMT_DXT1)
         {
             pLockedRect->pBits = This->resource.allocatedMemory + (pLockedRect->Pitch * pRect->top / 4) + (pRect->left * 2);
         }
-        else if (This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 ||
-                    This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5)
+        else if (This->resource.format_desc->format == WINED3DFMT_DXT2
+                || This->resource.format_desc->format == WINED3DFMT_DXT3
+                || This->resource.format_desc->format == WINED3DFMT_DXT4
+                || This->resource.format_desc->format == WINED3DFMT_DXT5)
         {
             pLockedRect->pBits = This->resource.allocatedMemory + (pLockedRect->Pitch * pRect->top / 4) + (pRect->left * 4);
@@ -1821,5 +1879,5 @@
             pLockedRect->pBits = This->resource.allocatedMemory +
                     (pLockedRect->Pitch * pRect->top) +
-                    (pRect->left * This->bytesPerPixel);
+                    (pRect->left * This->resource.format_desc->byte_count);
         }
         This->lockedRect.left   = pRect->left;
@@ -1835,5 +1893,5 @@
 }
 
-void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface) {
+void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) {
     ERR("Should not be called on base texture\n");
     return;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface_gdi.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface_gdi.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface_gdi.c	(revision 19678)
@@ -140,5 +140,5 @@
     if(This->Flags & SFLAG_LOCKED)
     {
-        ERR("(%p) Surface already locked\n", This);
+        WARN("(%p) Surface already locked\n", This);
         /* What should I return here? */
         return WINED3DERR_INVALIDCALL;
@@ -178,5 +178,5 @@
     {
         WARN("trying to Unlock an unlocked surf@%p\n", This);
-        return WINED3DERR_INVALIDCALL;
+        return WINEDDERR_NOTLOCKED;
     }
 
@@ -299,5 +299,5 @@
     static char *output = NULL;
     static UINT size = 0;
-    const StaticPixelFormatDesc *formatEntry = getFormatDescEntry(This->resource.format, NULL, NULL);
+    const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
 
     if (This->pow2Width > size) {
@@ -314,5 +314,6 @@
     fprintf(f, "P6\n%d %d\n255\n", This->pow2Width, This->pow2Height);
 
-    if (This->resource.format == WINED3DFMT_P8) {
+    if (This->resource.format_desc->format == WINED3DFMT_P8)
+    {
         unsigned char table[256][3];
         int i;
@@ -342,14 +343,14 @@
         int red_shift, green_shift, blue_shift, pix_width, alpha_shift;
 
-        pix_width = This->bytesPerPixel;
-
-        red_shift = get_shift(formatEntry->redMask);
-        green_shift = get_shift(formatEntry->greenMask);
-        blue_shift = get_shift(formatEntry->blueMask);
-        alpha_shift = get_shift(formatEntry->alphaMask);
+        pix_width = format_desc->byte_count;
+
+        red_shift = get_shift(format_desc->red_mask);
+        green_shift = get_shift(format_desc->green_mask);
+        blue_shift = get_shift(format_desc->blue_mask);
+        alpha_shift = get_shift(format_desc->alpha_mask);
 
         for (y = 0; y < This->pow2Height; y++) {
             const unsigned char *src = This->resource.allocatedMemory + (y * 1 * IWineD3DSurface_GetPitch(iface));
-            for (x = 0; x < This->pow2Width; x++) {	    
+            for (x = 0; x < This->pow2Width; x++) {
                 unsigned int color;
                 unsigned int comp;
@@ -362,9 +363,9 @@
                 src += 1 * pix_width;
 
-                comp = color & formatEntry->redMask;
+                comp = color & format_desc->red_mask;
                 output[3 * x + 0] = red_shift > 0 ? comp >> red_shift : comp << -red_shift;
-                comp = color & formatEntry->greenMask;
+                comp = color & format_desc->green_mask;
                 output[3 * x + 1] = green_shift > 0 ? comp >> green_shift : comp << -green_shift;
-                comp = color & formatEntry->alphaMask;
+                comp = color & format_desc->alpha_mask;
                 output[3 * x + 2] = alpha_shift > 0 ? comp >> alpha_shift : comp << -alpha_shift;
             }
@@ -412,6 +413,7 @@
     }
 
-    if(This->resource.format == WINED3DFMT_P8 ||
-       This->resource.format == WINED3DFMT_A8P8) {
+    if (This->resource.format_desc->format == WINED3DFMT_P8
+            || This->resource.format_desc->format == WINED3DFMT_A8P8)
+    {
         unsigned int n;
         const PALETTEENTRY *pal = NULL;
@@ -452,9 +454,9 @@
 
     if (!(This->Flags & SFLAG_DCINUSE))
-        return WINED3DERR_INVALIDCALL;
+        return WINEDDERR_NODC;
 
     if (This->hDC !=hDC) {
         WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC);
-        return WINED3DERR_INVALIDCALL;
+        return WINEDDERR_NODC;
     }
 
@@ -548,12 +550,4 @@
     FIXME("(%p) : Should not be called on a GDI surface\n", This);
     *glDescription = NULL;
-}
-
-static HRESULT WINAPI IWineGDISurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, CONST RECT* pDirtyRect) {
-    /* GDI surface data can only be in one location, the system memory dib section. So they are
-     * always clean by definition.
-     */
-    TRACE("No dirtification in GDI surfaces\n");
-    return WINED3D_OK;
 }
 
@@ -683,5 +677,4 @@
     IWineD3DBaseSurfaceImpl_GetClipper,
     /* Internal use: */
-    IWineGDISurfaceImpl_AddDirtyRect,
     IWineGDISurfaceImpl_LoadTexture,
     IWineD3DBaseSurfaceImpl_BindTexture,
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/swapchain.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/swapchain.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/swapchain.c	(revision 19678)
@@ -119,5 +119,5 @@
         cursor.resource.wineD3DDevice = This->wineD3DDevice;
         cursor.resource.pool = WINED3DPOOL_SCRATCH;
-        cursor.resource.format = WINED3DFMT_A8R8G8B8;
+        cursor.resource.format_desc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &This->wineD3DDevice->adapter->gl_info);
         cursor.resource.resourceType = WINED3DRTYPE_SURFACE;
         cursor.glDescription.textureName = This->wineD3DDevice->cursorTexture;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/texture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/texture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/texture.c	(revision 19678)
@@ -102,5 +102,5 @@
 }
 
-static void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DTexture *iface) {
+void texture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb) {
 
     /* Override the IWineD3DResource PreLoad method */
@@ -108,8 +108,17 @@
     IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    BOOL srgb_mode = This->baseTexture.is_srgb;
-    BOOL srgb_was_toggled = FALSE;
+    BOOL srgb_mode;
+    BOOL *dirty;
 
     TRACE("(%p) : About to load texture\n", This);
+
+    switch(srgb) {
+        case SRGB_RGB:      srgb_mode = FALSE; break;
+        case SRGB_BOTH:     texture_internal_preload(iface, SRGB_RGB);
+        case SRGB_SRGB:     srgb_mode = TRUE; break;
+        /* DONTKNOW, and shut up the compiler */
+        default:            srgb_mode = This->baseTexture.is_srgb; break;
+    }
+    dirty = srgb_mode ? &This->baseTexture.srgbDirty : &This->baseTexture.dirty;
 
     if(!device->isInDraw) {
@@ -118,11 +127,9 @@
          */
         ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-    } else if (GL_SUPPORT(EXT_TEXTURE_SRGB) && This->baseTexture.bindCount > 0) {
-        srgb_mode = device->stateBlock->samplerState[This->baseTexture.sampler][WINED3DSAMP_SRGBTEXTURE];
-        srgb_was_toggled = This->baseTexture.is_srgb != srgb_mode;
-        This->baseTexture.is_srgb = srgb_mode;
-    }
-
-    if (This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8) {
+    }
+
+    if (This->resource.format_desc->format == WINED3DFMT_P8
+            || This->resource.format_desc->format == WINED3DFMT_A8P8)
+    {
         for (i = 0; i < This->baseTexture.levels; i++) {
             if(palette9_changed((IWineD3DSurfaceImpl *)This->surfaces[i])) {
@@ -136,17 +143,6 @@
     }
     /* If the texture is marked dirty or the srgb sampler setting has changed since the last load then reload the surfaces */
-    if (This->baseTexture.dirty) {
+    if (*dirty) {
         for (i = 0; i < This->baseTexture.levels; i++) {
-            IWineD3DSurface_LoadTexture(This->surfaces[i], srgb_mode);
-        }
-    } else if (srgb_was_toggled) {
-        if (This->baseTexture.srgb_mode_change_count < 20)
-            ++This->baseTexture.srgb_mode_change_count;
-        else
-            FIXME("Texture (%p) has been reloaded at least 20 times due to WINED3DSAMP_SRGBTEXTURE changes on it\'s sampler\n", This);
-
-        for (i = 0; i < This->baseTexture.levels; i++) {
-            IWineD3DSurface_AddDirtyRect(This->surfaces[i], NULL);
-            surface_force_reload(This->surfaces[i]);
             IWineD3DSurface_LoadTexture(This->surfaces[i], srgb_mode);
         }
@@ -156,7 +152,11 @@
 
     /* No longer dirty */
-    This->baseTexture.dirty = FALSE;
+    *dirty = FALSE;
 
     return ;
+}
+
+static void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DTexture *iface) {
+    texture_internal_preload((IWineD3DBaseTexture *) iface, SRGB_ANY);
 }
 
@@ -172,5 +172,6 @@
     for (i = 0; i < This->baseTexture.levels; i++) {
         IWineD3DSurface_UnLoad(This->surfaces[i]);
-        surface_set_texture_name(This->surfaces[i], 0);
+        surface_set_texture_name(This->surfaces[i], 0, FALSE); /* Delete rgb name */
+        surface_set_texture_name(This->surfaces[i], 0, TRUE); /* delete srgb name */
     }
 
@@ -222,16 +223,20 @@
 }
 
-static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface) {
-    IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
-    BOOL set_gl_texture_desc = This->baseTexture.textureName == 0;
+static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface, BOOL srgb) {
+    IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
+    BOOL set_gl_texture_desc;
     HRESULT hr;
 
     TRACE("(%p) : relay to BaseTexture\n", This);
 
-    hr = basetexture_bind((IWineD3DBaseTexture *)iface);
+    hr = basetexture_bind((IWineD3DBaseTexture *)iface, srgb, &set_gl_texture_desc);
     if (set_gl_texture_desc && SUCCEEDED(hr)) {
         UINT i;
         for (i = 0; i < This->baseTexture.levels; ++i) {
-            surface_set_texture_name(This->surfaces[i], This->baseTexture.textureName);
+            if(This->baseTexture.is_srgb) {
+                surface_set_texture_name(This->surfaces[i], This->baseTexture.srgbTextureName, TRUE);
+            } else {
+                surface_set_texture_name(This->surfaces[i], This->baseTexture.textureName, FALSE);
+            }
         }
         /* Conditinal non power of two textures use a different clamping default. If we're using the GL_WINE_normalized_texrect
@@ -288,5 +293,5 @@
 static void WINAPI IWineD3DTextureImpl_Destroy(IWineD3DTexture *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroySurface) {
     IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
-    int i;
+    unsigned int i;
 
     TRACE("(%p) : Cleaning up\n",This);
@@ -294,5 +299,6 @@
         if (This->surfaces[i] != NULL) {
             /* Clean out the texture name we gave to the surface so that the surface doesn't try and release it */
-            surface_set_texture_name(This->surfaces[i], 0);
+            surface_set_texture_name(This->surfaces[i], 0, TRUE);
+            surface_set_texture_name(This->surfaces[i], 0, FALSE);
             surface_set_texture_target(This->surfaces[i], 0);
             IWineD3DSurface_SetContainer(This->surfaces[i], 0);
@@ -313,5 +319,5 @@
         return IWineD3DSurface_GetDesc(This->surfaces[Level], pDesc);
     }
-    FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
+    WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
     return WINED3DERR_INVALIDCALL;
 }
@@ -369,6 +375,9 @@
     IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
     This->baseTexture.dirty = TRUE;
+    This->baseTexture.srgbDirty = TRUE;
     TRACE("(%p) : dirtyfication of surface Level (0)\n", This);
-    return IWineD3DSurface_AddDirtyRect(This->surfaces[0], pDirtyRect);
+    surface_add_dirty_rect(This->surfaces[0], pDirtyRect);
+
+    return WINED3D_OK;
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/utils.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/utils.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/utils.c	(revision 19678)
@@ -38,4 +38,13 @@
 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
 
+struct StaticPixelFormatDesc
+{
+    WINED3DFORMAT format;
+    DWORD alphaMask, redMask, greenMask, blueMask;
+    UINT bpp;
+    short depthSize, stencilSize;
+    BOOL isFourcc;
+};
+
 /*****************************************************************************
  * Pixel format array
@@ -48,82 +57,121 @@
  * formats are not usable in 2D rendering because ddraw doesn't support them.
  */
-static const StaticPixelFormatDesc formats[] = {
-  /*{WINED3DFORMAT          ,alphamask  ,redmask    ,greenmask  ,bluemask   ,bpp    ,depth  ,stencil,    isFourcc*/
-    {WINED3DFMT_UNKNOWN     ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,FALSE },
+static const struct StaticPixelFormatDesc formats[] =
+{
+  /* WINED3DFORMAT               alphamask    redmask    greenmask    bluemask     bpp    depth  stencil   isFourcc */
+    {WINED3DFMT_UNKNOWN,            0x0,        0x0,        0x0,        0x0,        0,      0,      0,      FALSE},
     /* FourCC formats, kept here to have WINED3DFMT_R8G8B8(=20) at position 20 */
-    {WINED3DFMT_UYVY        ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_YUY2        ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_YV12        ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_DXT1        ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_DXT2        ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_DXT3        ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_DXT4        ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_DXT5        ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_MULTI2_ARGB8,0x0        ,0x0        ,0x0        ,0x0        ,1/*?*/ ,0      ,0          ,TRUE  },
-    {WINED3DFMT_G8R8_G8B8   ,0x0        ,0x0        ,0x0        ,0x0        ,1/*?*/ ,0      ,0          ,TRUE  },
-    {WINED3DFMT_R8G8_B8G8   ,0x0        ,0x0        ,0x0        ,0x0        ,1/*?*/ ,0      ,0          ,TRUE  },
+    {WINED3DFMT_UYVY,               0x0,        0x0,        0x0,        0x0,        2,      0,      0,      TRUE },
+    {WINED3DFMT_YUY2,               0x0,        0x0,        0x0,        0x0,        2,      0,      0,      TRUE },
+    {WINED3DFMT_YV12,               0x0,        0x0,        0x0,        0x0,        1,      0,      0,      TRUE },
+    {WINED3DFMT_DXT1,               0x0,        0x0,        0x0,        0x0,        1,      0,      0,      TRUE },
+    {WINED3DFMT_DXT2,               0x0,        0x0,        0x0,        0x0,        1,      0,      0,      TRUE },
+    {WINED3DFMT_DXT3,               0x0,        0x0,        0x0,        0x0,        1,      0,      0,      TRUE },
+    {WINED3DFMT_DXT4,               0x0,        0x0,        0x0,        0x0,        1,      0,      0,      TRUE },
+    {WINED3DFMT_DXT5,               0x0,        0x0,        0x0,        0x0,        1,      0,      0,      TRUE },
+    {WINED3DFMT_MULTI2_ARGB8,       0x0,        0x0,        0x0,        0x0,        1/*?*/, 0,      0,      TRUE },
+    {WINED3DFMT_G8R8_G8B8,          0x0,        0x0,        0x0,        0x0,        1/*?*/, 0,      0,      TRUE },
+    {WINED3DFMT_R8G8_B8G8,          0x0,        0x0,        0x0,        0x0,        1/*?*/, 0,      0,      TRUE },
     /* IEEE formats */
-    {WINED3DFMT_R32F        ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_G32R32F     ,0x0        ,0x0        ,0x0        ,0x0        ,8      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A32B32G32R32F,0x1       ,0x0        ,0x0        ,0x0        ,16     ,0      ,0          ,FALSE },
+    {WINED3DFMT_R32_FLOAT,          0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_R32G32_FLOAT,       0x0,        0x0,        0x0,        0x0,        8,      0,      0,      FALSE},
+    {WINED3DFMT_R32G32B32_FLOAT,    0x0,        0x0,        0x0,        0x0,        12,     0,      0,      FALSE},
+    {WINED3DFMT_R32G32B32A32_FLOAT, 0x1,        0x0,        0x0,        0x0,        16,     0,      0,      FALSE},
     /* Hmm? */
-    {WINED3DFMT_CxV8U8      ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,FALSE },
+    {WINED3DFMT_CxV8U8,             0x0,        0x0,        0x0,        0x0,        2,      0,      0,      FALSE},
     /* Float */
-    {WINED3DFMT_R16F        ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_G16R16F     ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A16B16G16R16F,0x1       ,0x0        ,0x0        ,0x0        ,8      ,0      ,0          ,FALSE },
+    {WINED3DFMT_R16_FLOAT,          0x0,        0x0,        0x0,        0x0,        2,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16_FLOAT,       0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16_SINT,        0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16B16A16_FLOAT, 0x1,        0x0,        0x0,        0x0,        8,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16B16A16_SINT,  0x1,        0x0,        0x0,        0x0,        8,      0,      0,      FALSE},
     /* Palettized formats */
-    {WINED3DFMT_A8P8        ,0x0000ff00 ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_P8          ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,FALSE },
-    /* Standard ARGB formats. Keep WINED3DFMT_R8G8B8(=20) at position 20 */
-    {WINED3DFMT_R8G8B8      ,0x0        ,0x00ff0000 ,0x0000ff00 ,0x000000ff ,3      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A8R8G8B8    ,0xff000000 ,0x00ff0000 ,0x0000ff00 ,0x000000ff ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_X8R8G8B8    ,0x0        ,0x00ff0000 ,0x0000ff00 ,0x000000ff ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_R5G6B5      ,0x0        ,0x0000F800 ,0x000007e0 ,0x0000001f ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_X1R5G5B5    ,0x0        ,0x00007c00 ,0x000003e0 ,0x0000001f ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A1R5G5B5    ,0x00008000 ,0x00007c00 ,0x000003e0 ,0x0000001f ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A4R4G4B4    ,0x0000f000 ,0x00000f00 ,0x000000f0 ,0x0000000f ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_R3G3B2      ,0x0        ,0x000000e0 ,0x0000001c ,0x00000003 ,1      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A8          ,0x000000ff ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A8R3G3B2    ,0x0000ff00 ,0x000000e0 ,0x0000001c ,0x00000003 ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_X4R4G4B4    ,0x0        ,0x00000f00 ,0x000000f0 ,0x0000000f ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A2B10G10R10 ,0xb0000000 ,0x000003ff ,0x000ffc00 ,0x3ff00000 ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A8B8G8R8    ,0xff000000 ,0x000000ff ,0x0000ff00 ,0x00ff0000 ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_X8B8G8R8    ,0x0        ,0x000000ff ,0x0000ff00 ,0x00ff0000 ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_G16R16      ,0x0        ,0x0000ffff ,0xffff0000 ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A2R10G10B10 ,0xb0000000 ,0x3ff00000 ,0x000ffc00 ,0x000003ff ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A16B16G16R16,0x1        ,0x0000ffff ,0xffff0000 ,0x0        ,8      ,0      ,0          ,FALSE },
+    {WINED3DFMT_A8P8,               0x0000ff00, 0x0,        0x0,        0x0,        2,      0,      0,      FALSE},
+    {WINED3DFMT_P8,                 0x0,        0x0,        0x0,        0x0,        1,      0,      0,      FALSE},
+    /* Standard ARGB formats. */
+    {WINED3DFMT_R8G8B8,             0x0,        0x00ff0000, 0x0000ff00, 0x000000ff, 3,      0,      0,      FALSE},
+    {WINED3DFMT_A8R8G8B8,           0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff, 4,      0,      0,      FALSE},
+    {WINED3DFMT_X8R8G8B8,           0x0,        0x00ff0000, 0x0000ff00, 0x000000ff, 4,      0,      0,      FALSE},
+    {WINED3DFMT_R5G6B5,             0x0,        0x0000f800, 0x000007e0, 0x0000001f, 2,      0,      0,      FALSE},
+    {WINED3DFMT_X1R5G5B5,           0x0,        0x00007c00, 0x000003e0, 0x0000001f, 2,      0,      0,      FALSE},
+    {WINED3DFMT_A1R5G5B5,           0x00008000, 0x00007c00, 0x000003e0, 0x0000001f, 2,      0,      0,      FALSE},
+    {WINED3DFMT_A4R4G4B4,           0x0000f000, 0x00000f00, 0x000000f0, 0x0000000f, 2,      0,      0,      FALSE},
+    {WINED3DFMT_R3G3B2,             0x0,        0x000000e0, 0x0000001c, 0x00000003, 1,      0,      0,      FALSE},
+    {WINED3DFMT_A8_UNORM,           0x000000ff, 0x0,        0x0,        0x0,        1,      0,      0,      FALSE},
+    {WINED3DFMT_A8R3G3B2,           0x0000ff00, 0x000000e0, 0x0000001c, 0x00000003, 2,      0,      0,      FALSE},
+    {WINED3DFMT_X4R4G4B4,           0x0,        0x00000f00, 0x000000f0, 0x0000000f, 2,      0,      0,      FALSE},
+    {WINED3DFMT_R10G10B10A2_UNORM,  0xb0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4,      0,      0,      FALSE},
+    {WINED3DFMT_R10G10B10A2_UINT,   0xb0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4,      0,      0,      FALSE},
+    {WINED3DFMT_R10G10B10A2_SNORM,  0xb0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4,      0,      0,      FALSE},
+    {WINED3DFMT_R8G8B8A8_UNORM,     0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4,      0,      0,      FALSE},
+    {WINED3DFMT_R8G8B8A8_UINT,      0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4,      0,      0,      FALSE},
+    {WINED3DFMT_X8B8G8R8,           0x0,        0x000000ff, 0x0000ff00, 0x00ff0000, 4,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16_UNORM,       0x0,        0x0000ffff, 0xffff0000, 0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_A2R10G10B10,        0xb0000000, 0x3ff00000, 0x000ffc00, 0x000003ff, 4,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16B16A16_UNORM, 0x1,        0x0000ffff, 0xffff0000, 0x0,        8,      0,      0,      FALSE},
     /* Luminance */
-    {WINED3DFMT_L8          ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A8L8        ,0x0000ff00 ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A4L4        ,0x000000f0 ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,FALSE },
+    {WINED3DFMT_L8,                 0x0,        0x0,        0x0,        0x0,        1,      0,      0,      FALSE},
+    {WINED3DFMT_A8L8,               0x0000ff00, 0x0,        0x0,        0x0,        2,      0,      0,      FALSE},
+    {WINED3DFMT_A4L4,               0x000000f0, 0x0,        0x0,        0x0,        1,      0,      0,      FALSE},
     /* Bump mapping stuff */
-    {WINED3DFMT_V8U8        ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_L6V5U5      ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_X8L8V8U8    ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_Q8W8V8U8    ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_V16U16      ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_W11V11U10   ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_A2W10V10U10 ,0xb0000000 ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
+    {WINED3DFMT_R8G8_SNORM,         0x0,        0x0,        0x0,        0x0,        2,      0,      0,      FALSE},
+    {WINED3DFMT_L6V5U5,             0x0,        0x0,        0x0,        0x0,        2,      0,      0,      FALSE},
+    {WINED3DFMT_X8L8V8U8,           0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_R8G8B8A8_SNORM,     0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16_SNORM,       0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_W11V11U10,          0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_A2W10V10U10,        0xb0000000, 0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
     /* Depth stencil formats */
-    {WINED3DFMT_D16_LOCKABLE,0x0        ,0x0        ,0x0        ,0x0        ,2      ,16     ,0          ,FALSE },
-    {WINED3DFMT_D32         ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,32     ,0          ,FALSE },
-    {WINED3DFMT_D15S1       ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,15     ,1          ,FALSE },
-    {WINED3DFMT_D24S8       ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,24     ,8          ,FALSE },
-    {WINED3DFMT_D24X8       ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,24     ,0          ,FALSE },
-    {WINED3DFMT_D24X4S4     ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,24     ,4          ,FALSE },
-    {WINED3DFMT_D16         ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,16     ,0          ,FALSE },
-    {WINED3DFMT_L16         ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,16      ,0          ,FALSE },
-    {WINED3DFMT_D32F_LOCKABLE,0x0       ,0x0        ,0x0        ,0x0        ,4      ,32     ,0          ,FALSE },
-    {WINED3DFMT_D24FS8      ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,24     ,8          ,FALSE },
+    {WINED3DFMT_D16_LOCKABLE,       0x0,        0x0,        0x0,        0x0,        2,      16,     0,      FALSE},
+    {WINED3DFMT_D32,                0x0,        0x0,        0x0,        0x0,        4,      32,     0,      FALSE},
+    {WINED3DFMT_D15S1,              0x0,        0x0,        0x0,        0x0,        2,      15,     1,      FALSE},
+    {WINED3DFMT_D24S8,              0x0,        0x0,        0x0,        0x0,        4,      24,     8,      FALSE},
+    {WINED3DFMT_D24X8,              0x0,        0x0,        0x0,        0x0,        4,      24,     0,      FALSE},
+    {WINED3DFMT_D24X4S4,            0x0,        0x0,        0x0,        0x0,        4,      24,     4,      FALSE},
+    {WINED3DFMT_D16_UNORM,          0x0,        0x0,        0x0,        0x0,        2,      16,     0,      FALSE},
+    {WINED3DFMT_L16,                0x0,        0x0,        0x0,        0x0,        2,      16,     0,      FALSE},
+    {WINED3DFMT_D32F_LOCKABLE,      0x0,        0x0,        0x0,        0x0,        4,      32,     0,      FALSE},
+    {WINED3DFMT_D24FS8,             0x0,        0x0,        0x0,        0x0,        4,      24,     8,      FALSE},
     /* Is this a vertex buffer? */
-    {WINED3DFMT_VERTEXDATA  ,0x0        ,0x0        ,0x0        ,0x0        ,0      ,0      ,0          ,FALSE },
-    {WINED3DFMT_INDEX16     ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,FALSE },
-    {WINED3DFMT_INDEX32     ,0x0        ,0x0        ,0x0        ,0x0        ,4      ,0      ,0          ,FALSE },
-    {WINED3DFMT_Q16W16V16U16,0x0        ,0x0        ,0x0        ,0x0        ,8      ,0      ,0          ,FALSE },
+    {WINED3DFMT_VERTEXDATA,         0x0,        0x0,        0x0,        0x0,        0,      0,      0,      FALSE},
+    {WINED3DFMT_R16_UINT,           0x0,        0x0,        0x0,        0x0,        2,      0,      0,      FALSE},
+    {WINED3DFMT_R32_UINT,           0x0,        0x0,        0x0,        0x0,        4,      0,      0,      FALSE},
+    {WINED3DFMT_R16G16B16A16_SNORM, 0x0,        0x0,        0x0,        0x0,        8,      0,      0,      FALSE},
     /* Vendor-specific formats */
-    {WINED3DFMT_ATI2N       ,0x0        ,0x0        ,0x0        ,0x0        ,1      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_NVHU        ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,TRUE  },
-    {WINED3DFMT_NVHS        ,0x0        ,0x0        ,0x0        ,0x0        ,2      ,0      ,0          ,TRUE  },
+    {WINED3DFMT_ATI2N,              0x0,        0x0,        0x0,        0x0,        1,      0,      0,      TRUE },
+    {WINED3DFMT_NVHU,               0x0,        0x0,        0x0,        0x0,        2,      0,      0,      TRUE },
+    {WINED3DFMT_NVHS,               0x0,        0x0,        0x0,        0x0,        2,      0,      0,      TRUE },
+};
+
+struct wined3d_format_vertex_info
+{
+    WINED3DFORMAT format;
+    enum wined3d_ffp_emit_idx emit_idx;
+    GLint component_count;
+    GLenum gl_vtx_type;
+    GLint gl_vtx_format;
+    GLboolean gl_normalized;
+    unsigned int component_size;
+};
+
+static const struct wined3d_format_vertex_info format_vertex_info[] =
+{
+    {WINED3DFMT_R32_FLOAT,          WINED3D_FFP_EMIT_FLOAT1,    1, GL_FLOAT,          1, GL_FALSE, sizeof(float)},
+    {WINED3DFMT_R32G32_FLOAT,       WINED3D_FFP_EMIT_FLOAT2,    2, GL_FLOAT,          2, GL_FALSE, sizeof(float)},
+    {WINED3DFMT_R32G32B32_FLOAT,    WINED3D_FFP_EMIT_FLOAT3,    3, GL_FLOAT,          3, GL_FALSE, sizeof(float)},
+    {WINED3DFMT_R32G32B32A32_FLOAT, WINED3D_FFP_EMIT_FLOAT4,    4, GL_FLOAT,          4, GL_FALSE, sizeof(float)},
+    {WINED3DFMT_A8R8G8B8,           WINED3D_FFP_EMIT_D3DCOLOR,  4, GL_UNSIGNED_BYTE,  4, GL_TRUE,  sizeof(BYTE)},
+    {WINED3DFMT_R8G8B8A8_UINT,      WINED3D_FFP_EMIT_UBYTE4,    4, GL_UNSIGNED_BYTE,  4, GL_FALSE, sizeof(BYTE)},
+    {WINED3DFMT_R16G16_SINT,        WINED3D_FFP_EMIT_SHORT2,    2, GL_SHORT,          2, GL_FALSE, sizeof(short int)},
+    {WINED3DFMT_R16G16B16A16_SINT,  WINED3D_FFP_EMIT_SHORT4,    4, GL_SHORT,          4, GL_FALSE, sizeof(short int)},
+    {WINED3DFMT_R8G8B8A8_UNORM,     WINED3D_FFP_EMIT_UBYTE4N,   4, GL_UNSIGNED_BYTE,  4, GL_TRUE,  sizeof(BYTE)},
+    {WINED3DFMT_R16G16_SNORM,       WINED3D_FFP_EMIT_SHORT2N,   2, GL_SHORT,          2, GL_TRUE,  sizeof(short int)},
+    {WINED3DFMT_R16G16B16A16_SNORM, WINED3D_FFP_EMIT_SHORT4N,   4, GL_SHORT,          4, GL_TRUE,  sizeof(short int)},
+    {WINED3DFMT_R16G16_UNORM,       WINED3D_FFP_EMIT_USHORT2N,  2, GL_UNSIGNED_SHORT, 2, GL_TRUE,  sizeof(short int)},
+    {WINED3DFMT_R16G16B16A16_UNORM, WINED3D_FFP_EMIT_USHORT4N,  4, GL_UNSIGNED_SHORT, 4, GL_TRUE,  sizeof(short int)},
+    {WINED3DFMT_R10G10B10A2_UINT,   WINED3D_FFP_EMIT_UDEC3,     3, GL_UNSIGNED_SHORT, 3, GL_FALSE, sizeof(short int)},
+    {WINED3DFMT_R10G10B10A2_SNORM,  WINED3D_FFP_EMIT_DEC3N,     3, GL_SHORT,          3, GL_TRUE,  sizeof(short int)},
+    {WINED3DFMT_R16G16_FLOAT,       WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_FLOAT,          2, GL_FALSE, sizeof(GLhalfNV)},
+    {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_FLOAT,          4, GL_FALSE, sizeof(GLhalfNV)}
 };
 
@@ -141,8 +189,10 @@
  */
 static const GlPixelFormatDescTemplate gl_formats_template[] = {
-  /*{                           internal                         ,srgbInternal                           , rtInternal,  format                    ,type \
-        ,Flags }*/
-    {WINED3DFMT_UNKNOWN        ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
+    /* WINED3DFORMAT                internal                          srgbInternal                            rtInternal
+            format                  type
+            flags */
+    {WINED3DFMT_UNKNOWN,            0,                                0,                                      0,
+            0,                      0,
+            0},
     /* FourCC formats */
     /* GL_APPLE_ycbcr_422 claims that its '2YUV' format, which is supported via the UNSIGNED_SHORT_8_8_REV_APPLE type
@@ -152,142 +202,206 @@
      * endian machine
      */
-    {WINED3DFMT_UYVY           ,GL_RGB                           ,GL_RGB                                 , 0,           GL_YCBCR_422_APPLE        ,UNSIGNED_SHORT_8_8_APPLE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_YUY2           ,GL_RGB                           ,GL_RGB                                 , 0,           GL_YCBCR_422_APPLE        ,UNSIGNED_SHORT_8_8_REV_APPLE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_YV12           ,GL_ALPHA                         ,GL_ALPHA                               , 0,           GL_ALPHA                  ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_DXT1           ,GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT , 0,           GL_RGBA                   ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_DXT2           ,GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT , 0,           GL_RGBA                   ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_DXT3           ,GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT , 0,           GL_RGBA                   ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_DXT4           ,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT , 0,           GL_RGBA                   ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_DXT5           ,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT , 0,           GL_RGBA                   ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_MULTI2_ARGB8   ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_G8R8_G8B8      ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_R8G8_B8G8      ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
+    {WINED3DFMT_UYVY,               GL_RGB,                           GL_RGB,                                 0,
+            GL_YCBCR_422_APPLE,     UNSIGNED_SHORT_8_8_APPLE,
+            WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_YUY2,               GL_RGB,                           GL_RGB,                                 0,
+            GL_YCBCR_422_APPLE, UNSIGNED_SHORT_8_8_REV_APPLE,
+            WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_YV12,               GL_ALPHA,                         GL_ALPHA,                               0,
+            GL_ALPHA,               GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_DXT1,               GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, 0,
+            GL_RGBA,                GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_DXT2,               GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
+            GL_RGBA,                GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_DXT3,               GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
+            GL_RGBA,                GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_DXT4,               GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
+            GL_RGBA,                GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_DXT5,               GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
+            GL_RGBA,                GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_MULTI2_ARGB8,       0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_G8R8_G8B8,          0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_R8G8_B8G8,          0,                                0,                                      0,
+            0,                      0,
+            0},
     /* IEEE formats */
-    {WINED3DFMT_R32F           ,GL_RGB32F_ARB                    ,GL_RGB32F_ARB                          , 0,           GL_RED                    ,GL_FLOAT
-        ,WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_G32R32F        ,0                                ,0                                      , 0,           0                         ,0
-        ,WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_A32B32G32R32F  ,GL_RGBA32F_ARB                   ,GL_RGBA32F_ARB                         , 0,           GL_RGBA                   ,GL_FLOAT
-        ,WINED3DFMT_FLAG_RENDERTARGET },
+    {WINED3DFMT_R32_FLOAT,          GL_RGB32F_ARB,                    GL_RGB32F_ARB,                          0,
+            GL_RED,                 GL_FLOAT,
+            WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_R32G32_FLOAT,       GL_RG32F,                         GL_RG32F,                               0,
+            GL_RG,                  GL_FLOAT,
+            WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_R32G32B32A32_FLOAT, GL_RGBA32F_ARB,                   GL_RGBA32F_ARB,                         0,
+            GL_RGBA,                GL_FLOAT,
+            WINED3DFMT_FLAG_RENDERTARGET},
     /* Hmm? */
-    {WINED3DFMT_CxV8U8         ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
+    {WINED3DFMT_CxV8U8,             0,                                0,                                      0,
+            0,                      0,
+            0},
     /* Float */
-    {WINED3DFMT_R16F           ,GL_RGB16F_ARB                    ,GL_RGB16F_ARB                          , 0,           GL_RED                    ,GL_HALF_FLOAT_ARB
-        ,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_G16R16F        ,0                                ,0                                      , 0,           0                         ,0
-        ,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_A16B16G16R16F  ,GL_RGBA16F_ARB                   ,GL_RGBA16F_ARB                         , 0,           GL_RGBA                   ,GL_HALF_FLOAT_ARB
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
+    {WINED3DFMT_R16_FLOAT,          GL_RGB16F_ARB,                    GL_RGB16F_ARB,                          0,
+            GL_RED,             GL_HALF_FLOAT_ARB,
+            WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_R16G16_FLOAT,       GL_RG16F,                         GL_RG16F,                               0,
+            GL_RG,              GL_HALF_FLOAT_ARB,
+            WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_R16G16B16A16_FLOAT, GL_RGBA16F_ARB,                   GL_RGBA16F_ARB,                         0,
+            GL_RGBA,            GL_HALF_FLOAT_ARB,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
     /* Palettized formats */
-    {WINED3DFMT_A8P8,           0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_P8,             GL_COLOR_INDEX8_EXT              ,GL_COLOR_INDEX8_EXT                    , 0,           GL_COLOR_INDEX            ,GL_UNSIGNED_BYTE
-        ,0 },
+    {WINED3DFMT_A8P8,               0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_P8,                 GL_COLOR_INDEX8_EXT,              GL_COLOR_INDEX8_EXT,                    0,
+            GL_COLOR_INDEX,         GL_UNSIGNED_BYTE,
+            0},
     /* Standard ARGB formats */
-    {WINED3DFMT_R8G8B8         ,GL_RGB8                          ,GL_RGB8                                , 0,           GL_BGR                    ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_A8R8G8B8       ,GL_RGBA8                         ,GL_SRGB8_ALPHA8_EXT                    , 0,           GL_BGRA                   ,GL_UNSIGNED_INT_8_8_8_8_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_X8R8G8B8       ,GL_RGB8                          ,GL_SRGB8_EXT                           , 0,           GL_BGRA                   ,GL_UNSIGNED_INT_8_8_8_8_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_R5G6B5         ,GL_RGB5                          ,GL_RGB5                                , GL_RGB8,     GL_RGB                    ,GL_UNSIGNED_SHORT_5_6_5
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
-    {WINED3DFMT_X1R5G5B5       ,GL_RGB5                          ,GL_RGB5_A1                             , 0,           GL_BGRA                   ,GL_UNSIGNED_SHORT_1_5_5_5_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_A1R5G5B5       ,GL_RGB5_A1                       ,GL_RGB5_A1                             , 0,           GL_BGRA                   ,GL_UNSIGNED_SHORT_1_5_5_5_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_A4R4G4B4       ,GL_RGBA4                         ,GL_SRGB8_ALPHA8_EXT                    , 0,           GL_BGRA                   ,GL_UNSIGNED_SHORT_4_4_4_4_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_R3G3B2         ,GL_R3_G3_B2                      ,GL_R3_G3_B2                            , 0,           GL_RGB                    ,GL_UNSIGNED_BYTE_3_3_2
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING },
-    {WINED3DFMT_A8             ,GL_ALPHA8                        ,GL_ALPHA8                              , 0,           GL_ALPHA                  ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING },
-    {WINED3DFMT_A8R3G3B2       ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_X4R4G4B4       ,GL_RGB4                          ,GL_RGB4                                , 0,           GL_BGRA                   ,GL_UNSIGNED_SHORT_4_4_4_4_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
-    {WINED3DFMT_A2B10G10R10    ,GL_RGB10_A2                      ,GL_RGB10_A2                            , 0,           GL_RGBA                   ,GL_UNSIGNED_INT_2_10_10_10_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
-    {WINED3DFMT_A8B8G8R8       ,GL_RGBA8                         ,GL_RGBA8                               , 0,           GL_RGBA                   ,GL_UNSIGNED_INT_8_8_8_8_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
-    {WINED3DFMT_X8B8G8R8       ,GL_RGB8                          ,GL_RGB8                                , 0,           GL_RGBA                   ,GL_UNSIGNED_INT_8_8_8_8_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
-    {WINED3DFMT_G16R16         ,GL_RGB16_EXT                     ,GL_RGB16_EXT                           , 0,           GL_RGB                    ,GL_UNSIGNED_SHORT
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_A2R10G10B10    ,GL_RGB10_A2                      ,GL_RGB10_A2                            , 0,           GL_BGRA                   ,GL_UNSIGNED_INT_2_10_10_10_REV
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_A16B16G16R16   ,GL_RGBA16_EXT                    ,GL_RGBA16_EXT                          , 0,           GL_RGBA                   ,GL_UNSIGNED_SHORT
-        ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
+    {WINED3DFMT_R8G8B8,             GL_RGB8,                          GL_RGB8,                                0,
+            GL_BGR,                 GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_A8R8G8B8,           GL_RGBA8,                         GL_SRGB8_ALPHA8_EXT,                    0,
+            GL_BGRA,                GL_UNSIGNED_INT_8_8_8_8_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_X8R8G8B8,           GL_RGB8,                          GL_SRGB8_EXT,                           0,
+            GL_BGRA,                GL_UNSIGNED_INT_8_8_8_8_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_R5G6B5,             GL_RGB5,                          GL_RGB5,                                GL_RGB8,
+            GL_RGB,                 GL_UNSIGNED_SHORT_5_6_5,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
+    {WINED3DFMT_X1R5G5B5,           GL_RGB5,                          GL_RGB5_A1,                             0,
+            GL_BGRA,                GL_UNSIGNED_SHORT_1_5_5_5_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_A1R5G5B5,           GL_RGB5_A1,                       GL_RGB5_A1,                             0,
+            GL_BGRA,                GL_UNSIGNED_SHORT_1_5_5_5_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_A4R4G4B4,           GL_RGBA4,                         GL_SRGB8_ALPHA8_EXT,                    0,
+            GL_BGRA,                GL_UNSIGNED_SHORT_4_4_4_4_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_R3G3B2,             GL_R3_G3_B2,                      GL_R3_G3_B2,                            0,
+            GL_RGB,                 GL_UNSIGNED_BYTE_3_3_2,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING},
+    {WINED3DFMT_A8_UNORM,           GL_ALPHA8,                        GL_ALPHA8,                              0,
+            GL_ALPHA,               GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING},
+    {WINED3DFMT_A8R3G3B2,           0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_X4R4G4B4,           GL_RGB4,                          GL_RGB4,                                0,
+            GL_BGRA,                GL_UNSIGNED_SHORT_4_4_4_4_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_R10G10B10A2_UNORM,  GL_RGB10_A2,                      GL_RGB10_A2,                            0,
+            GL_RGBA,                GL_UNSIGNED_INT_2_10_10_10_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_R8G8B8A8_UNORM,     GL_RGBA8,                         GL_RGBA8,                               0,
+            GL_RGBA,                GL_UNSIGNED_INT_8_8_8_8_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_X8B8G8R8,           GL_RGB8,                          GL_RGB8,                                0,
+            GL_RGBA,                GL_UNSIGNED_INT_8_8_8_8_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_R16G16_UNORM,       GL_RGB16_EXT,                     GL_RGB16_EXT,                           0,
+            GL_RGB,                 GL_UNSIGNED_SHORT,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_A2R10G10B10,        GL_RGB10_A2,                      GL_RGB10_A2,                            0,
+            GL_BGRA,                GL_UNSIGNED_INT_2_10_10_10_REV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_R16G16B16A16_UNORM, GL_RGBA16_EXT,                    GL_RGBA16_EXT,                          0,
+            GL_RGBA,                GL_UNSIGNED_SHORT,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
     /* Luminance */
-    {WINED3DFMT_L8             ,GL_LUMINANCE8                    ,GL_SLUMINANCE8_EXT                     , 0,           GL_LUMINANCE              ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_A8L8           ,GL_LUMINANCE8_ALPHA8             ,GL_SLUMINANCE8_ALPHA8_EXT              , 0,           GL_LUMINANCE_ALPHA        ,GL_UNSIGNED_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_A4L4           ,GL_LUMINANCE4_ALPHA4             ,GL_LUMINANCE4_ALPHA4                   , 0,           GL_LUMINANCE_ALPHA        ,GL_UNSIGNED_BYTE
-        ,0 },
+    {WINED3DFMT_L8,                 GL_LUMINANCE8,                    GL_SLUMINANCE8_EXT,                     0,
+            GL_LUMINANCE,           GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_A8L8,               GL_LUMINANCE8_ALPHA8,             GL_SLUMINANCE8_ALPHA8_EXT,              0,
+            GL_LUMINANCE_ALPHA,     GL_UNSIGNED_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_A4L4,               GL_LUMINANCE4_ALPHA4,             GL_LUMINANCE4_ALPHA4,                   0,
+            GL_LUMINANCE_ALPHA,     GL_UNSIGNED_BYTE,
+            0},
     /* Bump mapping stuff */
-    {WINED3DFMT_V8U8           ,GL_DSDT8_NV                      ,GL_DSDT8_NV                            , 0,           GL_DSDT_NV                ,GL_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_L6V5U5         ,GL_DSDT8_MAG8_NV                 ,GL_DSDT8_MAG8_NV                       , 0,           GL_DSDT_MAG_NV            ,GL_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_X8L8V8U8       ,GL_DSDT8_MAG8_INTENSITY8_NV      ,GL_DSDT8_MAG8_INTENSITY8_NV            , 0,           GL_DSDT_MAG_VIB_NV        ,GL_UNSIGNED_INT_8_8_S8_S8_REV_NV
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_Q8W8V8U8       ,GL_SIGNED_RGBA8_NV               ,GL_SIGNED_RGBA8_NV                     , 0,           GL_RGBA                   ,GL_BYTE
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_V16U16         ,GL_SIGNED_HILO16_NV              ,GL_SIGNED_HILO16_NV                    , 0,           GL_HILO_NV                ,GL_SHORT
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_W11V11U10      ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_A2W10V10U10    ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
+    {WINED3DFMT_R8G8_SNORM,         GL_DSDT8_NV,                      GL_DSDT8_NV,                            0,
+            GL_DSDT_NV,             GL_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_L6V5U5,             GL_DSDT8_MAG8_NV,                 GL_DSDT8_MAG8_NV,                       0,
+            GL_DSDT_MAG_NV,         GL_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_X8L8V8U8,           GL_DSDT8_MAG8_INTENSITY8_NV,      GL_DSDT8_MAG8_INTENSITY8_NV,            0,
+            GL_DSDT_MAG_VIB_NV,     GL_UNSIGNED_INT_8_8_S8_S8_REV_NV,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_R8G8B8A8_SNORM,     GL_SIGNED_RGBA8_NV,               GL_SIGNED_RGBA8_NV,                     0,
+            GL_RGBA,                GL_BYTE,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_R16G16_SNORM,       GL_SIGNED_HILO16_NV,              GL_SIGNED_HILO16_NV,                    0,
+            GL_HILO_NV,             GL_SHORT,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_W11V11U10,          0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_A2W10V10U10,        0,                                0,                                      0,
+            0,                      0,
+            0},
     /* Depth stencil formats */
-    {WINED3DFMT_D16_LOCKABLE   ,GL_DEPTH_COMPONENT24_ARB         ,GL_DEPTH_COMPONENT24_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_UNSIGNED_SHORT
-        ,WINED3DFMT_FLAG_DEPTH },
-    {WINED3DFMT_D32            ,GL_DEPTH_COMPONENT32_ARB         ,GL_DEPTH_COMPONENT32_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_UNSIGNED_INT
-        ,WINED3DFMT_FLAG_DEPTH },
-    {WINED3DFMT_D15S1          ,GL_DEPTH_COMPONENT24_ARB         ,GL_DEPTH_COMPONENT24_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_UNSIGNED_SHORT
-        ,WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL },
-    {WINED3DFMT_D24S8          ,GL_DEPTH_COMPONENT24_ARB         ,GL_DEPTH_COMPONENT24_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_UNSIGNED_INT
-        ,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL },
-    {WINED3DFMT_D24X8          ,GL_DEPTH_COMPONENT24_ARB         ,GL_DEPTH_COMPONENT24_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_UNSIGNED_INT
-        ,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH },
-    {WINED3DFMT_D24X4S4        ,GL_DEPTH_COMPONENT24_ARB         ,GL_DEPTH_COMPONENT24_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_UNSIGNED_INT
-        ,WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL },
-    {WINED3DFMT_D16            ,GL_DEPTH_COMPONENT24_ARB         ,GL_DEPTH_COMPONENT24_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_UNSIGNED_SHORT
-        ,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH },
-    {WINED3DFMT_L16            ,GL_LUMINANCE16_EXT               ,GL_LUMINANCE16_EXT                     , 0,           GL_LUMINANCE              ,GL_UNSIGNED_SHORT
-        ,WINED3DFMT_FLAG_FILTERING },
-    {WINED3DFMT_D32F_LOCKABLE  ,GL_DEPTH_COMPONENT32_ARB         ,GL_DEPTH_COMPONENT32_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_FLOAT
-        ,WINED3DFMT_FLAG_DEPTH },
-    {WINED3DFMT_D24FS8         ,GL_DEPTH_COMPONENT24_ARB         ,GL_DEPTH_COMPONENT24_ARB               , 0,           GL_DEPTH_COMPONENT        ,GL_FLOAT
-        ,WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
+    {WINED3DFMT_D16_LOCKABLE,       GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_UNSIGNED_SHORT,
+            WINED3DFMT_FLAG_DEPTH},
+    {WINED3DFMT_D32,                GL_DEPTH_COMPONENT32_ARB,         GL_DEPTH_COMPONENT32_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_UNSIGNED_INT,
+            WINED3DFMT_FLAG_DEPTH},
+    {WINED3DFMT_D15S1,              GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_UNSIGNED_SHORT,
+            WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
+    {WINED3DFMT_D24S8,              GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_UNSIGNED_INT,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
+    {WINED3DFMT_D24X8,              GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_UNSIGNED_INT,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH},
+    {WINED3DFMT_D24X4S4,            GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_UNSIGNED_INT,
+            WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
+    {WINED3DFMT_D16_UNORM,          GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_UNSIGNED_SHORT,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH},
+    {WINED3DFMT_L16,                GL_LUMINANCE16_EXT,               GL_LUMINANCE16_EXT,                     0,
+            GL_LUMINANCE,           GL_UNSIGNED_SHORT,
+            WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
+    {WINED3DFMT_D32F_LOCKABLE,      GL_DEPTH_COMPONENT32_ARB,         GL_DEPTH_COMPONENT32_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_FLOAT,
+            WINED3DFMT_FLAG_DEPTH},
+    {WINED3DFMT_D24FS8,             GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
+            GL_DEPTH_COMPONENT,     GL_FLOAT,
+            WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
     /* Is this a vertex buffer? */
-    {WINED3DFMT_VERTEXDATA     ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_INDEX16        ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_INDEX32        ,0                                ,0                                      , 0,           0                         ,0
-        ,0 },
-    {WINED3DFMT_Q16W16V16U16   ,GL_COLOR_INDEX                   ,GL_COLOR_INDEX                         , 0,           GL_COLOR_INDEX            ,GL_UNSIGNED_SHORT
-        ,0 },
+    {WINED3DFMT_VERTEXDATA,         0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_R16_UINT,           0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_R32_UINT,           0,                                0,                                      0,
+            0,                      0,
+            0},
+    {WINED3DFMT_R16G16B16A16_SNORM, GL_COLOR_INDEX,                   GL_COLOR_INDEX,                         0,
+            GL_COLOR_INDEX,         GL_UNSIGNED_SHORT,
+            0},
     /* Vendor-specific formats */
-    {WINED3DFMT_ATI2N          ,0                                ,0                                      , 0,           GL_LUMINANCE_ALPHA        ,GL_UNSIGNED_BYTE
-        ,0 },
-    {WINED3DFMT_NVHU           ,0                                ,0                                      , 0,           GL_LUMINANCE_ALPHA        ,GL_UNSIGNED_BYTE
-        ,0 },
-    {WINED3DFMT_NVHS           ,0                                ,0                                      , 0,           GL_LUMINANCE_ALPHA        ,GL_UNSIGNED_BYTE
-        ,0 }
+    {WINED3DFMT_ATI2N,              0,                                0,                                      0,
+            GL_LUMINANCE_ALPHA,     GL_UNSIGNED_BYTE,
+            0},
+    {WINED3DFMT_NVHU,               0,                                0,                                      0,
+            GL_LUMINANCE_ALPHA,     GL_UNSIGNED_BYTE,
+            0},
+    {WINED3DFMT_NVHS,               0,                                0,                                      0,
+            GL_LUMINANCE_ALPHA,     GL_UNSIGNED_BYTE,
+            0}
 };
 
@@ -309,86 +423,144 @@
 }
 
+static BOOL init_format_base_info(WineD3D_GL_Info *gl_info)
+{
+    UINT format_count = sizeof(formats) / sizeof(*formats);
+    UINT i;
+
+    gl_info->gl_formats = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, format_count * sizeof(*gl_info->gl_formats));
+    if (!gl_info->gl_formats)
+    {
+        ERR("Failed to allocate memory.\n");
+        return FALSE;
+    }
+
+    for (i = 0; i < format_count; ++i)
+    {
+        struct GlPixelFormatDesc *desc = &gl_info->gl_formats[i];
+        desc->format = formats[i].format;
+        desc->red_mask = formats[i].redMask;
+        desc->green_mask = formats[i].greenMask;
+        desc->blue_mask = formats[i].blueMask;
+        desc->alpha_mask = formats[i].alphaMask;
+        desc->byte_count = formats[i].bpp;
+        desc->depth_size = formats[i].depthSize;
+        desc->stencil_size = formats[i].stencilSize;
+        if (formats[i].isFourcc) desc->Flags |= WINED3DFMT_FLAG_FOURCC;
+    }
+
+    return TRUE;
+}
+
 #define GLINFO_LOCATION (*gl_info)
-BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
-{
-    unsigned int src;
-    int dst;
-
-    gl_info->gl_formats = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
-                                    sizeof(formats) / sizeof(formats[0]) * sizeof(gl_info->gl_formats[0]));
-    if(!gl_info->gl_formats) return FALSE;
-
-    /* If a format depends on some extensions, remove them from the table above and initialize them
-     * after this loop
-     */
-    for(src = 0; src < sizeof(gl_formats_template) / sizeof(gl_formats_template[0]); src++) {
-        dst = getFmtIdx(gl_formats_template[src].fmt);
-        gl_info->gl_formats[dst].glInternal      = gl_formats_template[src].glInternal;
-        gl_info->gl_formats[dst].glGammaInternal = gl_formats_template[src].glGammaInternal;
-        gl_info->gl_formats[dst].glFormat        = gl_formats_template[src].glFormat;
-        gl_info->gl_formats[dst].glType          = gl_formats_template[src].glType;
-        gl_info->gl_formats[dst].color_fixup     = COLOR_FIXUP_IDENTITY;
-        gl_info->gl_formats[dst].Flags           = gl_formats_template[src].Flags;
-        gl_info->gl_formats[dst].heightscale     = 1.0;
-
-        if(wined3d_settings.offscreen_rendering_mode == ORM_FBO &&
-           gl_formats_template[src].rtInternal != 0) {
-            GLuint tex, fb;
-            GLenum status;
-
+
+static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_format)
+{
+    GLuint tex, fb;
+    GLenum status;
+
+    while(glGetError());
+    glGenTextures(1, &tex);
+    glBindTexture(GL_TEXTURE_2D, tex);
+    glTexImage2D(GL_TEXTURE_2D, 0, internal_format, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+
+    GL_EXTCALL(glGenFramebuffersEXT(1, &fb));
+    GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb));
+    GL_EXTCALL(glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, tex, 0));
+
+    status = GL_EXTCALL(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT));
+    GL_EXTCALL(glDeleteFramebuffersEXT(1, &fb));
+    glDeleteTextures(1, &tex);
+
+    checkGLcall("Framebuffer format check");
+
+    return status == GL_FRAMEBUFFER_COMPLETE_EXT;
+}
+
+static BOOL init_format_texture_info(WineD3D_GL_Info *gl_info)
+{
+    unsigned int i;
+
+    for (i = 0; i < sizeof(gl_formats_template) / sizeof(gl_formats_template[0]); ++i)
+    {
+        int fmt_idx = getFmtIdx(gl_formats_template[i].fmt);
+        struct GlPixelFormatDesc *desc;
+
+        if (fmt_idx == -1)
+        {
+            ERR("Format %s (%#x) not found.\n",
+                    debug_d3dformat(gl_formats_template[i].fmt), gl_formats_template[i].fmt);
+            return FALSE;
+        }
+
+        desc = &gl_info->gl_formats[fmt_idx];
+        desc->glInternal = gl_formats_template[i].glInternal;
+        desc->glGammaInternal = gl_formats_template[i].glGammaInternal;
+        desc->glFormat = gl_formats_template[i].glFormat;
+        desc->glType = gl_formats_template[i].glType;
+        desc->color_fixup = COLOR_FIXUP_IDENTITY;
+        desc->Flags |= gl_formats_template[i].Flags;
+        desc->heightscale = 1.0;
+
+        if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && gl_formats_template[i].rtInternal)
+        {
             /* Check if the default internal format is supported as a frame buffer target, otherwise
              * fall back to the render target internal.
              *
-             * Try to stick to the standard format if possible, this limits precision differences
-             */
-            while(glGetError());
-            glGenTextures(1, &tex);
-            glBindTexture(GL_TEXTURE_2D, tex);
-            glTexImage2D(GL_TEXTURE_2D, 0, gl_formats_template[src].glInternal, 16, 16, 0,
-                         GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-
-            GL_EXTCALL(glGenFramebuffersEXT(1, &fb));
-            GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb));
-            GL_EXTCALL(glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
-                                                 GL_TEXTURE_2D, tex, 0));
-
-            status = GL_EXTCALL(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT));
-            GL_EXTCALL(glDeleteFramebuffersEXT(1, &fb));
-            glDeleteTextures(1, &tex);
-
-            checkGLcall("Framebuffer format check");
-
-            if(status != GL_FRAMEBUFFER_COMPLETE_EXT) {
-                TRACE("Internal format of %s not supported as frame buffer target, using render target internal instead\n",
-                    debug_d3dformat(gl_formats_template[src].fmt));
-                gl_info->gl_formats[dst].rtInternal = gl_formats_template[src].rtInternal;
-            } else {
-                TRACE("Format %s is supported as fbo target\n", debug_d3dformat(gl_formats_template[src].fmt));
-                gl_info->gl_formats[dst].rtInternal = gl_formats_template[src].glInternal;
+             * Try to stick to the standard format if possible, this limits precision differences */
+            if (!check_fbo_compat(gl_info, gl_formats_template[i].glInternal))
+            {
+                TRACE("Internal format of %s not supported as FBO target, using render target internal instead\n",
+                        debug_d3dformat(gl_formats_template[i].fmt));
+                desc->rtInternal = gl_formats_template[i].rtInternal;
             }
-
-        } else {
-            gl_info->gl_formats[dst].rtInternal = gl_formats_template[src].glInternal;
-        }
-    }
-
-    dst = getFmtIdx(WINED3DFMT_R16F);
-    gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+            else
+            {
+                TRACE("Format %s is supported as fbo target\n", debug_d3dformat(gl_formats_template[i].fmt));
+                desc->rtInternal = gl_formats_template[i].glInternal;
+            }
+        }
+        else
+        {
+            desc->rtInternal = gl_formats_template[i].glInternal;
+        }
+    }
+
+    return TRUE;
+}
+
+static void apply_format_fixups(WineD3D_GL_Info *gl_info)
+{
+    int idx;
+
+    idx = getFmtIdx(WINED3DFMT_R16_FLOAT);
+    gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
             0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
-
-    dst = getFmtIdx(WINED3DFMT_R32F);
-    gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+    /* When ARB_texture_rg is supported we only require 16-bit for R16F instead of 64-bit RGBA16F */
+    if (GL_SUPPORT(ARB_TEXTURE_RG))
+    {
+        gl_info->gl_formats[idx].glInternal = GL_R16F;
+        gl_info->gl_formats[idx].glGammaInternal = GL_R16F;
+    }
+
+    idx = getFmtIdx(WINED3DFMT_R32_FLOAT);
+    gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
             0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
-
-    dst = getFmtIdx(WINED3DFMT_G16R16);
-    gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+    /* When ARB_texture_rg is supported we only require 32-bit for R32F instead of 128-bit RGBA32F */
+    if (GL_SUPPORT(ARB_TEXTURE_RG))
+    {
+        gl_info->gl_formats[idx].glInternal = GL_R32F;
+        gl_info->gl_formats[idx].glGammaInternal = GL_R32F;
+    }
+
+    idx = getFmtIdx(WINED3DFMT_R16G16_UNORM);
+    gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
             0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
 
-    dst = getFmtIdx(WINED3DFMT_G16R16F);
-    gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+    idx = getFmtIdx(WINED3DFMT_R16G16_FLOAT);
+    gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
             0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
 
-    dst = getFmtIdx(WINED3DFMT_G32R32F);
-    gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+    idx = getFmtIdx(WINED3DFMT_R32G32_FLOAT);
+    gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
             0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
 
@@ -404,35 +576,38 @@
     if (!GL_SUPPORT(NV_TEXTURE_SHADER))
     {
-        dst = getFmtIdx(WINED3DFMT_V8U8);
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+        idx = getFmtIdx(WINED3DFMT_R8G8_SNORM);
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
-        dst = getFmtIdx(WINED3DFMT_V16U16);
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+        idx = getFmtIdx(WINED3DFMT_R16G16_SNORM);
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
     }
     else
     {
-        dst = getFmtIdx(WINED3DFMT_V8U8);
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+        idx = getFmtIdx(WINED3DFMT_R8G8_SNORM);
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
-        dst = getFmtIdx(WINED3DFMT_V16U16);
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+        idx = getFmtIdx(WINED3DFMT_R16G16_SNORM);
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
     }
 
-    if(!GL_SUPPORT(NV_TEXTURE_SHADER)) {
+    if (!GL_SUPPORT(NV_TEXTURE_SHADER))
+    {
         /* If GL_NV_texture_shader is not supported, those formats are converted, incompatibly
          * with each other
          */
-        dst = getFmtIdx(WINED3DFMT_L6V5U5);
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+        idx = getFmtIdx(WINED3DFMT_L6V5U5);
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Z, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE);
-        dst = getFmtIdx(WINED3DFMT_X8L8V8U8);
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+        idx = getFmtIdx(WINED3DFMT_X8L8V8U8);
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_Z, 0, CHANNEL_SOURCE_W);
-        dst = getFmtIdx(WINED3DFMT_Q8W8V8U8);
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+        idx = getFmtIdx(WINED3DFMT_R8G8B8A8_SNORM);
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 1, CHANNEL_SOURCE_Z, 1, CHANNEL_SOURCE_W);
-    } else {
+    }
+    else
+    {
         /* If GL_NV_texture_shader is supported, WINED3DFMT_L6V5U5 and WINED3DFMT_X8L8V8U8
          * are converted at surface loading time, but they do not need any modification in
@@ -442,70 +617,112 @@
     }
 
-    if(GL_SUPPORT(EXT_TEXTURE_COMPRESSION_RGTC)) {
-        dst = getFmtIdx(WINED3DFMT_ATI2N);
-        gl_info->gl_formats[dst].glInternal = GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
-        gl_info->gl_formats[dst].glGammaInternal = GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
-        gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
+    if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_RGTC))
+    {
+        idx = getFmtIdx(WINED3DFMT_ATI2N);
+        gl_info->gl_formats[idx].glInternal = GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
+        gl_info->gl_formats[idx].glGammaInternal = GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
+        gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
                 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
-    } else if(GL_SUPPORT(ATI_TEXTURE_COMPRESSION_3DC)) {
-        dst = getFmtIdx(WINED3DFMT_ATI2N);
-        gl_info->gl_formats[dst].glInternal = GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI;
-        gl_info->gl_formats[dst].glGammaInternal = GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI;
-        gl_info->gl_formats[dst].color_fixup= create_color_fixup_desc(
+    }
+    else if (GL_SUPPORT(ATI_TEXTURE_COMPRESSION_3DC))
+    {
+        idx = getFmtIdx(WINED3DFMT_ATI2N);
+        gl_info->gl_formats[idx].glInternal = GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI;
+        gl_info->gl_formats[idx].glGammaInternal = GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI;
+        gl_info->gl_formats[idx].color_fixup= create_color_fixup_desc(
                 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_W, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
     }
 
-    if(!GL_SUPPORT(APPLE_YCBCR_422)) {
-        dst = getFmtIdx(WINED3DFMT_YUY2);
-        gl_info->gl_formats[dst].glInternal = GL_LUMINANCE_ALPHA;
-        gl_info->gl_formats[dst].glGammaInternal = GL_LUMINANCE_ALPHA; /* not srgb */
-        gl_info->gl_formats[dst].glFormat = GL_LUMINANCE_ALPHA;
-        gl_info->gl_formats[dst].glType = GL_UNSIGNED_BYTE;
-        gl_info->gl_formats[dst].color_fixup = create_yuv_fixup_desc(YUV_FIXUP_YUY2);
-
-        dst = getFmtIdx(WINED3DFMT_UYVY);
-        gl_info->gl_formats[dst].glInternal = GL_LUMINANCE_ALPHA;
-        gl_info->gl_formats[dst].glGammaInternal = GL_LUMINANCE_ALPHA; /* not srgb */
-        gl_info->gl_formats[dst].glFormat = GL_LUMINANCE_ALPHA;
-        gl_info->gl_formats[dst].glType = GL_UNSIGNED_BYTE;
-        gl_info->gl_formats[dst].color_fixup = create_yuv_fixup_desc(YUV_FIXUP_UYVY);
-    }
-
-    dst = getFmtIdx(WINED3DFMT_YV12);
-    gl_info->gl_formats[dst].heightscale = 1.5;
-    gl_info->gl_formats[dst].color_fixup = create_yuv_fixup_desc(YUV_FIXUP_YV12);
+    if (!GL_SUPPORT(APPLE_YCBCR_422))
+    {
+        idx = getFmtIdx(WINED3DFMT_YUY2);
+        gl_info->gl_formats[idx].glInternal = GL_LUMINANCE_ALPHA;
+        gl_info->gl_formats[idx].glGammaInternal = GL_LUMINANCE_ALPHA; /* not srgb */
+        gl_info->gl_formats[idx].glFormat = GL_LUMINANCE_ALPHA;
+        gl_info->gl_formats[idx].glType = GL_UNSIGNED_BYTE;
+        gl_info->gl_formats[idx].color_fixup = create_yuv_fixup_desc(YUV_FIXUP_YUY2);
+
+        idx = getFmtIdx(WINED3DFMT_UYVY);
+        gl_info->gl_formats[idx].glInternal = GL_LUMINANCE_ALPHA;
+        gl_info->gl_formats[idx].glGammaInternal = GL_LUMINANCE_ALPHA; /* not srgb */
+        gl_info->gl_formats[idx].glFormat = GL_LUMINANCE_ALPHA;
+        gl_info->gl_formats[idx].glType = GL_UNSIGNED_BYTE;
+        gl_info->gl_formats[idx].color_fixup = create_yuv_fixup_desc(YUV_FIXUP_UYVY);
+    }
+
+    idx = getFmtIdx(WINED3DFMT_YV12);
+    gl_info->gl_formats[idx].heightscale = 1.5;
+    gl_info->gl_formats[idx].color_fixup = create_yuv_fixup_desc(YUV_FIXUP_YV12);
+
+    if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
+    {
+        idx = getFmtIdx(WINED3DFMT_A8R8G8B8);
+        gl_info->gl_formats[idx].gl_vtx_format = GL_BGRA;
+    }
+
+    if (GL_SUPPORT(ARB_HALF_FLOAT_VERTEX))
+    {
+        /* Do not change the size of the type, it is CPU side. We have to change the GPU-side information though.
+         * It is the job of the vertex buffer code to make sure that the vbos have the right format */
+        idx = getFmtIdx(WINED3DFMT_R16G16_FLOAT);
+        gl_info->gl_formats[idx].gl_vtx_type = GL_HALF_FLOAT; /* == GL_HALF_FLOAT_NV */
+
+        idx = getFmtIdx(WINED3DFMT_R16G16B16A16_FLOAT);
+        gl_info->gl_formats[idx].gl_vtx_type = GL_HALF_FLOAT;
+    }
+}
+
+static BOOL init_format_vertex_info(WineD3D_GL_Info *gl_info)
+{
+    unsigned int i;
+
+    for (i = 0; i < (sizeof(format_vertex_info) / sizeof(*format_vertex_info)); ++i)
+    {
+        struct GlPixelFormatDesc *format_desc;
+        int fmt_idx = getFmtIdx(format_vertex_info[i].format);
+
+        if (fmt_idx == -1)
+        {
+            ERR("Format %s (%#x) not found.\n",
+                    debug_d3dformat(format_vertex_info[i].format), format_vertex_info[i].format);
+            return FALSE;
+        }
+
+        format_desc = &gl_info->gl_formats[fmt_idx];
+        format_desc->emit_idx = format_vertex_info[i].emit_idx;
+        format_desc->component_count = format_vertex_info[i].component_count;
+        format_desc->gl_vtx_type = format_vertex_info[i].gl_vtx_type;
+        format_desc->gl_vtx_format = format_vertex_info[i].gl_vtx_format;
+        format_desc->gl_normalized = format_vertex_info[i].gl_normalized;
+        format_desc->component_size = format_vertex_info[i].component_size;
+    }
 
     return TRUE;
 }
 
-/* NOTE: Make sure these are in the correct numerical order. (see /include/wined3d_types.h) */
-static WINED3DGLTYPE const glTypeLookupTemplate[WINED3DDECLTYPE_UNUSED] = {
-                                  {WINED3DDECLTYPE_FLOAT1,    1, GL_FLOAT           , GL_FALSE ,sizeof(float)},
-                                  {WINED3DDECLTYPE_FLOAT2,    2, GL_FLOAT           , GL_FALSE ,sizeof(float)},
-                                  {WINED3DDECLTYPE_FLOAT3,    3, GL_FLOAT           , GL_FALSE ,sizeof(float)},
-                                  {WINED3DDECLTYPE_FLOAT4,    4, GL_FLOAT           , GL_FALSE ,sizeof(float)},
-                                  {WINED3DDECLTYPE_D3DCOLOR,  4, GL_UNSIGNED_BYTE   , GL_TRUE  ,sizeof(BYTE)},
-                                  {WINED3DDECLTYPE_UBYTE4,    4, GL_UNSIGNED_BYTE   , GL_FALSE ,sizeof(BYTE)},
-                                  {WINED3DDECLTYPE_SHORT2,    2, GL_SHORT           , GL_FALSE ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_SHORT4,    4, GL_SHORT           , GL_FALSE ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_UBYTE4N,   4, GL_UNSIGNED_BYTE   , GL_TRUE  ,sizeof(BYTE)},
-                                  {WINED3DDECLTYPE_SHORT2N,   2, GL_SHORT           , GL_TRUE  ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_SHORT4N,   4, GL_SHORT           , GL_TRUE  ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_USHORT2N,  2, GL_UNSIGNED_SHORT  , GL_TRUE  ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_USHORT4N,  4, GL_UNSIGNED_SHORT  , GL_TRUE  ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_UDEC3,     3, GL_UNSIGNED_SHORT  , GL_FALSE ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_DEC3N,     3, GL_SHORT           , GL_TRUE  ,sizeof(short int)},
-                                  {WINED3DDECLTYPE_FLOAT16_2, 2, GL_HALF_FLOAT_NV   , GL_FALSE ,sizeof(GLhalfNV)},
-                                  {WINED3DDECLTYPE_FLOAT16_4, 4, GL_HALF_FLOAT_NV   , GL_FALSE ,sizeof(GLhalfNV)}};
-
-void init_type_lookup(WineD3D_GL_Info *gl_info) {
-    memcpy(gl_info->glTypeLookup, glTypeLookupTemplate, sizeof(glTypeLookupTemplate));
-    if(!GL_SUPPORT(NV_HALF_FLOAT)) {
-        /* Do not change the size of the type, it is CPU side. We have to change the GPU-side information though.
-         * It is the job of the vertex buffer code to make sure that the vbos have the right format
-         */
-        gl_info->glTypeLookup[WINED3DDECLTYPE_FLOAT16_2].glType = GL_FLOAT;
-        gl_info->glTypeLookup[WINED3DDECLTYPE_FLOAT16_4].glType = GL_FLOAT;
-    }
+BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info)
+{
+    return init_format_base_info(gl_info);
+}
+
+BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
+{
+    if (!init_format_base_info(gl_info)) return FALSE;
+
+    if (!init_format_texture_info(gl_info))
+    {
+        HeapFree(GetProcessHeap(), 0, gl_info->gl_formats);
+        return FALSE;
+    }
+
+    if (!init_format_vertex_info(gl_info))
+    {
+        HeapFree(GetProcessHeap(), 0, gl_info->gl_formats);
+        return FALSE;
+    }
+
+    apply_format_fixups(gl_info);
+
+    return TRUE;
 }
 
@@ -514,6 +731,5 @@
 #define GLINFO_LOCATION This->adapter->gl_info
 
-const StaticPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const WineD3D_GL_Info *gl_info,
-        const struct GlPixelFormatDesc **glDesc)
+const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const WineD3D_GL_Info *gl_info)
 {
     int idx = getFmtIdx(fmt);
@@ -524,17 +740,6 @@
         idx = getFmtIdx(WINED3DFMT_UNKNOWN);
     }
-    if(glDesc) {
-        if(!gl_info->gl_formats) {
-            /* If we do not have gl format information, provide a dummy NULL format. This is an easy way to make
-             * all gl caps check return "unsupported" than catching the lack of gl all over the code. ANSI C requires
-             * static variables to be initialized to 0.
-             */
-            static const struct GlPixelFormatDesc dummyFmt;
-            *glDesc = &dummyFmt;
-        } else {
-            *glDesc = &gl_info->gl_formats[idx];
-        }
-    }
-    return &formats[idx];
+
+    return &gl_info->gl_formats[idx];
 }
 
@@ -554,13 +759,8 @@
     FMT_TO_STR(WINED3DFMT_A4R4G4B4);
     FMT_TO_STR(WINED3DFMT_R3G3B2);
-    FMT_TO_STR(WINED3DFMT_A8);
     FMT_TO_STR(WINED3DFMT_A8R3G3B2);
     FMT_TO_STR(WINED3DFMT_X4R4G4B4);
-    FMT_TO_STR(WINED3DFMT_A2B10G10R10);
-    FMT_TO_STR(WINED3DFMT_A8B8G8R8);
     FMT_TO_STR(WINED3DFMT_X8B8G8R8);
-    FMT_TO_STR(WINED3DFMT_G16R16);
     FMT_TO_STR(WINED3DFMT_A2R10G10B10);
-    FMT_TO_STR(WINED3DFMT_A16B16G16R16);
     FMT_TO_STR(WINED3DFMT_A8P8);
     FMT_TO_STR(WINED3DFMT_P8);
@@ -568,9 +768,6 @@
     FMT_TO_STR(WINED3DFMT_A8L8);
     FMT_TO_STR(WINED3DFMT_A4L4);
-    FMT_TO_STR(WINED3DFMT_V8U8);
     FMT_TO_STR(WINED3DFMT_L6V5U5);
     FMT_TO_STR(WINED3DFMT_X8L8V8U8);
-    FMT_TO_STR(WINED3DFMT_Q8W8V8U8);
-    FMT_TO_STR(WINED3DFMT_V16U16);
     FMT_TO_STR(WINED3DFMT_W11V11U10);
     FMT_TO_STR(WINED3DFMT_A2W10V10U10);
@@ -592,22 +789,101 @@
     FMT_TO_STR(WINED3DFMT_D24X8);
     FMT_TO_STR(WINED3DFMT_D24X4S4);
-    FMT_TO_STR(WINED3DFMT_D16);
     FMT_TO_STR(WINED3DFMT_L16);
     FMT_TO_STR(WINED3DFMT_D32F_LOCKABLE);
     FMT_TO_STR(WINED3DFMT_D24FS8);
     FMT_TO_STR(WINED3DFMT_VERTEXDATA);
-    FMT_TO_STR(WINED3DFMT_INDEX16);
-    FMT_TO_STR(WINED3DFMT_INDEX32);
-    FMT_TO_STR(WINED3DFMT_Q16W16V16U16);
-    FMT_TO_STR(WINED3DFMT_R16F);
-    FMT_TO_STR(WINED3DFMT_G16R16F);
-    FMT_TO_STR(WINED3DFMT_A16B16G16R16F);
-    FMT_TO_STR(WINED3DFMT_R32F);
-    FMT_TO_STR(WINED3DFMT_G32R32F);
-    FMT_TO_STR(WINED3DFMT_A32B32G32R32F);
     FMT_TO_STR(WINED3DFMT_CxV8U8);
     FMT_TO_STR(WINED3DFMT_ATI2N);
     FMT_TO_STR(WINED3DFMT_NVHU);
     FMT_TO_STR(WINED3DFMT_NVHS);
+    FMT_TO_STR(WINED3DFMT_R32G32B32A32_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R32G32B32A32_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R32G32B32A32_UINT);
+    FMT_TO_STR(WINED3DFMT_R32G32B32A32_SINT);
+    FMT_TO_STR(WINED3DFMT_R32G32B32_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R32G32B32_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R32G32B32_UINT);
+    FMT_TO_STR(WINED3DFMT_R32G32B32_SINT);
+    FMT_TO_STR(WINED3DFMT_R16G16B16A16_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R16G16B16A16_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R16G16B16A16_UNORM);
+    FMT_TO_STR(WINED3DFMT_R16G16B16A16_UINT);
+    FMT_TO_STR(WINED3DFMT_R16G16B16A16_SNORM);
+    FMT_TO_STR(WINED3DFMT_R16G16B16A16_SINT);
+    FMT_TO_STR(WINED3DFMT_R32G32_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R32G32_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R32G32_UINT);
+    FMT_TO_STR(WINED3DFMT_R32G32_SINT);
+    FMT_TO_STR(WINED3DFMT_R32G8X24_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_D32_FLOAT_S8X24_UINT);
+    FMT_TO_STR(WINED3DFMT_R32_FLOAT_X8X24_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_X32_TYPELESS_G8X24_UINT);
+    FMT_TO_STR(WINED3DFMT_R10G10B10A2_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R10G10B10A2_UNORM);
+    FMT_TO_STR(WINED3DFMT_R10G10B10A2_UINT);
+    FMT_TO_STR(WINED3DFMT_R10G10B10A2_SNORM);
+    FMT_TO_STR(WINED3DFMT_R11G11B10_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R8G8B8A8_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R8G8B8A8_UNORM);
+    FMT_TO_STR(WINED3DFMT_R8G8B8A8_UNORM_SRGB);
+    FMT_TO_STR(WINED3DFMT_R8G8B8A8_UINT);
+    FMT_TO_STR(WINED3DFMT_R8G8B8A8_SNORM);
+    FMT_TO_STR(WINED3DFMT_R8G8B8A8_SINT);
+    FMT_TO_STR(WINED3DFMT_R16G16_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R16G16_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R16G16_UNORM);
+    FMT_TO_STR(WINED3DFMT_R16G16_UINT);
+    FMT_TO_STR(WINED3DFMT_R16G16_SNORM);
+    FMT_TO_STR(WINED3DFMT_R16G16_SINT);
+    FMT_TO_STR(WINED3DFMT_R32_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_D32_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R32_FLOAT);
+    FMT_TO_STR(WINED3DFMT_R32_UINT);
+    FMT_TO_STR(WINED3DFMT_R32_SINT);
+    FMT_TO_STR(WINED3DFMT_R24G8_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_D24_UNORM_S8_UINT);
+    FMT_TO_STR(WINED3DFMT_R24_UNORM_X8_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_X24_TYPELESS_G8_UINT);
+    FMT_TO_STR(WINED3DFMT_R8G8_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R8G8_UNORM);
+    FMT_TO_STR(WINED3DFMT_R8G8_UINT);
+    FMT_TO_STR(WINED3DFMT_R8G8_SNORM);
+    FMT_TO_STR(WINED3DFMT_R8G8_SINT);
+    FMT_TO_STR(WINED3DFMT_R16_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R16_FLOAT);
+    FMT_TO_STR(WINED3DFMT_D16_UNORM);
+    FMT_TO_STR(WINED3DFMT_R16_UNORM);
+    FMT_TO_STR(WINED3DFMT_R16_UINT);
+    FMT_TO_STR(WINED3DFMT_R16_SNORM);
+    FMT_TO_STR(WINED3DFMT_R16_SINT);
+    FMT_TO_STR(WINED3DFMT_R8_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_R8_UNORM);
+    FMT_TO_STR(WINED3DFMT_R8_UINT);
+    FMT_TO_STR(WINED3DFMT_R8_SNORM);
+    FMT_TO_STR(WINED3DFMT_R8_SINT);
+    FMT_TO_STR(WINED3DFMT_A8_UNORM);
+    FMT_TO_STR(WINED3DFMT_R1_UNORM);
+    FMT_TO_STR(WINED3DFMT_R9G9B9E5_SHAREDEXP);
+    FMT_TO_STR(WINED3DFMT_R8G8_B8G8_UNORM);
+    FMT_TO_STR(WINED3DFMT_G8R8_G8B8_UNORM);
+    FMT_TO_STR(WINED3DFMT_BC1_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_BC1_UNORM);
+    FMT_TO_STR(WINED3DFMT_BC1_UNORM_SRGB);
+    FMT_TO_STR(WINED3DFMT_BC2_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_BC2_UNORM);
+    FMT_TO_STR(WINED3DFMT_BC2_UNORM_SRGB);
+    FMT_TO_STR(WINED3DFMT_BC3_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_BC3_UNORM);
+    FMT_TO_STR(WINED3DFMT_BC3_UNORM_SRGB);
+    FMT_TO_STR(WINED3DFMT_BC4_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_BC4_UNORM);
+    FMT_TO_STR(WINED3DFMT_BC4_SNORM);
+    FMT_TO_STR(WINED3DFMT_BC5_TYPELESS);
+    FMT_TO_STR(WINED3DFMT_BC5_UNORM);
+    FMT_TO_STR(WINED3DFMT_BC5_SNORM);
+    FMT_TO_STR(WINED3DFMT_B5G6R5_UNORM);
+    FMT_TO_STR(WINED3DFMT_B5G5R5A1_UNORM);
+    FMT_TO_STR(WINED3DFMT_B8G8R8A8_UNORM);
+    FMT_TO_STR(WINED3DFMT_B8G8R8X8_UNORM);
 #undef FMT_TO_STR
   default:
@@ -694,32 +970,4 @@
         default:
             FIXME("Unrecognized %u declaration method!\n", method);
-            return "unrecognized";
-    }
-}
-
-const char* debug_d3ddecltype(WINED3DDECLTYPE type) {
-    switch (type) {
-#define WINED3DDECLTYPE_TO_STR(u) case u: return #u
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_FLOAT1);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_FLOAT2);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_FLOAT3);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_FLOAT4);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_D3DCOLOR);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_UBYTE4);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_SHORT2);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_SHORT4);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_UBYTE4N);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_SHORT2N);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_SHORT4N);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_USHORT2N);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_USHORT4N);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_UDEC3);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_DEC3N);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_FLOAT16_2);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_FLOAT16_4);
-        WINED3DDECLTYPE_TO_STR(WINED3DDECLTYPE_UNUSED);
-#undef WINED3DDECLTYPE_TO_STR
-        default:
-            FIXME("Unrecognized %u declaration type!\n", type);
             return "unrecognized";
     }
@@ -752,5 +1000,5 @@
 const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res) {
   switch (res) {
-#define RES_TO_STR(res) case res: return #res;
+#define RES_TO_STR(res) case res: return #res
     RES_TO_STR(WINED3DRTYPE_SURFACE);
     RES_TO_STR(WINED3DRTYPE_VOLUME);
@@ -758,6 +1006,5 @@
     RES_TO_STR(WINED3DRTYPE_VOLUMETEXTURE);
     RES_TO_STR(WINED3DRTYPE_CUBETEXTURE);
-    RES_TO_STR(WINED3DRTYPE_VERTEXBUFFER);
-    RES_TO_STR(WINED3DRTYPE_INDEXBUFFER);
+    RES_TO_STR(WINED3DRTYPE_BUFFER);
 #undef  RES_TO_STR
   default:
@@ -769,5 +1016,6 @@
 const char* debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType) {
   switch (PrimitiveType) {
-#define PRIM_TO_STR(prim) case prim: return #prim;
+#define PRIM_TO_STR(prim) case prim: return #prim
+    PRIM_TO_STR(WINED3DPT_UNDEFINED);
     PRIM_TO_STR(WINED3DPT_POINTLIST);
     PRIM_TO_STR(WINED3DPT_LINELIST);
@@ -776,4 +1024,8 @@
     PRIM_TO_STR(WINED3DPT_TRIANGLESTRIP);
     PRIM_TO_STR(WINED3DPT_TRIANGLEFAN);
+    PRIM_TO_STR(WINED3DPT_LINELIST_ADJ);
+    PRIM_TO_STR(WINED3DPT_LINESTRIP_ADJ);
+    PRIM_TO_STR(WINED3DPT_TRIANGLELIST_ADJ);
+    PRIM_TO_STR(WINED3DPT_TRIANGLESTRIP_ADJ);
 #undef  PRIM_TO_STR
   default:
@@ -1018,5 +1270,4 @@
     D3DSTATE_TO_STR(WINED3DTSS_BUMPENVLOFFSET        );
     D3DSTATE_TO_STR(WINED3DTSS_TEXTURETRANSFORMFLAGS );
-    D3DSTATE_TO_STR(WINED3DTSS_ADDRESSW              );
     D3DSTATE_TO_STR(WINED3DTSS_COLORARG0             );
     D3DSTATE_TO_STR(WINED3DTSS_ALPHAARG0             );
@@ -1024,7 +1275,4 @@
     D3DSTATE_TO_STR(WINED3DTSS_CONSTANT              );
 #undef D3DSTATE_TO_STR
-  case 12:
-    /* Note WINED3DTSS are not consecutive, so skip these */
-    return "unused";
   default:
     FIXME("Unrecognized %u texture state!\n", state);
@@ -1096,5 +1344,5 @@
 const char* debug_d3dpool(WINED3DPOOL Pool) {
   switch (Pool) {
-#define POOL_TO_STR(p) case p: return #p;
+#define POOL_TO_STR(p) case p: return #p
     POOL_TO_STR(WINED3DPOOL_DEFAULT);
     POOL_TO_STR(WINED3DPOOL_MANAGED);
@@ -1164,5 +1412,5 @@
 }
 
-const char *debug_fixup_channel_source(enum fixup_channel_source source)
+static const char *debug_fixup_channel_source(enum fixup_channel_source source)
 {
     switch(source)
@@ -1184,5 +1432,5 @@
 }
 
-const char *debug_yuv_fixup(enum yuv_fixup yuv_fixup)
+static const char *debug_yuv_fixup(enum yuv_fixup yuv_fixup)
 {
     switch(yuv_fixup)
@@ -1211,4 +1459,15 @@
     TRACE("\tZ: %s%s\n", debug_fixup_channel_source(fixup.z_source), fixup.z_sign_fixup ? ", SIGN_FIXUP" : "");
     TRACE("\tW: %s%s\n", debug_fixup_channel_source(fixup.w_source), fixup.w_sign_fixup ? ", SIGN_FIXUP" : "");
+}
+
+const char *debug_surflocation(DWORD flag) {
+    char buf[128];
+
+    buf[0] = 0;
+    if(flag & SFLAG_INSYSMEM) strcat(buf, " | SFLAG_INSYSMEM");
+    if(flag & SFLAG_INDRAWABLE) strcat(buf, " | SFLAG_INDRAWABLE");
+    if(flag & SFLAG_INTEXTURE) strcat(buf, " | SFLAG_INTEXTURE");
+    if(flag & SFLAG_INSRGBTEX) strcat(buf, " | SFLAG_INSRGBTEX");
+    return wine_dbg_sprintf("%s", buf[0] ? buf + 3 : "0");
 }
 
@@ -1263,6 +1522,6 @@
 
 /* Setup this textures matrix according to the texture flags*/
-void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed, DWORD coordtype,
-                        BOOL ffp_proj_control)
+void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed,
+        WINED3DFORMAT vtx_fmt, BOOL ffp_proj_control)
 {
     float mat[16];
@@ -1299,6 +1558,7 @@
     } else { /* under directx the R/Z coord can be used for translation, under opengl we use the Q coord instead */
         if(!calculatedCoords) {
-            switch(coordtype) {
-                case WINED3DDECLTYPE_FLOAT1:
+            switch(vtx_fmt)
+            {
+                case WINED3DFMT_R32_FLOAT:
                     /* Direct3D passes the default 1.0 in the 2nd coord, while gl passes it in the 4th.
                      * swap 2nd and 4th coord. No need to store the value of mat[12] in mat[4] because
@@ -1310,5 +1570,5 @@
                     mat[15] = mat[7];
                     break;
-                case WINED3DDECLTYPE_FLOAT2:
+                case WINED3DFMT_R32G32_FLOAT:
                     /* See above, just 3rd and 4th coord
                     */
@@ -1318,6 +1578,6 @@
                     mat[15] = mat[11];
                     break;
-                case WINED3DDECLTYPE_FLOAT3: /* Opengl defaults match dx defaults */
-                case WINED3DDECLTYPE_FLOAT4: /* No defaults apply, all app defined */
+                case WINED3DFMT_R32G32B32_FLOAT: /* Opengl defaults match dx defaults */
+                case WINED3DFMT_R32G32B32A32_FLOAT: /* No defaults apply, all app defined */
 
                 /* This is to prevent swapping the matrix lines and put the default 4th coord = 1.0
@@ -1325,5 +1585,5 @@
                  * 1.0 doesn't do anything bad. The caller will set this value if the stride is 0
                  */
-                case WINED3DDECLTYPE_UNUSED: /* No texture coords, 0/0/0/1 defaults are passed */
+                case WINED3DFMT_UNKNOWN: /* No texture coords, 0/0/0/1 defaults are passed */
                     break;
                 default:
@@ -1358,6 +1618,4 @@
 #undef GLINFO_LOCATION
 
-#define GLINFO_LOCATION ((IWineD3DImpl *)(This->wineD3D))->gl_info
-
 /* This small helper function is used to convert a bitmask into the number of masked bits */
 unsigned int count_bits(unsigned int mask)
@@ -1373,14 +1631,14 @@
 /* Helper function for retrieving color info for ChoosePixelFormat and wglChoosePixelFormatARB.
  * The later function requires individual color components. */
-BOOL getColorBits(WINED3DFORMAT fmt, short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize)
-{
-    const StaticPixelFormatDesc *desc;
-
-    TRACE("fmt: %s\n", debug_d3dformat(fmt));
-    switch(fmt)
+BOOL getColorBits(const struct GlPixelFormatDesc *format_desc,
+        short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize)
+{
+    TRACE("fmt: %s\n", debug_d3dformat(format_desc->format));
+    switch(format_desc->format)
     {
         case WINED3DFMT_X8R8G8B8:
         case WINED3DFMT_R8G8B8:
         case WINED3DFMT_A8R8G8B8:
+        case WINED3DFMT_R8G8B8A8_UNORM:
         case WINED3DFMT_A2R10G10B10:
         case WINED3DFMT_X1R5G5B5:
@@ -1394,34 +1652,27 @@
             break;
         default:
-            ERR("Unsupported format: %s\n", debug_d3dformat(fmt));
+            ERR("Unsupported format: %s\n", debug_d3dformat(format_desc->format));
             return FALSE;
     }
 
-    desc = getFormatDescEntry(fmt, NULL, NULL);
-    if(!desc)
-    {
-        ERR("Unable to look up format: 0x%x\n", fmt);
-        return FALSE;
-    }
-    *redSize = count_bits(desc->redMask);
-    *greenSize = count_bits(desc->greenMask);
-    *blueSize = count_bits(desc->blueMask);
-    *alphaSize = count_bits(desc->alphaMask);
+    *redSize = count_bits(format_desc->red_mask);
+    *greenSize = count_bits(format_desc->green_mask);
+    *blueSize = count_bits(format_desc->blue_mask);
+    *alphaSize = count_bits(format_desc->alpha_mask);
     *totalSize = *redSize + *greenSize + *blueSize + *alphaSize;
 
-    TRACE("Returning red:  %d, green: %d, blue: %d, alpha: %d, total: %d for fmt=%s\n", *redSize, *greenSize, *blueSize, *alphaSize, *totalSize, debug_d3dformat(fmt));
+    TRACE("Returning red:  %d, green: %d, blue: %d, alpha: %d, total: %d for fmt=%s\n",
+            *redSize, *greenSize, *blueSize, *alphaSize, *totalSize, debug_d3dformat(format_desc->format));
     return TRUE;
 }
 
 /* Helper function for retrieving depth/stencil info for ChoosePixelFormat and wglChoosePixelFormatARB */
-BOOL getDepthStencilBits(WINED3DFORMAT fmt, short *depthSize, short *stencilSize)
-{
-    const StaticPixelFormatDesc *desc;
-
-    TRACE("fmt: %s\n", debug_d3dformat(fmt));
-    switch(fmt)
+BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, short *depthSize, short *stencilSize)
+{
+    TRACE("fmt: %s\n", debug_d3dformat(format_desc->format));
+    switch(format_desc->format)
     {
         case WINED3DFMT_D16_LOCKABLE:
-        case WINED3DFMT_D16:
+        case WINED3DFMT_D16_UNORM:
         case WINED3DFMT_D15S1:
         case WINED3DFMT_D24X8:
@@ -1433,22 +1684,15 @@
             break;
         default:
-            FIXME("Unsupported stencil format: %s\n", debug_d3dformat(fmt));
+            FIXME("Unsupported stencil format: %s\n", debug_d3dformat(format_desc->format));
             return FALSE;
     }
 
-    desc = getFormatDescEntry(fmt, NULL, NULL);
-    if(!desc)
-    {
-        ERR("Unable to look up format: 0x%x\n", fmt);
-        return FALSE;
-    }
-    *depthSize = desc->depthSize;
-    *stencilSize = desc->stencilSize;
-
-    TRACE("Returning depthSize: %d and stencilSize: %d for fmt=%s\n", *depthSize, *stencilSize, debug_d3dformat(fmt));
+    *depthSize = format_desc->depth_size;
+    *stencilSize = format_desc->stencil_size;
+
+    TRACE("Returning depthSize: %d and stencilSize: %d for fmt=%s\n",
+            *depthSize, *stencilSize, debug_d3dformat(format_desc->format));
     return TRUE;
 }
-
-#undef GLINFO_LOCATION
 
 /* DirectDraw stuff */
@@ -1510,4 +1754,5 @@
         case WINED3DFVF_XYZB4:  size += 7 * sizeof(float); break;
         case WINED3DFVF_XYZB5:  size += 8 * sizeof(float); break;
+        case WINED3DFVF_XYZW:   size += 4 * sizeof(float); break;
         default: ERR("Unexpected position mask\n");
     }
@@ -1719,4 +1964,14 @@
     HeapFree(GetProcessHeap(), 0, table->buckets);
     HeapFree(GetProcessHeap(), 0, table);
+}
+
+void hash_table_for_each_entry(struct hash_table_t *table, void (*callback)(void *value, void *context), void *context)
+{
+    unsigned int i = 0;
+
+    for (i = 0; i < table->entry_count; ++i)
+    {
+        callback(table->entries[i].value, context);
+    }
 }
 
@@ -1927,5 +2182,5 @@
             settings->op[i].carg0 = settings->op[i].carg1 = settings->op[i].carg2 = ARG_UNUSED;
             settings->op[i].aarg0 = settings->op[i].aarg1 = settings->op[i].aarg2 = ARG_UNUSED;
-            settings->op[i].color_correction = COLOR_FIXUP_IDENTITY;
+            settings->op[i].color_fixup = COLOR_FIXUP_IDENTITY;
             settings->op[i].dst = resultreg;
             settings->op[i].tex_type = tex_1d;
@@ -1937,9 +2192,9 @@
         texture = (IWineD3DBaseTextureImpl *) stateblock->textures[i];
         if(texture) {
-            settings->op[i].color_correction = texture->baseTexture.shader_color_fixup;
+            settings->op[i].color_fixup = texture->resource.format_desc->color_fixup;
             if(ignore_textype) {
                 settings->op[i].tex_type = tex_1d;
             } else {
-                switch(stateblock->textureDimensions[i]) {
+                switch (IWineD3DBaseTexture_GetTextureDimensions((IWineD3DBaseTexture *)texture)) {
                     case GL_TEXTURE_1D:
                         settings->op[i].tex_type = tex_1d;
@@ -1960,5 +2215,5 @@
             }
         } else {
-            settings->op[i].color_correction = COLOR_FIXUP_IDENTITY;
+            settings->op[i].color_fixup = COLOR_FIXUP_IDENTITY;
             settings->op[i].tex_type = tex_1d;
         }
@@ -1967,12 +2222,12 @@
         aop = stateblock->textureState[i][WINED3DTSS_ALPHAOP];
 
-        carg1 = (args[cop] & ARG1) ? stateblock->textureState[i][WINED3DTSS_COLORARG1] : 0xffffffff;
-        carg2 = (args[cop] & ARG2) ? stateblock->textureState[i][WINED3DTSS_COLORARG2] : 0xffffffff;
-        carg0 = (args[cop] & ARG0) ? stateblock->textureState[i][WINED3DTSS_COLORARG0] : 0xffffffff;
+        carg1 = (args[cop] & ARG1) ? stateblock->textureState[i][WINED3DTSS_COLORARG1] : ARG_UNUSED;
+        carg2 = (args[cop] & ARG2) ? stateblock->textureState[i][WINED3DTSS_COLORARG2] : ARG_UNUSED;
+        carg0 = (args[cop] & ARG0) ? stateblock->textureState[i][WINED3DTSS_COLORARG0] : ARG_UNUSED;
 
         if(is_invalid_op(stateblock->wineD3DDevice, i, cop,
                          carg1, carg2, carg0)) {
-            carg0 = 0xffffffff;
-            carg2 = 0xffffffff;
+            carg0 = ARG_UNUSED;
+            carg2 = ARG_UNUSED;
             carg1 = WINED3DTA_CURRENT;
             cop = WINED3DTOP_SELECTARG1;
@@ -1988,35 +2243,43 @@
             aarg0 = carg0;
         } else {
-            aarg1 = (args[aop] & ARG1) ? stateblock->textureState[i][WINED3DTSS_ALPHAARG1] : 0xffffffff;
-            aarg2 = (args[aop] & ARG2) ? stateblock->textureState[i][WINED3DTSS_ALPHAARG2] : 0xffffffff;
-            aarg0 = (args[aop] & ARG0) ? stateblock->textureState[i][WINED3DTSS_ALPHAARG0] : 0xffffffff;
-        }
-
-        if(i == 0 && stateblock->textures[0] &&
-                  stateblock->renderState[WINED3DRS_COLORKEYENABLE] &&
-                 (stateblock->textureDimensions[0] == GL_TEXTURE_2D ||
-                  stateblock->textureDimensions[0] == GL_TEXTURE_RECTANGLE_ARB)) {
-            IWineD3DSurfaceImpl *surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *) stateblock->textures[0])->surfaces[0];
-
-            if(surf->CKeyFlags & WINEDDSD_CKSRCBLT &&
-               getFormatDescEntry(surf->resource.format, NULL, NULL)->alphaMask == 0x00000000) {
-
-                if(aop == WINED3DTOP_DISABLE) {
-                   aarg1 = WINED3DTA_TEXTURE;
-                   aop = WINED3DTOP_SELECTARG1;
-                }
-                else if(aop == WINED3DTOP_SELECTARG1 && aarg1 != WINED3DTA_TEXTURE) {
-                    if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE]) {
-                        aarg2 = WINED3DTA_TEXTURE;
-                        aop = WINED3DTOP_MODULATE;
+            aarg1 = (args[aop] & ARG1) ? stateblock->textureState[i][WINED3DTSS_ALPHAARG1] : ARG_UNUSED;
+            aarg2 = (args[aop] & ARG2) ? stateblock->textureState[i][WINED3DTSS_ALPHAARG2] : ARG_UNUSED;
+            aarg0 = (args[aop] & ARG0) ? stateblock->textureState[i][WINED3DTSS_ALPHAARG0] : ARG_UNUSED;
+        }
+
+        if (i == 0 && stateblock->textures[0] && stateblock->renderState[WINED3DRS_COLORKEYENABLE])
+        {
+            UINT texture_dimensions = IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[0]);
+
+            if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB)
+            {
+                IWineD3DSurfaceImpl *surf;
+                surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *) stateblock->textures[0])->surfaces[0];
+
+                if (surf->CKeyFlags & WINEDDSD_CKSRCBLT && !surf->resource.format_desc->alpha_mask)
+                {
+                    if (aop == WINED3DTOP_DISABLE)
+                    {
+                       aarg1 = WINED3DTA_TEXTURE;
+                       aop = WINED3DTOP_SELECTARG1;
                     }
-                    else aarg1 = WINED3DTA_TEXTURE;
-                }
-                else if(aop == WINED3DTOP_SELECTARG2 && aarg2 != WINED3DTA_TEXTURE) {
-                    if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE]) {
-                        aarg1 = WINED3DTA_TEXTURE;
-                        aop = WINED3DTOP_MODULATE;
+                    else if (aop == WINED3DTOP_SELECTARG1 && aarg1 != WINED3DTA_TEXTURE)
+                    {
+                        if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE])
+                        {
+                            aarg2 = WINED3DTA_TEXTURE;
+                            aop = WINED3DTOP_MODULATE;
+                        }
+                        else aarg1 = WINED3DTA_TEXTURE;
                     }
-                    else aarg2 = WINED3DTA_TEXTURE;
+                    else if (aop == WINED3DTOP_SELECTARG2 && aarg2 != WINED3DTA_TEXTURE)
+                    {
+                        if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE])
+                        {
+                            aarg1 = WINED3DTA_TEXTURE;
+                            aop = WINED3DTOP_MODULATE;
+                        }
+                        else aarg2 = WINED3DTA_TEXTURE;
+                    }
                 }
             }
@@ -2025,6 +2288,6 @@
         if(is_invalid_op(stateblock->wineD3DDevice, i, aop,
            aarg1, aarg2, aarg0)) {
-               aarg0 = 0xffffffff;
-               aarg2 = 0xffffffff;
+               aarg0 = ARG_UNUSED;
+               aarg2 = ARG_UNUSED;
                aarg1 = WINED3DTA_CURRENT;
                aop = WINED3DTOP_SELECTARG1;
@@ -2069,15 +2332,19 @@
         settings->fog = FOG_OFF;
     } else if(stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE) {
-        switch(stateblock->renderState[WINED3DRS_FOGVERTEXMODE]) {
-            case WINED3DFOG_NONE:
-            case WINED3DFOG_LINEAR:
-                settings->fog = FOG_LINEAR;
-                break;
-            case WINED3DFOG_EXP:
-                settings->fog = FOG_EXP;
-                break;
-            case WINED3DFOG_EXP2:
-                settings->fog = FOG_EXP2;
-                break;
+        if(use_vs(stateblock) || ((IWineD3DVertexDeclarationImpl *) stateblock->vertexDecl)->position_transformed) {
+            settings->fog = FOG_LINEAR;
+        } else {
+            switch(stateblock->renderState[WINED3DRS_FOGVERTEXMODE]) {
+                case WINED3DFOG_NONE:
+                case WINED3DFOG_LINEAR:
+                    settings->fog = FOG_LINEAR;
+                    break;
+                case WINED3DFOG_EXP:
+                    settings->fog = FOG_EXP;
+                    break;
+                case WINED3DFOG_EXP2:
+                    settings->fog = FOG_EXP2;
+                    break;
+            }
         }
     } else {
@@ -2105,5 +2372,5 @@
         const struct ffp_frag_settings *settings)
 {
-    return (const struct ffp_frag_desc *)hash_table_get(fragment_shaders, settings);
+    return hash_table_get(fragment_shaders, settings);
 }
 
@@ -2125,5 +2392,5 @@
 void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     if(stateblock->textures[stage]) {
-        switch(stateblock->textureDimensions[stage]) {
+        switch (IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[stage])) {
             case GL_TEXTURE_2D:
                 glDisable(GL_TEXTURE_3D);
@@ -2204,5 +2471,5 @@
     * will take care of this business
     */
-    if(mapped_stage == -1 || mapped_stage >= GL_LIMITS(textures)) return;
+    if(mapped_stage == WINED3D_UNMAPPED_STAGE || mapped_stage >= GL_LIMITS(textures)) return;
     if(sampler >= stateblock->lowest_disabled_stage) return;
     if(isStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP))) return;
@@ -2214,5 +2481,5 @@
 unsigned int ffp_frag_program_key_hash(const void *key)
 {
-    const struct ffp_frag_settings *k = (const struct ffp_frag_settings *)key;
+    const struct ffp_frag_settings *k = key;
     unsigned int hash = 0, i;
     const DWORD *blob;
@@ -2241,7 +2508,33 @@
 BOOL ffp_frag_program_key_compare(const void *keya, const void *keyb)
 {
-    const struct ffp_frag_settings *ka = (const struct ffp_frag_settings *)keya;
-    const struct ffp_frag_settings *kb = (const struct ffp_frag_settings *)keyb;
+    const struct ffp_frag_settings *ka = keya;
+    const struct ffp_frag_settings *kb = keyb;
 
     return memcmp(ka, kb, sizeof(*ka)) == 0;
 }
+
+UINT wined3d_log2i(UINT32 x)
+{
+    static const BYTE l[] =
+    {
+        0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+        5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+        5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+        6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+        6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+        6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+        6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+    };
+    UINT32 i;
+
+    return (i = x >> 16) ? (x = i >> 8) ? l[x] + 24 : l[i] + 16 : (i = x >> 8) ? l[i] + 8 : l[x];
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexbuffer.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexbuffer.c	(revision 19677)
+++ 	(revision )
@@ -1,827 +1,0 @@
-/*
- * IWineD3DVertexBuffer Implementation
- *
- * Copyright 2002-2005 Jason Edmeades
- *                     Raphael Junqueira
- * Copyright 2004 Christian Costa
- * Copyright 2007 Stefan Dösinger for CodeWeavers
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/*
- * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
- * other than GPL or LGPL is available it will apply instead, Sun elects to use only
- * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
- * a choice of LGPL license versions is made available with the language indicating
- * that LGPLv2 or any later version may be used, or where a choice of which version
- * of the LGPL is applied is otherwise unspecified.
- */
-
-#include "config.h"
-#include "wined3d_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION This->resource.wineD3DDevice->adapter->gl_info
-
-#define VB_MAXDECLCHANGES     100     /* After that number we stop converting */
-#define VB_RESETDECLCHANGE    1000    /* Reset the changecount after that number of draws */
-
-/* *******************************************
-   IWineD3DVertexBuffer IUnknown parts follow
-   ******************************************* */
-static HRESULT WINAPI IWineD3DVertexBufferImpl_QueryInterface(IWineD3DVertexBuffer *iface, REFIID riid, LPVOID *ppobj)
-{
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
-    TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
-    if (IsEqualGUID(riid, &IID_IUnknown)
-        || IsEqualGUID(riid, &IID_IWineD3DBase)
-        || IsEqualGUID(riid, &IID_IWineD3DResource)
-        || IsEqualGUID(riid, &IID_IWineD3DVertexBuffer)){
-        IUnknown_AddRef(iface);
-        *ppobj = This;
-        return S_OK;
-    }
-    *ppobj = NULL;
-    return E_NOINTERFACE;
-}
-
-static ULONG WINAPI IWineD3DVertexBufferImpl_AddRef(IWineD3DVertexBuffer *iface) {
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
-    ULONG ref = InterlockedIncrement(&This->resource.ref);
-    TRACE("(%p) : AddRef increasing from %d\n", This, ref - 1);
-    return ref;
-}
-
-static ULONG WINAPI IWineD3DVertexBufferImpl_Release(IWineD3DVertexBuffer *iface) {
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
-    ULONG ref = InterlockedDecrement(&This->resource.ref);
-    TRACE("(%p) : Releasing from %d\n", This, ref + 1);
-    if (ref == 0) {
-
-        if(This->vbo) {
-            IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-
-            ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-            ENTER_GL();
-            GL_EXTCALL(glDeleteBuffersARB(1, &This->vbo));
-            checkGLcall("glDeleteBuffersARB");
-            LEAVE_GL();
-        }
-
-        resource_cleanup((IWineD3DResource *)iface);
-        HeapFree(GetProcessHeap(), 0, This);
-    }
-    return ref;
-}
-
-/* ****************************************************
-   IWineD3DVertexBuffer IWineD3DResource parts follow
-   **************************************************** */
-static HRESULT WINAPI IWineD3DVertexBufferImpl_GetDevice(IWineD3DVertexBuffer *iface, IWineD3DDevice** ppDevice) {
-    return resource_get_device((IWineD3DResource *)iface, ppDevice);
-}
-
-static HRESULT WINAPI IWineD3DVertexBufferImpl_SetPrivateData(IWineD3DVertexBuffer *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
-    return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
-}
-
-static HRESULT WINAPI IWineD3DVertexBufferImpl_GetPrivateData(IWineD3DVertexBuffer *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
-    return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
-}
-
-static HRESULT WINAPI IWineD3DVertexBufferImpl_FreePrivateData(IWineD3DVertexBuffer *iface, REFGUID refguid) {
-    return resource_free_private_data((IWineD3DResource *)iface, refguid);
-}
-
-static DWORD    WINAPI IWineD3DVertexBufferImpl_SetPriority(IWineD3DVertexBuffer *iface, DWORD PriorityNew) {
-    return resource_set_priority((IWineD3DResource *)iface, PriorityNew);
-}
-
-static DWORD    WINAPI IWineD3DVertexBufferImpl_GetPriority(IWineD3DVertexBuffer *iface) {
-    return resource_get_priority((IWineD3DResource *)iface);
-}
-
-static inline void fixup_d3dcolor(DWORD *pos) {
-    DWORD srcColor = *pos;
-
-    /* Color conversion like in drawStridedSlow. watch out for little endianity
-     * If we want that stuff to work on big endian machines too we have to consider more things
-     *
-     * 0xff000000: Alpha mask
-     * 0x00ff0000: Blue mask
-     * 0x0000ff00: Green mask
-     * 0x000000ff: Red mask
-     */
-    *pos = 0;
-    *pos |= (srcColor & 0xff00ff00)      ;   /* Alpha Green */
-    *pos |= (srcColor & 0x00ff0000) >> 16;   /* Red */
-    *pos |= (srcColor & 0x000000ff) << 16;   /* Blue */
-}
-
-static inline void fixup_transformed_pos(float *p) {
-    float x, y, z, w;
-
-    /* rhw conversion like in drawStridedSlow */
-    if(p[3] == 1.0 || ((p[3] < eps) && (p[3] > -eps))) {
-        x = p[0];
-        y = p[1];
-        z = p[2];
-        w = 1.0;
-    } else {
-        w = 1.0 / p[3];
-        x = p[0] * w;
-        y = p[1] * w;
-        z = p[2] * w;
-    }
-    p[0] = x;
-    p[1] = y;
-    p[2] = z;
-    p[3] = w;
-}
-
-static DWORD *find_conversion_shift(IWineD3DVertexBufferImpl *This, const WineDirect3DVertexStridedData *strided, DWORD stride)
-{
-    DWORD *ret, i, shift, j, type;
-    DWORD orig_type_size;
-
-    if(!stride) {
-        TRACE("No shift\n");
-        return NULL;
-    }
-
-    This->conv_stride = stride;
-    ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DWORD) * stride);
-    for(i = 0; i < MAX_ATTRIBS; i++) {
-        if(strided->u.input[i].VBO != This->vbo) continue;
-
-        type = strided->u.input[i].dwType;
-        if(type == WINED3DDECLTYPE_FLOAT16_2) {
-            shift = 4;
-        } else if(type == WINED3DDECLTYPE_FLOAT16_4) {
-            shift = 8;
-            /* Pre-shift the last 4 bytes in the FLOAT16_4 by 4 bytes - this makes FLOAT16_2 and FLOAT16_4 conversions
-             * compatible
-             */
-            for(j = 4; j < 8; j++) {
-                ret[(DWORD_PTR) strided->u.input[i].lpData + j ] += 4;
-            }
-        } else {
-            shift = 0;
-        }
-        This->conv_stride += shift;
-
-        if(shift) {
-            orig_type_size = WINED3D_ATR_TYPESIZE(type) * WINED3D_ATR_SIZE(type);
-            for(j = (DWORD_PTR) strided->u.input[i].lpData + orig_type_size; j < stride; j++) {
-                ret[j] += shift;
-            }
-        }
-    }
-
-    if(TRACE_ON(d3d)) {
-        TRACE("Dumping conversion shift:\n");
-        for(i = 0; i < stride; i++) {
-            TRACE("[%d]", ret[i]);
-        }
-        TRACE("\n");
-    }
-    return ret;
-}
-
-static inline BOOL process_converted_attribute(IWineD3DVertexBufferImpl *This,
-                                               const enum vbo_conversion_type conv_type,
-                                               const WineDirect3DStridedData *attrib,
-                                               DWORD *stride_this_run, const DWORD type) {
-    DWORD attrib_size;
-    BOOL ret = FALSE;
-    int i;
-    DWORD offset = This->resource.wineD3DDevice->stateBlock->streamOffset[attrib->streamNo];
-    DWORD_PTR data;
-
-    /* Check for some valid situations which cause us pain. One is if the buffer is used for
-     * constant attributes(stride = 0), the other one is if the buffer is used on two streams
-     * with different strides. In the 2nd case we might have to drop conversion entirely,
-     * it is possible that the same bytes are once read as FLOAT2 and once as UBYTE4N.
-     */
-    if(attrib->dwStride == 0) {
-        FIXME("%s used with stride 0, let's hope we get the vertex stride from somewhere else\n",
-                debug_d3ddecltype(type));
-    } else if(attrib->dwStride != *stride_this_run &&
-                *stride_this_run) {
-        FIXME("Got two concurrent strides, %d and %d\n", attrib->dwStride, *stride_this_run);
-    } else {
-        *stride_this_run = attrib->dwStride;
-        if(This->stride != *stride_this_run) {
-            /* We rely that this happens only on the first converted attribute that is found,
-             * if at all. See above check
-             */
-            TRACE("Reconverting because converted attributes occur, and the stride changed\n");
-            This->stride = *stride_this_run;
-            HeapFree(GetProcessHeap(), HEAP_ZERO_MEMORY, This->conv_map);
-            This->conv_map = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This->conv_map) * This->stride);
-            ret = TRUE;
-        }
-    }
-
-    data = (((DWORD_PTR) attrib->lpData) + offset) % This->stride;
-    attrib_size = WINED3D_ATR_SIZE(type) * WINED3D_ATR_TYPESIZE(type);
-    for(i = 0; i < attrib_size; i++) {
-        if(This->conv_map[data + i] != conv_type) {
-            TRACE("Byte %ld in vertex changed\n", i + data);
-            TRACE("It was type %d, is %d now\n", This->conv_map[data + i], conv_type);
-            ret = TRUE;
-            This->conv_map[data + i] = conv_type;
-        }
-    }
-    return ret;
-}
-
-static inline BOOL check_attribute(IWineD3DVertexBufferImpl *This, const WineDirect3DStridedData *attrib,
-                                   const BOOL check_d3dcolor, const BOOL is_ffp_position, const BOOL is_ffp_color,
-                                   DWORD *stride_this_run, BOOL *float16_used) {
-    BOOL ret = FALSE;
-    DWORD type;
-
-    /* Ignore attributes that do not have our vbo. After that check we can be sure that the attribute is
-     * there, on nonexistent attribs the vbo is 0.
-     */
-    if(attrib->VBO != This->vbo) return FALSE;
-
-    type = attrib->dwType;
-    /* Look for newly appeared conversion */
-    if(!GL_SUPPORT(NV_HALF_FLOAT) && (
-       type == WINED3DDECLTYPE_FLOAT16_2 ||
-       type == WINED3DDECLTYPE_FLOAT16_4)) {
-
-        ret = process_converted_attribute(This, CONV_FLOAT16_2, attrib, stride_this_run, type);
-
-        if(is_ffp_position) {
-            FIXME("Test FLOAT16 fixed function processing positions\n");
-        } else if(is_ffp_color) {
-            FIXME("test FLOAT16 fixed function processing colors\n");
-        }
-        *float16_used = TRUE;
-    } else if(check_d3dcolor && type == WINED3DDECLTYPE_D3DCOLOR) {
-
-        ret = process_converted_attribute(This, CONV_D3DCOLOR, attrib, stride_this_run, WINED3DDECLTYPE_D3DCOLOR);
-
-        if(!is_ffp_color) {
-            FIXME("Test for non-color fixed function D3DCOLOR type\n");
-        }
-    } else if(is_ffp_position && type == WINED3DDECLTYPE_FLOAT4) {
-        ret = process_converted_attribute(This, CONV_POSITIONT, attrib, stride_this_run, WINED3DDECLTYPE_FLOAT4);
-    } else if(This->conv_map) {
-        ret = process_converted_attribute(This, CONV_NONE, attrib, stride_this_run, type);
-    }
-    return ret;
-}
-
-static inline BOOL IWineD3DVertexBufferImpl_FindDecl(IWineD3DVertexBufferImpl *This)
-{
-    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    BOOL ret = FALSE;
-    int i;
-    DWORD stride_this_run = 0;
-    BOOL float16_used = FALSE;
-
-    /* In d3d7 the vertex buffer declaration NEVER changes because it is stored in the d3d7 vertex buffer.
-     * Once we have our declaration there is no need to look it up again.
-     */
-    if(((IWineD3DImpl *)device->wineD3D)->dxVersion == 7 && This->Flags & VBFLAG_HASDESC) {
-        return FALSE;
-    }
-
-    TRACE("Finding vertex buffer conversion information\n");
-    /* Certain declaration types need some fixups before we can pass them to opengl. This means D3DCOLOR attributes with fixed
-     * function vertex processing, FLOAT4 POSITIONT with fixed function, and FLOAT16 if GL_NV_half_float is not supported.
-     *
-     * The vertex buffer FVF doesn't help with finding them, we have to use the decoded vertex declaration and pick the things
-     * that concern the current buffer. A problem with this is that this can change between draws, so we have to validate
-     * the information and reprocess the buffer if it changes, and avoid false positives for performance reasons.
-     *
-     * We have to distinguish between vertex shaders and fixed function to pick the way we access the
-     * strided vertex information.
-     *
-     * This code sets up a per-byte array with the size of the detected stride of the arrays in the
-     * buffer. For each byte we have a field that marks the conversion needed on this byte. For example,
-     * the following declaration with fixed function vertex processing:
-     *
-     *      POSITIONT, FLOAT4
-     *      NORMAL, FLOAT3
-     *      DIFFUSE, FLOAT16_4
-     *      SPECULAR, D3DCOLOR
-     *
-     * Will result in
-     * {                 POSITIONT                    }{             NORMAL                }{    DIFFUSE          }{SPECULAR }
-     * [P][P][P][P][P][P][P][P][P][P][P][P][P][P][P][P][0][0][0][0][0][0][0][0][0][0][0][0][F][F][F][F][F][F][F][F][C][C][C][C]
-     *
-     * Where in this example map P means 4 component position conversion, 0 means no conversion, F means FLOAT16_2 conversion
-     * and C means D3DCOLOR conversion(red / blue swizzle).
-     *
-     * If we're doing conversion and the stride changes we have to reconvert the whole buffer. Note that we do not mind if the
-     * semantic changes, we only care for the conversion type. So if the NORMAL is replaced with a TEXCOORD, nothing has to be
-     * done, or if the DIFFUSE is replaced with a D3DCOLOR BLENDWEIGHT we can happily dismiss the change. Some conversion types
-     * depend on the semantic as well, for example a FLOAT4 texcoord needs no conversion while a FLOAT4 positiont needs one
-     */
-    if(use_vs(device)) {
-        TRACE("vhsader\n");
-        /* If the current vertex declaration is marked for no half float conversion don't bother to
-         * analyse the strided streams in depth, just set them up for no conversion. Return decl changed
-         * if we used conversion before
-         */
-        if(!((IWineD3DVertexDeclarationImpl *) device->stateBlock->vertexDecl)->half_float_conv_needed) {
-            if(This->conv_map) {
-                TRACE("Now using shaders without conversion, but conversion used before\n");
-                HeapFree(GetProcessHeap(), 0, This->conv_map);
-                HeapFree(GetProcessHeap(), 0, This->conv_shift);
-                This->conv_map = NULL;
-                This->stride = 0;
-                This->conv_shift = NULL;
-                This->conv_stride = 0;
-                return TRUE;
-            } else {
-                return FALSE;
-            }
-        }
-        for(i = 0; i < MAX_ATTRIBS; i++) {
-            ret = check_attribute(This, &device->strided_streams.u.input[i], FALSE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        }
-
-        /* Recalculate the conversion shift map if the declaration has changed,
-         * and we're using float16 conversion or used it on the last run
-         */
-        if(ret && (float16_used || This->conv_map)) {
-            HeapFree(GetProcessHeap(), 0, This->conv_shift);
-            This->conv_shift = find_conversion_shift(This, &device->strided_streams, This->stride);
-        }
-    } else {
-        /* Fixed function is a bit trickier. We have to take care for D3DCOLOR types, FLOAT4 positions and of course
-         * FLOAT16s if not supported. Also, we can't iterate over the array, so use macros to generate code for all
-         * the attributes that our current fixed function pipeline implementation cares for.
-         */
-        ret = check_attribute(This, &device->strided_streams.u.s.position,     TRUE, TRUE,  FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.normal,       TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.diffuse,      TRUE, FALSE, TRUE,  &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.specular,     TRUE, FALSE, TRUE,  &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[0], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[1], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[2], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[3], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[4], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[5], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[6], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-        ret = check_attribute(This, &device->strided_streams.u.s.texCoords[7], TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret;
-
-        if(float16_used) FIXME("Float16 conversion used with fixed function vertex processing\n");
-    }
-
-    if(stride_this_run == 0 && This->conv_map) {
-        /* Sanity test */
-        if(ret == FALSE) {
-            ERR("no converted attributes found, old conversion map exists, and no declaration change???\n");
-        }
-        HeapFree(GetProcessHeap(), 0, This->conv_map);
-        This->conv_map = NULL;
-        This->stride = 0;
-    }
-    This->Flags |= VBFLAG_HASDESC;
-
-    if(ret) TRACE("Conversion information changed\n");
-    return ret;
-}
-
-static void check_vbo_size(IWineD3DVertexBufferImpl *This) {
-    DWORD size = This->conv_stride ? This->conv_stride * (This->resource.size / This->stride) : This->resource.size;
-    if(This->vbo_size != size) {
-        TRACE("Old size %d, creating new size %d\n", This->vbo_size, size);
-        ENTER_GL();
-        GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
-        checkGLcall("glBindBufferARB");
-        GL_EXTCALL(glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, This->vbo_usage));
-        This->vbo_size = size;
-        checkGLcall("glBufferDataARB");
-        LEAVE_GL();
-    }
-}
-
-static void CreateVBO(IWineD3DVertexBufferImpl *This) {
-    GLenum error, glUsage;
-    DWORD vboUsage = This->resource.usage;
-    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-
-    TRACE("Creating an OpenGL vertex buffer object for IWineD3DVertexBuffer %p  Usage(%s)\n", This, debug_d3dusage(vboUsage));
-
-    /* Make sure that a context is there. Needed in a multithreaded environment. Otherwise this call is a nop */
-    ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-    ENTER_GL();
-
-    /* Make sure that the gl error is cleared. Do not use checkGLcall
-    * here because checkGLcall just prints a fixme and continues. However,
-    * if an error during VBO creation occurs we can fall back to non-vbo operation
-    * with full functionality(but performance loss)
-    */
-    while(glGetError() != GL_NO_ERROR);
-
-    /* Basically the FVF parameter passed to CreateVertexBuffer is no good
-    * It is the FVF set with IWineD3DDevice::SetFVF or the Vertex Declaration set with
-    * IWineD3DDevice::SetVertexDeclaration that decides how the vertices in the buffer
-    * look like. This means that on each DrawPrimitive call the vertex buffer has to be verified
-    * to check if the rhw and color values are in the correct format.
-    */
-
-    GL_EXTCALL(glGenBuffersARB(1, &This->vbo));
-    error = glGetError();
-    if(This->vbo == 0 || error != GL_NO_ERROR) {
-        WARN("Failed to create a VBO with error %s (%#x)\n", debug_glerror(error), error);
-        goto error;
-    }
-
-    GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
-    error = glGetError();
-    if(error != GL_NO_ERROR) {
-        WARN("Failed to bind the VBO with error %s (%#x)\n", debug_glerror(error), error);
-        goto error;
-    }
-
-    /* Don't use static, because dx apps tend to update the buffer
-    * quite often even if they specify 0 usage. Because we always keep the local copy
-    * we never read from the vbo and can create a write only opengl buffer.
-    */
-    switch(vboUsage & (WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_DYNAMIC) ) {
-        case WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_DYNAMIC:
-        case WINED3DUSAGE_DYNAMIC:
-            TRACE("Gl usage = GL_STREAM_DRAW\n");
-            glUsage = GL_STREAM_DRAW_ARB;
-            break;
-        case WINED3DUSAGE_WRITEONLY:
-        default:
-            TRACE("Gl usage = GL_DYNAMIC_DRAW\n");
-            glUsage = GL_DYNAMIC_DRAW_ARB;
-            break;
-    }
-
-    /* Reserve memory for the buffer. The amount of data won't change
-    * so we are safe with calling glBufferData once with a NULL ptr and
-    * calling glBufferSubData on updates
-    */
-    GL_EXTCALL(glBufferDataARB(GL_ARRAY_BUFFER_ARB, This->resource.size, NULL, glUsage));
-    error = glGetError();
-    if(error != GL_NO_ERROR) {
-        WARN("glBufferDataARB failed with error %s (%#x)\n", debug_glerror(error), error);
-        goto error;
-    }
-    This->vbo_size = This->resource.size;
-    This->vbo_usage = glUsage;
-    This->dirtystart = 0;
-    This->dirtyend = This->resource.size;
-    This->Flags |= VBFLAG_DIRTY;
-
-    LEAVE_GL();
-
-    return;
-    error:
-            /* Clean up all vbo init, but continue because we can work without a vbo :-) */
-            FIXME("Failed to create a vertex buffer object. Continuing, but performance issues can occur\n");
-    if(This->vbo) GL_EXTCALL(glDeleteBuffersARB(1, &This->vbo));
-    This->vbo = 0;
-    LEAVE_GL();
-    return;
-}
-
-static void     WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *iface) {
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *) iface;
-    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    BYTE *data;
-    UINT start = 0, end = 0, vertices;
-    BOOL declChanged = FALSE;
-    int i, j;
-    TRACE("(%p)->()\n", This);
-
-    if(!This->vbo) {
-        /* TODO: Make converting independent from VBOs */
-        if(This->Flags & VBFLAG_CREATEVBO) {
-            CreateVBO(This);
-            This->Flags &= ~VBFLAG_CREATEVBO;
-        } else {
-            return; /* Not doing any conversion */
-        }
-    }
-
-    /* Reading the declaration makes only sense if the stateblock is finalized and the buffer bound to a stream */
-    if(device->isInDraw && This->bindCount > 0) {
-        declChanged = IWineD3DVertexBufferImpl_FindDecl(This);
-    } else if(This->Flags & VBFLAG_HASDESC) {
-        /* Reuse the declaration stored in the buffer. It will most likely not change, and if it does
-         * the stream source state handler will call PreLoad again and the change will be caught
-         */
-    } else {
-        /* Cannot get a declaration, and no declaration is stored in the buffer. It is pointless to preload
-         * now. When the buffer is used, PreLoad will be called by the stream source state handler and a valid
-         * declaration for the buffer can be found
-         */
-        return;
-    }
-
-    /* If applications change the declaration over and over, reconverting all the time is a huge
-     * performance hit. So count the declaration changes and release the VBO if there are too many
-     * of them (and thus stop converting)
-     */
-    if(declChanged) {
-        This->declChanges++;
-        This->draws = 0;
-
-        if(This->declChanges > VB_MAXDECLCHANGES) {
-            FIXME("Too many declaration changes, stopping converting\n");
-            ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-            ENTER_GL();
-            GL_EXTCALL(glDeleteBuffersARB(1, &This->vbo));
-            checkGLcall("glDeleteBuffersARB");
-            LEAVE_GL();
-            This->vbo = 0;
-            HeapFree(GetProcessHeap(), 0, This->conv_shift);
-
-            /* The stream source state handler might have read the memory of the vertex buffer already
-             * and got the memory in the vbo which is not valid any longer. Dirtify the stream source
-             * to force a reload. This happens only once per changed vertexbuffer and should occur rather
-             * rarely
-             */
-            IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC);
-
-            return;
-        }
-        check_vbo_size(This);
-    } else {
-        /* However, it is perfectly fine to change the declaration every now and then. We don't want a game that
-         * changes it every minute drop the VBO after VB_MAX_DECL_CHANGES minutes. So count draws without
-         * decl changes and reset the decl change count after a specific number of them
-         */
-        This->draws++;
-        if(This->draws > VB_RESETDECLCHANGE) This->declChanges = 0;
-    }
-
-    if(declChanged) {
-        /* The declaration changed, reload the whole buffer */
-        WARN("Reloading buffer because of decl change\n");
-        start = 0;
-        end = This->resource.size;
-    } else if(This->Flags & VBFLAG_DIRTY) {
-        /* No decl change, but dirty data, reload the changed stuff */
-        if(This->conv_shift) {
-            if(This->dirtystart != 0 || This->dirtyend != 0) {
-                FIXME("Implement partial buffer loading with shifted conversion\n");
-            }
-        }
-        start = This->dirtystart;
-        end = This->dirtyend;
-    } else {
-        /* Desc not changed, buffer not dirty, nothing to do :-) */
-        return;
-    }
-
-    /* Mark the buffer clean */
-    This->Flags &= ~VBFLAG_DIRTY;
-    This->dirtystart = 0;
-    This->dirtyend = 0;
-
-    if(!This->conv_map) {
-        /* That means that there is nothing to fixup. Just upload from This->resource.allocatedMemory
-         * directly into the vbo. Do not free the system memory copy because drawPrimitive may need it if
-         * the stride is 0, for instancing emulation, vertex blending emulation or shader emulation.
-         */
-        TRACE("No conversion needed\n");
-
-        if(!device->isInDraw) {
-            ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-        }
-        ENTER_GL();
-        GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
-        checkGLcall("glBindBufferARB");
-        GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, start, end-start, This->resource.allocatedMemory + start));
-        checkGLcall("glBufferSubDataARB");
-        LEAVE_GL();
-        return;
-    }
-
-    /* Now for each vertex in the buffer that needs conversion */
-    vertices = This->resource.size / This->stride;
-
-    if(This->conv_shift) {
-        TRACE("Shifted conversion\n");
-        data = HeapAlloc(GetProcessHeap(), 0, vertices * This->conv_stride);
-
-        for(i = start / This->stride; i < min((end / This->stride) + 1, vertices); i++) {
-            for(j = 0; j < This->stride; j++) {
-                switch(This->conv_map[j]) {
-                    case CONV_NONE:
-                        data[This->conv_stride * i + j + This->conv_shift[j]] = This->resource.allocatedMemory[This->stride * i + j];
-                        break;
-
-                    case CONV_FLOAT16_2:
-                    {
-                        float *out = (float *) (&data[This->conv_stride * i + j + This->conv_shift[j]]);
-                        const WORD *in = (WORD *) (&This->resource.allocatedMemory[i * This->stride + j]);
-
-                        out[1] = float_16_to_32(in + 1);
-                        out[0] = float_16_to_32(in + 0);
-                        j += 3;    /* Skip 3 additional bytes,as a FLOAT16_2 has 4 bytes */
-                        break;
-                    }
-
-                    default:
-                        FIXME("Unimplemented conversion %d in shifted conversion\n", This->conv_map[j]);
-                }
-            }
-        }
-
-        ENTER_GL();
-        GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
-        checkGLcall("glBindBufferARB");
-        GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, vertices * This->conv_stride, data));
-        checkGLcall("glBufferSubDataARB");
-        LEAVE_GL();
-
-    } else {
-        data = HeapAlloc(GetProcessHeap(), 0, This->resource.size);
-        memcpy(data + start, This->resource.allocatedMemory + start, end - start);
-        for(i = start / This->stride; i < min((end / This->stride) + 1, vertices); i++) {
-            for(j = 0; j < This->stride; j++) {
-                switch(This->conv_map[j]) {
-                    case CONV_NONE:
-                        /* Done already */
-                        j += 3;
-                        break;
-                    case CONV_D3DCOLOR:
-                        fixup_d3dcolor((DWORD *) (data + i * This->stride + j));
-                        j += 3;
-                        break;
-
-                    case CONV_POSITIONT:
-                        fixup_transformed_pos((float *) (data + i * This->stride + j));
-                        j += 15;
-                        break;
-
-                    case CONV_FLOAT16_2:
-                        ERR("Did not expect FLOAT16 conversion in unshifted conversion\n");
-                    default:
-                        FIXME("Unimplemented conversion %d in shifted conversion\n", This->conv_map[j]);
-                }
-            }
-        }
-
-        ENTER_GL();
-        GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo));
-        checkGLcall("glBindBufferARB");
-        GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, start, end - start, data + start));
-        checkGLcall("glBufferSubDataARB");
-        LEAVE_GL();
-    }
-
-    HeapFree(GetProcessHeap(), 0, data);
-}
-
-static void WINAPI IWineD3DVertexBufferImpl_UnLoad(IWineD3DVertexBuffer *iface) {
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *) iface;
-    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
-    TRACE("(%p)\n", This);
-
-    /* This is easy: The whole content is shadowed in This->resource.allocatedMemory,
-     * so we only have to destroy the vbo. Only do it if we have a vbo, which implies
-     * that vbos are supported
-     */
-    if(This->vbo) {
-        ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
-        ENTER_GL();
-        GL_EXTCALL(glDeleteBuffersARB(1, &This->vbo));
-        checkGLcall("glDeleteBuffersARB");
-        LEAVE_GL();
-        This->vbo = 0;
-        This->Flags |= VBFLAG_CREATEVBO; /* Recreate the VBO next load */
-    }
-}
-
-static WINED3DRESOURCETYPE WINAPI IWineD3DVertexBufferImpl_GetType(IWineD3DVertexBuffer *iface) {
-    return resource_get_type((IWineD3DResource *)iface);
-}
-
-static HRESULT WINAPI IWineD3DVertexBufferImpl_GetParent(IWineD3DVertexBuffer *iface, IUnknown **pParent) {
-    return resource_get_parent((IWineD3DResource *)iface, pParent);
-}
-
-/* ******************************************************
-   IWineD3DVertexBuffer IWineD3DVertexBuffer parts follow
-   ****************************************************** */
-static HRESULT  WINAPI IWineD3DVertexBufferImpl_Lock(IWineD3DVertexBuffer *iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags) {
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
-    BYTE *data;
-    TRACE("(%p)->%d, %d, %p, %08x\n", This, OffsetToLock, SizeToLock, ppbData, Flags);
-
-    InterlockedIncrement(&This->lockcount);
-
-    if(This->Flags & VBFLAG_DIRTY) {
-        if(This->dirtystart > OffsetToLock) This->dirtystart = OffsetToLock;
-        if(SizeToLock) {
-            if(This->dirtyend < OffsetToLock + SizeToLock) This->dirtyend = OffsetToLock + SizeToLock;
-        } else {
-            This->dirtyend = This->resource.size;
-        }
-    } else {
-        This->dirtystart = OffsetToLock;
-        if(SizeToLock)
-            This->dirtyend = OffsetToLock + SizeToLock;
-        else
-            This->dirtyend = This->resource.size;
-    }
-
-    data = This->resource.allocatedMemory;
-    This->Flags |= VBFLAG_DIRTY;
-    *ppbData = data + OffsetToLock;
-
-    TRACE("(%p) : returning memory of %p (base:%p,offset:%u)\n", This, data + OffsetToLock, data, OffsetToLock);
-    /* TODO: check Flags compatibility with This->currentDesc.Usage (see MSDN) */
-    return WINED3D_OK;
-}
-static HRESULT WINAPI IWineD3DVertexBufferImpl_Unlock(IWineD3DVertexBuffer *iface) {
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *) iface;
-    LONG lockcount;
-    TRACE("(%p)\n", This);
-
-    lockcount = InterlockedDecrement(&This->lockcount);
-    if(lockcount > 0) {
-        /* Delay loading the buffer until everything is unlocked */
-        TRACE("Ignoring the unlock\n");
-        return WINED3D_OK;
-    }
-
-    if(This->Flags & VBFLAG_HASDESC) {
-        IWineD3DVertexBufferImpl_PreLoad(iface);
-    }
-    return WINED3D_OK;
-}
-static HRESULT  WINAPI IWineD3DVertexBufferImpl_GetDesc(IWineD3DVertexBuffer *iface, WINED3DVERTEXBUFFER_DESC *pDesc) {
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
-
-    TRACE("(%p)\n", This);
-    pDesc->Format = This->resource.format;
-    pDesc->Type   = This->resource.resourceType;
-    pDesc->Usage  = This->resource.usage;
-    pDesc->Pool   = This->resource.pool;
-    pDesc->Size   = This->resource.size;
-    pDesc->FVF    = This->fvf;
-    return WINED3D_OK;
-}
-
-const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl =
-{
-    /* IUnknown */
-    IWineD3DVertexBufferImpl_QueryInterface,
-    IWineD3DVertexBufferImpl_AddRef,
-    IWineD3DVertexBufferImpl_Release,
-    /* IWineD3DResource */
-    IWineD3DVertexBufferImpl_GetParent,
-    IWineD3DVertexBufferImpl_GetDevice,
-    IWineD3DVertexBufferImpl_SetPrivateData,
-    IWineD3DVertexBufferImpl_GetPrivateData,
-    IWineD3DVertexBufferImpl_FreePrivateData,
-    IWineD3DVertexBufferImpl_SetPriority,
-    IWineD3DVertexBufferImpl_GetPriority,
-    IWineD3DVertexBufferImpl_PreLoad,
-    IWineD3DVertexBufferImpl_UnLoad,
-    IWineD3DVertexBufferImpl_GetType,
-    /* IWineD3DVertexBuffer */
-    IWineD3DVertexBufferImpl_Lock,
-    IWineD3DVertexBufferImpl_Unlock,
-    IWineD3DVertexBufferImpl_GetDesc
-};
-
-const BYTE* IWineD3DVertexBufferImpl_GetMemory(IWineD3DVertexBuffer* iface, DWORD iOffset, GLint *vbo)
-{
-    IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
-
-    *vbo = This->vbo;
-    if(This->vbo == 0) {
-        if(This->Flags & VBFLAG_CREATEVBO) {
-            CreateVBO(This);
-            This->Flags &= ~VBFLAG_CREATEVBO;
-            if(This->vbo) {
-                *vbo = This->vbo;
-                return (const BYTE *)iOffset;
-            }
-        }
-        return This->resource.allocatedMemory + iOffset;
-    } else {
-        return (const BYTE *)iOffset;
-    }
-}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexdeclaration.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexdeclaration.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexdeclaration.c	(revision 19678)
@@ -39,11 +39,11 @@
 
 static void dump_wined3dvertexelement(const WINED3DVERTEXELEMENT *element) {
-    TRACE("     Stream: %d\n", element->Stream);
-    TRACE("     Offset: %d\n", element->Offset);
-    TRACE("       Type: %s (%#x)\n", debug_d3ddecltype(element->Type), element->Type);
-    TRACE("     Method: %s (%#x)\n", debug_d3ddeclmethod(element->Method), element->Method);
-    TRACE("      Usage: %s (%#x)\n", debug_d3ddeclusage(element->Usage), element->Usage);
-    TRACE("Usage index: %d\n", element->UsageIndex);
-    TRACE("   Register: %d\n", element->Reg);
+    TRACE("     format: %s (%#x)\n", debug_d3dformat(element->format), element->format);
+    TRACE(" input_slot: %u\n", element->input_slot);
+    TRACE("     offset: %u\n", element->offset);
+    TRACE("output_slot: %u\n", element->output_slot);
+    TRACE("     method: %s (%#x)\n", debug_d3ddeclmethod(element->method), element->method);
+    TRACE("      usage: %s (%#x)\n", debug_d3ddeclusage(element->usage), element->usage);
+    TRACE("  usage_idx: %u\n", element->usage_idx);
 }
 
@@ -83,6 +83,5 @@
         }
 
-        HeapFree(GetProcessHeap(), 0, This->pDeclarationWine);
-        HeapFree(GetProcessHeap(), 0, This->ffp_valid);
+        HeapFree(GetProcessHeap(), 0, This->elements);
         HeapFree(GetProcessHeap(), 0, This);
     }
@@ -113,35 +112,19 @@
 }
 
-static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration(IWineD3DVertexDeclaration *iface,
-        WINED3DVERTEXELEMENT *elements, UINT *element_count) {
-    IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
-    HRESULT hr = WINED3D_OK;
-
-    TRACE("(%p) : d3d version %d, elements %p, element_count %p\n",
-            This, ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion, elements, element_count);
-
-    *element_count = This->declarationWNumElements;
-    if (elements) {
-        CopyMemory(elements, This->pDeclarationWine, This->declarationWNumElements * sizeof(WINED3DVERTEXELEMENT));
-    }
-
-    return hr;
-}
-
 static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element)
 {
-    switch(element->Usage)
+    switch(element->usage)
     {
         case WINED3DDECLUSAGE_POSITION:
         case WINED3DDECLUSAGE_POSITIONT:
-            switch(element->Type)
-            {
-                case WINED3DDECLTYPE_FLOAT2:
-                case WINED3DDECLTYPE_FLOAT3:
-                case WINED3DDECLTYPE_FLOAT4:
-                case WINED3DDECLTYPE_SHORT2:
-                case WINED3DDECLTYPE_SHORT4:
-                case WINED3DDECLTYPE_FLOAT16_2:
-                case WINED3DDECLTYPE_FLOAT16_4:
+            switch(element->format)
+            {
+                case WINED3DFMT_R32G32_FLOAT:
+                case WINED3DFMT_R32G32B32_FLOAT:
+                case WINED3DFMT_R32G32B32A32_FLOAT:
+                case WINED3DFMT_R16G16_SINT:
+                case WINED3DFMT_R16G16B16A16_SINT:
+                case WINED3DFMT_R16G16_FLOAT:
+                case WINED3DFMT_R16G16B16A16_FLOAT:
                     return TRUE;
                 default:
@@ -150,12 +133,16 @@
 
         case WINED3DDECLUSAGE_BLENDWEIGHT:
-            switch(element->Type)
-            {
-                case WINED3DDECLTYPE_D3DCOLOR:
-                case WINED3DDECLTYPE_UBYTE4:
-                case WINED3DDECLTYPE_SHORT2:
-                case WINED3DDECLTYPE_SHORT4:
-                case WINED3DDECLTYPE_FLOAT16_2:
-                case WINED3DDECLTYPE_FLOAT16_4:
+            switch(element->format)
+            {
+                case WINED3DFMT_R32_FLOAT:
+                case WINED3DFMT_R32G32_FLOAT:
+                case WINED3DFMT_R32G32B32_FLOAT:
+                case WINED3DFMT_R32G32B32A32_FLOAT:
+                case WINED3DFMT_A8R8G8B8:
+                case WINED3DFMT_R8G8B8A8_UINT:
+                case WINED3DFMT_R16G16_SINT:
+                case WINED3DFMT_R16G16B16A16_SINT:
+                case WINED3DFMT_R16G16_FLOAT:
+                case WINED3DFMT_R16G16B16A16_FLOAT:
                     return TRUE;
                 default:
@@ -164,10 +151,10 @@
 
         case WINED3DDECLUSAGE_NORMAL:
-            switch(element->Type)
-            {
-                case WINED3DDECLTYPE_FLOAT3:
-                case WINED3DDECLTYPE_FLOAT4:
-                case WINED3DDECLTYPE_SHORT4:
-                case WINED3DDECLTYPE_FLOAT16_4:
+            switch(element->format)
+            {
+                case WINED3DFMT_R32G32B32_FLOAT:
+                case WINED3DFMT_R32G32B32A32_FLOAT:
+                case WINED3DFMT_R16G16B16A16_SINT:
+                case WINED3DFMT_R16G16B16A16_FLOAT:
                     return TRUE;
                 default:
@@ -176,14 +163,14 @@
 
         case WINED3DDECLUSAGE_TEXCOORD:
-            switch(element->Type)
-            {
-                case WINED3DDECLTYPE_FLOAT1:
-                case WINED3DDECLTYPE_FLOAT2:
-                case WINED3DDECLTYPE_FLOAT3:
-                case WINED3DDECLTYPE_FLOAT4:
-                case WINED3DDECLTYPE_SHORT2:
-                case WINED3DDECLTYPE_SHORT4:
-                case WINED3DDECLTYPE_FLOAT16_2:
-                case WINED3DDECLTYPE_FLOAT16_4:
+            switch(element->format)
+            {
+                case WINED3DFMT_R32_FLOAT:
+                case WINED3DFMT_R32G32_FLOAT:
+                case WINED3DFMT_R32G32B32_FLOAT:
+                case WINED3DFMT_R32G32B32A32_FLOAT:
+                case WINED3DFMT_R16G16_SINT:
+                case WINED3DFMT_R16G16B16A16_SINT:
+                case WINED3DFMT_R16G16_FLOAT:
+                case WINED3DFMT_R16G16B16A16_FLOAT:
                     return TRUE;
                 default:
@@ -192,15 +179,15 @@
 
         case WINED3DDECLUSAGE_COLOR:
-            switch(element->Type)
-            {
-                case WINED3DDECLTYPE_FLOAT3:
-                case WINED3DDECLTYPE_FLOAT4:
-                case WINED3DDECLTYPE_D3DCOLOR:
-                case WINED3DDECLTYPE_UBYTE4:
-                case WINED3DDECLTYPE_SHORT4:
-                case WINED3DDECLTYPE_UBYTE4N:
-                case WINED3DDECLTYPE_SHORT4N:
-                case WINED3DDECLTYPE_USHORT4N:
-                case WINED3DDECLTYPE_FLOAT16_4:
+            switch(element->format)
+            {
+                case WINED3DFMT_R32G32B32_FLOAT:
+                case WINED3DFMT_R32G32B32A32_FLOAT:
+                case WINED3DFMT_A8R8G8B8:
+                case WINED3DFMT_R8G8B8A8_UINT:
+                case WINED3DFMT_R16G16B16A16_SINT:
+                case WINED3DFMT_R8G8B8A8_UNORM:
+                case WINED3DFMT_R16G16B16A16_SNORM:
+                case WINED3DFMT_R16G16B16A16_UNORM:
+                case WINED3DFMT_R16G16B16A16_FLOAT:
                     return TRUE;
                 default:
@@ -213,9 +200,9 @@
 }
 
-static HRESULT WINAPI IWineD3DVertexDeclarationImpl_SetDeclaration(IWineD3DVertexDeclaration *iface,
-        const WINED3DVERTEXELEMENT *elements, UINT element_count) {
-    IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
+HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *This,
+        const WINED3DVERTEXELEMENT *elements, UINT element_count)
+{
     HRESULT hr = WINED3D_OK;
-    int i, j;
+    unsigned int i;
     char isPreLoaded[MAX_STREAMS];
 
@@ -229,12 +216,10 @@
     }
 
-    This->declarationWNumElements = element_count;
-    This->pDeclarationWine = HeapAlloc(GetProcessHeap(), 0, sizeof(WINED3DVERTEXELEMENT) * element_count);
-    This->ffp_valid = HeapAlloc(GetProcessHeap(), 0, sizeof(*This->ffp_valid) * element_count);
-    if (!This->pDeclarationWine || !This->ffp_valid) {
+    This->element_count = element_count;
+    This->elements = HeapAlloc(GetProcessHeap(), 0, sizeof(*This->elements) * element_count);
+    if (!This->elements)
+    {
         ERR("Memory allocation failed\n");
         return WINED3DERR_OUTOFVIDEOMEMORY;
-    } else {
-        CopyMemory(This->pDeclarationWine, elements, sizeof(WINED3DVERTEXELEMENT) * element_count);
     }
 
@@ -245,65 +230,49 @@
     This->position_transformed = FALSE;
     for (i = 0; i < element_count; ++i) {
-        This->ffp_valid[i] = declaration_element_valid_ffp(&This->pDeclarationWine[i]);
-
-        if(This->pDeclarationWine[i].Usage == WINED3DDECLUSAGE_POSITIONT) {
-            This->position_transformed = TRUE;
-        }
+        struct wined3d_vertex_declaration_element *e = &This->elements[i];
+
+        e->format_desc = getFormatDescEntry(elements[i].format, &This->wineD3DDevice->adapter->gl_info);
+        e->ffp_valid = declaration_element_valid_ffp(&elements[i]);
+        e->input_slot = elements[i].input_slot;
+        e->offset = elements[i].offset;
+        e->output_slot = elements[i].output_slot;
+        e->method = elements[i].method;
+        e->usage = elements[i].usage;
+        e->usage_idx = elements[i].usage_idx;
+
+        if (e->usage == WINED3DDECLUSAGE_POSITIONT) This->position_transformed = TRUE;
 
         /* Find the Streams used in the declaration. The vertex buffers have to be loaded
          * when drawing, but filter tesselation pseudo streams
          */
-        if(This->pDeclarationWine[i].Stream >= MAX_STREAMS) continue;
-
-        if(This->pDeclarationWine[i].Type == WINED3DDECLTYPE_UNUSED) {
-            WARN("The application tries to use WINED3DDECLTYPE_UNUSED, returning E_FAIL\n");
-            /* The caller will release the vdecl, which will free This->pDeclarationWine */
+        if (e->input_slot >= MAX_STREAMS) continue;
+
+        if (!e->format_desc->gl_vtx_format)
+        {
+            FIXME("The application tries to use an unsupported format (%s), returning E_FAIL\n",
+                    debug_d3dformat(elements[i].format));
+            /* The caller will release the vdecl, which will free This->elements */
             return E_FAIL;
         }
 
-        if(This->pDeclarationWine[i].Offset & 0x3) {
-            WARN("Declaration element %d is not 4 byte aligned(%d), returning E_FAIL\n", i, This->pDeclarationWine[i].Offset);
+        if (e->offset & 0x3)
+        {
+            WARN("Declaration element %u is not 4 byte aligned(%u), returning E_FAIL\n", i, e->offset);
             return E_FAIL;
         }
 
-        if(!isPreLoaded[This->pDeclarationWine[i].Stream]) {
-            This->streams[This->num_streams] = This->pDeclarationWine[i].Stream;
+        if (!isPreLoaded[e->input_slot])
+        {
+            This->streams[This->num_streams] = e->input_slot;
             This->num_streams++;
-            isPreLoaded[This->pDeclarationWine[i].Stream] = 1;
-        }
-
-        /* Create a sorted array containing the attribute declarations that are of type
-         * D3DCOLOR. D3DCOLOR requires swizzling of the r and b component, and if the
-         * declaration of one attribute changes the vertex shader needs recompilation.
-         * Having a sorted array of the attributes allows efficient comparison of the
-         * declaration against a shader
-         */
-        if(This->pDeclarationWine[i].Type == WINED3DDECLTYPE_D3DCOLOR) {
-            for(j = 0; j < This->num_swizzled_attribs; j++) {
-                if(This->swizzled_attribs[j].usage >  This->pDeclarationWine[i].Usage ||
-                  (This->swizzled_attribs[j].usage == This->pDeclarationWine[i].Usage &&
-                   This->swizzled_attribs[j].idx   >   This->pDeclarationWine[i].UsageIndex)) {
-                    memmove(&This->swizzled_attribs[j + 1], &This->swizzled_attribs[j],
-                             sizeof(This->swizzled_attribs) - (sizeof(This->swizzled_attribs[0]) * (j + 1)));
-                    break;
-                }
-            }
-
-            This->swizzled_attribs[j].usage = This->pDeclarationWine[i].Usage;
-            This->swizzled_attribs[j].idx = This->pDeclarationWine[i].UsageIndex;
-            This->num_swizzled_attribs++;
-        } else if(This->pDeclarationWine[i].Type == WINED3DDECLTYPE_FLOAT16_2 ||
-                  This->pDeclarationWine[i].Type == WINED3DDECLTYPE_FLOAT16_4) {
-            if(!GL_SUPPORT(NV_HALF_FLOAT)) {
-                This->half_float_conv_needed = TRUE;
-            }
-        }
-    }
-
-    TRACE("Swizzled attributes found:\n");
-    for(i = 0; i < This->num_swizzled_attribs; i++) {
-        TRACE("%u: %s%d\n", i,
-              debug_d3ddeclusage(This->swizzled_attribs[i].usage), This->swizzled_attribs[i].idx);
-    }
+            isPreLoaded[e->input_slot] = 1;
+        }
+
+        if (elements[i].format == WINED3DFMT_R16G16_FLOAT || elements[i].format == WINED3DFMT_R16G16B16A16_FLOAT)
+        {
+            if (!GL_SUPPORT(ARB_HALF_FLOAT_VERTEX)) This->half_float_conv_needed = TRUE;
+        }
+    }
+
     TRACE("Returning\n");
     return hr;
@@ -319,5 +288,3 @@
     IWineD3DVertexDeclarationImpl_GetParent,
     IWineD3DVertexDeclarationImpl_GetDevice,
-    IWineD3DVertexDeclarationImpl_GetDeclaration,
-    IWineD3DVertexDeclarationImpl_SetDeclaration
 };
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexshader.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexshader.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vertexshader.c	(revision 19678)
@@ -44,133 +44,69 @@
 #define GLINFO_LOCATION ((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info
 
-/* TODO: Vertex and Pixel shaders are almost identical, the only exception being the way that some of the data is looked up or the availability of some of the data i.e. some instructions are only valid for pshaders and some for vshaders
-because of this the bulk of the software pipeline can be shared between pixel and vertex shaders... and it wouldn't surprise me if the program can be cross compiled using a large body of shared code */
-
-#define GLNAME_REQUIRE_GLSL  ((const char *)1)
-
-CONST SHADER_OPCODE IWineD3DVertexShaderImpl_shader_ins[] = {
-    /* This table is not order or position dependent. */
-
-    /* Arithmetic */
-    {WINED3DSIO_NOP,     "nop",     "NOP",               0, 0, WINED3DSIH_NOP,     0,                      0                     },
-    {WINED3DSIO_MOV,     "mov",     "MOV",               1, 2, WINED3DSIH_MOV,     0,                      0                     },
-    {WINED3DSIO_MOVA,    "mova",    NULL,                1, 2, WINED3DSIH_MOVA,    WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_ADD,     "add",     "ADD",               1, 3, WINED3DSIH_ADD,     0,                      0                     },
-    {WINED3DSIO_SUB,     "sub",     "SUB",               1, 3, WINED3DSIH_SUB,     0,                      0                     },
-    {WINED3DSIO_MAD,     "mad",     "MAD",               1, 4, WINED3DSIH_MAD,     0,                      0                     },
-    {WINED3DSIO_MUL,     "mul",     "MUL",               1, 3, WINED3DSIH_MUL,     0,                      0                     },
-    {WINED3DSIO_RCP,     "rcp",     "RCP",               1, 2, WINED3DSIH_RCP,     0,                      0                     },
-    {WINED3DSIO_RSQ,     "rsq",     "RSQ",               1, 2, WINED3DSIH_RSQ,     0,                      0                     },
-    {WINED3DSIO_DP3,     "dp3",     "DP3",               1, 3, WINED3DSIH_DP3,     0,                      0                     },
-    {WINED3DSIO_DP4,     "dp4",     "DP4",               1, 3, WINED3DSIH_DP4,     0,                      0                     },
-    {WINED3DSIO_MIN,     "min",     "MIN",               1, 3, WINED3DSIH_MIN,     0,                      0                     },
-    {WINED3DSIO_MAX,     "max",     "MAX",               1, 3, WINED3DSIH_MAX,     0,                      0                     },
-    {WINED3DSIO_SLT,     "slt",     "SLT",               1, 3, WINED3DSIH_SLT,     0,                      0                     },
-    {WINED3DSIO_SGE,     "sge",     "SGE",               1, 3, WINED3DSIH_SGE,     0,                      0                     },
-    {WINED3DSIO_ABS,     "abs",     "ABS",               1, 2, WINED3DSIH_ABS,     0,                      0                     },
-    {WINED3DSIO_EXP,     "exp",     "EX2",               1, 2, WINED3DSIH_EXP,     0,                      0                     },
-    {WINED3DSIO_LOG,     "log",     "LG2",               1, 2, WINED3DSIH_LOG,     0,                      0                     },
-    {WINED3DSIO_EXPP,    "expp",    "EXP",               1, 2, WINED3DSIH_EXPP,    0,                      0                     },
-    {WINED3DSIO_LOGP,    "logp",    "LOG",               1, 2, WINED3DSIH_LOGP,    0,                      0                     },
-    {WINED3DSIO_LIT,     "lit",     "LIT",               1, 2, WINED3DSIH_LIT,     0,                      0                     },
-    {WINED3DSIO_DST,     "dst",     "DST",               1, 3, WINED3DSIH_DST,     0,                      0                     },
-    {WINED3DSIO_LRP,     "lrp",     "LRP",               1, 4, WINED3DSIH_LRP,     0,                      0                     },
-    {WINED3DSIO_FRC,     "frc",     "FRC",               1, 2, WINED3DSIH_FRC,     0,                      0                     },
-    {WINED3DSIO_POW,     "pow",     "POW",               1, 3, WINED3DSIH_POW,     0,                      0                     },
-    {WINED3DSIO_CRS,     "crs",     "XPD",               1, 3, WINED3DSIH_CRS,     0,                      0                     },
-    /* TODO: sng can possibly be performed a  s
-        RCP tmp, vec
-        MUL out, tmp, vec*/
-    {WINED3DSIO_SGN,     "sgn",     NULL,                1, 2, WINED3DSIH_SGN,     0,                      0                     },
-    {WINED3DSIO_NRM,     "nrm",     NULL,                1, 2, WINED3DSIH_NRM,     0,                      0                     },
-    {WINED3DSIO_SINCOS,  "sincos",  NULL,                1, 4, WINED3DSIH_SINCOS,  WINED3DVS_VERSION(2,0), WINED3DVS_VERSION(2,1)},
-    {WINED3DSIO_SINCOS,  "sincos",  "SCS",               1, 2, WINED3DSIH_SINCOS,  WINED3DVS_VERSION(3,0), -1                    },
-    /* Matrix */
-    {WINED3DSIO_M4x4,    "m4x4",    "undefined",         1, 3, WINED3DSIH_M4x4,    0,                      0                     },
-    {WINED3DSIO_M4x3,    "m4x3",    "undefined",         1, 3, WINED3DSIH_M4x3,    0,                      0                     },
-    {WINED3DSIO_M3x4,    "m3x4",    "undefined",         1, 3, WINED3DSIH_M3x4,    0,                      0                     },
-    {WINED3DSIO_M3x3,    "m3x3",    "undefined",         1, 3, WINED3DSIH_M3x3,    0,                      0                     },
-    {WINED3DSIO_M3x2,    "m3x2",    "undefined",         1, 3, WINED3DSIH_M3x2,    0,                      0                     },
-    /* Declare registers */
-    {WINED3DSIO_DCL,     "dcl",     NULL,                0, 2, WINED3DSIH_DCL,     0,                      0                     },
-    /* Constant definitions */
-    {WINED3DSIO_DEF,     "def",     NULL,                1, 5, WINED3DSIH_DEF,     0,                      0                     },
-    {WINED3DSIO_DEFB,    "defb",    GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_DEFB,    0,                      0                     },
-    {WINED3DSIO_DEFI,    "defi",    GLNAME_REQUIRE_GLSL, 1, 5, WINED3DSIH_DEFI,    0,                      0                     },
-    /* Flow control - requires GLSL or software shaders */
-    {WINED3DSIO_REP ,    "rep",     NULL,                0, 1, WINED3DSIH_REP,     WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_ENDREP,  "endrep",  NULL,                0, 0, WINED3DSIH_ENDREP,  WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_IF,      "if",      NULL,                0, 1, WINED3DSIH_IF,      WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_IFC,     "ifc",     NULL,                0, 2, WINED3DSIH_IFC,     WINED3DVS_VERSION(2,1), -1                    },
-    {WINED3DSIO_ELSE,    "else",    NULL,                0, 0, WINED3DSIH_ELSE,    WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_ENDIF,   "endif",   NULL,                0, 0, WINED3DSIH_ENDIF,   WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_BREAK,   "break",   NULL,                0, 0, WINED3DSIH_BREAK,   WINED3DVS_VERSION(2,1), -1                    },
-    {WINED3DSIO_BREAKC,  "breakc",  NULL,                0, 2, WINED3DSIH_BREAKC,  WINED3DVS_VERSION(2,1), -1                    },
-    {WINED3DSIO_BREAKP,  "breakp",  GLNAME_REQUIRE_GLSL, 0, 1, WINED3DSIH_BREAKP,  0,                      0                     },
-    {WINED3DSIO_CALL,    "call",    NULL,                0, 1, WINED3DSIH_CALL,    WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_CALLNZ,  "callnz",  NULL,                0, 2, WINED3DSIH_CALLNZ,  WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_LOOP,    "loop",    NULL,                0, 2, WINED3DSIH_LOOP,    WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_RET,     "ret",     NULL,                0, 0, WINED3DSIH_RET,     WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_ENDLOOP, "endloop", NULL,                0, 0, WINED3DSIH_ENDLOOP, WINED3DVS_VERSION(2,0), -1                    },
-    {WINED3DSIO_LABEL,   "label",   NULL,                0, 1, WINED3DSIH_LABEL,   WINED3DVS_VERSION(2,0), -1                    },
-
-    {WINED3DSIO_SETP,    "setp",    GLNAME_REQUIRE_GLSL, 1, 3, WINED3DSIH_SETP,    0,                      0                     },
-    {WINED3DSIO_TEXLDL,  "texldl",  NULL,                1, 3, WINED3DSIH_TEXLDL,  WINED3DVS_VERSION(3,0), -1                    },
-    {0,                  NULL,      NULL,                0, 0, 0,                  0,                      0                     }
-};
-
-static void vshader_set_limits(
-      IWineD3DVertexShaderImpl *This) {
-
-      This->baseShader.limits.texcoord = 0;
-      This->baseShader.limits.attributes = 16;
-      This->baseShader.limits.packed_input = 0;
-
-      /* Must match D3DCAPS9.MaxVertexShaderConst: at least 256 for vs_2_0 */
-      This->baseShader.limits.constant_float = GL_LIMITS(vshader_constantsF);
-
-      switch (This->baseShader.hex_version) {
-          case WINED3DVS_VERSION(1,0):
-          case WINED3DVS_VERSION(1,1):
-                   This->baseShader.limits.temporary = 12;
-                   This->baseShader.limits.constant_bool = 0;
-                   This->baseShader.limits.constant_int = 0;
-                   This->baseShader.limits.address = 1;
-                   This->baseShader.limits.packed_output = 0;
-                   This->baseShader.limits.sampler = 0;
-                   This->baseShader.limits.label = 0;
-                   break;
-      
-          case WINED3DVS_VERSION(2,0):
-          case WINED3DVS_VERSION(2,1):
-                   This->baseShader.limits.temporary = 12;
-                   This->baseShader.limits.constant_bool = 16;
-                   This->baseShader.limits.constant_int = 16;
-                   This->baseShader.limits.address = 1;
-                   This->baseShader.limits.packed_output = 0;
-                   This->baseShader.limits.sampler = 0;
-                   This->baseShader.limits.label = 16;
-                   break;
-
-          case WINED3DVS_VERSION(3,0):
-                   This->baseShader.limits.temporary = 32;
-                   This->baseShader.limits.constant_bool = 32;
-                   This->baseShader.limits.constant_int = 32;
-                   This->baseShader.limits.address = 1;
-                   This->baseShader.limits.packed_output = 12;
-                   This->baseShader.limits.sampler = 4;
-                   This->baseShader.limits.label = 16; /* FIXME: 2048 */
-                   break;
-
-          default: This->baseShader.limits.temporary = 12;
-                   This->baseShader.limits.constant_bool = 16;
-                   This->baseShader.limits.constant_int = 16;
-                   This->baseShader.limits.address = 1;
-                   This->baseShader.limits.packed_output = 0;
-                   This->baseShader.limits.sampler = 0;
-                   This->baseShader.limits.label = 16;
-                   FIXME("Unrecognized vertex shader version %#x\n",
-                       This->baseShader.hex_version);
-      }
+static void vshader_set_limits(IWineD3DVertexShaderImpl *This)
+{
+    DWORD shader_version = WINED3D_SHADER_VERSION(This->baseShader.reg_maps.shader_version.major,
+            This->baseShader.reg_maps.shader_version.minor);
+
+    This->baseShader.limits.texcoord = 0;
+    This->baseShader.limits.attributes = 16;
+    This->baseShader.limits.packed_input = 0;
+
+    switch (shader_version)
+    {
+        case WINED3D_SHADER_VERSION(1,0):
+        case WINED3D_SHADER_VERSION(1,1):
+            This->baseShader.limits.temporary = 12;
+            This->baseShader.limits.constant_bool = 0;
+            This->baseShader.limits.constant_int = 0;
+            This->baseShader.limits.address = 1;
+            This->baseShader.limits.packed_output = 0;
+            This->baseShader.limits.sampler = 0;
+            This->baseShader.limits.label = 0;
+            /* TODO: vs_1_1 has a minimum of 96 constants. What happens if a vs_1_1 shader is used
+             * on a vs_3_0 capable card that has 256 constants? */
+            This->baseShader.limits.constant_float = min(256, GL_LIMITS(vshader_constantsF));
+            break;
+
+        case WINED3D_SHADER_VERSION(2,0):
+        case WINED3D_SHADER_VERSION(2,1):
+            This->baseShader.limits.temporary = 12;
+            This->baseShader.limits.constant_bool = 16;
+            This->baseShader.limits.constant_int = 16;
+            This->baseShader.limits.address = 1;
+            This->baseShader.limits.packed_output = 0;
+            This->baseShader.limits.sampler = 0;
+            This->baseShader.limits.label = 16;
+            This->baseShader.limits.constant_float = min(256, GL_LIMITS(vshader_constantsF));
+            break;
+
+        case WINED3D_SHADER_VERSION(3,0):
+            This->baseShader.limits.temporary = 32;
+            This->baseShader.limits.constant_bool = 32;
+            This->baseShader.limits.constant_int = 32;
+            This->baseShader.limits.address = 1;
+            This->baseShader.limits.packed_output = 12;
+            This->baseShader.limits.sampler = 4;
+            This->baseShader.limits.label = 16; /* FIXME: 2048 */
+            /* DX10 cards on Windows advertise a d3d9 constant limit of 256 even though they are capable
+             * of supporting much more(GL drivers advertise 1024). d3d9.dll and d3d8.dll clamp the
+             * wined3d-advertised maximum. Clamp the constant limit for <= 3.0 shaders to 256.s
+             * use constant buffers */
+            This->baseShader.limits.constant_float = min(256, GL_LIMITS(vshader_constantsF));
+            break;
+
+        default:
+            This->baseShader.limits.temporary = 12;
+            This->baseShader.limits.constant_bool = 16;
+            This->baseShader.limits.constant_int = 16;
+            This->baseShader.limits.address = 1;
+            This->baseShader.limits.packed_output = 0;
+            This->baseShader.limits.sampler = 0;
+            This->baseShader.limits.label = 16;
+            This->baseShader.limits.constant_float = min(256, GL_LIMITS(vshader_constantsF));
+            FIXME("Unrecognized vertex shader version %u.%u\n",
+                    This->baseShader.reg_maps.shader_version.major,
+                    This->baseShader.reg_maps.shader_version.minor);
+    }
 }
 
@@ -185,14 +121,12 @@
     BYTE usage, BYTE usage_idx) {
 
-    /* Fake usage: set reserved bit, usage, usage_idx */
-    DWORD usage_token = (0x1 << 31) |
-        (usage << WINED3DSP_DCL_USAGE_SHIFT) | (usage_idx << WINED3DSP_DCL_USAGEINDEX_SHIFT);
-
-    /* Fake register; set reserved bit, regnum, type: input, wmask: all */
-    DWORD reg_token = (0x1 << 31) |
-        WINED3DSP_WRITEMASK_ALL | (WINED3DSPR_INPUT << WINED3DSP_REGTYPE_SHIFT) | regnum;
-
-    This->semantics_in[regnum].usage = usage_token;
-    This->semantics_in[regnum].reg = reg_token;
+    This->semantics_in[regnum].usage = usage;
+    This->semantics_in[regnum].usage_idx = usage_idx;
+    This->semantics_in[regnum].reg.reg.type = WINED3DSPR_INPUT;
+    This->semantics_in[regnum].reg.reg.idx = regnum;
+    This->semantics_in[regnum].reg.write_mask = WINED3DSP_WRITEMASK_ALL;
+    This->semantics_in[regnum].reg.modifiers = 0;
+    This->semantics_in[regnum].reg.shift = 0;
+    This->semantics_in[regnum].reg.reg.rel_addr = NULL;
 }
 
@@ -215,9 +149,9 @@
 
     for (i = 0; i < MAX_ATTRIBS; i++) {
-        DWORD usage_token = This->semantics_in[i].usage;
-        DWORD usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-        DWORD usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-
-        if (usage_token && match_usage(usage, usage_idx, usage_req, usage_idx_req)) {
+        if (!This->baseShader.reg_maps.attributes[i]) continue;
+
+        if (match_usage(This->semantics_in[i].usage,
+                This->semantics_in[i].usage_idx, usage_req, usage_idx_req))
+        {
             *regnum = i;
             return TRUE;
@@ -225,135 +159,4 @@
     }
     return FALSE;
-}
-
-BOOL vshader_input_is_color(
-    IWineD3DVertexShader* iface,
-    unsigned int regnum) {
-
-    IWineD3DVertexShaderImpl* This = (IWineD3DVertexShaderImpl*) iface;
-
-    DWORD usage_token = This->semantics_in[regnum].usage;
-    DWORD usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-    DWORD usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-
-    int i;
-
-    for(i = 0; i < This->num_swizzled_attribs; i++) {
-        if(This->swizzled_attribs[i].usage == usage &&
-           This->swizzled_attribs[i].idx == usage_idx) {
-            return TRUE;
-        }
-    }
-    return FALSE;
-}
-
-static inline void find_swizzled_attribs(IWineD3DVertexDeclaration *declaration, IWineD3DVertexShaderImpl *This) {
-    UINT num = 0, i, j;
-    UINT numoldswizzles = This->num_swizzled_attribs;
-    IWineD3DVertexDeclarationImpl *decl = (IWineD3DVertexDeclarationImpl *) declaration;
-
-    DWORD usage_token, usage, usage_idx;
-    BOOL found;
-
-    attrib_declaration oldswizzles[sizeof(This->swizzled_attribs) / sizeof(This->swizzled_attribs[0])];
-
-    /* Back up the old swizzles to keep attributes that are undefined in the current declaration */
-    memcpy(oldswizzles, This->swizzled_attribs, sizeof(oldswizzles));
-
-    memset(This->swizzled_attribs, 0, sizeof(This->swizzled_attribs[0]) * MAX_ATTRIBS);
-
-    for(i = 0; i < decl->num_swizzled_attribs; i++) {
-        for(j = 0; j < MAX_ATTRIBS; j++) {
-
-            if(!This->baseShader.reg_maps.attributes[j]) continue;
-
-            usage_token = This->semantics_in[j].usage;
-            usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-            usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-
-            if(decl->swizzled_attribs[i].usage == usage &&
-               decl->swizzled_attribs[i].idx == usage_idx) {
-                This->swizzled_attribs[num].usage = usage;
-                This->swizzled_attribs[num].idx = usage_idx;
-                num++;
-            }
-        }
-    }
-
-    /* Add previously converted attributes back in if they are not defined in the current declaration */
-    for(i = 0; i < numoldswizzles; i++) {
-
-        found = FALSE;
-        for(j = 0; j < decl->declarationWNumElements; j++) {
-            if(oldswizzles[i].usage == decl->pDeclarationWine[j].Usage &&
-               oldswizzles[i].idx == decl->pDeclarationWine[j].UsageIndex) {
-                found = TRUE;
-            }
-        }
-        if(found) {
-            /* This previously converted attribute is declared in the current declaration. Either it is
-             * already in the new array, or it should not be there. Skip it
-             */
-            continue;
-        }
-        /* We have a previously swizzled attribute that is not defined by the current vertex declaration.
-         * Insert it into the new conversion array to keep it in the old defined state. Otherwise we end up
-         * recompiling if the old decl is used again because undefined attributes are reset to no swizzling.
-         * In the reverse way(attribute was not swizzled and is not declared in new declaration) the attrib
-         * stays unswizzled as well because it isn't found in the oldswizzles array
-         */
-        for(j = 0; j < num; j++) {
-            if(oldswizzles[i].usage > This->swizzled_attribs[j].usage || (
-               oldswizzles[i].usage == This->swizzled_attribs[j].usage &&
-               oldswizzles[i].idx > This->swizzled_attribs[j].idx)) {
-                memmove(&This->swizzled_attribs[j + 1], &This->swizzled_attribs[j],
-                         sizeof(This->swizzled_attribs) - (sizeof(This->swizzled_attribs[0]) * (j + 1)));
-                break;
-            }
-        }
-        This->swizzled_attribs[j].usage = oldswizzles[i].usage;
-        This->swizzled_attribs[j].idx = oldswizzles[i].idx;
-        num++;
-    }
-
-    TRACE("New swizzled attributes array\n");
-    for(i = 0; i < num; i++) {
-        TRACE("%d: %s(%d), %d\n", i, debug_d3ddeclusage(This->swizzled_attribs[i].usage),
-              This->swizzled_attribs[i].usage, This->swizzled_attribs[i].idx);
-    }
-    This->num_swizzled_attribs = num;
-}
-/** Generate a vertex shader string using either GL_VERTEX_PROGRAM_ARB
-    or GLSL and send it to the card */
-static void IWineD3DVertexShaderImpl_GenerateShader(IWineD3DVertexShader *iface,
-        const struct shader_reg_maps* reg_maps, const DWORD *pFunction)
-{
-    IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
-    IWineD3DVertexDeclaration *decl = ((IWineD3DDeviceImpl *) This->baseShader.device)->stateBlock->vertexDecl;
-    SHADER_BUFFER buffer;
-
-    find_swizzled_attribs(decl, This);
-
-#if 0 /* FIXME: Use the buffer that is held by the device, this is ok since fixups will be skipped for software shaders
-        it also requires entering a critical section but cuts down the runtime footprint of wined3d and any memory fragmentation that may occur... */
-    if (This->device->fixupVertexBufferSize < SHADER_PGMSIZE) {
-        HeapFree(GetProcessHeap(), 0, This->fixupVertexBuffer);
-        This->fixupVertexBuffer = HeapAlloc(GetProcessHeap() , 0, SHADER_PGMSIZE);
-        This->fixupVertexBufferSize = PGMSIZE;
-        This->fixupVertexBuffer[0] = 0;
-    }
-    buffer.buffer = This->device->fixupVertexBuffer;
-#else
-    buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE); 
-#endif
-    buffer.bsize = 0;
-    buffer.lineNo = 0;
-    buffer.newline = TRUE;
-
-    ((IWineD3DDeviceImpl *)This->baseShader.device)->shader_backend->shader_generate_vshader(iface, &buffer);
-
-#if 1 /* if were using the data buffer of device then we don't need to free it */
-  HeapFree(GetProcessHeap(), 0, buffer.buffer);
-#endif
 }
 
@@ -362,13 +165,44 @@
    ******************************************* */
 static HRESULT  WINAPI IWineD3DVertexShaderImpl_QueryInterface(IWineD3DVertexShader *iface, REFIID riid, LPVOID *ppobj) {
-    return IWineD3DBaseShaderImpl_QueryInterface((IWineD3DBaseShader *) iface, riid, ppobj);
+    TRACE("iface %p, riid %s, ppobj %p\n", iface, debugstr_guid(riid), ppobj);
+
+    if (IsEqualGUID(riid, &IID_IWineD3DVertexShader)
+            || IsEqualGUID(riid, &IID_IWineD3DBaseShader)
+            || IsEqualGUID(riid, &IID_IWineD3DBase)
+            || IsEqualGUID(riid, &IID_IUnknown))
+    {
+        IUnknown_AddRef(iface);
+        *ppobj = iface;
+        return S_OK;
+    }
+
+    WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
+
+    *ppobj = NULL;
+    return E_NOINTERFACE;
 }
 
 static ULONG  WINAPI IWineD3DVertexShaderImpl_AddRef(IWineD3DVertexShader *iface) {
-    return IWineD3DBaseShaderImpl_AddRef((IWineD3DBaseShader *) iface);
+    IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
+    ULONG refcount = InterlockedIncrement(&This->baseShader.ref);
+
+    TRACE("%p increasing refcount to %u\n", This, refcount);
+
+    return refcount;
 }
 
 static ULONG WINAPI IWineD3DVertexShaderImpl_Release(IWineD3DVertexShader *iface) {
-    return IWineD3DBaseShaderImpl_Release((IWineD3DBaseShader *) iface);
+    IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
+    ULONG refcount = InterlockedDecrement(&This->baseShader.ref);
+
+    TRACE("%p decreasing refcount to %u\n", This, refcount);
+
+    if (!refcount)
+    {
+        shader_cleanup((IWineD3DBaseShader *)iface);
+        HeapFree(GetProcessHeap(), 0, This);
+    }
+
+    return refcount;
 }
 
@@ -408,14 +242,8 @@
         return WINED3DERR_INVALIDCALL;
     }
-    if (NULL == This->baseShader.function) { /* no function defined */
-        TRACE("(%p) : GetFunction no User Function defined using NULL to %p\n", This, pData);
-        (*(DWORD **) pData) = NULL;
-    } else {
-        if(This->baseShader.functionLength == 0){
-
-        }
-        TRACE("(%p) : GetFunction copying to %p\n", This, pData);
-        memcpy(pData, This->baseShader.function, This->baseShader.functionLength);
-    }
+
+    TRACE("(%p) : GetFunction copying to %p\n", This, pData);
+    memcpy(pData, This->baseShader.function, This->baseShader.functionLength);
+
     return WINED3D_OK;
 }
@@ -429,4 +257,5 @@
     IWineD3DVertexShaderImpl *This =(IWineD3DVertexShaderImpl *)iface;
     IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *) This->baseShader.device;
+    const struct wined3d_shader_frontend *fe;
     HRESULT hr;
     shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
@@ -434,7 +263,20 @@
     TRACE("(%p) : pFunction %p\n", iface, pFunction);
 
+    fe = shader_select_frontend(*pFunction);
+    if (!fe)
+    {
+        FIXME("Unable to find frontend for shader.\n");
+        return WINED3DERR_INVALIDCALL;
+    }
+    This->baseShader.frontend = fe;
+    This->baseShader.frontend_data = fe->shader_init(pFunction);
+    if (!This->baseShader.frontend_data)
+    {
+        FIXME("Failed to initialize frontend.\n");
+        return WINED3DERR_INVALIDCALL;
+    }
+
     /* First pass: trace shader */
-    shader_trace_init((IWineD3DBaseShader*) This, pFunction);
-    vshader_set_limits(This);
+    if (TRACE_ON(d3d_shader)) shader_trace_init(fe, This->baseShader.frontend_data, pFunction);
 
     /* Initialize immediate constant lists */
@@ -446,10 +288,10 @@
     This->min_rel_offset = GL_LIMITS(vshader_constantsF);
     This->max_rel_offset = 0;
-    memset(reg_maps, 0, sizeof(shader_reg_maps));
-    hr = shader_get_registers_used((IWineD3DBaseShader*) This, reg_maps,
-       This->semantics_in, This->semantics_out, pFunction, NULL);
+    hr = shader_get_registers_used((IWineD3DBaseShader*) This, fe,
+            reg_maps, This->semantics_in, This->semantics_out, pFunction,
+            GL_LIMITS(vshader_constantsF));
     if (hr != WINED3D_OK) return hr;
 
-    This->baseShader.shader_mode = deviceImpl->vs_selected_mode;
+    vshader_set_limits(This);
 
     if(deviceImpl->vs_selected_mode == SHADER_ARB &&
@@ -472,14 +314,7 @@
 
     /* copy the function ... because it will certainly be released by application */
-    if (NULL != pFunction) {
-        void *function;
-
-        function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
-        if (!function) return E_OUTOFMEMORY;
-        memcpy(function, pFunction, This->baseShader.functionLength);
-        This->baseShader.function = function;
-    } else {
-        This->baseShader.function = NULL;
-    }
+    This->baseShader.function = HeapAlloc(GetProcessHeap(), 0, This->baseShader.functionLength);
+    if (!This->baseShader.function) return E_OUTOFMEMORY;
+    memcpy(This->baseShader.function, pFunction, This->baseShader.functionLength);
 
     return WINED3D_OK;
@@ -491,8 +326,9 @@
     IWineD3DVertexDeclarationImpl* vdecl = (IWineD3DVertexDeclarationImpl*)vertex_declaration;
 
-    int i;
-    for (i = 0; i < vdecl->declarationWNumElements - 1; ++i) {
-        const WINED3DVERTEXELEMENT *element = vdecl->pDeclarationWine + i;
-        vshader_set_input(This, element->Reg, element->Usage, element->UsageIndex);
+    unsigned int i;
+    for (i = 0; i < vdecl->element_count; ++i)
+    {
+        const struct wined3d_vertex_declaration_element *e = &vdecl->elements[i];
+        vshader_set_input(This, e->output_slot, e->usage, e->usage_idx);
     }
 }
@@ -524,102 +360,18 @@
 }
 
-static inline BOOL swizzled_attribs_differ(IWineD3DVertexShaderImpl *This, IWineD3DVertexDeclarationImpl *vdecl) {
-    UINT i, j, k;
-    BOOL found;
-
-    DWORD usage_token;
-    DWORD usage;
-    DWORD usage_idx;
-
-    for(i = 0; i < vdecl->declarationWNumElements; i++) {
-        /* Ignore tesselated streams and the termination entry(position0, stream 255, unused) */
-        if(vdecl->pDeclarationWine[i].Stream >= MAX_STREAMS ||
-           vdecl->pDeclarationWine[i].Type == WINED3DDECLTYPE_UNUSED) continue;
-
-        for(j = 0; j < MAX_ATTRIBS; j++) {
-            if(!This->baseShader.reg_maps.attributes[j]) continue;
-
-            usage_token = This->semantics_in[j].usage;
-            usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
-            usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
-
-            if(vdecl->pDeclarationWine[i].Usage != usage ||
-               vdecl->pDeclarationWine[i].UsageIndex != usage_idx) {
-                continue;
-            }
-
-            found = FALSE;
-            for(k = 0; k < This->num_swizzled_attribs; k++) {
-                if(This->swizzled_attribs[k].usage == usage &&
-                    This->swizzled_attribs[k].idx == usage_idx) {
-                    found = TRUE;
-                }
-            }
-            if(!found && vdecl->pDeclarationWine[i].Type == WINED3DDECLTYPE_D3DCOLOR) {
-                TRACE("Attribute %s%d is D3DCOLOR now but wasn't before\n",
-                      debug_d3ddeclusage(usage), usage_idx);
-                return TRUE;
-            }
-            if( found && vdecl->pDeclarationWine[i].Type != WINED3DDECLTYPE_D3DCOLOR) {
-                TRACE("Attribute %s%d was D3DCOLOR before but is not any more\n",
-                      debug_d3ddeclusage(usage), usage_idx);
-                return TRUE;
-            }
-        }
-    }
-    return FALSE;
-}
-
-HRESULT IWineD3DVertexShaderImpl_CompileShader(IWineD3DVertexShader *iface) {
-    IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
-    IWineD3DVertexDeclarationImpl *vdecl;
-    CONST DWORD *function = This->baseShader.function;
+static GLuint vertexshader_compile(IWineD3DVertexShaderImpl *This, const struct vs_compile_args *args) {
     IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *) This->baseShader.device;
-
-    TRACE("(%p) : function %p\n", iface, function);
-
-    /* We're already compiled. */
-    if (This->baseShader.is_compiled) {
-        vdecl = (IWineD3DVertexDeclarationImpl *) deviceImpl->stateBlock->vertexDecl;
-
-        if(This->num_swizzled_attribs != vdecl->num_swizzled_attribs ||
-           memcmp(This->swizzled_attribs, vdecl->swizzled_attribs, sizeof(vdecl->swizzled_attribs[0]) * This->num_swizzled_attribs) != 0) {
-
-            /* The swizzled attributes differ between shader and declaration. This doesn't necessarily mean
-             * we have to recompile, but we have to take a deeper look at see if the attribs that differ
-             * are declared in the decl and used in the shader
-             */
-            if(swizzled_attribs_differ(This, vdecl)) {
-                WARN("Recompiling vertex shader %p due to D3DCOLOR input changes\n", This);
-                goto recompile;
-            }
-            WARN("Swizzled attribute validation required an expensive comparison\n");
-        }
-
-        return WINED3D_OK;
-
-        recompile:
-        if(This->recompile_count < 50) {
-            This->recompile_count++;
-        } else {
-            FIXME("Vertexshader %p recompiled more than 50 times\n", This);
-        }
-
-        deviceImpl->shader_backend->shader_destroy((IWineD3DBaseShader *) iface);
-    }
-
-    /* We don't need to compile */
-    if (!function) {
-        This->baseShader.is_compiled = TRUE;
-        return WINED3D_OK;
-    }
+    SHADER_BUFFER buffer;
+    GLuint ret;
 
     /* Generate the HW shader */
     TRACE("(%p) : Generating hardware program\n", This);
-    IWineD3DVertexShaderImpl_GenerateShader(iface, &This->baseShader.reg_maps, function);
-
-    This->baseShader.is_compiled = TRUE;
-
-    return WINED3D_OK;
+    shader_buffer_init(&buffer);
+    This->cur_args = args;
+    ret = deviceImpl->shader_backend->shader_generate_vshader((IWineD3DVertexShader *)This, &buffer, args);
+    This->cur_args = NULL;
+    shader_buffer_free(&buffer);
+
+    return ret;
 }
 
@@ -640,2 +392,56 @@
     IWIneD3DVertexShaderImpl_SetLocalConstantsF
 };
+
+void find_vs_compile_args(IWineD3DVertexShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct vs_compile_args *args) {
+    args->fog_src = stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE ? VS_FOG_COORD : VS_FOG_Z;
+    args->swizzle_map = ((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.swizzle_map;
+}
+
+static inline BOOL vs_args_equal(const struct vs_compile_args *stored, const struct vs_compile_args *new,
+                                 const DWORD use_map) {
+    if((stored->swizzle_map & use_map) != new->swizzle_map) return FALSE;
+    return stored->fog_src == new->fog_src;
+}
+
+GLuint find_gl_vshader(IWineD3DVertexShaderImpl *shader, const struct vs_compile_args *args)
+{
+    UINT i;
+    DWORD new_size = shader->shader_array_size;
+    struct vs_compiled_shader *new_array;
+    DWORD use_map = ((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.use_map;
+
+    /* Usually we have very few GL shaders for each d3d shader(just 1 or maybe 2),
+     * so a linear search is more performant than a hashmap or a binary search
+     * (cache coherency etc)
+     */
+    for(i = 0; i < shader->num_gl_shaders; i++) {
+        if(vs_args_equal(&shader->gl_shaders[i].args, args, use_map)) {
+            return shader->gl_shaders[i].prgId;
+        }
+    }
+
+    TRACE("No matching GL shader found, compiling a new shader\n");
+
+    if(shader->shader_array_size == shader->num_gl_shaders) {
+        if (shader->num_gl_shaders)
+        {
+            new_size = shader->shader_array_size + max(1, shader->shader_array_size / 2);
+            new_array = HeapReAlloc(GetProcessHeap(), 0, shader->gl_shaders,
+                                    new_size * sizeof(*shader->gl_shaders));
+        } else {
+            new_array = HeapAlloc(GetProcessHeap(), 0, sizeof(*shader->gl_shaders));
+            new_size = 1;
+        }
+
+        if(!new_array) {
+            ERR("Out of memory\n");
+            return 0;
+        }
+        shader->gl_shaders = new_array;
+        shader->shader_array_size = new_size;
+    }
+
+    shader->gl_shaders[shader->num_gl_shaders].args = *args;
+    shader->gl_shaders[shader->num_gl_shaders].prgId = vertexshader_compile(shader, args);
+    return shader->gl_shaders[shader->num_gl_shaders++].prgId;
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/view.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/view.c	(revision 19678)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/view.c	(revision 19678)
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2009 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+/*
+ * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
+ * other than GPL or LGPL is available it will apply instead, Sun elects to use only
+ * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
+ * a choice of LGPL license versions is made available with the language indicating
+ * that LGPLv2 or any later version may be used, or where a choice of which version
+ * of the LGPL is applied is otherwise unspecified.
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include "wined3d_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3d);
+
+/* IUnknown methods */
+
+static HRESULT STDMETHODCALLTYPE rendertarget_view_QueryInterface(IWineD3DRendertargetView *iface,
+        REFIID riid, void **object)
+{
+    TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
+
+    if (IsEqualGUID(riid, &IID_IWineD3DRendertargetView)
+            || IsEqualGUID(riid, &IID_IWineD3DBase)
+            || IsEqualGUID(riid, &IID_IUnknown))
+    {
+        IUnknown_AddRef(iface);
+        *object = iface;
+        return S_OK;
+    }
+
+    WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
+
+    *object = NULL;
+    return E_NOINTERFACE;
+}
+
+static ULONG STDMETHODCALLTYPE rendertarget_view_AddRef(IWineD3DRendertargetView *iface)
+{
+    struct wined3d_rendertarget_view *This = (struct wined3d_rendertarget_view *)iface;
+    ULONG refcount = InterlockedIncrement(&This->refcount);
+
+    TRACE("%p increasing refcount to %u\n", This, refcount);
+
+    return refcount;
+}
+
+static ULONG STDMETHODCALLTYPE rendertarget_view_Release(IWineD3DRendertargetView *iface)
+{
+    struct wined3d_rendertarget_view *This = (struct wined3d_rendertarget_view *)iface;
+    ULONG refcount = InterlockedDecrement(&This->refcount);
+
+    TRACE("%p decreasing refcount to %u\n", This, refcount);
+
+    if (!refcount)
+    {
+        IWineD3DResource_Release(This->resource);
+        HeapFree(GetProcessHeap(), 0, This);
+    }
+
+    return refcount;
+}
+
+/* IWineD3DBase methods */
+
+static HRESULT STDMETHODCALLTYPE rendertarget_view_GetParent(IWineD3DRendertargetView *iface, IUnknown **parent)
+{
+    struct wined3d_rendertarget_view *This = (struct wined3d_rendertarget_view *)iface;
+
+    IUnknown_AddRef(This->parent);
+    *parent = This->parent;
+
+    return WINED3D_OK;
+}
+
+/* IWineD3DRendertargetView methods */
+
+static HRESULT STDMETHODCALLTYPE rendertarget_view_GetResource(IWineD3DRendertargetView *iface,
+        IWineD3DResource **resource)
+{
+    struct wined3d_rendertarget_view *This = (struct wined3d_rendertarget_view *)iface;
+
+    IWineD3DResource_AddRef(This->resource);
+    *resource = This->resource;
+
+    return WINED3D_OK;
+}
+
+const struct IWineD3DRendertargetViewVtbl wined3d_rendertarget_view_vtbl =
+{
+    /* IUnknown methods */
+    rendertarget_view_QueryInterface,
+    rendertarget_view_AddRef,
+    rendertarget_view_Release,
+    /* IWineD3DBase methods */
+    rendertarget_view_GetParent,
+    /* IWineD3DRendertargetView methods */
+    rendertarget_view_GetResource,
+};
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/volume.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/volume.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/volume.c	(revision 19678)
@@ -67,8 +67,33 @@
 
     if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DVolumeTexture, (void **)&texture))) {
-        IWineD3DVolumeTexture_BindTexture(texture);
+        IWineD3DVolumeTexture_BindTexture(texture, FALSE);
         IWineD3DVolumeTexture_Release(texture);
     } else {
         ERR("Volume should be part of a volume texture\n");
+    }
+}
+
+void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box)
+{
+    IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
+
+    This->dirty = TRUE;
+    if (dirty_box)
+    {
+        This->lockedBox.Left = min(This->lockedBox.Left, dirty_box->Left);
+        This->lockedBox.Top = min(This->lockedBox.Top, dirty_box->Top);
+        This->lockedBox.Front = min(This->lockedBox.Front, dirty_box->Front);
+        This->lockedBox.Right = max(This->lockedBox.Right, dirty_box->Right);
+        This->lockedBox.Bottom = max(This->lockedBox.Bottom, dirty_box->Bottom);
+        This->lockedBox.Back = max(This->lockedBox.Back, dirty_box->Back);
+    }
+    else
+    {
+        This->lockedBox.Left = 0;
+        This->lockedBox.Top = 0;
+        This->lockedBox.Front = 0;
+        This->lockedBox.Right = This->currentDesc.Width;
+        This->lockedBox.Bottom = This->currentDesc.Height;
+        This->lockedBox.Back = This->currentDesc.Depth;
     }
 }
@@ -181,5 +206,5 @@
     TRACE("(%p) : copying into %p\n", This, pDesc);
 
-    *(pDesc->Format)  = This->resource.format;
+    *(pDesc->Format)  = This->resource.format_desc->format;
     *(pDesc->Type)    = This->resource.resourceType;
     *(pDesc->Usage)   = This->resource.usage;
@@ -203,6 +228,7 @@
     TRACE("(%p) : box=%p, output pbox=%p, allMem=%p\n", This, pBox, pLockedVolume, This->resource.allocatedMemory);
 
-    pLockedVolume->RowPitch   = This->bytesPerPixel * This->currentDesc.Width;                        /* Bytes / row   */
-    pLockedVolume->SlicePitch = This->bytesPerPixel * This->currentDesc.Width * This->currentDesc.Height;  /* Bytes / slice */
+    pLockedVolume->RowPitch = This->resource.format_desc->byte_count * This->currentDesc.Width; /* Bytes / row   */
+    pLockedVolume->SlicePitch = This->resource.format_desc->byte_count
+            * This->currentDesc.Width * This->currentDesc.Height;                               /* Bytes / slice */
     if (!pBox) {
         TRACE("No box supplied - all is ok\n");
@@ -216,8 +242,8 @@
     } else {
         TRACE("Lock Box (%p) = l %d, t %d, r %d, b %d, fr %d, ba %d\n", pBox, pBox->Left, pBox->Top, pBox->Right, pBox->Bottom, pBox->Front, pBox->Back);
-        pLockedVolume->pBits = This->resource.allocatedMemory +
-          (pLockedVolume->SlicePitch * pBox->Front) + /* FIXME: is front < back or vica versa? */
-          (pLockedVolume->RowPitch * pBox->Top) +
-          (pBox->Left * This->bytesPerPixel);
+        pLockedVolume->pBits = This->resource.allocatedMemory
+                + (pLockedVolume->SlicePitch * pBox->Front)     /* FIXME: is front < back or vica versa? */
+                + (pLockedVolume->RowPitch * pBox->Top)
+                + (pBox->Left * This->resource.format_desc->byte_count);
         This->lockedBox.Left   = pBox->Left;
         This->lockedBox.Top    = pBox->Top;
@@ -235,5 +261,5 @@
        * as seen in msdn docs
        */
-      IWineD3DVolume_AddDirtyBox(iface, &This->lockedBox);
+      volume_add_dirty_box(iface, &This->lockedBox);
 
       /**  Dirtify Container if needed */
@@ -271,37 +297,4 @@
 /* Internal use functions follow : */
 
-static HRESULT WINAPI IWineD3DVolumeImpl_CleanDirtyBox(IWineD3DVolume *iface) {
-  IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
-  This->dirty = FALSE;
-  This->lockedBox.Left   = This->currentDesc.Width;
-  This->lockedBox.Top    = This->currentDesc.Height;
-  This->lockedBox.Front  = This->currentDesc.Depth;
-  This->lockedBox.Right  = 0;
-  This->lockedBox.Bottom = 0;
-  This->lockedBox.Back   = 0;
-  return WINED3D_OK;
-}
-
-static HRESULT WINAPI IWineD3DVolumeImpl_AddDirtyBox(IWineD3DVolume *iface, CONST WINED3DBOX* pDirtyBox) {
-  IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
-  This->dirty = TRUE;
-   if (NULL != pDirtyBox) {
-    This->lockedBox.Left   = min(This->lockedBox.Left,   pDirtyBox->Left);
-    This->lockedBox.Top    = min(This->lockedBox.Top,    pDirtyBox->Top);
-    This->lockedBox.Front  = min(This->lockedBox.Front,  pDirtyBox->Front);
-    This->lockedBox.Right  = max(This->lockedBox.Right,  pDirtyBox->Right);
-    This->lockedBox.Bottom = max(This->lockedBox.Bottom, pDirtyBox->Bottom);
-    This->lockedBox.Back   = max(This->lockedBox.Back,   pDirtyBox->Back);
-  } else {
-    This->lockedBox.Left   = 0;
-    This->lockedBox.Top    = 0;
-    This->lockedBox.Front  = 0;
-    This->lockedBox.Right  = This->currentDesc.Width;
-    This->lockedBox.Bottom = This->currentDesc.Height;
-    This->lockedBox.Back   = This->currentDesc.Depth;
-  }
-  return WINED3D_OK;
-}
-
 static HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWineD3DBase* container) {
     IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
@@ -319,9 +312,7 @@
 static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, int gl_level, BOOL srgb_mode) {
     IWineD3DVolumeImpl *This     = (IWineD3DVolumeImpl *)iface;
-    WINED3DFORMAT format = This->resource.format;
-    const struct GlPixelFormatDesc *glDesc;
-    getFormatDescEntry(format, &GLINFO_LOCATION, &glDesc);
-
-    TRACE("(%p) : level %u, format %s (0x%08x)\n", This, gl_level, debug_d3dformat(format), format);
+    const struct GlPixelFormatDesc *glDesc = This->resource.format_desc;
+
+    TRACE("(%p) : level %u, format %s (0x%08x)\n", This, gl_level, debug_d3dformat(glDesc->format), glDesc->format);
 
     volume_bind_and_dirtify(iface);
@@ -384,6 +375,4 @@
     IWineD3DVolumeImpl_UnlockBox,
     /* Internal interface */
-    IWineD3DVolumeImpl_AddDirtyBox,
-    IWineD3DVolumeImpl_CleanDirtyBox,
     IWineD3DVolumeImpl_LoadTexture,
     IWineD3DVolumeImpl_SetContainer
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/volumetexture.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/volumetexture.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/volumetexture.c	(revision 19678)
@@ -100,7 +100,7 @@
 }
 
-static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *iface) {
+void volumetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb) {
     /* Overrider the IWineD3DResource Preload method */
-    int i;
+    unsigned int i;
     IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
     IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
@@ -123,11 +123,6 @@
             IWineD3DVolume_LoadTexture(This->volumes[i], i, srgb_mode);
     } else if (srgb_was_toggled) {
-        if (This->baseTexture.srgb_mode_change_count < 20)
-            ++This->baseTexture.srgb_mode_change_count;
-        else
-            FIXME("Volumetexture (%p) has been reloaded at least 20 times due to WINED3DSAMP_SRGBTEXTURE changes on it\'s sampler\n", This);
-
         for (i = 0; i < This->baseTexture.levels; i++) {
-            IWineD3DVolume_AddDirtyBox(This->volumes[i], NULL);
+            volume_add_dirty_box(This->volumes[i], NULL);
             IWineD3DVolume_LoadTexture(This->volumes[i], i, srgb_mode);
         }
@@ -140,4 +135,8 @@
 
     return ;
+}
+
+static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *iface) {
+    volumetexture_internal_preload((IWineD3DBaseTexture *) iface, SRGB_ANY);
 }
 
@@ -202,8 +201,9 @@
 }
 
-static HRESULT WINAPI IWineD3DVolumeTextureImpl_BindTexture(IWineD3DVolumeTexture *iface) {
-    IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
+static HRESULT WINAPI IWineD3DVolumeTextureImpl_BindTexture(IWineD3DVolumeTexture *iface, BOOL srgb) {
+    IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
+    BOOL dummy;
     TRACE("(%p) : relay to BaseTexture\n", This);
-    return basetexture_bind((IWineD3DBaseTexture *)iface);
+    return basetexture_bind((IWineD3DBaseTexture *)iface, srgb, &dummy);
 }
 
@@ -235,5 +235,5 @@
 static void WINAPI IWineD3DVolumeTextureImpl_Destroy(IWineD3DVolumeTexture *iface, D3DCB_DESTROYVOLUMEFN D3DCB_DestroyVolume) {
     IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
-    int i;
+    unsigned int i;
     TRACE("(%p) : Cleaning up\n",This);
     for (i = 0; i < This->baseTexture.levels; i++) {
@@ -254,5 +254,5 @@
         return IWineD3DVolume_GetDesc(This->volumes[Level], pDesc);
     } else {
-        FIXME("(%p) Level (%d)\n", This, Level);
+        WARN("(%p) Level (%d)\n", This, Level);
     }
     return WINED3D_OK;
@@ -265,5 +265,5 @@
       TRACE("(%p) -> level(%d) returning volume@%p\n", This, Level, *ppVolumeLevel);
     } else {
-      FIXME("(%p) Level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
+      WARN("(%p) Level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
       return WINED3DERR_INVALIDCALL;
     }
@@ -305,5 +305,7 @@
     This->baseTexture.dirty = TRUE;
     TRACE("(%p) : dirtyfication of volume Level (0)\n", This);
-    return IWineD3DVolume_AddDirtyBox(This->volumes[0], pDirtyBox);
+    volume_add_dirty_box(This->volumes[0], pDirtyBox);
+
+    return WINED3D_OK;
 }
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_gl.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_gl.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_gl.h	(revision 19678)
@@ -876,4 +876,5 @@
 void (WINE_GLAPI *glDepthRange) (GLclampd nearParam, GLclampd farParam);
 void (WINE_GLAPI *glDisable) (GLenum cap);
+void (WINE_GLAPI *glDisableWINE) (GLenum cap);
 void (WINE_GLAPI *glDisableClientState) (GLenum array);
 void (WINE_GLAPI *glDrawArrays) (GLenum mode, GLint first, GLsizei count);
@@ -885,4 +886,5 @@
 void (WINE_GLAPI *glEdgeFlagv) (const GLboolean* flag);
 void (WINE_GLAPI *glEnable) (GLenum cap);
+void (WINE_GLAPI *glEnableWINE) (GLenum cap);
 void (WINE_GLAPI *glEnableClientState) (GLenum array);
 void (WINE_GLAPI *glEnd) ();
@@ -1558,4 +1560,35 @@
 typedef void (WINE_GLAPI *PGLFNDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
 
+/* GL_ARB_geometry_shader4 */
+#ifndef GL_ARB_geometry_shader4
+#define GL_GEOMETRY_SHADER_ARB                      0x8dd9
+#define GL_GEOMETRY_VERTICES_OUT_ARB                0x8dda
+#define GL_GEOMETRY_INPUT_TYPE_ARB                  0x8ddb
+#define GL_GEOMETRY_OUTPUT_TYPE_ARB                 0x8ddc
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB     0x8c29
+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB      0x8ddd
+#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB        0x8dde
+#define GL_MAX_VARYING_COMPONENTS_ARB               0x8b4b
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB      0x8ddf
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB         0x8de0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8de1
+#define GL_LINES_ADJACENCY_ARB                      0x000a
+#define GL_LINE_STRIP_ADJACENCY_ARB                 0x000b
+#define GL_TRIANGLES_ADJACENCY_ARB                  0x000c
+#define GL_TRIANGLE_STRIP_ADJACENCY_ARB             0x000d
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8da8
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB   0x8da9
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB       0x8da7
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER     0x8cd4
+#define GL_PROGRAM_POINT_SIZE_ARB                   0x8642
+#endif
+typedef void (WINE_GLAPI *PGLFNPROGRAMPARAMETERIARBPROC)(GLuint program, GLenum pname, GLint value);
+typedef void (WINE_GLAPI *PGLFNFRAMEBUFFERTEXTUREARBPROC)(GLenum target, GLenum attachment,
+        GLuint texture, GLint level);
+typedef void (WINE_GLAPI *PGLFNFRAMEBUFFERTEXTURELAYERARBPROC)(GLenum target, GLenum attachment,
+        GLuint texture, GLint level, GLint layer);
+typedef void (WINE_GLAPI *PGLFNFRAMEBUFFERTEXTUREFACEARBPROC)(GLenum target, GLenum attachment,
+        GLuint texture, GLint level, GLenum face);
+
 /* GL_ARB_imaging */
 #ifndef GL_ARB_imaging
@@ -1888,4 +1921,5 @@
 typedef void (WINE_GLAPI * PGLFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
 typedef void (WINE_GLAPI * PGLFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (WINE_GLAPI * PGLFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
 typedef void (WINE_GLAPI * PGLFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
 /* GL_EXT_paletted_texture */
@@ -2046,4 +2080,37 @@
 #define GL_RGBA16F_ARB                    0x881A
 #define GL_RGB16F_ARB                     0x881B
+#endif
+/* GL_ARB_texture_rg */
+#ifndef GL_ARB_texture_rg
+#define GL_RG                             0x8227
+#define GL_RG_INTEGER                     0x8228
+#define GL_R8                             0x8229
+#define GL_R16                            0x822A
+#define GL_RG8                            0x822B
+#define GL_RG16                           0x822C
+#define GL_R16F                           0x822D
+#define GL_R32F                           0x822E
+#define GL_RG16F                          0x822F
+#define GL_RG32F                          0x8230
+#define GL_R8I                            0x8231
+#define GL_R8UI                           0x8232
+#define GL_R16I                           0x8233
+#define GL_R16UI                          0x8234
+#define GL_R32I                           0x8235
+#define GL_R32UI                          0x8236
+#define GL_RG8I                           0x8237
+#define GL_RG8UI                          0x8238
+#define GL_RG16I                          0x8239
+#define GL_RG16UI                         0x823A
+#define GL_RG32I                          0x823B
+#define GL_RG32UI                         0x823C
+#endif
+/* GL_EXT_texture_swizzle */
+#ifndef GL_EXT_texture_swizzle
+#define GL_TEXTURE_SWIZZLE_R_EXT          0x8E42
+#define GL_TEXTURE_SWIZZLE_G_EXT          0x8E43
+#define GL_TEXTURE_SWIZZLE_B_EXT          0x8E44
+#define GL_TEXTURE_SWIZZLE_A_EXT          0x8E45
+#define GL_TEXTURE_SWIZZLE_RGBA_EXT       0x8E46
 #endif
 /* GL_ARB_half_float_pixel */
@@ -2298,8 +2365,8 @@
 #define GL_FOG_COORDINATE_ARRAY_EXT             0x8457
 #endif /* GL_EXT_fog_coord */
-typedef void (WINE_GLAPI * PGLFNGLFOGCOORDFEXTPROC) (GLfloat intesity);
-typedef void (WINE_GLAPI * PGLFNGLFOGCOORDFVEXTPROC) (GLfloat intesity);
-typedef void (WINE_GLAPI * PGLFNGLFOGCOORDDEXTPROC) (GLfloat intesity);
-typedef void (WINE_GLAPI * PGLFNGLFOGCOORDDVEXTPROC) (GLfloat intesity);
+typedef void (WINE_GLAPI * PGLFNGLFOGCOORDFEXTPROC) (GLfloat coord);
+typedef void (WINE_GLAPI * PGLFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
+typedef void (WINE_GLAPI * PGLFNGLFOGCOORDDEXTPROC) (GLdouble coord);
+typedef void (WINE_GLAPI * PGLFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
 typedef void (WINE_GLAPI * PGLFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, GLvoid *data);
 /* GL_ARB_shader_objects (GLSL) */
@@ -2480,4 +2547,10 @@
 #endif
 
+/* GL_ARB_half_float_vertex */
+#ifndef GL_ARB_half_float_vertex
+#define GL_ARB_half_float_vertex
+/* No _ARB, see extension spec */
+#define GL_HALF_FLOAT                     0x140B
+#endif
 /* GL_NV_half_float */
 #ifndef GL_NV_half_float
@@ -2838,5 +2911,5 @@
 #define GL_APPLE_fence 1
 #define GL_DRAW_PIXELS_APPLE                0x8A0A
-#define GL_FENCE_APPLE                      0x84F3
+#define GL_FENCE_APPLE                      0x8A0B
 #endif
 typedef void (WINE_GLAPI * PGLFNGENFENCESAPPLEPROC) (GLsizei, GLuint *);
@@ -3232,4 +3305,5 @@
   CARD_ATI_RADEON_8500            = 0x514c,
   CARD_ATI_RADEON_9500            = 0x4144,
+  CARD_ATI_RADEON_XPRESS_200M     = 0x5955,
   CARD_ATI_RADEON_X700            = 0x5e4c,
   CARD_ATI_RADEON_X1600           = 0x71c2,
@@ -3262,6 +3336,11 @@
   CARD_NVIDIA_GEFORCE_8600MGT     = 0x0407,
   CARD_NVIDIA_GEFORCE_8800GTS     = 0x0193,
+  CARD_NVIDIA_GEFORCE_9200        = 0x086d,
+  CARD_NVIDIA_GEFORCE_9400GT      = 0x042c,
+  CARD_NVIDIA_GEFORCE_9500GT      = 0x0640,
   CARD_NVIDIA_GEFORCE_9600GT      = 0x0622,
   CARD_NVIDIA_GEFORCE_9800GT      = 0x0614,
+  CARD_NVIDIA_GEFORCE_GTX260      = 0x05e2,
+  CARD_NVIDIA_GEFORCE_GTX275      = 0x05e6,
   CARD_NVIDIA_GEFORCE_GTX280      = 0x05e1,
 
@@ -3309,4 +3388,5 @@
   ARB_FRAGMENT_PROGRAM,
   ARB_FRAGMENT_SHADER,
+  ARB_GEOMETRY_SHADER4,
   ARB_IMAGING,
   ARB_MULTISAMPLE,
@@ -3327,4 +3407,5 @@
   ARB_TEXTURE_NON_POWER_OF_TWO,
   ARB_TEXTURE_RECTANGLE,
+  ARB_TEXTURE_RG,
   ARB_VERTEX_PROGRAM,
   ARB_VERTEX_BLEND,
@@ -3332,4 +3413,6 @@
   ARB_VERTEX_SHADER,
   ARB_SHADER_OBJECTS,
+  ARB_SHADER_TEXTURE_LOD,
+  ARB_HALF_FLOAT_VERTEX,
   /* EXT */
   EXT_BLEND_COLOR,
@@ -3357,5 +3440,7 @@
   EXT_TEXTURE_ENV_DOT3,
   EXT_TEXTURE_SRGB,
+  EXT_TEXTURE_SWIZZLE,
   EXT_GPU_PROGRAM_PARAMETERS,
+  EXT_VERTEX_ARRAY_BGRA,
   /* NVIDIA */
   NV_HALF_FLOAT,
@@ -3400,4 +3485,5 @@
   /* WGL extensions */
   WGL_ARB_PBUFFER,
+  WGL_ARB_PIXEL_FORMAT,
   WGL_WINE_PIXEL_FORMAT_PASSTHROUGH,
 
@@ -3415,4 +3501,9 @@
     /* GL_ARB_draw_buffers */ \
     USE_GL_FUNC(PGLFNDRAWBUFFERSARBPROC,                            glDrawBuffersARB,                           ARB_DRAW_BUFFERS,       NULL )\
+    /* GL_ARB_geometry_shader4 */ \
+    USE_GL_FUNC(PGLFNPROGRAMPARAMETERIARBPROC,                      glProgramParameteriARB,                     ARB_GEOMETRY_SHADER4,   NULL ) \
+    USE_GL_FUNC(PGLFNFRAMEBUFFERTEXTUREARBPROC,                     glFramebufferTextureARB,                    ARB_GEOMETRY_SHADER4,   NULL ) \
+    USE_GL_FUNC(PGLFNFRAMEBUFFERTEXTURELAYERARBPROC,                glFramebufferTextureLayerARB,               ARB_GEOMETRY_SHADER4,   NULL ) \
+    USE_GL_FUNC(PGLFNFRAMEBUFFERTEXTUREFACEARBPROC,                 glFramebufferTextureFaceARB,                ARB_GEOMETRY_SHADER4,   NULL ) \
     /* GL_ARB_imaging, GL_EXT_blend_minmax */ \
     USE_GL_FUNC(PGLFNBLENDCOLORPROC,                                glBlendColorEXT,                            EXT_BLEND_COLOR,        NULL )\
@@ -3481,5 +3572,5 @@
     USE_GL_FUNC(PGLFNGLFOGCOORDFVEXTPROC,                           glFogCoordfvEXT,                            EXT_FOG_COORD,          NULL )\
     USE_GL_FUNC(PGLFNGLFOGCOORDDEXTPROC,                            glFogCoorddEXT,                             EXT_FOG_COORD,          NULL )\
-    USE_GL_FUNC(PGLFNGLFOGCOORDDVEXTPROC,                           glFogCoordvEXT,                             EXT_FOG_COORD,          NULL )\
+    USE_GL_FUNC(PGLFNGLFOGCOORDDVEXTPROC,                           glFogCoorddvEXT,                            EXT_FOG_COORD,          NULL )\
     USE_GL_FUNC(PGLFNGLFOGCOORDPOINTEREXTPROC,                      glFogCoordPointerEXT,                       EXT_FOG_COORD,          NULL )\
     /* GL_EXT_framebuffer_object */ \
@@ -3512,4 +3603,5 @@
     /* GL_EXT_secondary_color */ \
     USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3UBEXTPROC,                    glSecondaryColor3ubEXT,                     EXT_SECONDARY_COLOR,    NULL )\
+    USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3UBVEXTPROC,                   glSecondaryColor3ubvEXT,                    EXT_SECONDARY_COLOR,    NULL )\
     USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FEXTPROC,                     glSecondaryColor3fEXT,                      EXT_SECONDARY_COLOR,    NULL )\
     USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FVEXTPROC,                    glSecondaryColor3fvEXT,                     EXT_SECONDARY_COLOR,    NULL )\
@@ -3589,6 +3681,6 @@
     USE_GL_FUNC(WINED3D_PFNGLUNIFORMMATRIX3FVARBPROC,               glUniformMatrix3fvARB,                      ARB_SHADER_OBJECTS,     NULL )\
     USE_GL_FUNC(WINED3D_PFNGLUNIFORMMATRIX4FVARBPROC,               glUniformMatrix4fvARB,                      ARB_SHADER_OBJECTS,     NULL )\
-    USE_GL_FUNC(WINED3D_PFNGLGETUNIFORMFVARBPROC,                   glGetUniform4fvARB,                         ARB_SHADER_OBJECTS,     NULL )\
-    USE_GL_FUNC(WINED3D_PFNGLGETUNIFORMIVARBPROC,                   glGetUniform4ivARB,                         ARB_SHADER_OBJECTS,     NULL )\
+    USE_GL_FUNC(WINED3D_PFNGLGETUNIFORMFVARBPROC,                   glGetUniformfvARB,                          ARB_SHADER_OBJECTS,     NULL )\
+    USE_GL_FUNC(WINED3D_PFNGLGETUNIFORMIVARBPROC,                   glGetUniformivARB,                          ARB_SHADER_OBJECTS,     NULL )\
     USE_GL_FUNC(WINED3D_PFNGLGETINFOLOGARBPROC,                     glGetInfoLogARB,                            ARB_SHADER_OBJECTS,     NULL )\
     USE_GL_FUNC(WINED3D_PFNGLUSEPROGRAMOBJECTARBPROC,               glUseProgramObjectARB,                      ARB_SHADER_OBJECTS,     NULL )\
@@ -3688,6 +3780,6 @@
     USE_GL_FUNC(PGLXFNWAITVIDEOSYNCSGIPROC,                         glXWaitVideoSyncSGI,                        SGI_VIDEO_SYNC,         NULL )\
     /* GL_APPLE_flush_render */ \
-    USE_GL_FUNC(PGLFNFLUSHRENDERAPPLEPROC,                          glFlushRenderApple,                         APPLE_FLUSH_RENDER,     NULL )\
-    USE_GL_FUNC(PGLFNFINISHRENDERAPPLEPROC,                         glFinishRenderApple,                        APPLE_FLUSH_RENDER,     NULL )\
+    USE_GL_FUNC(PGLFNFLUSHRENDERAPPLEPROC,                          glFlushRenderAPPLE,                         APPLE_FLUSH_RENDER,     NULL )\
+    USE_GL_FUNC(PGLFNFINISHRENDERAPPLEPROC,                         glFinishRenderAPPLE,                        APPLE_FLUSH_RENDER,     NULL )\
     /* GL_EXT_gpu_program_parameters */ \
     USE_GL_FUNC(PGLFNPROGRAMENVPARAMETERS4FVEXTPROC,                glProgramEnvParameters4fvEXT,            EXT_GPU_PROGRAM_PARAMETERS,NULL )\
@@ -3823,12 +3915,4 @@
  ****************************************************/
 
-typedef struct _WINED3DGLTYPE {
-    int         d3dType;
-    GLint       size;
-    GLenum      glType;
-    GLboolean   normalized;
-    int         typesize;
-} WINED3DGLTYPE;
-
 #define USE_GL_FUNC(type, pfn, ext, replace) type pfn;
 typedef struct _WineD3D_GL_Info {
@@ -3842,4 +3926,5 @@
   DWORD  driver_version;
   DWORD  driver_version_hipart;
+  CHAR   driver_description[255];
   CHAR   gl_renderer[255];
   /**
@@ -3858,4 +3943,5 @@
   UINT   max_texture3d_size;
   float  max_pointsize, max_pointsizemin;
+  UINT   max_point_sprite_units;
   UINT   max_blends;
   UINT   max_anisotropy;
@@ -3884,4 +3970,5 @@
   BOOL arb_vs_offset_limit;
   BOOL set_texcoord_w;
+  DWORD reserved_glsl_constants;
 
   BOOL supported[OPENGL_SUPPORTED_EXT_END + 1];
@@ -3893,9 +3980,12 @@
 
   struct GlPixelFormatDesc *gl_formats;
-
-  /* Vertex data types */
-  WINED3DGLTYPE glTypeLookup[WINED3DDECLTYPE_UNUSED];
 } WineD3D_GL_Info;
 #undef USE_GL_FUNC
 
+struct driver_quirk {
+    BOOL        (*match)(const WineD3D_GL_Info *gl_info);
+    void        (*apply)(WineD3D_GL_Info *gl_info);
+    const char  *description;
+};
+
 #endif /* __WINE_WINED3D_GL */
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c	(revision 19678)
@@ -39,6 +39,6 @@
 
 int num_lock = 0;
-void (*wine_tsx11_lock_ptr)(void) = NULL;
-void (*wine_tsx11_unlock_ptr)(void) = NULL;
+void (*CDECL wine_tsx11_lock_ptr)(void) = NULL;
+void (*CDECL wine_tsx11_unlock_ptr)(void) = NULL;
 
 
@@ -63,12 +63,4 @@
     IWineD3DImpl* object;
 
-    if (!InitAdapters()) {
-        WARN("Failed to initialize direct3d adapters, Direct3D will not be available\n");
-        if(dxVersion > 7) {
-            ERR("Direct3D%d is not available without opengl\n", dxVersion);
-            return NULL;
-        }
-    }
-
     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DImpl));
     object->lpVtbl = &IWineD3D_Vtbl;
@@ -77,4 +69,15 @@
     object->parent = parent;
 
+    if (!InitAdapters(object))
+    {
+        WARN("Failed to initialize direct3d adapters, Direct3D will not be available\n");
+        if (dxVersion > 7)
+        {
+            ERR("Direct3D%d is not available without opengl\n", dxVersion);
+            HeapFree(GetProcessHeap(), 0, object);
+            return NULL;
+        }
+    }
+
     TRACE("Created WineD3D object @ %p for d3d%d support\n", object, dxVersion);
 
@@ -98,6 +101,238 @@
 }
 
-static void wined3d_do_nothing(void)
-{
+static void CDECL wined3d_do_nothing(void)
+{
+}
+
+static BOOL wined3d_init(HINSTANCE hInstDLL)
+{
+    HMODULE mod;
+    char buffer[MAX_PATH+10];
+    DWORD size = sizeof(buffer);
+    HKEY hkey = 0;
+    HKEY appkey = 0;
+    DWORD len, tmpvalue;
+    WNDCLASSA wc;
+
+    /* We need our own window class for a fake window which we use to retrieve GL capabilities */
+    /* We might need CS_OWNDC in the future if we notice strange things on Windows.
+     * Various articles/posts about OpenGL problems on Windows recommend this. */
+    wc.style                = CS_HREDRAW | CS_VREDRAW;
+    wc.lpfnWndProc          = DefWindowProcA;
+    wc.cbClsExtra           = 0;
+    wc.cbWndExtra           = 0;
+    wc.hInstance            = hInstDLL;
+    wc.hIcon                = LoadIconA(NULL, (LPCSTR)IDI_WINLOGO);
+    wc.hCursor              = LoadCursorA(NULL, (LPCSTR)IDC_ARROW);
+    wc.hbrBackground        = NULL;
+    wc.lpszMenuName         = NULL;
+    wc.lpszClassName        = "WineD3D_OpenGL";
+
+    if (!RegisterClassA(&wc) && GetLastError() != ERROR_CLASS_ALREADY_EXISTS)
+    {
+        ERR("Failed to register window class 'WineD3D_OpenGL'!\n");
+        return FALSE;
+    }
+
+    DisableThreadLibraryCalls(hInstDLL);
+
+    mod = GetModuleHandleA( "winex11.drv" );
+    if (mod)
+    {
+        wine_tsx11_lock_ptr   = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
+        wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" );
+    }
+    else /* We are most likely on Windows */
+    {
+        wine_tsx11_lock_ptr   = wined3d_do_nothing;
+        wine_tsx11_unlock_ptr = wined3d_do_nothing;
+    }
+    /* @@ Wine registry key: HKCU\Software\Wine\Direct3D */
+    if ( RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey ) ) hkey = 0;
+
+    len = GetModuleFileNameA( 0, buffer, MAX_PATH );
+    if (len && len < MAX_PATH)
+    {
+        HKEY tmpkey;
+        /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\Direct3D */
+        if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\AppDefaults", &tmpkey ))
+        {
+            char *p, *appname = buffer;
+            if ((p = strrchr( appname, '/' ))) appname = p + 1;
+            if ((p = strrchr( appname, '\\' ))) appname = p + 1;
+            strcat( appname, "\\Direct3D" );
+            TRACE("appname = [%s]\n", appname);
+            if (RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;
+            RegCloseKey( tmpkey );
+        }
+    }
+
+    if ( 0 != hkey || 0 != appkey )
+    {
+        if ( !get_config_key( hkey, appkey, "VertexShaderMode", buffer, size) )
+        {
+            if (!strcmp(buffer,"none"))
+            {
+                TRACE("Disable vertex shaders\n");
+                wined3d_settings.vs_mode = VS_NONE;
+            }
+        }
+        if ( !get_config_key( hkey, appkey, "PixelShaderMode", buffer, size) )
+        {
+            if (!strcmp(buffer,"enabled"))
+            {
+                TRACE("Allow pixel shaders\n");
+                wined3d_settings.ps_mode = PS_HW;
+            }
+            if (!strcmp(buffer,"disabled"))
+            {
+                TRACE("Disable pixel shaders\n");
+                wined3d_settings.ps_mode = PS_NONE;
+            }
+        }
+        if ( !get_config_key( hkey, appkey, "VertexBufferMode", buffer, size) )
+        {
+            if (!strcmp(buffer,"none"))
+            {
+                TRACE("Disable Vertex Buffer Hardware support\n");
+                wined3d_settings.vbo_mode = VBO_NONE;
+            }
+            else if (!strcmp(buffer,"hardware"))
+            {
+                TRACE("Allow Vertex Buffer Hardware support\n");
+                wined3d_settings.vbo_mode = VBO_HW;
+            }
+        }
+        if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) )
+        {
+            if (!strcmp(buffer,"disabled"))
+            {
+                TRACE("Use of GL Shading Language disabled\n");
+                wined3d_settings.glslRequested = FALSE;
+            }
+        }
+        if ( !get_config_key( hkey, appkey, "OffscreenRenderingMode", buffer, size) )
+        {
+            if (!strcmp(buffer,"backbuffer"))
+            {
+                TRACE("Using the backbuffer for offscreen rendering\n");
+                wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER;
+            }
+            else if (!strcmp(buffer,"pbuffer"))
+            {
+                TRACE("Using PBuffers for offscreen rendering\n");
+                wined3d_settings.offscreen_rendering_mode = ORM_PBUFFER;
+            }
+            else if (!strcmp(buffer,"fbo"))
+            {
+                TRACE("Using FBOs for offscreen rendering\n");
+                wined3d_settings.offscreen_rendering_mode = ORM_FBO;
+            }
+        }
+        if ( !get_config_key( hkey, appkey, "RenderTargetLockMode", buffer, size) )
+        {
+            if (!strcmp(buffer,"disabled"))
+            {
+                TRACE("Disabling render target locking\n");
+                wined3d_settings.rendertargetlock_mode = RTL_DISABLE;
+            }
+            else if (!strcmp(buffer,"readdraw"))
+            {
+                TRACE("Using glReadPixels for render target reading and glDrawPixels for writing\n");
+                wined3d_settings.rendertargetlock_mode = RTL_READDRAW;
+            }
+            else if (!strcmp(buffer,"readtex"))
+            {
+                TRACE("Using glReadPixels for render target reading and textures for writing\n");
+                wined3d_settings.rendertargetlock_mode = RTL_READTEX;
+            }
+            else if (!strcmp(buffer,"texdraw"))
+            {
+                TRACE("Using textures for render target reading and glDrawPixels for writing\n");
+                wined3d_settings.rendertargetlock_mode = RTL_TEXDRAW;
+            }
+            else if (!strcmp(buffer,"textex"))
+            {
+                TRACE("Reading render targets via textures and writing via textures\n");
+                wined3d_settings.rendertargetlock_mode = RTL_TEXTEX;
+            }
+        }
+        if ( !get_config_key_dword( hkey, appkey, "VideoPciDeviceID", &tmpvalue) )
+        {
+            int pci_device_id = tmpvalue;
+
+            /* A pci device id is 16-bit */
+            if(pci_device_id > 0xffff)
+            {
+                ERR("Invalid value for VideoPciDeviceID. The value should be smaller or equal to 65535 or 0xffff\n");
+            }
+            else
+            {
+                TRACE("Using PCI Device ID %04x\n", pci_device_id);
+                wined3d_settings.pci_device_id = pci_device_id;
+            }
+        }
+        if ( !get_config_key_dword( hkey, appkey, "VideoPciVendorID", &tmpvalue) )
+        {
+            int pci_vendor_id = tmpvalue;
+
+            /* A pci device id is 16-bit */
+            if(pci_vendor_id > 0xffff)
+            {
+                ERR("Invalid value for VideoPciVendorID. The value should be smaller or equal to 65535 or 0xffff\n");
+            }
+            else
+            {
+                TRACE("Using PCI Vendor ID %04x\n", pci_vendor_id);
+                wined3d_settings.pci_vendor_id = pci_vendor_id;
+            }
+        }
+        if ( !get_config_key( hkey, appkey, "VideoMemorySize", buffer, size) )
+        {
+            int TmpVideoMemorySize = atoi(buffer);
+            if(TmpVideoMemorySize > 0)
+            {
+                wined3d_settings.emulated_textureram = TmpVideoMemorySize *1024*1024;
+                TRACE("Use %iMB = %d byte for emulated_textureram\n",
+                        TmpVideoMemorySize,
+                        wined3d_settings.emulated_textureram);
+            }
+            else
+                ERR("VideoMemorySize is %i but must be >0\n", TmpVideoMemorySize);
+        }
+        if ( !get_config_key( hkey, appkey, "WineLogo", buffer, size) )
+        {
+            wined3d_settings.logo = HeapAlloc(GetProcessHeap(), 0, strlen(buffer) + 1);
+            if(wined3d_settings.logo) strcpy(wined3d_settings.logo, buffer);
+        }
+        if ( !get_config_key( hkey, appkey, "Multisampling", buffer, size) )
+        {
+            if (!strcmp(buffer,"enabled"))
+            {
+                TRACE("Allow multisampling\n");
+                wined3d_settings.allow_multisampling = TRUE;
+            }
+        }
+    }
+    if (wined3d_settings.vs_mode == VS_HW)
+        TRACE("Allow HW vertex shaders\n");
+    if (wined3d_settings.ps_mode == PS_NONE)
+        TRACE("Disable pixel shaders\n");
+    if (wined3d_settings.vbo_mode == VBO_NONE)
+        TRACE("Disable Vertex Buffer Hardware support\n");
+    if (wined3d_settings.glslRequested)
+        TRACE("If supported by your system, GL Shading Language will be used\n");
+
+    if (appkey) RegCloseKey( appkey );
+    if (hkey) RegCloseKey( hkey );
+
+    return TRUE;
+}
+
+static BOOL wined3d_destroy(void)
+{
+    HeapFree(GetProcessHeap(), 0, wined3d_settings.logo);
+
+    return TRUE;
 }
 
@@ -105,227 +340,16 @@
 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
 {
-    TRACE("WineD3D DLLMain Reason=%d\n", fdwReason);
-    if (fdwReason == DLL_PROCESS_ATTACH)
-    {
-       HMODULE mod;
-       char buffer[MAX_PATH+10];
-       DWORD size = sizeof(buffer);
-       HKEY hkey = 0;
-       HKEY appkey = 0;
-       DWORD len, tmpvalue;
-       WNDCLASSA wc;
-
-       /* We need our own window class for a fake window which we use to retrieve GL capabilities */
-       /* We might need CS_OWNDC in the future if we notice strange things on Windows.
-        * Various articles/posts about OpenGL problems on Windows recommend this. */
-       wc.style                = CS_HREDRAW | CS_VREDRAW;
-       wc.lpfnWndProc          = DefWindowProcA;
-       wc.cbClsExtra           = 0;
-       wc.cbWndExtra           = 0;
-       wc.hInstance            = hInstDLL;
-       wc.hIcon                = LoadIconA(NULL, (LPCSTR)IDI_WINLOGO);
-       wc.hCursor              = LoadCursorA(NULL, (LPCSTR)IDC_ARROW);
-       wc.hbrBackground        = NULL;
-       wc.lpszMenuName         = NULL;
-       wc.lpszClassName        = "WineD3D_OpenGL";
-
-       if (!RegisterClassA(&wc) && GetLastError() != ERROR_CLASS_ALREADY_EXISTS)
-       {
-           ERR("Failed to register window class 'WineD3D_OpenGL'!\n");
-           return FALSE;
-       }
-
-       DisableThreadLibraryCalls(hInstDLL);
-
-       mod = GetModuleHandleA( "winex11.drv" );
-       if (mod)
-       {
-           wine_tsx11_lock_ptr   = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
-           wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" );
-       }
-       else /* We are most likely on Windows */
-       {
-           wine_tsx11_lock_ptr   = wined3d_do_nothing;
-           wine_tsx11_unlock_ptr = wined3d_do_nothing;
-       }
-       /* @@ Wine registry key: HKCU\Software\Wine\Direct3D */
-       if ( RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey ) ) hkey = 0;
-
-       len = GetModuleFileNameA( 0, buffer, MAX_PATH );
-       if (len && len < MAX_PATH)
-       {
-            HKEY tmpkey;
-            /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\Direct3D */
-            if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\AppDefaults", &tmpkey ))
-            {
-                char *p, *appname = buffer;
-                if ((p = strrchr( appname, '/' ))) appname = p + 1;
-                if ((p = strrchr( appname, '\\' ))) appname = p + 1;
-                strcat( appname, "\\Direct3D" );
-                TRACE("appname = [%s]\n", appname);
-                if (RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;
-                RegCloseKey( tmpkey );
-            }
-       }
-
-       if ( 0 != hkey || 0 != appkey )
-       {
-            if ( !get_config_key( hkey, appkey, "VertexShaderMode", buffer, size) )
-            {
-                if (!strcmp(buffer,"none"))
-                {
-                    TRACE("Disable vertex shaders\n");
-                    wined3d_settings.vs_mode = VS_NONE;
-                }
-            }
-            if ( !get_config_key( hkey, appkey, "PixelShaderMode", buffer, size) )
-            {
-                if (!strcmp(buffer,"enabled"))
-                {
-                    TRACE("Allow pixel shaders\n");
-                    wined3d_settings.ps_mode = PS_HW;
-                }
-                if (!strcmp(buffer,"disabled"))
-                {
-                    TRACE("Disable pixel shaders\n");
-                    wined3d_settings.ps_mode = PS_NONE;
-                }
-            }
-            if ( !get_config_key( hkey, appkey, "VertexBufferMode", buffer, size) )
-            {
-                if (!strcmp(buffer,"none"))
-                {
-                    TRACE("Disable Vertex Buffer Hardware support\n");
-                    wined3d_settings.vbo_mode = VBO_NONE;
-                }
-                else if (!strcmp(buffer,"hardware"))
-                {
-                    TRACE("Allow Vertex Buffer Hardware support\n");
-                    wined3d_settings.vbo_mode = VBO_HW;
-                }
-            }
-            if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) )
-            {
-                if (!strcmp(buffer,"disabled"))
-                {
-                    TRACE("Use of GL Shading Language disabled\n");
-                    wined3d_settings.glslRequested = FALSE;
-                }
-            }
-            if ( !get_config_key( hkey, appkey, "OffscreenRenderingMode", buffer, size) )
-            {
-                if (!strcmp(buffer,"backbuffer"))
-                {
-                    TRACE("Using the backbuffer for offscreen rendering\n");
-                    wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER;
-                }
-                else if (!strcmp(buffer,"pbuffer"))
-                {
-                    TRACE("Using PBuffers for offscreen rendering\n");
-                    wined3d_settings.offscreen_rendering_mode = ORM_PBUFFER;
-                }
-                else if (!strcmp(buffer,"fbo"))
-                {
-                    TRACE("Using FBOs for offscreen rendering\n");
-                    wined3d_settings.offscreen_rendering_mode = ORM_FBO;
-                }
-            }
-            if ( !get_config_key( hkey, appkey, "RenderTargetLockMode", buffer, size) )
-            {
-                if (!strcmp(buffer,"disabled"))
-                {
-                    TRACE("Disabling render target locking\n");
-                    wined3d_settings.rendertargetlock_mode = RTL_DISABLE;
-                }
-                else if (!strcmp(buffer,"readdraw"))
-                {
-                    TRACE("Using glReadPixels for render target reading and glDrawPixels for writing\n");
-                    wined3d_settings.rendertargetlock_mode = RTL_READDRAW;
-                }
-                else if (!strcmp(buffer,"readtex"))
-                {
-                    TRACE("Using glReadPixels for render target reading and textures for writing\n");
-                    wined3d_settings.rendertargetlock_mode = RTL_READTEX;
-                }
-                else if (!strcmp(buffer,"texdraw"))
-                {
-                    TRACE("Using textures for render target reading and glDrawPixels for writing\n");
-                    wined3d_settings.rendertargetlock_mode = RTL_TEXDRAW;
-                }
-                else if (!strcmp(buffer,"textex"))
-                {
-                    TRACE("Reading render targets via textures and writing via textures\n");
-                    wined3d_settings.rendertargetlock_mode = RTL_TEXTEX;
-                }
-            }
-            if ( !get_config_key_dword( hkey, appkey, "VideoPciDeviceID", &tmpvalue) )
-            {
-                int pci_device_id = tmpvalue;
-
-                /* A pci device id is 16-bit */
-                if(pci_device_id > 0xffff)
-                {
-                    ERR("Invalid value for VideoPciDeviceID. The value should be smaller or equal to 65535 or 0xffff\n");
-                }
-                else
-                {
-                    TRACE("Using PCI Device ID %04x\n", pci_device_id);
-                    wined3d_settings.pci_device_id = pci_device_id;
-                }
-            }
-            if ( !get_config_key_dword( hkey, appkey, "VideoPciVendorID", &tmpvalue) )
-            {
-                int pci_vendor_id = tmpvalue;
-
-                /* A pci device id is 16-bit */
-                if(pci_vendor_id > 0xffff)
-                {
-                    ERR("Invalid value for VideoPciVendorID. The value should be smaller or equal to 65535 or 0xffff\n");
-                }
-                else
-                {
-                    TRACE("Using PCI Vendor ID %04x\n", pci_vendor_id);
-                    wined3d_settings.pci_vendor_id = pci_vendor_id;
-                }
-            }
-            if ( !get_config_key( hkey, appkey, "VideoMemorySize", buffer, size) )
-            {
-                int TmpVideoMemorySize = atoi(buffer);
-                if(TmpVideoMemorySize > 0)
-                {
-                    wined3d_settings.emulated_textureram = TmpVideoMemorySize *1024*1024;
-                    TRACE("Use %iMB = %d byte for emulated_textureram\n",
-                            TmpVideoMemorySize,
-                            wined3d_settings.emulated_textureram);
-                }
-                else
-                    ERR("VideoMemorySize is %i but must be >0\n", TmpVideoMemorySize);
-            }
-            if ( !get_config_key( hkey, appkey, "WineLogo", buffer, size) )
-            {
-                wined3d_settings.logo = HeapAlloc(GetProcessHeap(), 0, strlen(buffer) + 1);
-                if(wined3d_settings.logo) strcpy(wined3d_settings.logo, buffer);
-            }
-            if ( !get_config_key( hkey, appkey, "Multisampling", buffer, size) )
-            {
-                if (!strcmp(buffer,"enabled"))
-                {
-                    TRACE("Allow multisampling\n");
-                    wined3d_settings.allow_multisampling = TRUE;
-                }
-            }
-       }
-       if (wined3d_settings.vs_mode == VS_HW)
-           TRACE("Allow HW vertex shaders\n");
-       if (wined3d_settings.ps_mode == PS_NONE)
-           TRACE("Disable pixel shaders\n");
-       if (wined3d_settings.vbo_mode == VBO_NONE)
-           TRACE("Disable Vertex Buffer Hardware support\n");
-       if (wined3d_settings.glslRequested)
-           TRACE("If supported by your system, GL Shading Language will be used\n");
-
-       if (appkey) RegCloseKey( appkey );
-       if (hkey) RegCloseKey( hkey );
-    }
-    return TRUE;
-}
+    TRACE("WineD3D DLLMain Reason=%u\n", fdwReason);
+
+    switch (fdwReason)
+    {
+        case DLL_PROCESS_ATTACH:
+            return wined3d_init(hInstDLL);
+
+        case DLL_PROCESS_DETACH:
+            return wined3d_destroy();
+
+        default:
+            return TRUE;
+    }
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h	(revision 19677)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h	(revision 19678)
@@ -4,5 +4,5 @@
  * Copyright 2002-2003 The wine-d3d team
  * Copyright 2002-2003 Raphael Junqueira
- * Copyright 2004 Jason Edmeades
+ * Copyright 2002-2003, 2004 Jason Edmeades
  * Copyright 2005 Oliver Stieber
  *
@@ -48,5 +48,4 @@
 
 #include "objbase.h"
-#include "wined3d_private_types.h"
 #include "wine/wined3d.h"
 #include "wined3d_gl.h"
@@ -163,4 +162,5 @@
 struct hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function);
 void hash_table_destroy(struct hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb);
+void hash_table_for_each_entry(struct hash_table_t *table, void (*callback)(void *value, void *context), void *context);
 void *hash_table_get(const struct hash_table_t *table, const void *key);
 void hash_table_put(struct hash_table_t *table, void *key, void *value);
@@ -176,8 +176,4 @@
 #define MAX_ACTIVE_LIGHTS       8
 #define MAX_CLIPPLANES          WINED3DMAXUSERCLIPPLANES
-#define MAX_LEVELS              256
-
-#define MAX_CONST_I 16
-#define MAX_CONST_B 16
 
 /* Used for CreateStateBlock */
@@ -217,11 +213,4 @@
 extern const struct filter_lookup filter_lookup_nofilter;
 extern struct filter_lookup filter_lookup;
-
-void init_type_lookup(WineD3D_GL_Info *gl_info);
-#define WINED3D_ATR_TYPE(type)          GLINFO_LOCATION.glTypeLookup[type].d3dType
-#define WINED3D_ATR_SIZE(type)          GLINFO_LOCATION.glTypeLookup[type].size
-#define WINED3D_ATR_GLTYPE(type)        GLINFO_LOCATION.glTypeLookup[type].glType
-#define WINED3D_ATR_NORMALIZED(type)    GLINFO_LOCATION.glTypeLookup[type].normalized
-#define WINED3D_ATR_TYPESIZE(type)      GLINFO_LOCATION.glTypeLookup[type].typesize
 
 /* float_16_to_32() and float_32_to_16() (see implementation in
@@ -311,6 +300,217 @@
 extern wined3d_settings_t wined3d_settings;
 
+typedef enum _WINED3DSAMPLER_TEXTURE_TYPE
+{
+    WINED3DSTT_UNKNOWN = 0,
+    WINED3DSTT_1D = 1,
+    WINED3DSTT_2D = 2,
+    WINED3DSTT_CUBE = 3,
+    WINED3DSTT_VOLUME = 4,
+} WINED3DSAMPLER_TEXTURE_TYPE;
+
+typedef enum _WINED3DSHADER_PARAM_REGISTER_TYPE
+{
+    WINED3DSPR_TEMP = 0,
+    WINED3DSPR_INPUT = 1,
+    WINED3DSPR_CONST = 2,
+    WINED3DSPR_ADDR = 3,
+    WINED3DSPR_TEXTURE = 3,
+    WINED3DSPR_RASTOUT = 4,
+    WINED3DSPR_ATTROUT = 5,
+    WINED3DSPR_TEXCRDOUT = 6,
+    WINED3DSPR_OUTPUT = 6,
+    WINED3DSPR_CONSTINT = 7,
+    WINED3DSPR_COLOROUT = 8,
+    WINED3DSPR_DEPTHOUT = 9,
+    WINED3DSPR_SAMPLER = 10,
+    WINED3DSPR_CONST2 = 11,
+    WINED3DSPR_CONST3 = 12,
+    WINED3DSPR_CONST4 = 13,
+    WINED3DSPR_CONSTBOOL = 14,
+    WINED3DSPR_LOOP = 15,
+    WINED3DSPR_TEMPFLOAT16 = 16,
+    WINED3DSPR_MISCTYPE = 17,
+    WINED3DSPR_LABEL = 18,
+    WINED3DSPR_PREDICATE = 19,
+    WINED3DSPR_IMMCONST,
+} WINED3DSHADER_PARAM_REGISTER_TYPE;
+
+enum wined3d_immconst_type
+{
+    WINED3D_IMMCONST_FLOAT,
+    WINED3D_IMMCONST_FLOAT4,
+};
+
+typedef enum _WINED3DVS_RASTOUT_OFFSETS
+{
+    WINED3DSRO_POSITION = 0,
+    WINED3DSRO_FOG = 1,
+    WINED3DSRO_POINT_SIZE = 2,
+} WINED3DVS_RASTOUT_OFFSETS;
+
+#define WINED3DSP_NOSWIZZLE (0 | (1 << 2) | (2 << 4) | (3 << 6))
+
+typedef enum _WINED3DSHADER_PARAM_SRCMOD_TYPE
+{
+    WINED3DSPSM_NONE = 0,
+    WINED3DSPSM_NEG = 1,
+    WINED3DSPSM_BIAS = 2,
+    WINED3DSPSM_BIASNEG = 3,
+    WINED3DSPSM_SIGN = 4,
+    WINED3DSPSM_SIGNNEG = 5,
+    WINED3DSPSM_COMP = 6,
+    WINED3DSPSM_X2 = 7,
+    WINED3DSPSM_X2NEG = 8,
+    WINED3DSPSM_DZ = 9,
+    WINED3DSPSM_DW = 10,
+    WINED3DSPSM_ABS = 11,
+    WINED3DSPSM_ABSNEG = 12,
+    WINED3DSPSM_NOT = 13,
+} WINED3DSHADER_PARAM_SRCMOD_TYPE;
+
+#define WINED3DSP_WRITEMASK_0   0x1 /* .x r */
+#define WINED3DSP_WRITEMASK_1   0x2 /* .y g */
+#define WINED3DSP_WRITEMASK_2   0x4 /* .z b */
+#define WINED3DSP_WRITEMASK_3   0x8 /* .w a */
+#define WINED3DSP_WRITEMASK_ALL 0xf /* all */
+
+typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE
+{
+    WINED3DSPDM_NONE = 0,
+    WINED3DSPDM_SATURATE = 1,
+    WINED3DSPDM_PARTIALPRECISION = 2,
+    WINED3DSPDM_MSAMPCENTROID = 4,
+} WINED3DSHADER_PARAM_DSTMOD_TYPE;
+
+typedef enum _WINED3DSHADER_INSTRUCTION_OPCODE_TYPE
+{
+    WINED3DSIO_NOP = 0,
+    WINED3DSIO_MOV = 1,
+    WINED3DSIO_ADD = 2,
+    WINED3DSIO_SUB = 3,
+    WINED3DSIO_MAD = 4,
+    WINED3DSIO_MUL = 5,
+    WINED3DSIO_RCP = 6,
+    WINED3DSIO_RSQ = 7,
+    WINED3DSIO_DP3 = 8,
+    WINED3DSIO_DP4 = 9,
+    WINED3DSIO_MIN = 10,
+    WINED3DSIO_MAX = 11,
+    WINED3DSIO_SLT = 12,
+    WINED3DSIO_SGE = 13,
+    WINED3DSIO_EXP = 14,
+    WINED3DSIO_LOG = 15,
+    WINED3DSIO_LIT = 16,
+    WINED3DSIO_DST = 17,
+    WINED3DSIO_LRP = 18,
+    WINED3DSIO_FRC = 19,
+    WINED3DSIO_M4x4 = 20,
+    WINED3DSIO_M4x3 = 21,
+    WINED3DSIO_M3x4 = 22,
+    WINED3DSIO_M3x3 = 23,
+    WINED3DSIO_M3x2 = 24,
+    WINED3DSIO_CALL = 25,
+    WINED3DSIO_CALLNZ = 26,
+    WINED3DSIO_LOOP = 27,
+    WINED3DSIO_RET = 28,
+    WINED3DSIO_ENDLOOP = 29,
+    WINED3DSIO_LABEL = 30,
+    WINED3DSIO_DCL = 31,
+    WINED3DSIO_POW = 32,
+    WINED3DSIO_CRS = 33,
+    WINED3DSIO_SGN = 34,
+    WINED3DSIO_ABS = 35,
+    WINED3DSIO_NRM = 36,
+    WINED3DSIO_SINCOS = 37,
+    WINED3DSIO_REP = 38,
+    WINED3DSIO_ENDREP = 39,
+    WINED3DSIO_IF = 40,
+    WINED3DSIO_IFC = 41,
+    WINED3DSIO_ELSE = 42,
+    WINED3DSIO_ENDIF = 43,
+    WINED3DSIO_BREAK = 44,
+    WINED3DSIO_BREAKC = 45,
+    WINED3DSIO_MOVA = 46,
+    WINED3DSIO_DEFB = 47,
+    WINED3DSIO_DEFI = 48,
+
+    WINED3DSIO_TEXCOORD = 64,
+    WINED3DSIO_TEXKILL = 65,
+    WINED3DSIO_TEX = 66,
+    WINED3DSIO_TEXBEM = 67,
+    WINED3DSIO_TEXBEML = 68,
+    WINED3DSIO_TEXREG2AR = 69,
+    WINED3DSIO_TEXREG2GB = 70,
+    WINED3DSIO_TEXM3x2PAD = 71,
+    WINED3DSIO_TEXM3x2TEX = 72,
+    WINED3DSIO_TEXM3x3PAD = 73,
+    WINED3DSIO_TEXM3x3TEX = 74,
+    WINED3DSIO_TEXM3x3DIFF = 75,
+    WINED3DSIO_TEXM3x3SPEC = 76,
+    WINED3DSIO_TEXM3x3VSPEC = 77,
+    WINED3DSIO_EXPP = 78,
+    WINED3DSIO_LOGP = 79,
+    WINED3DSIO_CND = 80,
+    WINED3DSIO_DEF = 81,
+    WINED3DSIO_TEXREG2RGB = 82,
+    WINED3DSIO_TEXDP3TEX = 83,
+    WINED3DSIO_TEXM3x2DEPTH = 84,
+    WINED3DSIO_TEXDP3 = 85,
+    WINED3DSIO_TEXM3x3 = 86,
+    WINED3DSIO_TEXDEPTH = 87,
+    WINED3DSIO_CMP = 88,
+    WINED3DSIO_BEM = 89,
+    WINED3DSIO_DP2ADD = 90,
+    WINED3DSIO_DSX = 91,
+    WINED3DSIO_DSY = 92,
+    WINED3DSIO_TEXLDD = 93,
+    WINED3DSIO_SETP = 94,
+    WINED3DSIO_TEXLDL = 95,
+    WINED3DSIO_BREAKP = 96,
+
+    WINED3DSIO_PHASE = 0xfffd,
+    WINED3DSIO_COMMENT = 0xfffe,
+    WINED3DSIO_END = 0Xffff,
+} WINED3DSHADER_INSTRUCTION_OPCODE_TYPE;
+
+/* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */
+#define WINED3DSI_TEXLD_PROJECT 1
+#define WINED3DSI_TEXLD_BIAS    2
+
+typedef enum COMPARISON_TYPE
+{
+    COMPARISON_GT = 1,
+    COMPARISON_EQ = 2,
+    COMPARISON_GE = 3,
+    COMPARISON_LT = 4,
+    COMPARISON_NE = 5,
+    COMPARISON_LE = 6,
+} COMPARISON_TYPE;
+
+#define WINED3D_SM1_VS  0xfffe
+#define WINED3D_SM1_PS  0xffff
+#define WINED3D_SM4_PS  0x0000
+#define WINED3D_SM4_VS  0x0001
+#define WINED3D_SM4_GS  0x0002
+
+/* Shader version tokens, and shader end tokens */
+#define WINED3DPS_VERSION(major, minor) ((WINED3D_SM1_PS << 16) | ((major) << 8) | (minor))
+#define WINED3DVS_VERSION(major, minor) ((WINED3D_SM1_VS << 16) | ((major) << 8) | (minor))
+
 /* Shader backends */
-struct SHADER_OPCODE_ARG;
+
+/* TODO: Make this dynamic, based on shader limits ? */
+#define MAX_ATTRIBS 16
+#define MAX_REG_ADDR 1
+#define MAX_REG_TEMP 32
+#define MAX_REG_TEXCRD 8
+#define MAX_REG_INPUT 12
+#define MAX_REG_OUTPUT 12
+#define MAX_CONST_I 16
+#define MAX_CONST_B 16
+
+/* FIXME: This needs to go up to 2048 for
+ * Shader model 3 according to msdn (and for software shaders) */
+#define MAX_LABELS 16
 
 #define SHADER_PGMSIZE 65535
@@ -410,5 +610,119 @@
 };
 
-typedef void (*SHADER_HANDLER)(const struct SHADER_OPCODE_ARG *);
+enum wined3d_shader_type
+{
+    WINED3D_SHADER_TYPE_PIXEL,
+    WINED3D_SHADER_TYPE_VERTEX,
+    WINED3D_SHADER_TYPE_GEOMETRY,
+};
+
+struct wined3d_shader_version
+{
+    enum wined3d_shader_type type;
+    BYTE major;
+    BYTE minor;
+};
+
+#define WINED3D_SHADER_VERSION(major, minor) (((major) << 8) | (minor))
+
+typedef struct shader_reg_maps
+{
+    struct wined3d_shader_version shader_version;
+    char texcoord[MAX_REG_TEXCRD];          /* pixel < 3.0 */
+    char temporary[MAX_REG_TEMP];           /* pixel, vertex */
+    char address[MAX_REG_ADDR];             /* vertex */
+    char packed_input[MAX_REG_INPUT];       /* pshader >= 3.0 */
+    char packed_output[MAX_REG_OUTPUT];     /* vertex >= 3.0 */
+    char attributes[MAX_ATTRIBS];           /* vertex */
+    char labels[MAX_LABELS];                /* pixel, vertex */
+    DWORD *constf;                          /* pixel, vertex */
+    DWORD texcoord_mask[MAX_REG_TEXCRD];    /* vertex < 3.0 */
+    WORD integer_constants;                 /* MAX_CONST_I, 16 */
+    WORD boolean_constants;                 /* MAX_CONST_B, 16 */
+
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type[max(MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS)];
+    BOOL bumpmat[MAX_TEXTURES], luminanceparams[MAX_TEXTURES];
+    char usesnrm, vpos, usesdsy, usestexldd;
+    char usesrelconstF;
+
+    /* Whether or not loops are used in this shader, and nesting depth */
+    unsigned loop_depth;
+
+    /* Whether or not this shader uses fog */
+    char fog;
+
+} shader_reg_maps;
+
+struct wined3d_shader_context
+{
+    IWineD3DBaseShader *shader;
+    const struct shader_reg_maps *reg_maps;
+    SHADER_BUFFER *buffer;
+};
+
+struct wined3d_shader_register
+{
+    WINED3DSHADER_PARAM_REGISTER_TYPE type;
+    UINT idx;
+    const struct wined3d_shader_src_param *rel_addr;
+    enum wined3d_immconst_type immconst_type;
+    DWORD immconst_data[4];
+};
+
+struct wined3d_shader_dst_param
+{
+    struct wined3d_shader_register reg;
+    DWORD write_mask;
+    DWORD modifiers;
+    DWORD shift;
+};
+
+struct wined3d_shader_src_param
+{
+    struct wined3d_shader_register reg;
+    DWORD swizzle;
+    DWORD modifiers;
+};
+
+struct wined3d_shader_instruction
+{
+    const struct wined3d_shader_context *ctx;
+    enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+    DWORD flags;
+    BOOL coissue;
+    DWORD predicate;
+    UINT dst_count;
+    const struct wined3d_shader_dst_param *dst;
+    UINT src_count;
+    const struct wined3d_shader_src_param *src;
+};
+
+struct wined3d_shader_semantic
+{
+    WINED3DDECLUSAGE usage;
+    UINT usage_idx;
+    WINED3DSAMPLER_TEXTURE_TYPE sampler_type;
+    struct wined3d_shader_dst_param reg;
+};
+
+struct wined3d_shader_frontend
+{
+    void *(*shader_init)(const DWORD *ptr);
+    void (*shader_free)(void *data);
+    void (*shader_read_header)(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version);
+    void (*shader_read_opcode)(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins, UINT *param_size);
+    void (*shader_read_src_param)(void *data, const DWORD **ptr, struct wined3d_shader_src_param *src_param,
+            struct wined3d_shader_src_param *src_rel_addr);
+    void (*shader_read_dst_param)(void *data, const DWORD **ptr, struct wined3d_shader_dst_param *dst_param,
+            struct wined3d_shader_src_param *dst_rel_addr);
+    void (*shader_read_semantic)(const DWORD **ptr, struct wined3d_shader_semantic *semantic);
+    void (*shader_read_comment)(const DWORD **ptr, const char **comment);
+    BOOL (*shader_is_end)(void *data, const DWORD **ptr);
+};
+
+extern const struct wined3d_shader_frontend sm1_shader_frontend;
+extern const struct wined3d_shader_frontend sm4_shader_frontend;
+
+typedef void (*SHADER_HANDLER)(const struct wined3d_shader_instruction *);
 
 struct shader_caps {
@@ -418,4 +732,5 @@
     DWORD               PixelShaderVersion;
     float               PixelShader1xMaxValue;
+    DWORD               MaxPixelShaderConst;
 
     WINED3DVSHADERCAPS2_0   VS20Caps;
@@ -438,4 +753,50 @@
 };
 
+enum vertexprocessing_mode {
+    fixedfunction,
+    vertexshader,
+    pretransformed
+};
+
+#define WINED3D_CONST_NUM_UNUSED ~0U
+
+struct stb_const_desc {
+    unsigned char           texunit;
+    UINT                    const_num;
+};
+
+enum fogmode {
+    FOG_OFF,
+    FOG_LINEAR,
+    FOG_EXP,
+    FOG_EXP2
+};
+
+/* Stateblock dependent parameters which have to be hardcoded
+ * into the shader code
+ */
+struct ps_compile_args {
+    struct color_fixup_desc     color_fixup[MAX_FRAGMENT_SAMPLERS];
+    enum vertexprocessing_mode  vp_mode;
+    enum fogmode                fog;
+    /* Projected textures(ps 1.0-1.3) */
+    /* Texture types(2D, Cube, 3D) in ps 1.x */
+    BOOL                        srgb_correction;
+    WORD                        np2_fixup;
+    /* Bitmap for NP2 texcoord fixups (16 samplers max currently).
+       D3D9 has a limit of 16 samplers and the fixup is superfluous
+       in D3D10 (unconditional NP2 support mandatory). */
+};
+
+enum fog_src_type {
+    VS_FOG_Z        = 0,
+    VS_FOG_COORD    = 1
+};
+
+struct vs_compile_args {
+    WORD                        fog_src;
+    WORD                        swizzle_map;   /* MAX_ATTRIBS, 16 */
+};
+
 typedef struct {
     const SHADER_HANDLER *shader_instruction_handler_table;
@@ -443,15 +804,19 @@
     void (*shader_select_depth_blt)(IWineD3DDevice *iface, enum tex_types tex_type);
     void (*shader_deselect_depth_blt)(IWineD3DDevice *iface);
+    void (*shader_update_float_vertex_constants)(IWineD3DDevice *iface, UINT start, UINT count);
+    void (*shader_update_float_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count);
     void (*shader_load_constants)(IWineD3DDevice *iface, char usePS, char useVS);
-    void (*shader_cleanup)(IWineD3DDevice *iface);
-    void (*shader_color_correction)(const struct SHADER_OPCODE_ARG *arg, struct color_fixup_desc fixup);
+    void (*shader_load_np2fixup_constants)(IWineD3DDevice *iface, char usePS, char useVS);
     void (*shader_destroy)(IWineD3DBaseShader *iface);
     HRESULT (*shader_alloc_private)(IWineD3DDevice *iface);
     void (*shader_free_private)(IWineD3DDevice *iface);
     BOOL (*shader_dirtifyable_constants)(IWineD3DDevice *iface);
-    GLuint (*shader_generate_pshader)(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer);
-    void (*shader_generate_vshader)(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer);
+    GLuint (*shader_generate_pshader)(IWineD3DPixelShader *iface,
+            SHADER_BUFFER *buffer, const struct ps_compile_args *args);
+    GLuint (*shader_generate_vshader)(IWineD3DVertexShader *iface,
+            SHADER_BUFFER *buffer, const struct vs_compile_args *args);
     void (*shader_get_caps)(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *caps);
     BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup);
+    void (*shader_add_instruction_modifiers)(const struct wined3d_shader_instruction *ins);
 } shader_backend_t;
 
@@ -462,6 +827,6 @@
 /* X11 locking */
 
-extern void (*wine_tsx11_lock_ptr)(void);
-extern void (*wine_tsx11_unlock_ptr)(void);
+extern void (* CDECL wine_tsx11_lock_ptr)(void);
+extern void (* CDECL wine_tsx11_unlock_ptr)(void);
 
 /* As GLX relies on X, this is needed */
@@ -506,11 +871,8 @@
 /* DirectX Device Limits */
 /* --------------------- */
-#define MAX_LEVELS  256  /* Maximum number of mipmap levels. Guessed at 256 */
-
+#define MAX_MIP_LEVELS 32  /* Maximum number of mipmap levels. */
 #define MAX_STREAMS  16  /* Maximum possible streams - used for fixed size arrays
                             See MaxStreams in MSDN under GetDeviceCaps */
-                         /* Maximum number of constants provided to the shaders */
-#define HIGHEST_TRANSFORMSTATE 512 
-                         /* Highest value in WINED3DTRANSFORMSTATETYPE */
+#define HIGHEST_TRANSFORMSTATE WINED3DTS_WORLDMATRIX(255) /* Highest value in WINED3DTRANSFORMSTATETYPE */
 
 /* Checking of API calls */
@@ -558,6 +920,7 @@
 /* Trace vector and strided data information */
 #define TRACE_VECTOR(name) TRACE( #name "=(%f, %f, %f, %f)\n", name.x, name.y, name.z, name.w);
-#define TRACE_STRIDED(sd,name) TRACE( #name "=(data:%p, stride:%d, type:%d, vbo %d, stream %u)\n", \
-        sd->u.s.name.lpData, sd->u.s.name.dwStride, sd->u.s.name.dwType, sd->u.s.name.VBO, sd->u.s.name.streamNo);
+#define TRACE_STRIDED(si, name) TRACE( #name "=(data:%p, stride:%d, format:%#x, vbo %d, stream %u)\n", \
+        si->elements[name].data, si->elements[name].stride, si->elements[name].format_desc->format, \
+        si->elements[name].buffer_object, si->elements[name].stream_idx);
 
 /* Defines used for optimizations */
@@ -617,4 +980,62 @@
 #endif
 
+enum wined3d_ffp_idx
+{
+    WINED3D_FFP_POSITION = 0,
+    WINED3D_FFP_BLENDWEIGHT = 1,
+    WINED3D_FFP_BLENDINDICES = 2,
+    WINED3D_FFP_NORMAL = 3,
+    WINED3D_FFP_PSIZE = 4,
+    WINED3D_FFP_DIFFUSE = 5,
+    WINED3D_FFP_SPECULAR = 6,
+    WINED3D_FFP_TEXCOORD0 = 7,
+    WINED3D_FFP_TEXCOORD1 = 8,
+    WINED3D_FFP_TEXCOORD2 = 9,
+    WINED3D_FFP_TEXCOORD3 = 10,
+    WINED3D_FFP_TEXCOORD4 = 11,
+    WINED3D_FFP_TEXCOORD5 = 12,
+    WINED3D_FFP_TEXCOORD6 = 13,
+    WINED3D_FFP_TEXCOORD7 = 14,
+};
+
+enum wined3d_ffp_emit_idx
+{
+    WINED3D_FFP_EMIT_FLOAT1 = 0,
+    WINED3D_FFP_EMIT_FLOAT2 = 1,
+    WINED3D_FFP_EMIT_FLOAT3 = 2,
+    WINED3D_FFP_EMIT_FLOAT4 = 3,
+    WINED3D_FFP_EMIT_D3DCOLOR = 4,
+    WINED3D_FFP_EMIT_UBYTE4 = 5,
+    WINED3D_FFP_EMIT_SHORT2 = 6,
+    WINED3D_FFP_EMIT_SHORT4 = 7,
+    WINED3D_FFP_EMIT_UBYTE4N = 8,
+    WINED3D_FFP_EMIT_SHORT2N = 9,
+    WINED3D_FFP_EMIT_SHORT4N = 10,
+    WINED3D_FFP_EMIT_USHORT2N = 11,
+    WINED3D_FFP_EMIT_USHORT4N = 12,
+    WINED3D_FFP_EMIT_UDEC3 = 13,
+    WINED3D_FFP_EMIT_DEC3N = 14,
+    WINED3D_FFP_EMIT_FLOAT16_2 = 15,
+    WINED3D_FFP_EMIT_FLOAT16_4 = 16,
+    WINED3D_FFP_EMIT_COUNT = 17
+};
+
+struct wined3d_stream_info_element
+{
+    const struct GlPixelFormatDesc *format_desc;
+    GLsizei stride;
+    const BYTE *data;
+    UINT stream_idx;
+    GLuint buffer_object;
+};
+
+struct wined3d_stream_info
+{
+    struct wined3d_stream_info_element elements[MAX_ATTRIBS];
+    BOOL position_transformed;
+    WORD swizzle_map; /* MAX_ATTRIBS, 16 */
+    WORD use_map; /* MAX_ATTRIBS, 16 */
+};
+
 /*****************************************************************************
  * Prototypes
@@ -622,31 +1043,16 @@
 
 /* Routine common to the draw primitive and draw indexed primitive routines */
-void drawPrimitive(IWineD3DDevice *iface,
-                    int PrimitiveType,
-                    long NumPrimitives,
-                    /* for Indexed: */
-                    long  StartVertexIndex,
-                    UINT  numberOfVertices,
-                    long  StartIdx,
-                    short idxBytes,
-                    const void *idxData,
-                    int   minIndex);
-
-void primitiveDeclarationConvertToStridedData(
-     IWineD3DDevice *iface,
-     BOOL useVertexShaderFunction,
-     WineDirect3DVertexStridedData *strided,
-     BOOL *fixup);
-
+void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT numberOfVertices,
+        UINT start_idx, UINT idxBytes, const void *idxData, UINT minIndex);
 DWORD get_flexible_vertex_size(DWORD d3dvtVertexType);
 
 typedef void (WINE_GLAPI *glAttribFunc)(const void *data);
 typedef void (WINE_GLAPI *glMultiTexCoordFunc)(GLenum unit, const void *data);
-extern glAttribFunc position_funcs[WINED3DDECLTYPE_UNUSED];
-extern glAttribFunc diffuse_funcs[WINED3DDECLTYPE_UNUSED];
-extern glAttribFunc specular_funcs[WINED3DDECLTYPE_UNUSED];
-extern glAttribFunc normal_funcs[WINED3DDECLTYPE_UNUSED];
-extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3DDECLTYPE_UNUSED];
-extern glAttribFunc texcoord_funcs[WINED3DDECLTYPE_UNUSED];
+extern glAttribFunc position_funcs[WINED3D_FFP_EMIT_COUNT];
+extern glAttribFunc diffuse_funcs[WINED3D_FFP_EMIT_COUNT];
+extern glAttribFunc specular_func_3ubv;
+extern glAttribFunc specular_funcs[WINED3D_FFP_EMIT_COUNT];
+extern glAttribFunc normal_funcs[WINED3D_FFP_EMIT_COUNT];
+extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT];
 
 #define eps 1e-8
@@ -662,5 +1068,5 @@
 #define STATE_IS_RENDER(a) ((a) >= STATE_RENDER(1) && (a) <= STATE_RENDER(WINEHIGHEST_RENDER_STATE))
 
-#define STATE_TEXTURESTAGE(stage, num) (STATE_RENDER(WINEHIGHEST_RENDER_STATE) + (stage) * WINED3D_HIGHEST_TEXTURE_STATE + (num))
+#define STATE_TEXTURESTAGE(stage, num) (STATE_RENDER(WINEHIGHEST_RENDER_STATE) + 1 + (stage) * (WINED3D_HIGHEST_TEXTURE_STATE + 1) + (num))
 #define STATE_IS_TEXTURESTAGE(a) ((a) >= STATE_TEXTURESTAGE(0, 1) && (a) <= STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
 
@@ -749,5 +1155,5 @@
 
 /* "Base" state table */
-void compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs,
+HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs,
         const WineD3D_GL_Info *gl_info, const struct StateEntryTemplate *vertex,
         const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc);
@@ -757,5 +1163,6 @@
     HRESULT (*alloc_private)(IWineD3DDevice *iface);
     void (*free_private)(IWineD3DDevice *iface);
-    HRESULT (*set_shader)(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum textype, UINT width, UINT height);
+    HRESULT (*set_shader)(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc,
+            GLenum textype, UINT width, UINT height);
     void (*unset_shader)(IWineD3DDevice *iface);
     BOOL (*color_fixup_supported)(struct color_fixup_desc fixup);
@@ -764,4 +1171,10 @@
 extern const struct blit_shader ffp_blit;
 extern const struct blit_shader arbfp_blit;
+
+enum fogsource {
+    FOGSOURCE_FFP,
+    FOGSOURCE_VS,
+    FOGSOURCE_COORD,
+};
 
 /* The new context manager that should deal with onscreen and offscreen rendering */
@@ -781,18 +1194,24 @@
 
     /* Stores some information about the context state for optimization */
-    BOOL                    draw_buffer_dirty;
-    BOOL                    last_was_rhw;      /* true iff last draw_primitive was in xyzrhw mode */
-    BOOL                    last_was_pshader;
-    BOOL                    last_was_vshader;
-    BOOL                    last_was_foggy_shader;
-    BOOL                    namedArraysLoaded, numberedArraysLoaded;
-    BOOL                    lastWasPow2Texture[MAX_TEXTURES];
+    WORD draw_buffer_dirty : 1;
+    WORD last_was_rhw : 1;              /* true iff last draw_primitive was in xyzrhw mode */
+    WORD last_was_pshader : 1;
+    WORD last_was_vshader : 1;
+    WORD namedArraysLoaded : 1;
+    WORD numberedArraysLoaded : 1;
+    WORD last_was_blit : 1;
+    WORD last_was_ckey : 1;
+    WORD fog_coord : 1;
+    WORD isPBuffer : 1;
+    WORD fog_enabled : 1;
+    WORD num_untracked_materials : 2;   /* Max value 2 */
+    WORD padding : 3;
+    BYTE texShaderBumpMap;              /* MAX_TEXTURES, 8 */
+    BYTE lastWasPow2Texture;            /* MAX_TEXTURES, 8 */
+    DWORD                   numbered_array_mask;
     GLenum                  tracking_parm;     /* Which source is tracking current colour         */
-    unsigned char           num_untracked_materials;
     GLenum                  untracked_materials[2];
-    BOOL                    last_was_blit, last_was_ckey;
     UINT                    blit_w, blit_h;
-    char                    texShaderBumpMap;
-    BOOL                    fog_coord;
+    enum fogsource          fog_source;
 
     char                    *vshader_const_dirty, *pshader_const_dirty;
@@ -803,5 +1222,4 @@
     HDC                     hdc;
     HPBUFFERARB             pbuffer;
-    BOOL                    isPBuffer;
     GLint                   aux_buffers;
 
@@ -811,4 +1229,9 @@
     GLuint                  src_fbo;
     GLuint                  dst_fbo;
+
+    /* Extension emulation */
+    GLint                   gl_fog_source;
+    GLfloat                 fog_coord_value;
+    GLfloat                 color[4], fogstart, fogend, fogcolor[4];
 };
 
@@ -821,4 +1244,5 @@
 
 void ActivateContext(IWineD3DDeviceImpl *device, IWineD3DSurface *target, ContextUsage usage);
+WineD3DContext *getActiveContext(void);
 WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, HWND win, BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *pPresentParms);
 void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context);
@@ -896,7 +1320,8 @@
 };
 
-extern BOOL InitAdapters(void);
 extern BOOL initPixelFormats(WineD3D_GL_Info *gl_info);
+BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info);
 extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram);
+extern void add_gl_compat_wrappers(WineD3D_GL_Info *gl_info);
 
 /*****************************************************************************
@@ -932,5 +1357,5 @@
  * Fixed function pipeline replacements
  */
-#define ARG_UNUSED          0x3f
+#define ARG_UNUSED          0xff
 struct texture_stage_op
 {
@@ -945,5 +1370,5 @@
     unsigned                aarg0 : 8;
 
-    struct color_fixup_desc color_correction;
+    struct color_fixup_desc color_fixup;
     unsigned                tex_type : 3;
     unsigned                dst : 1;
@@ -954,10 +1379,5 @@
 struct ffp_frag_settings {
     struct texture_stage_op     op[MAX_TEXTURES];
-    enum {
-        FOG_OFF,
-        FOG_LINEAR,
-        FOG_EXP,
-        FOG_EXP2
-    } fog;
+    enum fogmode fog;
     /* Use an int instead of a char to get dword alignment */
     unsigned int sRGB_write;
@@ -988,7 +1408,12 @@
     IUnknown               *parent;
     UINT                    dxVersion;
+
+    UINT adapter_count;
+    struct WineD3DAdapter adapters[1];
 } IWineD3DImpl;
 
 extern const IWineD3DVtbl IWineD3D_Vtbl;
+
+BOOL InitAdapters(IWineD3DImpl *This);
 
 /* TODO: setup some flags in the registry to enable, disable pbuffer support
@@ -1004,4 +1429,9 @@
  * IWineD3DDevice implementation structure
  */
+#define WINED3D_UNMAPPED_STAGE ~0U
+
+/* Multithreaded flag. Removed from the public header to signal that IWineD3D::CreateDevice ignores it */
+#define WINED3DCREATE_MULTITHREADED 0x00000004
+
 struct IWineD3DDeviceImpl
 {
@@ -1012,4 +1442,5 @@
     /* WineD3D Information  */
     IUnknown               *parent;
+    IWineD3DDeviceParent   *device_parent;
     IWineD3D               *wineD3D;
     struct WineD3DAdapter  *adapter;
@@ -1037,9 +1468,23 @@
 
     unsigned int max_ffp_textures, max_ffp_texture_stages;
-
-    /* To store */
-    BOOL                    view_ident;        /* true iff view matrix is identity                */
-    BOOL                    untransformed;
-    BOOL                    vertexBlendUsed;   /* To avoid needless setting of the blend matrices */
+    DWORD d3d_vshader_constantF, d3d_pshader_constantF; /* Advertised d3d caps, not GL ones */
+
+    WORD view_ident : 1;                /* true iff view matrix is identity */
+    WORD untransformed : 1;
+    WORD vertexBlendUsed : 1;           /* To avoid needless setting of the blend matrices */
+    WORD isRecordingState : 1;
+    WORD isInDraw : 1;
+    WORD render_offscreen : 1;
+    WORD bCursorVisible : 1;
+    WORD haveHardwareCursor : 1;
+    WORD d3d_initialized : 1;
+    WORD inScene : 1;                   /* A flag to check for proper BeginScene / EndScene call pairs */
+    WORD softwareVertexProcessing : 1;  /* process vertex shaders using software or hardware */
+    WORD useDrawStridedSlow : 1;
+    WORD instancedDraw : 1;
+    WORD padding : 3;
+
+    BYTE fixed_function_usage_map;      /* MAX_TEXTURES, 8 */
+
 #define DDRAW_PITCH_ALIGNMENT 8
 #define D3D8_PITCH_ALIGNMENT 4
@@ -1047,8 +1492,6 @@
 
     /* State block related */
-    BOOL                    isRecordingState;
     IWineD3DStateBlockImpl *stateBlock;
     IWineD3DStateBlockImpl *updateStateBlock;
-    BOOL                   isInDraw;
 
     /* Internal use fields  */
@@ -1080,5 +1523,4 @@
 
     /* For rendering to a texture using glCopyTexImage */
-    BOOL                    render_offscreen;
     GLenum                  *draw_buffers;
     GLuint                  depth_blt_texture;
@@ -1088,5 +1530,4 @@
 
     /* Cursor management */
-    BOOL                    bCursorVisible;
     UINT                    xHotSpot;
     UINT                    yHotSpot;
@@ -1095,5 +1536,4 @@
     UINT                    cursorWidth, cursorHeight;
     GLuint                  cursorTexture;
-    BOOL                    haveHardwareCursor;
     HCURSOR                 hardwareCursor;
 
@@ -1104,16 +1544,6 @@
     UINT                          dummyTextureName[MAX_TEXTURES];
 
-    /* Debug stream management */
-    BOOL                     debug;
-
     /* Device state management */
     HRESULT                 state;
-    BOOL                    d3d_initialized;
-
-    /* A flag to check for proper BeginScene / EndScene call pairs */
-    BOOL inScene;
-
-    /* process vertex shaders using software or hardware */
-    BOOL softwareVertexProcessing;
 
     /* DirectDraw stuff */
@@ -1127,11 +1557,8 @@
     DWORD                     texUnitMap[MAX_COMBINED_SAMPLERS];
     DWORD                     rev_tex_unit_map[MAX_COMBINED_SAMPLERS];
-    BOOL                      fixed_function_usage_map[MAX_TEXTURES];
 
     /* Stream source management */
-    WineDirect3DVertexStridedData strided_streams;
+    struct wined3d_stream_info strided_streams;
     const WineDirect3DVertexStridedData *up_strided;
-    BOOL                      useDrawStridedSlow;
-    BOOL                      instancedDraw;
 
     /* Context management */
@@ -1150,6 +1577,10 @@
 };
 
-extern const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl, IWineD3DDevice_DirtyConst_Vtbl;
-
+extern const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl;
+
+void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
+        BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup);
+void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
+        const struct WineDirect3DVertexStridedData *strided, struct wined3d_stream_info *stream_info);
 HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This,  IWineD3DSurfaceImpl *target, DWORD Count,
                                         CONST WINED3DRECT* pRects, DWORD Flags, WINED3DCOLOR Color,
@@ -1195,5 +1626,5 @@
     UINT                    size;
     DWORD                   usage;
-    WINED3DFORMAT           format;
+    const struct GlPixelFormatDesc *format_desc;
     DWORD                   priority;
     BYTE                   *allocatedMemory; /* Pointer to the real data location */
@@ -1218,4 +1649,7 @@
 HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID guid,
         void *data, DWORD *data_size);
+HRESULT resource_init(struct IWineD3DResourceClass *resource, WINED3DRESOURCETYPE resource_type,
+        IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc,
+        WINED3DPOOL pool, IUnknown *parent);
 WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface);
 DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority);
@@ -1225,72 +1659,4 @@
 /* Tests show that the start address of resources is 32 byte aligned */
 #define RESOURCE_ALIGNMENT 32
-
-/*****************************************************************************
- * IWineD3DVertexBuffer implementation structure (extends IWineD3DResourceImpl)
- */
-enum vbo_conversion_type {
-    CONV_NONE               = 0,
-    CONV_D3DCOLOR           = 1,
-    CONV_POSITIONT          = 2,
-    CONV_FLOAT16_2          = 3 /* Also handles FLOAT16_4 */
-
-    /* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
-     * fixed function semantics as D3DCOLOR or FLOAT16
-     */
-};
-
-typedef struct IWineD3DVertexBufferImpl
-{
-    /* IUnknown & WineD3DResource Information     */
-    const IWineD3DVertexBufferVtbl *lpVtbl;
-    IWineD3DResourceClass     resource;
-
-    /* WineD3DVertexBuffer specifics */
-    DWORD                     fvf;
-
-    /* Vertex buffer object support */
-    GLuint                    vbo;
-    BYTE                      Flags;
-    LONG                      bindCount;
-    LONG                      vbo_size;
-    GLenum                    vbo_usage;
-
-    UINT                      dirtystart, dirtyend;
-    LONG                      lockcount;
-
-    LONG                      declChanges, draws;
-    /* Last description of the buffer */
-    DWORD                     stride;       /* 0 if no conversion               */
-    enum vbo_conversion_type  *conv_map;    /* NULL if no conversion            */
-
-    /* Extra load offsets, for FLOAT16 conversion */
-    DWORD                     *conv_shift;  /* NULL if no shifted conversion    */
-    DWORD                     conv_stride;  /* 0 if no shifted conversion       */
-} IWineD3DVertexBufferImpl;
-
-extern const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl;
-
-#define VBFLAG_OPTIMIZED      0x01    /* Optimize has been called for the VB */
-#define VBFLAG_DIRTY          0x02    /* Buffer data has been modified */
-#define VBFLAG_HASDESC        0x04    /* A vertex description has been found */
-#define VBFLAG_CREATEVBO      0x08    /* Attempt to create a VBO next PreLoad */
-
-/*****************************************************************************
- * IWineD3DIndexBuffer implementation structure (extends IWineD3DResourceImpl)
- */
-typedef struct IWineD3DIndexBufferImpl
-{
-    /* IUnknown & WineD3DResource Information     */
-    const IWineD3DIndexBufferVtbl *lpVtbl;
-    IWineD3DResourceClass     resource;
-
-    GLuint                    vbo;
-    UINT                      dirtystart, dirtyend;
-    LONG                      lockcount;
-
-    /* WineD3DVertexBuffer specifics */
-} IWineD3DIndexBufferImpl;
-
-extern const IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl;
 
 /*****************************************************************************
@@ -1317,4 +1683,12 @@
 } winetexturestates;
 
+enum WINED3DSRGB
+{
+    SRGB_ANY                                = 0,    /* Uses the cached value(e.g. external calls) */
+    SRGB_RGB                                = 1,    /* Loads the rgb texture */
+    SRGB_SRGB                               = 2,    /* Loads the srgb texture */
+    SRGB_BOTH                               = 3,    /* Loads both textures */
+};
+
 /*****************************************************************************
  * IWineD3DBaseTexture implementation structure (extends IWineD3DResourceImpl)
@@ -1323,7 +1697,8 @@
 {
     DWORD                   states[MAX_WINETEXTURESTATES];
+    DWORD                   srgbstates[MAX_WINETEXTURESTATES];
     UINT                    levels;
-    BOOL                    dirty;
-    UINT                    textureName;
+    BOOL                    dirty, srgbDirty;
+    UINT                    textureName, srgbTextureName;
     float                   pow2Matrix[16];
     UINT                    LOD;
@@ -1332,9 +1707,14 @@
     DWORD                   sampler;
     BOOL                    is_srgb;
-    UINT                    srgb_mode_change_count;
+    BOOL                    pow2Matrix_identity;
     const struct min_lookup *minMipLookup;
     const GLenum            *magLookup;
-    struct color_fixup_desc shader_color_fixup;
+    void                    (*internal_preload)(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb);
 } IWineD3DBaseTextureClass;
+
+void texture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb);
+void cubetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb);
+void volumetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb);
+void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb);
 
 typedef struct IWineD3DBaseTextureImpl
@@ -1350,5 +1730,5 @@
         const DWORD texture_states[WINED3D_HIGHEST_TEXTURE_STATE + 1],
         const DWORD sampler_states[WINED3D_HIGHEST_SAMPLER_STATE + 1]);
-HRESULT basetexture_bind(IWineD3DBaseTexture *iface);
+HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surface_desc);
 void basetexture_cleanup(IWineD3DBaseTexture *iface);
 void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface);
@@ -1357,8 +1737,13 @@
 DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface);
 DWORD basetexture_get_lod(IWineD3DBaseTexture *iface);
+void basetexture_init(struct IWineD3DBaseTextureClass *texture, UINT levels, DWORD usage);
 HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE filter_type);
 BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty);
 DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD new_lod);
 void basetexture_unload(IWineD3DBaseTexture *iface);
+static inline void basetexture_setsrgbcache(IWineD3DBaseTexture *iface, BOOL srgb) {
+    IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
+    This->baseTexture.is_srgb = srgb;
+}
 
 /*****************************************************************************
@@ -1373,8 +1758,5 @@
 
     /* IWineD3DTexture */
-    IWineD3DSurface          *surfaces[MAX_LEVELS];
-    
-    UINT                      width;
-    UINT                      height;
+    IWineD3DSurface          *surfaces[MAX_MIP_LEVELS];
     UINT                      target;
     BOOL                      cond_np2;
@@ -1395,5 +1777,5 @@
 
     /* IWineD3DCubeTexture */
-    IWineD3DSurface          *surfaces[6][MAX_LEVELS];
+    IWineD3DSurface          *surfaces[6][MAX_MIP_LEVELS];
 } IWineD3DCubeTextureImpl;
 
@@ -1419,6 +1801,4 @@
     WINED3DVOLUMET_DESC      currentDesc;
     IWineD3DBase            *container;
-    UINT                    bytesPerPixel;
-
     BOOL                    lockable;
     BOOL                    locked;
@@ -1426,9 +1806,9 @@
     WINED3DBOX              dirtyBox;
     BOOL                    dirty;
-
-
 } IWineD3DVolumeImpl;
 
 extern const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl;
+
+void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box);
 
 /*****************************************************************************
@@ -1443,5 +1823,5 @@
 
     /* IWineD3DVolumeTexture */
-    IWineD3DVolume           *volumes[MAX_LEVELS];
+    IWineD3DVolume           *volumes[MAX_MIP_LEVELS];
 } IWineD3DVolumeTextureImpl;
 
@@ -1511,6 +1891,4 @@
     PALETTEENTRY              *palette9; /* D3D8/9 style palette handling */
 
-    UINT                      bytesPerPixel;
-
     /* TODO: move this off into a management class(maybe!) */
     DWORD                      Flags;
@@ -1518,5 +1896,4 @@
     UINT                      pow2Width;
     UINT                      pow2Height;
-    float                     heightscale;
 
     /* A method to retrieve the drawable size. Not in the Vtable to make it changeable */
@@ -1535,5 +1912,4 @@
 
     glDescriptor              glDescription;
-    BOOL                      srgb;
 
     /* For GetDC */
@@ -1604,5 +1980,5 @@
         IWineD3DSurface *Source, const RECT *rsrc, DWORD trans);
 HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags);
-void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface);
+void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb);
 const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface);
 
@@ -1622,9 +1998,9 @@
 #define SFLAG_LOCKED        0x00000020 /* Surface is locked atm */
 #define SFLAG_INTEXTURE     0x00000040 /* The GL texture contains the newest surface content */
-#define SFLAG_INDRAWABLE    0x00000080 /* The gl drawable contains the most up to date data */
-#define SFLAG_INSYSMEM      0x00000100 /* The system memory copy is most up to date */
-#define SFLAG_NONPOW2       0x00000200 /* Surface sizes are not a power of 2 */
-#define SFLAG_DYNLOCK       0x00000400 /* Surface is often locked by the app */
-#define SFLAG_DYNCHANGE     0x00000C00 /* Surface contents are changed very often, implies DYNLOCK */
+#define SFLAG_INSRGBTEX     0x00000080 /* The GL srgb texture contains the newest surface content */
+#define SFLAG_INDRAWABLE    0x00000100 /* The gl drawable contains the most up to date data */
+#define SFLAG_INSYSMEM      0x00000200 /* The system memory copy is most up to date */
+#define SFLAG_NONPOW2       0x00000400 /* Surface sizes are not a power of 2 */
+#define SFLAG_DYNLOCK       0x00000800 /* Surface is often locked by the app */
 #define SFLAG_DCINUSE       0x00001000 /* Set between GetDC and ReleaseDC calls */
 #define SFLAG_LOST          0x00002000 /* Surface lost flag for DDraw */
@@ -1633,9 +2009,11 @@
 #define SFLAG_CLIENT        0x00010000 /* GL_APPLE_client_storage is used on that texture */
 #define SFLAG_ALLOCATED     0x00020000 /* A gl texture is allocated for this surface */
-#define SFLAG_PBO           0x00040000 /* Has a PBO attached for speeding up data transfers for dynamically locked surfaces */
-#define SFLAG_NORMCOORD     0x00080000 /* Set if the GL texture coords are normalized(non-texture rectangle) */
-#define SFLAG_DS_ONSCREEN   0x00100000 /* Is a depth stencil, last modified onscreen */
-#define SFLAG_DS_OFFSCREEN  0x00200000 /* Is a depth stencil, last modified offscreen */
-#define SFLAG_INOVERLAYDRAW 0x00400000 /* Overlay drawing is in progress. Recursion prevention */
+#define SFLAG_SRGBALLOCATED 0x00040000 /* A srgb gl texture is allocated for this surface */
+#define SFLAG_PBO           0x00080000 /* Has a PBO attached for speeding up data transfers for dynamically locked surfaces */
+#define SFLAG_NORMCOORD     0x00100000 /* Set if the GL texture coords are normalized(non-texture rectangle) */
+#define SFLAG_DS_ONSCREEN   0x00200000 /* Is a depth stencil, last modified onscreen */
+#define SFLAG_DS_OFFSCREEN  0x00400000 /* Is a depth stencil, last modified offscreen */
+#define SFLAG_INOVERLAYDRAW 0x00800000 /* Overlay drawing is in progress. Recursion prevention */
+#define SFLAG_SWAPCHAIN     0x01000000 /* The surface is part of a swapchain */
 
 /* In some conditions the surface memory must not be freed:
@@ -1645,5 +2023,4 @@
  * SFLAG_LOCKED: The app requires access to the surface data
  * SFLAG_DYNLOCK: Avoid freeing the data for performance
- * SFLAG_DYNCHANGE: Same reason as DYNLOCK
  * SFLAG_PBO: PBOs don't use 'normal' memory. It is either allocated by the driver or must be NULL.
  * SFLAG_CLIENT: OpenGL uses our memory as backup
@@ -1654,5 +2031,4 @@
                              SFLAG_LOCKED     | \
                              SFLAG_DYNLOCK    | \
-                             SFLAG_DYNCHANGE  | \
                              SFLAG_USERPTR    | \
                              SFLAG_PBO        | \
@@ -1661,5 +2037,6 @@
 #define SFLAG_LOCATIONS     (SFLAG_INSYSMEM   | \
                              SFLAG_INTEXTURE  | \
-                             SFLAG_INDRAWABLE)
+                             SFLAG_INDRAWABLE | \
+                             SFLAG_INSRGBTEX)
 
 #define SFLAG_DS_LOCATIONS  (SFLAG_DS_ONSCREEN | \
@@ -1689,4 +2066,7 @@
     CONVERT_V16U16,
     CONVERT_A4L4,
+    CONVERT_G16R16,
+    CONVERT_R16G16F,
+    CONVERT_R32G32F,
 } CONVERT_TYPES;
 
@@ -1698,10 +2078,17 @@
  * IWineD3DVertexDeclaration implementation structure
  */
-typedef struct attrib_declaration {
-    DWORD usage;
-    DWORD idx;
-} attrib_declaration;
-
 #define MAX_ATTRIBS 16
+
+struct wined3d_vertex_declaration_element
+{
+    const struct GlPixelFormatDesc *format_desc;
+    BOOL ffp_valid;
+    WORD input_slot;
+    WORD offset;
+    UINT output_slot;
+    BYTE method;
+    BYTE usage;
+    BYTE usage_idx;
+};
 
 typedef struct IWineD3DVertexDeclarationImpl {
@@ -1713,7 +2100,6 @@
     IWineD3DDeviceImpl      *wineD3DDevice;
 
-    WINED3DVERTEXELEMENT    *pDeclarationWine;
-    BOOL                    *ffp_valid;
-    UINT                    declarationWNumElements;
+    struct wined3d_vertex_declaration_element *elements;
+    UINT element_count;
 
     DWORD                   streams[MAX_STREAMS];
@@ -1721,11 +2107,10 @@
     BOOL                    position_transformed;
     BOOL                    half_float_conv_needed;
-
-    /* Ordered array of declaration types that need swizzling in a vshader */
-    attrib_declaration      swizzled_attribs[MAX_ATTRIBS];
-    UINT                    num_swizzled_attribs;
 } IWineD3DVertexDeclarationImpl;
 
 extern const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl;
+
+HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *This,
+        const WINED3DVERTEXELEMENT *elements, UINT element_count);
 
 /*****************************************************************************
@@ -1737,33 +2122,28 @@
 /*   to resolve everything we need, so doing it manually for now */
 typedef struct SAVEDSTATES {
-        BOOL                      indices;
-        BOOL                      material;
-        BOOL                      fvf;
-        BOOL                      streamSource[MAX_STREAMS];
-        BOOL                      streamFreq[MAX_STREAMS];
-        BOOL                      textures[MAX_COMBINED_SAMPLERS];
-        BOOL                      transform[HIGHEST_TRANSFORMSTATE + 1];
-        BOOL                      viewport;
-        BOOL                      renderState[WINEHIGHEST_RENDER_STATE + 1];
-        BOOL                      textureState[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
-        BOOL                      samplerState[MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1];
-        BOOL                      clipplane[MAX_CLIPPLANES];
-        BOOL                      vertexDecl;
-        BOOL                      pixelShader;
-        WORD                      pixelShaderConstantsB;
-        WORD                      pixelShaderConstantsI;
-        BOOL                     *pixelShaderConstantsF;
-        BOOL                      vertexShader;
-        WORD                      vertexShaderConstantsB;
-        WORD                      vertexShaderConstantsI;
-        BOOL                     *vertexShaderConstantsF;
-        BOOL                      scissorRect;
+    DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1];
+    WORD streamSource;                          /* MAX_STREAMS, 16 */
+    WORD streamFreq;                            /* MAX_STREAMS, 16 */
+    DWORD renderState[(WINEHIGHEST_RENDER_STATE >> 5) + 1];
+    DWORD textureState[MAX_TEXTURES];           /* WINED3D_HIGHEST_TEXTURE_STATE + 1, 18 */
+    WORD samplerState[MAX_COMBINED_SAMPLERS];   /* WINED3D_HIGHEST_SAMPLER_STATE + 1, 14 */
+    DWORD textures;                             /* MAX_COMBINED_SAMPLERS, 20 */
+    DWORD clipplane;                            /* WINED3DMAXUSERCLIPPLANES, 32 */
+    WORD pixelShaderConstantsB;                 /* MAX_CONST_B, 16 */
+    WORD pixelShaderConstantsI;                 /* MAX_CONST_I, 16 */
+    BOOL *pixelShaderConstantsF;
+    WORD vertexShaderConstantsB;                /* MAX_CONST_B, 16 */
+    WORD vertexShaderConstantsI;                /* MAX_CONST_I, 16 */
+    BOOL *vertexShaderConstantsF;
+    WORD primitive_type : 1;
+    WORD indices : 1;
+    WORD material : 1;
+    WORD viewport : 1;
+    WORD vertexDecl : 1;
+    WORD pixelShader : 1;
+    WORD vertexShader : 1;
+    WORD scissorRect : 1;
+    WORD padding : 1;
 } SAVEDSTATES;
-
-typedef struct {
-    struct  list entry;
-    DWORD   count;
-    DWORD   idx[13];
-} constants_entry;
 
 struct StageState {
@@ -1785,9 +2165,5 @@
     /* Array indicating whether things have been set or changed */
     SAVEDSTATES               changed;
-    struct list               set_vconstantsF;
-    struct list               set_pconstantsF;
-
-    /* Drawing - Vertex Shader or FVF related */
-    DWORD                     fvf;
+
     /* Vertex Shader Declaration */
     IWineD3DVertexDeclaration *vertexDecl;
@@ -1800,14 +2176,18 @@
     float                     *vertexShaderConstantF;
 
+    /* primitive type */
+    GLenum gl_primitive_type;
+
     /* Stream Source */
     BOOL                      streamIsUP;
     UINT                      streamStride[MAX_STREAMS];
     UINT                      streamOffset[MAX_STREAMS + 1 /* tesselated pseudo-stream */ ];
-    IWineD3DVertexBuffer     *streamSource[MAX_STREAMS];
+    IWineD3DBuffer           *streamSource[MAX_STREAMS];
     UINT                      streamFreq[MAX_STREAMS + 1];
     UINT                      streamFlags[MAX_STREAMS + 1];     /*0 | WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA  */
 
     /* Indices */
-    IWineD3DIndexBuffer*      pIndexData;
+    IWineD3DBuffer*           pIndexData;
+    WINED3DFORMAT             IndexFmt;
     INT                       baseVertexIndex;
     INT                       loadBaseVertexIndex; /* non-indexed drawing needs 0 here, indexed baseVertexIndex */
@@ -1845,5 +2225,4 @@
     /* Texture */
     IWineD3DBaseTexture      *textures[MAX_COMBINED_SAMPLERS];
-    int                       textureDimensions[MAX_COMBINED_SAMPLERS];
 
     /* Texture State Stage */
@@ -1873,5 +2252,5 @@
     DWORD                     *contained_ps_consts_f;
     unsigned int              num_contained_ps_consts_f;
-    struct StageState         contained_tss_states[MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE)];
+    struct StageState         contained_tss_states[MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1)];
     unsigned int              num_contained_tss_states;
     struct StageState         contained_sampler_states[MAX_COMBINED_SAMPLERS * WINED3D_HIGHEST_SAMPLER_STATE];
@@ -1938,4 +2317,66 @@
     WineD3DContext *ctx;
 } WineQueryEventData;
+
+/* IWineD3DBuffer */
+
+/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
+ * fixed function semantics as D3DCOLOR or FLOAT16 */
+enum wined3d_buffer_conversion_type
+{
+    CONV_NONE,
+    CONV_D3DCOLOR,
+    CONV_POSITIONT,
+    CONV_FLOAT16_2, /* Also handles FLOAT16_4 */
+};
+
+#define WINED3D_BUFFER_OPTIMIZED    0x01    /* Optimize has been called for the buffer */
+#define WINED3D_BUFFER_DIRTY        0x02    /* Buffer data has been modified */
+#define WINED3D_BUFFER_HASDESC      0x04    /* A vertex description has been found */
+#define WINED3D_BUFFER_CREATEBO     0x08    /* Attempt to create a buffer object next PreLoad */
+#define WINED3D_BUFFER_DOUBLEBUFFER 0x10    /* Use a vbo and local allocated memory */
+
+struct wined3d_buffer
+{
+    const struct IWineD3DBufferVtbl *vtbl;
+    IWineD3DResourceClass resource;
+
+    struct wined3d_buffer_desc desc;
+
+    GLuint buffer_object;
+    GLenum buffer_object_usage;
+    GLenum buffer_type_hint;
+    UINT buffer_object_size;
+    LONG bind_count;
+    DWORD flags;
+
+    UINT dirty_start;
+    UINT dirty_end;
+    LONG lock_count;
+
+    /* conversion stuff */
+    UINT conversion_count;
+    UINT draw_count;
+    UINT stride;                                            /* 0 if no conversion */
+    UINT conversion_stride;                                 /* 0 if no shifted conversion */
+    enum wined3d_buffer_conversion_type *conversion_map;    /* NULL if no conversion */
+    /* Extra load offsets, for FLOAT16 conversion */
+    UINT *conversion_shift;                                 /* NULL if no shifted conversion */
+};
+
+extern const IWineD3DBufferVtbl wined3d_buffer_vtbl;
+const BYTE *buffer_get_memory(IWineD3DBuffer *iface, UINT offset, GLuint *buffer_object);
+const BYTE *buffer_get_sysmem(struct wined3d_buffer *This);
+
+/* IWineD3DRendertargetView */
+struct wined3d_rendertarget_view
+{
+    const struct IWineD3DRendertargetViewVtbl *vtbl;
+    LONG refcount;
+
+    IWineD3DResource *resource;
+    IUnknown *parent;
+};
+
+extern const IWineD3DRendertargetViewVtbl wined3d_rendertarget_view_vtbl;
 
 /*****************************************************************************
@@ -1999,5 +2440,4 @@
 const char* debug_d3dusagequery(DWORD usagequery);
 const char* debug_d3ddeclmethod(WINED3DDECLMETHOD method);
-const char* debug_d3ddecltype(WINED3DDECLTYPE type);
 const char* debug_d3ddeclusage(BYTE usage);
 const char* debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType);
@@ -2013,7 +2453,6 @@
 const char *debug_d3ddegree(WINED3DDEGREETYPE order);
 const char* debug_d3dtop(WINED3DTEXTUREOP d3dtop);
-const char *debug_fixup_channel_source(enum fixup_channel_source source);
-const char *debug_yuv_fixup(enum yuv_fixup yuv_fixup);
 void dump_color_fixup_desc(struct color_fixup_desc fixup);
+const char *debug_surflocation(DWORD flag);
 
 /* Routines for GL <-> D3D values */
@@ -2027,5 +2466,10 @@
 void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context);
 void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context);
-
+void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context);
+void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context);
+void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context);
+void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context);
+
+void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect);
 void surface_force_reload(IWineD3DSurface *iface);
 GLenum surface_get_gl_buffer(IWineD3DSurface *iface, IWineD3DSwapChain *swapchain);
@@ -2033,40 +2477,15 @@
 void surface_modify_ds_location(IWineD3DSurface *iface, DWORD location);
 void surface_set_compatible_renderbuffer(IWineD3DSurface *iface, unsigned int width, unsigned int height);
-void surface_set_texture_name(IWineD3DSurface *iface, GLuint name);
+void surface_set_texture_name(IWineD3DSurface *iface, GLuint name, BOOL srgb_name);
 void surface_set_texture_target(IWineD3DSurface *iface, GLenum target);
 
-BOOL getColorBits(WINED3DFORMAT fmt, short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize);
-BOOL getDepthStencilBits(WINED3DFORMAT fmt, short *depthSize, short *stencilSize);
+BOOL getColorBits(const struct GlPixelFormatDesc *format_desc,
+        short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize);
+BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, short *depthSize, short *stencilSize);
 
 /* Math utils */
 void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2);
+UINT wined3d_log2i(UINT32 x);
 unsigned int count_bits(unsigned int mask);
-
-/*****************************************************************************
- * To enable calling of inherited functions, requires prototypes 
- *
- * Note: Only require classes which are subclassed, ie resource, basetexture, 
- */
-
-    /* IWineD3DVertexBuffer */
-    extern const BYTE *IWineD3DVertexBufferImpl_GetMemory(IWineD3DVertexBuffer* iface, DWORD iOffset, GLint *vbo);
-
-/* TODO: Make this dynamic, based on shader limits ? */
-#define MAX_REG_ADDR 1
-#define MAX_REG_TEMP 32
-#define MAX_REG_TEXCRD 8
-#define MAX_REG_INPUT 12
-#define MAX_REG_OUTPUT 12
-#define MAX_CONST_I 16
-#define MAX_CONST_B 16
-
-/* FIXME: This needs to go up to 2048 for
- * Shader model 3 according to msdn (and for software shaders) */
-#define MAX_LABELS 16
-
-typedef struct semantic {
-    DWORD usage;
-    DWORD reg;
-} semantic;
 
 typedef struct local_constant {
@@ -2075,67 +2494,4 @@
     DWORD value[4];
 } local_constant;
-
-typedef struct shader_reg_maps {
-
-    char texcoord[MAX_REG_TEXCRD];          /* pixel < 3.0 */
-    char temporary[MAX_REG_TEMP];           /* pixel, vertex */
-    char address[MAX_REG_ADDR];             /* vertex */
-    char packed_input[MAX_REG_INPUT];       /* pshader >= 3.0 */
-    char packed_output[MAX_REG_OUTPUT];     /* vertex >= 3.0 */
-    char attributes[MAX_ATTRIBS];           /* vertex */
-    char labels[MAX_LABELS];                /* pixel, vertex */
-    DWORD texcoord_mask[MAX_REG_TEXCRD];    /* vertex < 3.0 */
-
-    /* Sampler usage tokens 
-     * Use 0 as default (bit 31 is always 1 on a valid token) */
-    DWORD samplers[max(MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS)];
-    BOOL bumpmat[MAX_TEXTURES], luminanceparams[MAX_TEXTURES];
-    char usesnrm, vpos, usesdsy;
-    char usesrelconstF;
-
-    /* Whether or not loops are used in this shader, and nesting depth */
-    unsigned loop_depth;
-
-    /* Whether or not this shader uses fog */
-    char fog;
-
-} shader_reg_maps;
-
-/* Undocumented opcode controls */
-#define INST_CONTROLS_SHIFT 16
-#define INST_CONTROLS_MASK 0x00ff0000
-
-typedef enum COMPARISON_TYPE {
-    COMPARISON_GT = 1,
-    COMPARISON_EQ = 2,
-    COMPARISON_GE = 3,
-    COMPARISON_LT = 4,
-    COMPARISON_NE = 5,
-    COMPARISON_LE = 6
-} COMPARISON_TYPE;
-
-typedef struct SHADER_OPCODE {
-    unsigned int  opcode;
-    const char*   name;
-    const char*   glname;
-    char          dst_token;
-    CONST UINT    num_params;
-    enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx;
-    DWORD         min_version;
-    DWORD         max_version;
-} SHADER_OPCODE;
-
-typedef struct SHADER_OPCODE_ARG {
-    IWineD3DBaseShader* shader;
-    const shader_reg_maps *reg_maps;
-    CONST SHADER_OPCODE* opcode;
-    DWORD opcode_token;
-    DWORD dst;
-    DWORD dst_addr;
-    DWORD predicate;
-    DWORD src[4];
-    DWORD src_addr[4];
-    SHADER_BUFFER* buffer;
-} SHADER_OPCODE_ARG;
 
 typedef struct SHADER_LIMITS {
@@ -2171,6 +2527,5 @@
     SHADER_BUFFER* buffer,
     const char* fmt, ...) PRINTF_ATTR(2,3);
-
-const SHADER_OPCODE *shader_get_opcode(const SHADER_OPCODE *shader_ins, DWORD shader_version, DWORD code);
+int shader_vaddline(SHADER_BUFFER *buffer, const char *fmt, va_list args);
 
 /* Vertex shader utility functions */
@@ -2180,12 +2535,5 @@
     unsigned int* regnum);
 
-extern BOOL vshader_input_is_color(
-    IWineD3DVertexShader* iface,
-    unsigned int regnum);
-
 extern HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object);
-
-/* GLSL helper functions */
-extern void shader_glsl_add_instruction_modifiers(const SHADER_OPCODE_ARG *arg);
 
 /*****************************************************************************
@@ -2195,16 +2543,12 @@
 {
     LONG                            ref;
-    DWORD                           hex_version;
     SHADER_LIMITS                   limits;
     SHADER_PARSE_STATE              parse_state;
-    CONST SHADER_OPCODE             *shader_ins;
     DWORD                          *function;
     UINT                            functionLength;
-    BOOL                            is_compiled;
     UINT                            cur_loop_depth, cur_loop_regno;
     BOOL                            load_local_constsF;
-
-    /* Type of shader backend */
-    int shader_mode;
+    const struct wined3d_shader_frontend *frontend;
+    void *frontend_data;
 
     /* Programs this shader is linked with */
@@ -2217,9 +2561,4 @@
     shader_reg_maps reg_maps;
 
-    UINT                sampled_samplers[MAX_COMBINED_SAMPLERS];
-    UINT                num_sampled_samplers;
-
-    UINT recompile_count;
-
     /* Pointer to the parent device */
     IWineD3DDevice *device;
@@ -2236,54 +2575,37 @@
 } IWineD3DBaseShaderImpl;
 
-HRESULT  WINAPI IWineD3DBaseShaderImpl_QueryInterface(IWineD3DBaseShader *iface, REFIID riid, LPVOID *ppobj);
-ULONG  WINAPI IWineD3DBaseShaderImpl_AddRef(IWineD3DBaseShader *iface);
-ULONG  WINAPI IWineD3DBaseShaderImpl_Release(IWineD3DBaseShader *iface);
-
-extern HRESULT shader_get_registers_used(
-    IWineD3DBaseShader *iface,
-    shader_reg_maps* reg_maps,
-    semantic* semantics_in,
-    semantic* semantics_out,
-    CONST DWORD* pToken,
-    IWineD3DStateBlockImpl *stateBlock);
-
-extern void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER *buffer,
+void shader_buffer_init(struct SHADER_BUFFER *buffer);
+void shader_buffer_free(struct SHADER_BUFFER *buffer);
+void shader_cleanup(IWineD3DBaseShader *iface);
+void shader_dump_src_param(const struct wined3d_shader_src_param *param,
+        const struct wined3d_shader_version *shader_version);
+void shader_dump_dst_param(const struct wined3d_shader_dst_param *param,
+        const struct wined3d_shader_version *shader_version);
+void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER *buffer,
         const shader_reg_maps *reg_maps, const DWORD *pFunction);
-
-extern void shader_trace_init(
-    IWineD3DBaseShader *iface,
-    const DWORD* pFunction);
-
-static inline int shader_get_regtype(const DWORD param) {
-    return (((param & WINED3DSP_REGTYPE_MASK) >> WINED3DSP_REGTYPE_SHIFT) |
-            ((param & WINED3DSP_REGTYPE_MASK2) >> WINED3DSP_REGTYPE_SHIFT2));
+HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3d_shader_frontend *fe,
+        struct shader_reg_maps *reg_maps, struct wined3d_shader_semantic *semantics_in,
+        struct wined3d_shader_semantic *semantics_out, const DWORD *byte_code, DWORD constf_size);
+void shader_init(struct IWineD3DBaseShaderClass *shader, IWineD3DDevice *device);
+const struct wined3d_shader_frontend *shader_select_frontend(DWORD version_token);
+void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe_data, const DWORD *pFunction);
+
+static inline BOOL shader_is_pshader_version(enum wined3d_shader_type type)
+{
+    return type == WINED3D_SHADER_TYPE_PIXEL;
 }
 
-static inline int shader_get_writemask(const DWORD param) {
-    return param & WINED3DSP_WRITEMASK_ALL;
+static inline BOOL shader_is_vshader_version(enum wined3d_shader_type type)
+{
+    return type == WINED3D_SHADER_TYPE_VERTEX;
 }
 
-static inline BOOL shader_is_pshader_version(DWORD token) {
-    return 0xFFFF0000 == (token & 0xFFFF0000);
-}
-
-static inline BOOL shader_is_vshader_version(DWORD token) {
-    return 0xFFFE0000 == (token & 0xFFFF0000);
-}
-
-static inline BOOL shader_is_comment(DWORD token) {
-    return WINED3DSIO_COMMENT == (token & WINED3DSI_OPCODE_MASK);
-}
-
-static inline BOOL shader_is_scalar(DWORD param) {
-    DWORD reg_type = shader_get_regtype(param);
-    DWORD reg_num;
-
-    switch (reg_type) {
+static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg)
+{
+    switch (reg->type)
+    {
         case WINED3DSPR_RASTOUT:
-            if ((param & WINED3DSP_REGNUM_MASK) != 0) {
-                /* oFog & oPts */
-                return TRUE;
-            }
+            /* oFog & oPts */
+            if (reg->idx != 0) return TRUE;
             /* oPos */
             return FALSE;
@@ -2296,6 +2618,6 @@
 
         case WINED3DSPR_MISCTYPE:
-            reg_num = param & WINED3DSP_REGNUM_MASK;
-            switch(reg_num) {
+            switch(reg->idx)
+            {
                 case 0: /* vPos */
                     return FALSE;
@@ -2306,4 +2628,13 @@
             }
 
+        case WINED3DSPR_IMMCONST:
+            switch(reg->immconst_type)
+            {
+                case WINED3D_IMMCONST_FLOAT:
+                    return TRUE;
+                default:
+                    return FALSE;
+            }
+
         default:
             return FALSE;
@@ -2323,6 +2654,12 @@
 
 /*****************************************************************************
- * IDirect3DVertexShader implementation structure
- */
+ * IDirect3DVertexShader implementation structures
+ */
+
+struct vs_compiled_shader {
+    struct vs_compile_args      args;
+    GLuint                      prgId;
+};
+
 typedef struct IWineD3DVertexShaderImpl {
     /* IUnknown parts*/   
@@ -2338,13 +2675,10 @@
 
     /* The GL shader */
-    GLuint                          prgId;
+    struct vs_compiled_shader   *gl_shaders;
+    UINT                        num_gl_shaders, shader_array_size;
 
     /* Vertex shader input and output semantics */
-    semantic semantics_in [MAX_ATTRIBS];
-    semantic semantics_out [MAX_REG_OUTPUT];
-
-    /* Ordered array of attributes that are swizzled */
-    attrib_declaration          swizzled_attribs [MAX_ATTRIBS];
-    UINT                        num_swizzled_attribs;
+    struct wined3d_shader_semantic semantics_in[MAX_ATTRIBS];
+    struct wined3d_shader_semantic semantics_out[MAX_REG_OUTPUT];
 
     UINT                       min_rel_offset, max_rel_offset;
@@ -2352,35 +2686,15 @@
 
     UINT                       recompile_count;
+
+    const struct vs_compile_args    *cur_args;
 } IWineD3DVertexShaderImpl;
-extern const SHADER_OPCODE IWineD3DVertexShaderImpl_shader_ins[];
 extern const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl;
-HRESULT IWineD3DVertexShaderImpl_CompileShader(IWineD3DVertexShader *iface);
+
+void find_vs_compile_args(IWineD3DVertexShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct vs_compile_args *args);
+GLuint find_gl_vshader(IWineD3DVertexShaderImpl *shader, const struct vs_compile_args *args);
 
 /*****************************************************************************
  * IDirect3DPixelShader implementation structure
  */
-
-enum vertexprocessing_mode {
-    fixedfunction,
-    vertexshader,
-    pretransformed
-};
-
-struct stb_const_desc {
-    char                    texunit;
-    UINT                    const_num;
-};
-
-/* Stateblock dependent parameters which have to be hardcoded
- * into the shader code
- */
-struct ps_compile_args {
-    struct color_fixup_desc     color_fixup[MAX_FRAGMENT_SAMPLERS];
-    BOOL                        srgb_correction;
-    enum vertexprocessing_mode  vp_mode;
-    /* Projected textures(ps 1.0-1.3) */
-    /* Texture types(2D, Cube, 3D) in ps 1.x */
-};
-
 struct ps_compiled_shader {
     struct ps_compile_args      args;
@@ -2399,5 +2713,5 @@
 
     /* Pixel shader input semantics */
-    semantic semantics_in [MAX_REG_INPUT];
+    struct wined3d_shader_semantic semantics_in[MAX_REG_INPUT];
     DWORD                 input_reg_map[MAX_REG_INPUT];
     BOOL                  input_reg_used[MAX_REG_INPUT];
@@ -2406,14 +2720,15 @@
     /* The GL shader */
     struct ps_compiled_shader   *gl_shaders;
-    UINT                        num_gl_shaders;
+    UINT                        num_gl_shaders, shader_array_size;
 
     /* Some information about the shader behavior */
     struct stb_const_desc       bumpenvmatconst[MAX_TEXTURES];
-    char                        numbumpenvmatconsts;
+    unsigned char               numbumpenvmatconsts;
     struct stb_const_desc       luminanceconst[MAX_TEXTURES];
     char                        vpos_uniform;
+
+    const struct ps_compile_args *cur_args;
 } IWineD3DPixelShaderImpl;
 
-extern const SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[];
 extern const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl;
 GLuint find_gl_pshader(IWineD3DPixelShaderImpl *shader, const struct ps_compile_args *args);
@@ -2458,6 +2773,30 @@
  */
 
+/* WineD3D pixel format flags */
+#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x1
+#define WINED3DFMT_FLAG_FILTERING                0x2
+#define WINED3DFMT_FLAG_DEPTH                    0x4
+#define WINED3DFMT_FLAG_STENCIL                  0x8
+#define WINED3DFMT_FLAG_RENDERTARGET             0x10
+#define WINED3DFMT_FLAG_FOURCC                   0x20
+
 struct GlPixelFormatDesc
 {
+    WINED3DFORMAT format;
+    DWORD red_mask;
+    DWORD green_mask;
+    DWORD blue_mask;
+    DWORD alpha_mask;
+    UINT byte_count;
+    WORD depth_size;
+    WORD stencil_size;
+
+    enum wined3d_ffp_emit_idx emit_idx;
+    GLint component_count;
+    GLenum gl_vtx_type;
+    GLint gl_vtx_format;
+    GLboolean gl_normalized;
+    unsigned int component_size;
+
     GLint glInternal;
     GLint glGammaInternal;
@@ -2470,26 +2809,17 @@
 };
 
-typedef struct {
-    WINED3DFORMAT           format;
-    DWORD                   alphaMask, redMask, greenMask, blueMask;
-    UINT                    bpp;
-    short                   depthSize, stencilSize;
-    BOOL                    isFourcc;
-} StaticPixelFormatDesc;
-
-const StaticPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt,
-        const WineD3D_GL_Info *gl_info, const struct GlPixelFormatDesc **glDesc);
-
-static inline BOOL use_vs(IWineD3DDeviceImpl *device) {
-    return (device->vs_selected_mode != SHADER_NONE
-            && device->stateBlock->vertexShader
-            && ((IWineD3DVertexShaderImpl *)device->stateBlock->vertexShader)->baseShader.function
-            && !device->strided_streams.u.s.position_transformed);
+const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const WineD3D_GL_Info *gl_info);
+
+static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock)
+{
+    return (stateblock->vertexShader
+            && !stateblock->wineD3DDevice->strided_streams.position_transformed
+            && stateblock->wineD3DDevice->vs_selected_mode != SHADER_NONE);
 }
 
-static inline BOOL use_ps(IWineD3DDeviceImpl *device) {
-    return (device->ps_selected_mode != SHADER_NONE
-            && device->stateBlock->pixelShader
-            && ((IWineD3DPixelShaderImpl *)device->stateBlock->pixelShader)->baseShader.function);
+static inline BOOL use_ps(IWineD3DStateBlockImpl *stateblock)
+{
+    return (stateblock->pixelShader
+            && stateblock->wineD3DDevice->ps_selected_mode != SHADER_NONE);
 }
 
