RAN Online X64 | Working Fully Emulator, Client and Server Files | RAN PH 822 Source 

Dark Magician
Decennium
Joined
Dec 7, 2011
Messages
553
Reaction score
443
Been years lying uncommited in my git worktree so enjoy. :P

RANOnline-x64
The Ran Online EP7 source now builds and runs as a native 64-bit program, next to the usual Win32 build. The client, servers and tools all compile for x64 in Visual Studio 2022.

Source:

What changed for x64
  • Skeletons: the old loader used d3dxof.dll, which has no 64-bit version. A new library, YXCore, now reads .x skeletons and matches DirectX bit for bit on all 1,361 skeleton files in the client (127,922 bones).
  • Models: D3DX9 still loads .x skins on x64. Skins in other formats (FBX, glTF, OBJ, DAE) load through Assimp.
  • Code: inline assembly is replaced with intrinsics, and values that hold pointers (DWORD_PTR, UINT_PTR, SQLLEN) are fixed across the engine, client and servers.
  • Data: files keep their 32-bit layout, so Win32 and x64 builds read and write the same data.
  • Libraries: Assimp, and the x64 builds of lzo, ogg and vorbis, come from vcpkg.

Building
  1. Install Visual Studio 2022 with the C++ desktop workload and MFC.
  2. Open RanOnline.sln, select the x64 platform and build. vcpkg installs the packages on the first build. It uses VCPKG_ROOT if set, otherwise the vcpkg bundled with Visual Studio.
  3. The programs and their DLLs go to ..\game-client\x64\.
  4. On the PC that runs the client, install the DirectX End-User Runtime (June 2010). It provides the 64-bit d3dx9_26.dll.

Notes
  • Don't put the x86 d3dx9_*.dll files from your client folder next to the x64 exe. The game then fails to start with error 0xC000007B.
  • Packets between client and servers are unchanged. Don't run a mix of x86 and x64 servers, because one server-to-server message has a different size on x64.
  • Tested: Debug and Release builds on Win32 and x64, and the x64 client in-game in the Emulator. A full login through x64 servers is not tested yet.

Credits to Min Communications, to Jollin88 for sharing the EP7 source, and to geger and the RaGEZONE Ran community.
 
Is this source possible also to upgrade to x64?

 
Back