|
fragreaver
|
 |
« on: January 05, 2010, 04:20:22 PM » |
|
Hi everyone. during the last two days I was looking for a way to extract xbox360 images under linux / mac os. Tried several things (schtrom xtract with wine, etc.), since there seems to be no native solution for either OS. So, as a first step I extracted the game partition with schtrom in a xp vm. From here on it's just a simple Image with xdvdfs, right? Then I extracted it with extract-xiso. Worked like a charm. Task now is to make extract-xiso compatible with xbox360 images. The source from it is available here. So me and a friend took a look at the various offsets used in extract-xiso: #define n_sectors( size ) ( ( size ) / XISO_SECTOR_SIZE + ( ( size ) % XISO_SECTOR_SIZE ? 1 : 0 ) )
#define XISO_HEADER_DATA "MICROSOFT*XBOX*MEDIA" #define XISO_HEADER_DATA_LENGTH 20 #define XISO_HEADER_OFFSET 0x10000
#define XISO_FILE_MODULUS 0x10000 #define XISO_ROOT_DIRECTORY_SECTOR 0x108
#define XISO_OPTIMIZED_TAG_OFFSET 31337 #define XISO_OPTIMIZED_TAG "in!xiso!" exiso_version #define XISO_OPTIMIZED_TAG_LENGTH ( 8 + VERSION_LENGTH ) #define XISO_OPTIMIZED_TAG_LENGTH_MIN 7
#define XISO_ATTRIBUTES_SIZE 1 #define XISO_FILENAME_LENGTH_SIZE 1 #define XISO_TABLE_OFFSET_SIZE 2 #define XISO_SECTOR_OFFSET_SIZE 4 #define XISO_DIRTABLE_SIZE 4 #define XISO_FILESIZE_SIZE 4 #define XISO_DWORD_SIZE 4 #define XISO_FILETIME_SIZE 8
#define XISO_SECTOR_SIZE 2048 #define XISO_UNUSED_SIZE 0x7c8
#define XISO_FILENAME_OFFSET 14 #define XISO_FILENAME_LENGTH_OFFSET ( XISO_FILENAME_OFFSET - 1 ) #define XISO_FILENAME_MAX_CHARS 255
#define XISO_ATTRIBUTE_RO 0x01 #define XISO_ATTRIBUTE_HID 0x02 #define XISO_ATTRIBUTE_SYS 0x04 #define XISO_ATTRIBUTE_DIR 0x10 #define XISO_ATTRIBUTE_ARC 0x20 #define XISO_ATTRIBUTE_NOR 0x80
#define XISO_PAD_BYTE 0xff #define XISO_PAD_SHORT 0xffff
We thought that those offsets are the suspects we're looking for, so we adapted them to the according offsets in the 360 iso: XISO_HEADER_OFFSET - 0xFDA0000 XISO_FILE_MODULUS - 0xFDA0000 XISO_ROOT_DIRECTORY_SECTOR - 0xFD90108 XISO_OPTIMIZED_TAG_OFFSET - 0xFDC1337 XISO_UNUSED_SIZE - 0xFD907C8 XISO_FILENAME_OFFSET - 0xFD90014 Still, the compiled extract-xiso complains about the iso not being valid. Any ideas? Maybe we're missing something else completely...can't reach the developer of it, last update was around 2005 I guess it's just a wrong offset somewhere, cause the game iso itself works with a ripped game.iso 
|
|
|
|
|
Logged
|
|
|
|
|
Thinkdiff
|
 |
« Reply #1 on: January 06, 2010, 12:28:56 AM » |
|
dd if=xbox360.iso of=game.iso skip=519296 count=14271488 extract-xiso -x game.iso
It's not a solution, but at least it will save some time by eliminating VMWare or Wine. I tested it on a 5 or 6 ISOs and they all worked fine, so the offsets seem consistent.
|
|
|
|
|
Logged
|
|
|
|
|
slasherking823
|
 |
« Reply #2 on: January 06, 2010, 12:37:27 AM » |
|
now we just need a way to rip on osx/linux
|
|
|
|
|
Logged
|
If that gamerscore or tenth prestige is so important to you that you absolutely need a pointless number - get it legit If you are just trying to show off - throw a party(real party, not nerd party, some of you would miss that point) If you like to be a fagot and go by "Jtags are for Mw2" - GTFO
|
|
|
|
Coniger12
|
 |
« Reply #3 on: January 06, 2010, 01:09:18 AM » |
|
I completely forgot about uxrip360. This is what's been collecting dust in my computer. http://www.megaupload.com/?d=D4VKJ468Built on Ubuntu Karmic x86.
|
|
|
|
|
Logged
|
I like being the only person to rip from Lite-Ons using uxrip360.
|
|
|
|
Tribb
|
 |
« Reply #4 on: January 06, 2010, 05:05:47 AM » |
|
i just use redline99 Image browser on linux under wine, It just needs MSCOMCTL.OCX and msvbvm60.dll in the same folder, I found these on my xp machine but im sure you can also find em with google
|
|
|
|
|
Logged
|
|
|
|
|
littlestevie360
|
 |
« Reply #5 on: January 07, 2010, 05:54:44 AM » |
|
i just use redline99 Image browser on linux under wine, It just needs MSCOMCTL.OCX and msvbvm60.dll in the same folder, I found these on my xp machine but im sure you can also find em with google
thats fine, but some people prefer native solutions, personally i find that darwine can bog the cpu down like a bitch, they work as an interim solution
|
|
|
|
|
Logged
|
|
|
|
|
nevernow
|
 |
« Reply #6 on: January 07, 2010, 07:16:29 AM » |
|
The error you're getting seems to be triggered here, line 1030: 1024 int verify_xiso( int in_xiso, int32_t *out_root_dir_sector, int32_t *out_root_dir_size, char *in_iso_name ) { 1025 int err = 0; 1026 char buffer[ XISO_HEADER_DATA_LENGTH ]; 1027 1028 if ( lseek( in_xiso, (xoff_t) XISO_HEADER_OFFSET, SEEK_SET ) == -1 ) seek_err(); 1029 if ( ! err && read( in_xiso, buffer, XISO_HEADER_DATA_LENGTH ) != XISO_HEADER_DATA_LENGTH ) read_err(); 1030 if ( ! err && memcmp( buffer, XISO_HEADER_DATA, XISO_HEADER_DATA_LENGTH ) ) misc_err( "%s does not appear to be a valid xbox iso image\n", in_iso_name, 0, 0 ); [...]
which simply compares the header's "title" in the ISO to a hardcoded string, which is: #define XISO_HEADER_DATA "MICROSOFT*XBOX*MEDIA" #define XISO_HEADER_DATA_LENGTH 20
Since the string itself seems correct even for the 360 images, maybe we check into the parameters passed to the verify_xiso function. Sorry, gotta go now, will try to get back to this later!
|
|
|
|
|
Logged
|
|
|
|
|
fragreaver
|
 |
« Reply #7 on: January 07, 2010, 08:41:56 PM » |
|
We came to thinkdiff's solution aswell, which works but uses too much space (you need around 20gb for each game as temporary space to unpack). The creator of extract-xiso replied to the issue: Wow, you want me to look at that crufty old code? Heh...
It has been years since I've done anything with this program so you may have to do more than I suggest, but I took a look at the source and it looks like things are kicked off in decode_xiso(). The first thing it does is open() the file, so immediately after that you'd want to do an lseek() to 0xFD90000. That would reset its notion of the "start of file" but I'm not sure if that's enough. You might need to add some constant like
#define GLOBAL_LSEEK_OFFSET 0xfd90000ul
Then not only do the lseek() after open() but also add the global offset to any lseek() call. There are many lseeks since you have to skip around while you're reading the image.
I hope that's actually enough info, like I say it has been a long time since I looked at this code.
You probably don't want to mess with the directory sector offsets or header offsets, you simply need to have the base-address (fd90000) to add to everything so you can relocate the notion of start-of-file.
Hope that helps.
in Since I'm not too good at c programming, I just don't know how to integrate that properly. Tried the Wine solution, too. Made a bundled wine based app. And this is how a 1mb XBox Image Browser became a 50mb, wine-drunk monster 
|
|
|
|
|
Logged
|
|
|
|
|
nevernow
|
 |
« Reply #8 on: January 07, 2010, 09:03:40 PM » |
|
I'm not only very bad at C programming, I also fear C a little bit. But if all that's needed is to redefine an offset, maybe we could make it.  In the meanwhile, redline's Xbox Image Browser works well through Wine and doesn't really require 50MB drunken monsters... only MSVBVM60.DLL, in my experience.
|
|
|
|
|
Logged
|
|
|
|
|
Redline99
|
 |
« Reply #9 on: January 07, 2010, 09:29:30 PM » |
|
A verrrrrry long time ago I made a port of "xtract360 from PI" and put the source code on xbins.
"XBOX 360/xdvdfs/Game Dump Extractors/xtract360ex/"
You should be able to get that to work, careful though there is a possible buffer overflow if the root dir spans a few sectors or something like that (going from memory) A good test app is "Star Trek Legacy" because it has over 30,000 files or something like that.
My code additions supported extracting all ISO types.
|
|
|
|
|
Logged
|
Where's Waldo
|
|
|
|
nevernow
|
 |
« Reply #10 on: January 08, 2010, 03:29:01 AM » |
|
Thanks! I will definitely take a look.
|
|
|
|
|
Logged
|
|
|
|
|
aiyyo
|
 |
« Reply #11 on: January 18, 2010, 05:46:16 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
rokor
|
 |
« Reply #12 on: January 19, 2010, 11:00:47 AM » |
|
will this now work with mac?
|
|
|
|
|
Logged
|
|
|
|
|
aiyyo
|
 |
« Reply #13 on: January 19, 2010, 01:28:58 PM » |
|
Yes, if you compile. will this now work with mac?
|
|
|
|
|
Logged
|
|
|
|
|
rokor
|
 |
« Reply #14 on: January 19, 2010, 01:30:34 PM » |
|
sorry to be a noob but how do I do that? or could someone do it for me??
|
|
|
|
|
Logged
|
|
|
|
|
Thinkdiff
|
 |
« Reply #15 on: January 19, 2010, 07:41:54 PM » |
|
Awesome! It works great on OS X. Compiled with no errors. I'll post a compiled version later if somebody else doesn't.
|
|
|
|
|
Logged
|
|
|
|
|
Thinkdiff
|
 |
« Reply #16 on: January 20, 2010, 12:13:45 AM » |
|
I had to make the following additions to the gcc flags to make it compile using the 10.4 Universal Binary SDK, but it seems to work fine: For PPC: -I/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/include -mmacosx-version-min=10.4 For i386: I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include -mmacosx-version-min=10.4 I've only tested it on Intel 10.6.2. http://www.sendspace.com/file/854z03
|
|
|
|
« Last Edit: January 20, 2010, 12:17:32 AM by Thinkdiff »
|
Logged
|
|
|
|
|
senas8
|
 |
« Reply #17 on: January 20, 2010, 07:23:12 AM » |
|
That is really cool.. thanks for sharing! 
|
|
|
|
|
Logged
|
|
|
|
|
Tuxbox
|
 |
« Reply #18 on: January 20, 2010, 04:07:46 PM » |
|
Thanks from a Gnu/Linux user!
|
|
|
|
|
Logged
|
|
|
|
|
mastha
|
 |
« Reply #19 on: January 20, 2010, 10:00:19 PM » |
|
Good night, very nice from you aiyyo but isn't it missing the extract-xiso.c ? At least the link from megaupload is lacking that file, can't tell about the rapidshare one since can't access it.. Anyway compiled it with no problem under linux but had to put the extract-xiso.c from original version there.. dunno didn't had any xisos on that machine to test.. My intention was to compile the win32 version of it but i was looking in the makefile and there is nothing which points to the win32 version, so how do I compile it for windows? Any help would be great, since there are also gui versions for the original version which would work with this one too. 
|
|
|
|
|
Logged
|
|
|
|
|