Here are a couple files to fix the XBE Title extraction.

Discussion of XBMC4XBOX development.
Post Reply
User avatar
Rocky5
Posts: 944
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 86 times
Been thanked: 241 times

Here are a couple files to fix the XBE Title extraction.

Post by Rocky5 » Sun Apr 15, 2018 7:22 am

For some reason they read the XBEHeadersize instead of the certificate offset. So what this done was break xbe titles that were not formatted correctly and had a wrong xbeheadersize.
Anyhow replace these files in the source and build to fix it.

There are quite a few games that have broken xbeheader sizes.
Animaniacs - The Great Edgar Hunt is one and the reason I fixed it.
Attachments
Fix XBE Title Extraction.zip
(48.98 KiB) Downloaded 23 times
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5

User avatar
Dan Dar3
Posts: 1138
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 236 times
Been thanked: 240 times
Contact:

Re: Here are a couple files to fix the XBE Title extraction.

Post by Dan Dar3 » Mon May 07, 2018 9:57 pm

I've attached a diff patch if you want to put it into a ticket and propose it to be merged into main codebase:
fix_xbe_title_extraction.zip
Patch
(854 Bytes) Downloaded 7 times

Had a quick look around for the .XBE file format and the original code probably worked for most titles if the Certificate structure was right after the Header structure? and that is why reading a chunk the size of the header and then a chunk the size of the certificate worked, not having to use the actual Certificate pointer value. http://www.caustik.com/cxbx/download/xbe.htm

Not sure I agree with the change for the "Certificate Address" from a structure pointer (4 bytes?) to a USHORT (2 bytes?) and how that worked in tour tests. From what I see the "Certificate Address" should be 4 byte size. I assume you have tried keeping _XBE_HEADER.Certificate as it was, a pointer to the structure and it didn't work? Or maybe I'm wrong and the compiler just sized this correctly...

User avatar
Rocky5
Posts: 944
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 86 times
Been thanked: 241 times

Re: Here are a couple files to fix the XBE Title extraction.

Post by Rocky5 » Tue May 08, 2018 1:49 am

Yeah it didn’t work, I had to change it to USHORT. I would have had to subtract 1000 off it so there was no point when the certificate pointer is actually only 2bytes, the other 2bytes are not required.


Example:
2bytes
0x0184
4bytes
0x00010184
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5

User avatar
Dan Dar3
Posts: 1138
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 236 times
Been thanked: 240 times
Contact:

Re: Here are a couple files to fix the XBE Title extraction.

Post by Dan Dar3 » Tue May 08, 2018 8:16 am

Rocky, I think there is an important point about the size - sizing any field incorrectly will affect the values of the fields defined after it in the structure as that will shift their positions.

User avatar
Rocky5
Posts: 944
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 86 times
Been thanked: 241 times

Re: Here are a couple files to fix the XBE Title extraction.

Post by Rocky5 » Tue May 08, 2018 4:31 pm

That’s what I though but it just goes through each entry and grabs the offsets in the h file.

I seen no adverts effect in changing the value. All features of XBMC work still with the updated files.


Also that’s why I put the files up and not a patch file, as folk can see if I botched it or there was a better way lol
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5

Post Reply