Results 1 to 14 of 14

Thread: SR1: New Sound Engine Demo

  1. #1
    Join Date
    Sep 2007
    Location
    Russia
    Posts
    293

    Wink SR1: New Sound Engine Demo

    Demonstration of new sound engine for LOK: SR1.
    Look at here.
    Support of LOK-games is the duty of Square Enix and Crystal Dynamics.

  2. #2
    You never cease to amaze, man.

    Is this the same midi plugin (or whatever it is) for SR2 or a custom one?

    Also, something I'm curious about, but is there a way to program button 2 (or is it 1, I'll have to check) to skip the intro cutscenes like Esc does?

  3. #3
    Join Date
    Sep 2007
    Location
    Russia
    Posts
    293
    Thanks.
    This is the custom engine with connecting DSP-plugins (like ones for Winamp or any other music-player).
    Cutscenes are not skipped, they just are speeded up x5 by the appropriate feature which is the same like one from SRHook.
    Support of LOK-games is the duty of Square Enix and Crystal Dynamics.

  4. #4
    I meant the Eidos screen and the Crystal Dynamics screen at the beginning upon boot. I mean sure, i could just permanently disable them in the kain2.ini file but strangely, it doesnt feel nostalgic to me to do so.... i know, sounds silly.

  5. #5
    Join Date
    Sep 2007
    Location
    Russia
    Posts
    293
    For SR1 there are options "skip first|all puppet show" (though they do not work now in their original form), and I also had idea to correct them, but after I become to think that it is enough just to speed up cutscenes instead of to spend time for finding the appropriate corrections for the options I wrote above.

    If you need just to skip only intro-cutscene, for this there is known way - just to change default cmd-line for running game - "under 1 -mainmenu -voice -inspectral" (inside kain2.exe; though the same string is written in kain2.arg but this file is not reading by the game now) to "train 1 -mainmenu -voice -allwarp" (for example). I also have idea to add such possibility to kain2.ini.

    P.S.: anyway, I just need to know whether any feature is needed anyone (in addition to me), - in such case I will try to add it.
    Support of LOK-games is the duty of Square Enix and Crystal Dynamics.

  6. #6
    I didnt want to play hot potato with this thread but I was wondering if you know how to access the instruction sets of this game.... you know, how to access the file where it says "this game has to open this particular textures.big, this particular bigfile.dat etc..." ive been trying for days to implement the dreamcast models into this game... it has to be possible, but probably difficult.... or i dont know what the hell I'm doing. Right now what i am working on is making it so that instead of 1 2 3 4 5 show up as button prompts, PS1 buttons show up instead since i play with sony controllers and have the game almost flawlessly working with controller support.

    One thing i could reccomend if anyone ever implements proper controller support (vibration, real stick support vs my emulated dpad stick support, etc) is how the Ginput plugin was made for GTA games.


    I'd say this game hasnt aged too badly but with all these continued efforts, the game has stood the test of time.

    EDIT: rummaging through the forum, i see you yourself tried porting over dreamcast models xD sigh.... i believe its possible. (actually i believe the dreamcast version is a port that takes more examples from the pc version than it does the ps version, but thats just my take on it)

    I also believe its possible because SR2 follows that same formula AND it is based on DX7 like SR1 is.
    Last edited by mackdanny; 25th Jul 2016 at 06:37.

  7. #7
    I'm planning my own alternate patch in which I've modded the start up dialog to let you set parameters like "under 1 -mainmenu -voice -inspectral" and "train 1 -mainmenu -voice -allwarp". It doesn't have Russian language support or the changes to move everything into the ini file because I think the ini changes could cause problems.

    I know Wrace0 will disagree with me on that, however I will share the source code and he and anyone else who wants to is welcome to incorporate it into their own patches.

    I'm in the process of moving from the UK to Canada, which means I don't have much free time right now. Please be patient and I'll continue work on this once I've settled in to my new place and bought/shipped a computer over there.
    "If events are matched closely enough to course, they have a way of restructuring themselves to familiar outcomes." ~ Scorpius, Farscape

  8. #8
    Join Date
    Sep 2007
    Location
    Russia
    Posts
    293
    Vampmaster
    I know Wrace0 will disagree with me on that, however I will share the source code and he and anyone else who wants to is welcome to incorporate it into their own patches.
    I do not disagree with you on adding improved start up dialog - I now that you can do that and now I just do not spend my time on that and simply store the settings into kain2.ini (+ most of them are for advanced users, for simple users are used default values of such parameters and they even don't see the window with settings - some fans asked for hiding it).

    Vampmaster
    because I think the ini changes could cause problems.
    They do not cause any problems (you saw the code). Efforts of the game to store settings in HKLM-section of registry on the modern OS - this is that cause problems. Moreover, Steam-version of the game SR1 already has the appropriate rights on its own folder (in which is placed kain2.ini), so there are no problems with access to this file (like ones that you described to me in PM).
    Owners of any other versions of this game should have the appropriate knowledge about game folder rights by themself.

    Vampmaster
    It doesn't have Russian language support or the changes to move everything into the ini file
    Also it doesn't have bink-support, new sound engine support too, and any other things/modifications that already added or can be added in the future. About "everything" - it is just these parameters:
    RenderDeviceID=2
    SoundDeviceID=2
    ScreenWidth=1366
    ScreenHeight=768
    ScreenDepth=32
    TripleBuffer=0
    Filter=1
    VSync=1
    which are stored by the game into the HKLM root of registry (hm, either in compatibility mode or with admin rights).

    mackdanny
    but I was wondering if you know how to access the instruction sets of this game.... you know, how to access the file where it says "this game has to open this particular textures.big, this particular bigfile.dat etc..."
    kain2.map + disassembler + injections of your code instead original ones.

    mackdanny
    rummaging through the forum, i see you yourself tried porting over dreamcast models xD sigh.... i believe its possible.
    Now I think that we (I mean - fans) can't replace/modify (in the nearest future) SR1 graphical engine to use models from DreamCast or SR2.
    Vampmaster can explain this better, I think.
    Support of LOK-games is the duty of Square Enix and Crystal Dynamics.

  9. #9
    Quote Originally Posted by wrace0 View Post
    Now I think that we (I mean - fans) can't replace/modify (in the nearest future) SR1 graphical engine to use models from DreamCast or SR2.
    Vampmaster can explain this better, I think.
    First of all, Soul Reaver 1 stores the model data in the same memory locations every time it loads. This means if you try to make one bigger to fit more polygons in, it will start to overlap the next one in the list and cause it to break. Secondly, Soul Reaver uses two bytes for it's floating point integers for it's vertex positions (the corners of a polygon) instead of four and my ModelEx tool only does an approximation when converting. I don't know that the Dreamcast uses the same format of positions as PC. Lastly, the animations are in a very complicated structure that I don't know if I'll ever be able to figure out. Unless I do (or someone else can), then the imported models need to use the same rig as the original ones on PC. Currently the Dreamcast models have a different rig.

    If I can get the rig exported, it might be possible for someone to re-rig the Dreamcast models to work with the PC animations and then maybe I could try hooking in replacement polygon data. I'm no good at rigging models, so I'd need to get help with that.

    What would have to happen is I'd need to force the game to allocate memory for the replacement polygons, leave the old ones in the static locations, but then ignore them and use the replacements instead. Then I'd need to change the pointers to the old data to point to the replacement data.
    "If events are matched closely enough to course, they have a way of restructuring themselves to familiar outcomes." ~ Scorpius, Farscape

  10. #10
    Join Date
    Sep 2007
    Location
    Russia
    Posts
    293
    Vampmaster, do you see this tool?
    For example, for TR3 I saw such code:
    vertexTransformCallback(pDevice2, n_vertices, pVertices)
    {
    critical
    static TL_VERTEX := struct("float x; float y; float z; float rhw; DWORD color; DWORD specular; float u; float v;")
    TL_VERTEX[] := pVertices
    if (TL_VERTEX.z > 0.99)
    {
    if dllcall(IDirect3DDevice2.SetRenderState, uint, pDevice2, uint, 1, uint, g_globals.background.rhwnd)
    return
    loop, % n_vertices
    {
    TL_VERTEX.u := TL_VERTEX.x/g_globals.res.w
    TL_VERTEX.v := TL_VERTEX.y/g_globals.res.h
    TL_VERTEX.x -= 0.5
    TL_VERTEX.y -= 0.5
    TL_VERTEX[] += TL_VERTEX.size()
    }
    }
    }

    AltIDirect3DDevice2_BeginScene(p1)
    {
    static inv_prev := 1, blt, cut_prev
    inInventory := numget(title_add+0, "uint")
    cut := numget(Level_add+4, "uint")

    if ( (inInventory = 1) and (inInventory != inv_prev) )
    {
    isobject(g_globals.background) ? g_globals.background := releaseTexture2(g_globals.background)
    g_globals.background := createTexture2(g_Globals.pIDirectDraw, p1, g_globals.res.w, g_globals.res.h)

    blt := dllcall(IDirectDrawSurface.Blt, uint, g_globals.background.rSurface
    , uint, 0, uint, g_Globals.primary, uint, 0
    , uint, DDBLTFAST_NOCOLORKEY, uint, DDBLTFX[], uint)
    printl("blt " blt ddraw.result[blt . ""])
    }

    HDHOOKS_DATA.callback := False
    if (inInventory = 1) and isobject(g_globals.background) and !dgVoodoo2
    HDHOOKS_DATA.callback := True
    dllcall(g_globals.pInitHDHooks2, uint, HDHOOKS_DATA[])

    if ((unlocks > 1) and not (inInventory and !inv_prev) ) or (cut_prev != cut)
    {
    TextSwapLibSwapBack2()
    }

    cut_prev := cut
    inv_prev := inInventory
    unlocks := 0
    r := dllcall(IDirect3DDevice2.BeginScene, uint, p1)
    return r
    }
    Support of LOK-games is the duty of Square Enix and Crystal Dynamics.

  11. #11
    I think Soul Reaver applies the transforms to a copy of the data from the file and then copies that to the real directx buffer every frame. There would be no way to know what pose the pVertices are supposed to be on or what model they belong to.

    The vertexTransformCallback does not deal with animation poses. They're already done before any function like that is called.

    The functions you game could potentially make a better widescreen patch and also higher res textures, but it can't change the number of vertices without knowing what pose they should be in.
    Last edited by Vampmaster; 26th Jul 2016 at 13:16.
    "If events are matched closely enough to course, they have a way of restructuring themselves to familiar outcomes." ~ Scorpius, Farscape

  12. #12
    Very interesting, Vampmaster.


    I've been learning a lot playing with your tools, so I hold you in high regard. This is probably a goofy question, but you've played the GTA3 era games, right? (I have a point, i promise )

    Nevertheless, while there is still a ways to go, the screenshots ive been seeing on thelostworlds of the cancelled Dreamcast port of SR2 and the fact that SR2's PC version follows the tried and true method that SR1 for the PC and Dreamcast does (monolithic texture file and bigfile.dat) combined with the fact that like SR1, DX7 is used makes me believe that there are possibilities. Sure, SR2 has more complex models that move more fluidly and SR1 was developed with the intent of running on since dated hardware and a since obsolete OS, which is more or less part of the roadblock you mentioned with how the memory gets used. Sadly, because of the fact that you guys can only inject so much into the game without being granted access to the source, it os possible and i have hope, but like wrace0 said... not any time soon.

    Btw, wrace0, i couldnt find that kain2.map you mentioned.... unless im looking wrong.

  13. #13
    More simply put, the number and positions of the joints on the imported model need to match the animations otherwise the game will either crash or the model will look badly broken. Since exporting and importing the animations is currently beyond my ability, the only other option is to edit the Dreamcast models so that they have the same joints as the ones already in the PC version.
    "If events are matched closely enough to course, they have a way of restructuring themselves to familiar outcomes." ~ Scorpius, Farscape

  14. #14
    Join Date
    Sep 2007
    Location
    Russia
    Posts
    293
    mackdanny, it seems that the file kain2.map was removed from the Steam-version, but it can be found as part of the last official patch for SR1, which you can take on The Lost Worlds (here).
    Support of LOK-games is the duty of Square Enix and Crystal Dynamics.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •