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

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

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

Post by Rocky5 »

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 320 times
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
User avatar
Dan Dar3
Posts: 1176
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 273 times
Been thanked: 257 times
Contact:

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

Post by Dan Dar3 »

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 304 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: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 257 times

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

Post by Rocky5 »

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: 1176
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 273 times
Been thanked: 257 times
Contact:

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

Post by Dan Dar3 »

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: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 257 times

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

Post by Rocky5 »

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