[WIP]LunaSource Repack

Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    (oO (||||) (||||) Oo) jM2.me is offline
    MemberRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    [WIP]LunaSource Repack

    Offtopic
    So I have attempted to convert some luna projects so that they can be compiled with vs2012. Unfortunately files had issues and needed more fixes to use latest sdk. Of course you can use old sdk and old compile and perhaps compile it in vs2012, but it is just useless. So I have put that aside until I have enough knowledge to convert files completely. Instead I have setup a VM to work on repack.

    Plan/TODO:
    • Remove files and projects that are not related to Luna Online
    • Remove unnecessary configurations or configurations for other EYA Interactive games
    • Restructure 4Dyuich engine a little
    • Update libraries (i.e. ziparchive, curl, directx...)
    • Remove configurations for specific locales such as Japan, Taiwan, China, and so on
    • Restructure and organize source code overall
    • Setup project dependencies
    • Finish script for copying and re-organizing compiled files. (ClientDebug, Client Release, Server, and so on.)



    Sidenotes
    • All original tools for file packing/unpacking will be removed and replaced with generic pack/unpack tool
      • Select .bin files, drag onto .exe file, and they get decrypted/unpacked. Same for .txt files but other way around
      • Similar process for .pack files


    Status

    • LunaClient
      • haven't looked at yet
      • too many configurations to go over

    • FileStorage
      • reorganized; compiles;

    • Func
      • reorganized; compiles;

    • Geometry
      • reorganized; compiles;

    • Renderer
      • reorganized; compiles;

    • Network
      • reorganized; compiles;

    • Executer
      • reorganized; compiles;

    • LunaExecuter
      • reorganized; compiles;

    • LunaLauncher
      • reorganized; compiles;
      • need to remove extra code for locales and make sure it loads patch server settings from a file and not binary

    • Sound
      • reorganized; compiles;
      • might update to latest miles sound library

    • DBThread
      • reorganized; compiles;


    Disclaimer: This is something I will hopefully finish as a side project. No support will be provided. I do not guarantee that I will not mess something up.

    Instructions
    1. Download 7z file and unpack it.
    2. Open LunaDevFolder and then 7830dd80e4db108c
    3. Open LunaEngine solution and build release or debug. There will be errors because I havent setup project dependencies and post-build events
    4. Run CopyFiles.bat once and it will copy Func library to Lib folder
    5. Build LunaEngine solution again and everything should build. If not then build again.
    6. Open LunaExecutables solution and build it.
    7. You can run CopyFiles.bat which will copy compiled files to ClientDebug/ReleaseOutput. Other files can be found in Output folder.



    Download



    Meanwhile feel free to post requests related to the luna source structure, etc. I expect to have repack ready by end of June. Also if anyone can provided test server (not live), that is already setup, it would help me make sure nothing is broken after repack is done.
    Last edited by jM2.me; 22-06-13 at 07:13 AM.


  2. #2
    I play it straight up, yo pokchop1 is offline
    MemberRank
    May 2012 Join Date
    Emporia, KSLocation
    933Posts

    Re: [WIP]LunaSource Repack

    Do you require full access to the server?

  3. #3
    (oO (||||) (||||) Oo) jM2.me is offline
    MemberRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by pokchop1 View Post
    Do you require full access to the server?
    No. As long as you can compile and debug I do not need any kind of access.

  4. #4
    I play it straight up, yo pokchop1 is offline
    MemberRank
    May 2012 Join Date
    Emporia, KSLocation
    933Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by jM2.me View Post
    No. As long as you can compile and debug I do not need any kind of access.
    Hell, I'll give it a shot then.

  5. #5
    (oO (||||) (||||) Oo) jM2.me is offline
    MemberRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by pokchop1 View Post
    Hell, I'll give it a shot then.
    I updated OP with what I have so far.
    Everything should be able to build. Only Debug client was tested.
    If there is an error/crash then anything will help. Screenshot, crashdump, debug screenshot, etc.

  6. #6
    I play it straight up, yo pokchop1 is offline
    MemberRank
    May 2012 Join Date
    Emporia, KSLocation
    933Posts

    Re: [WIP]LunaSource Repack

    Client DLL's

    • SoundLib.dll - Not using Sound.dll - redirect client to use Sound.dll.

    • SS3DGFuncSSE.dll - Needs a Configuration in LunaEngine.sln - Needs to be renamed, try Func-SSE.

    • FreeImage - Needs to be copied from client FreeImage Folder, and placed in both Release and Debug folders.

    The Client Itself

    • Client.debug - Configuration is using NProtect, Drop _NPROTECT_ from preprocessor.

    • Client-debug - Unexpect crash - After debugging: Unhandled exception at 0x779615de in LUNAClient-Debug.exe: 0x00000000


    Server side runs fine, well at least after an hours worth of setting up a new one, damn databases went offline. The Client side on the other hand had trouble, as you can tell from top portion. I hope that when I was debugging it that this is the info you wanted.

    Also, what was wrong with your original repack?
    Last edited by pokchop1; 22-06-13 at 09:36 AM.

  7. #7
    (oO (||||) (||||) Oo) jM2.me is offline
    MemberRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by pokchop1 View Post
    Client DLL's

    • SoundLib.dll - Not using Sound.dll - redirect client to use Sound.dll.


    • SS3DGFuncSSE.dll - Needs a Configuration in LunaEngine.sln - Needs to be renamed, try Func-SSE.


    • FreeImage - Needs to be copied from client FreeImage Folder, and placed in both Release and Debug folders.

    The Client Itself

    • Client.debug - Configuration is using NProtect, Drop _NPROTECT_ from preprocessor.


    • Client-debug - Unexpect crash - After debugging: Unhandled exception at 0x779615de in LUNAClient-Debug.exe: 0x00000000


    Server side runs fine, well at least after an hours worth of setting up a new one, damn databases went offline. The Client side on the other hand had trouble, as you can tell from top portion. I hope that when I was debugging it that this is the info you wanted.

    Also, what was wrong with your original repack?

    • After posting I realized that client was using SoundLib from its Audio folder. In next upload it should be using Sound.lib built from Solution/Sound folder instead.
    • Actually if I am not mistaken the SSE configuration used asm code for some math functions. I replaced original Release&Debug with the ones for SSE. I'll take a look if there are issues.
    • Will add FreeImage
    • Will drop nprotect


    What do you mean by "your original repack"? The original source files?
    Edit1: Try using debug gm tool instead.
    Last edited by jM2.me; 22-06-13 at 06:29 PM.

  8. #8
    I play it straight up, yo pokchop1 is offline
    MemberRank
    May 2012 Join Date
    Emporia, KSLocation
    933Posts

    Re: [WIP]LunaSource Repack

    A long time ago you uploaded a luna online plus source code, it seemed pretty optimized because a lot of the configurations were changed up.

  9. #9
    (oO (||||) (||||) Oo) jM2.me is offline
    MemberRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by pokchop1 View Post
    A long time ago you uploaded a luna online plus source code, it seemed pretty optimized because a lot of the configurations were changed up.
    Honestly I can't remember me uploading source files. Nonetheless I will be working on these sources now.

    If someone can elaborate on SSE configuration of Func library that would be great. Last time I checked SSE configuration used asm for some of the functions. Also three output files for Func library had different optimizations one of them compiled with asm code. I think client, server, and tools should work just fine with single file.

    I fixed everything that was mentioned above, however having some issues with bin files. Next upload should be up On Sunday Evening PST (23rd June)

  10. #10
    I play it straight up, yo pokchop1 is offline
    MemberRank
    May 2012 Join Date
    Emporia, KSLocation
    933Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by jM2.me View Post
    Honestly I can't remember me uploading source files. Nonetheless I will be working on these sources now.

    If someone can elaborate on SSE configuration of Func library that would be great. Last time I checked SSE configuration used asm for some of the functions. Also three output files for Func library had different optimizations one of them compiled with asm code. I think client, server, and tools should work just fine with single file.

    I fixed everything that was mentioned above, however having some issues with bin files. Next upload should be up On Sunday Evening PST (23rd June)
    Define asm, are you talking about Inline Assembly?

  11. #11
    (oO (||||) (||||) Oo) jM2.me is offline
    MemberRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by pokchop1 View Post
    Define asm, are you talking about Inline Assembly?
    Yea the assembly code in Func\global.h

    Edit:
    I looked at LunaExecuter and found following line of code.
    Code:
    CopyFile(IsSupportSSE() ? _T("SS3DGFuncSSE.dll") : _T("SS3DGFuncN.dll"), _T("SS3DGFunc.dll"), FALSE);
    Executer checks if cpu supports SSE instructions. If it does then SSE func is used, otherwise FuncN will be used. It selects either of the files and copies it as SS3DFunc.dll
    And again, _WITH_SSE preprocessor just compiles the code with some assembly code that uses SSE instructions.

    I think this was more revelant when the game was being coded, but nowadays pretty much all cpus support sse.
    Therefore the sources will use Func dll with SSE instructions. Your welcome to remove the preprocessor _FOR_SSE if you choose so.

    Another edit:
    Other dll files (Geometry, Executive, FileStorage, etc) included debug library of func, no matter of configuration. I am not sure if it was done for a reason or not. I replaced that the code to include the debug/release lib of func dependent on configuration.

    Code:
    #ifdef NDEBUG
    #pragma comment(lib, "..\\Lib\\Release\\Func.lib")
    #else
    #pragma comment(lib, "..\\Lib\\Debug\\Func.lib")
    #endif
    Could this be problematic in future?

    Yet another edit:
    Currently stuck with client crashing. Might have to start over with client code.
    > ntdll.dll!77de15de()
    Last edited by jM2.me; 23-06-13 at 09:41 PM.

  12. #12
    Viserion is online now
    MemberRank
    Jan 2009 Join Date
    1,108Posts

    Re: [WIP]LunaSource Repack

    @jme
    Thank you very much!
    One question, it is possible you add the system moves with WASD?

  13. #13
    I can has title? hamisgood87 is offline
    MemberRank
    Feb 2012 Join Date
    GoogleLocation
    447Posts

    Re: [WIP]LunaSource Repack

    When i compile them it doesn't put anything into the output folder i think, Nothing copies or anything.

  14. #14
    I play it straight up, yo pokchop1 is offline
    MemberRank
    May 2012 Join Date
    Emporia, KSLocation
    933Posts

    Re: [WIP]LunaSource Repack

    Quote Originally Posted by hamisgood87 View Post
    When i compile them it doesn't put anything into the output folder i think, Nothing copies or anything.
    Can you tell us if you looked at any other folders?

  15. #15
    I can has title? hamisgood87 is offline
    MemberRank
    Feb 2012 Join Date
    GoogleLocation
    447Posts

    Re: [WIP]LunaSource Repack

    I was looking at the area it copies from and the area it copies to so the output folder in 7830dd80e4db108c and the folders outside of that. The only folders it filled in the output folder were in Network and Sound. When it copied over this is what i got
    That is the same for both folders, and it is only LunaEngine
    http://puu.sh/3q8F2.png
    http://puu.sh/3q3i8.png
    http://puu.sh/3q8Hm.png
    http://puu.sh/3q8HP.png
    http://puu.sh/3q8Qu.png
    There are some screens if that helps.
    I am using vs2012 Express and i run on win 7 if that helps also xD.
    Last edited by hamisgood87; 28-06-13 at 09:08 AM.



Page 1 of 3 123 LastLast

Advertisement