ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Oct 18, 2018 4:29 pm

All times are UTC




Post new topic  Reply to topic  [ 87 posts ]  Go to page Previous 1 2 3 4 5 Next
Author Message
PostPosted: Thu May 10, 2018 5:17 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
not sure this is ever gonna work.. seems the "Script" for the game engine is embeded (Gscript_indy.dll on PC and packed into the xbox default.xbe) without it, I dunno the game can be made to run.. I mean levels sure, textures Eventually all of them can be worked out EXCEPT, the main playable character.. I can find no where that it lists the character. Missionlist.txt one of the cmd arguments is the player model ( like indy in a tux, indy in his university suit, etc..).. If the xbe can be unpacked (doubt) possibly an equivalent is there that can be worked with (it is , after all, x86 code)... shame too cause it really is starting to look like something


Attachments:
buffy2.jpg [961.74 KiB]
Not downloaded yet
Top
   
PostPosted: Fri May 11, 2018 4:24 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
well finally figured the character texture thing out... all the textures in the level are present...missing audio, items, game logic (can't solve the puzzle to continue on cause the item isn't there...I have to look further into the level file and see whats up)


Attachments:
buffy3.jpg [812.82 KiB]
Not downloaded yet


Last edited by medievil on Fri May 11, 2018 7:43 am, edited 1 time in total.
Top
   
PostPosted: Fri May 11, 2018 6:35 am 

Joined: Tue Mar 27, 2018 6:41 pm
Posts: 16
medievil wrote:
well finally figured the character texture thing out... all the textures in the level are present...missing audio, items, game logic (can't solve the puzzle to continue on cause the item isn't there...I have to look further into the level vile and see whats up)


Wow nice one how did you get the character textures to work in the end?


Top
   
PostPosted: Fri May 11, 2018 7:41 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
You have to rename the buffy msh file (I used buffyslayer.msh ) to indianajones.msh and place buffyslayer.mtx .ban and .gin all in the main meshes/char folder, only rename the msh file though.. after that delete res.dat and they loaded when it got created back....all the textures are like that, once you place them in the layout (the map textures have to be in the same folders they would be in for buffy.. like textures/props/xxxx... you can load the map in a hex editor and see all the textures used....mine even has all the trees and bushes on it now...and yes hat is REQUIRED in the game script...I really wish I knew how to get the scripting out of the xbox xbe or could replace all the info in the indy one so that it read the buffy file names and followed he buffy script... I've still not found the control for EITHER game, the one that says play this animation and this audio file> we have the missions list placing one of the buffy missions at the top doesn't always work though


Attachments:
buffy4.jpg [860.12 KiB]
Not downloaded yet
Top
   
PostPosted: Sat May 12, 2018 3:58 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
not giving up, but progress is gonna go to a crawl...I gotta learn debugging , ida, etc... so I can figure out how to transfer/translate the scripting and my time is fairly limited so it will take a while...


Top
   
PostPosted: Sat May 12, 2018 11:12 pm 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
https://www.dropbox.com/s/s7ipokral0c8jz2/mtx.zip?dl=0

working tool to create the multitex files from individual buffy pak extracted mtx files


Top
   
PostPosted: Mon May 14, 2018 7:23 am 

Joined: Mon May 14, 2018 7:08 am
Posts: 5
So amazing to see someone working on this, I had to join just to say Thank You :D. I wish you luck with this and hopefully one day it will all be done and we will have a PC port, my dream haha


Top
   
PostPosted: Tue May 15, 2018 1:04 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
hmmmm gonna have to investigate the rpe files.. they are definitely in xbox adpcm format (0x69) the rpe format itself is pretty easy... 01 is first byte, 4th is number of audio files... then, like the mtx, you have specific headers with name, offset location and size of file.. I'd hate to have to write a script to extract them all for conversion to regular adpcm (0x11).... one rpe has over 1000 audio files most have about 100.. thats a lot of hand converting since I don't know of a tool that can batch convert xbox adpcm to regular wav. Also been looking more into the level files, seems maybe the scripting MIGHT be there after all... their are references to dialog, characters, etc....not seeing why , for instance, on the opening level giles is not there talking to her (even if there was no audio) though...


Top
   
PostPosted: Tue May 15, 2018 2:13 am 

Joined: Mon May 14, 2018 7:08 am
Posts: 5
**EDIT**
never mind, you had already done what i was suggesting :)


Top
   
PostPosted: Tue May 15, 2018 5:54 am 

Joined: Mon May 14, 2018 7:08 am
Posts: 5
This post http://the-scholars.com/viewtopic.php?f=38&t=22730# might be helpful, the person has written a script that might do what you need in replacing the hex code. There are other programs but they are paid and dont really let you test them first. The othet thing i wanted to ask, I was looking through the hex code for the wav files and was wondering if all of the 0x69 need to be changed or just the first one. I could help you to change the values or do it for you if the script wont work i just need to know what to change haha and how to get all of the rpe files or if you can give me access to them.


Top
   
PostPosted: Tue May 15, 2018 4:36 pm 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
not that easy.. to be done proper, the files need to be reencoded and new rpe's created... I can do it(I can create a python script to extract them and then to recreate the rpe.. the time consuming part is reencoding... aluigi created a reencoder on the bms site as far as I know it doesn't do multiple files at once though


Top
   
PostPosted: Wed May 16, 2018 2:54 am 

Joined: Mon May 14, 2018 7:08 am
Posts: 5
It can do batch files with this code, i don't know how to make it do sub folders though.. tried but i just don't know enough.
for %%G in ("%~dp0"\*.wav) do xbadpdec.exe "%%G" "Done\%%~nxG"

When using the program for testing on the .wav files the newly created files are much larger and I'm not sure if that's an issue as well the codec is changed to PCM not ADPCM. If you use the -a option there is no change to the codec and remains the same size, its still unplayable on a system without the xbox codec installed. If you manually hex edit the file to change all the 69 to 11 MediaInfo will report it as being ADPCM and will also play on a system without the xbox codec installed on it, but I'm not sure if that's will work out as you said that wouldn't be the right way to do it.

I went back and learnt how to extract the .pak files with Luigi's QuickBMS but its just straight to .wav no .rpe so that's what I'm working with. I also noticed that the sound files extracted in the music folder are .wma matching the ones outside of the .pak files but tiny file size and no codec info when checked.

Hope I'm being of some help and not just holding you up

**EDIT**

Also have you seen this XBE Explorer http://dxbx-emu.com/downloads/ might help you find some more stuff in the XBE file


Top
   
PostPosted: Wed May 16, 2018 5:47 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
ok, if that will do them in a batch I will write a python script(2 of them) one to extract the files and one to put them back together... size isn't an issue it will just make the rpe files larger.. the rpe's are in the dialogue folder BUT that might not get extracted, it might be part of the install.dat... I know I got them running the game in cxbx..it creates the HD structure/partitions in users/your profile/appdata/roaming/cxbx reloaded... partition 4(the folder, not the bin)is where buffy stores everything.... it will take me a few days to get the scripts working (Work and all, limited time, unfortunately) and yup, saw xbe explorer... moved on from it... ida pro, this actually might be dooable, will take a while though (months most likely at the earliest)... the whole engine main body is pretty much made of structs if it is movable, useable, a person or even some rocks, it will have a struct that gets called. Advantage for me, I have the pc and xbox version of indy to do my comparisons and plot out how best to make changes.. another advantage (I think).. the PC indy uses rtti.. which means instead of having a blue million structs, you feed it info and it creates the struct on the fly...if I figure the format out, it will be easier to translate buffy engine data cause I'd just need to make the correct data string... Thats of course, if I understood Rtti when I looked it up.


Top
   
PostPosted: Wed May 16, 2018 11:16 am 

Joined: Mon May 14, 2018 7:08 am
Posts: 5
ok cool, i will keep an eye on your progress and if i see anything i might be able to help with i will try. Good luck :D


Top
   
PostPosted: Fri May 18, 2018 3:06 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
ok looks like this is gonna be REAL fun...lol..comparing XB indy and pc indy, you'd be really, really surprised how similar the code is, at least things like the loading tables for mesh names and such for example
PC:
Code:
.text:10001C80 sub_10001C80    proc near               ; CODE XREF: sub_10001060+127↑p
.text:10001C80                 push    ebx
.text:10001C81                 push    ebp
.text:10001C82                 push    esi
.text:10001C83                 push    edi
.text:10001C84                 mov     esi, ecx
.text:10001C86                 call    sub_1019A5B0
.text:10001C8B                 mov     eax, [esi+1510h]
.text:10001C91                 mov     dword ptr [esi], offset aBHuman ; "b_human"
.text:10001C97                 mov     dword ptr [esi+8], offset aRHuman ; "r_human"
.text:10001C9E                 mov     dword ptr [esi+0Ch], offset aAIndy ; "a_indy"
.text:10001CA5                 mov     dword ptr [esi+10h], offset aAWeapon ; "a_weapon"
.text:10001CAC                 mov     dword ptr [esi+24h], offset aHuman ; "Human"
.text:10001CB3                 mov     dword ptr [esi+28h], offset aIndy ; "Indy"
.text:10001CBA                 mov     dword ptr [esi+1Ch], offset aIndy_0 ; "indy"
.text:10001CC1                 mov     dword ptr [esi+20h], offset aNazi ; "nazi"
.text:10001CC8                 mov     dword ptr [esi+eax*4+1450h], offset aIndianaJones ; "Indiana Jones"

and
XB:
Code:
.text:00344F89 sub_344F89      proc near               ; CODE XREF: .text:0034770E↓p
.text:00344F89
.text:00344F89 var_4           = dword ptr -4
.text:00344F89
.text:00344F89                 push    ebp
.text:00344F8A                 mov     ebp, esp
.text:00344F8C                 push    ecx
.text:00344F8D                 push    ebx
.text:00344F8E                 push    esi
.text:00344F8F                 push    edi
.text:00344F90                 mov     edi, ecx
.text:00344F92                 call    sub_3156F0
.text:00344F97                 lea     eax, [ebp+var_4]
.text:00344F9A                 push    eax
.text:00344F9B                 mov     ecx, edi
.text:00344F9D                 mov     dword ptr [edi], offset aBHuman ; "b_human"
.text:00344FA3                 mov     dword ptr [edi+4], offset aRHuman ; "r_human"
.text:00344FAA                 mov     dword ptr [edi+8], offset aAIndy ; "a_indy"
.text:00344FB1                 mov     dword ptr [edi+0Ch], offset aAWeapon ; "a_weapon"
.text:00344FB8                 mov     dword ptr [edi+20h], offset aHuman ; "Human"
.text:00344FBF                 mov     dword ptr [edi+24h], offset aIndy ; "Indy"
.text:00344FC6                 mov     dword ptr [edi+18h], offset aIndy_0 ; "indy"
.text:00344FCD                 mov     dword ptr [edi+1Ch], offset aNazi ; "nazi"
.text:00344FD4                 mov     [ebp+var_4], offset aIndianaJones ; "Indiana Jones"


Top
   
PostPosted: Sun May 20, 2018 8:33 am 

Joined: Tue Mar 27, 2018 6:41 pm
Posts: 16
Great work so far - thanks for everything you've done this far :)


Top
   
PostPosted: Thu May 24, 2018 4:58 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
uuugh, getting more than a little frustrated.. not with the hacking stuff, but with IDA...It doesn't allow direct altering of files, it creates a little image of the file, you make changes and it can adjust offsets, etc...normally you make your changes, create a dif file and patch the binary... BUT, it isn't letting me create a dif file... or more correctly it produces a blank one..had all the menu and manager functions and exports all renamed and ready to go and lost all of it cause it would not directly patch nor create a dif file...if I can't get this lined out, next option (pretty huge undertaking) is recreating 3 dll's....I can copy the assembly code from them on the pc side and just replace all the game functions... thats a lot of work for no reason though.. much of the code is already ready on the pc side...it more a matter of adding functions and altering those that are equivalent... all the sound code, for example, is good to go, the xbox sound stuff is tailored for xbox and would have to be rewritten anyway so it make more sense to use the PC code, same for 3d access... and the XBE, is ONE file, everything is packed into it, so no exports or imports... all that has to be figured out, on PC it is already there, more or less. I can see some benefit to MAYBE creating a new script sgl file, since it is most of the main functions (NPC animations/behaviors ..items/props....etc) while the other 2 main dll's are more engine (handling sound, 3d, movement/controls, etc..) and they just pass info between them via the imports and exports... anyway, still plucking away.....


Top
   
PostPosted: Mon May 28, 2018 3:22 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
ahhh ran into a pretty significant problem... the boneanim files... the indy engine won't use them (says they are misaligned) and there is no way to redo them since they are built with the engine version...so now I am gonna go a different route, looking at taking the xbe and hacking the crap out of it, change the kernel thunk to actual ntdll calls(table list is already there, just have to change the functions)... take the dsound and d3d sections and change their calls to compatible d3d8 exports(hard part cause it is less well commented/documented in the xbe)...basically rebuild the thing into it's own exe


Top
   
PostPosted: Fri Jun 01, 2018 11:28 am 

Joined: Tue Mar 27, 2018 6:41 pm
Posts: 16
Wow sounds like a huge undertaking, good luck on your progress!

On a side note how viable do you think it would be to extract the models and/or animations?


Top
   
PostPosted: Sun Jun 03, 2018 2:23 am 

Joined: Tue Apr 17, 2018 4:23 pm
Posts: 60
the models work in the pc engine so I have not looked at them, the animations though are completely code blocks...and I would imagine both are proprietary (unless they used 3d max or something similar back them to create them)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 87 posts ]  Go to page Previous 1 2 3 4 5 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited