xboxscene.org forums

Author Topic: Dir List On A Xbox On Pc  (Read 93 times)

Redline99

  • Archived User
  • Full Member
  • *
  • Posts: 207
Dir List On A Xbox On Pc
« on: December 09, 2008, 03:41:00 AM »

Yes, I made a slightly modded version of xtract360 and named it xtract360ex. It is on xbins and the source is included. It should work with most iso's be careful of maybe "Star trek Legacy" or something like that. I think the code has a buffer sizing issue when there are large directories of file counts. I don't remember now but its 99.5% functional or should at least be a good basis to start from.

good luck
smile.gif
Logged

Cleverglove

  • Archived User
  • Newbie
  • *
  • Posts: 4
Dir List On A Xbox On Pc
« Reply #1 on: December 09, 2008, 12:28:00 PM »

QUOTE(Redline99 @ Dec 9 2008, 06:17 AM) View Post

Yes, I made a slightly modded version of xtract360 and named it xtract360ex. It is on xbins and the source is included. It should work with most iso's be careful of maybe "Star trek Legacy" or something like that. I think the code has a buffer sizing issue when there are large directories of file counts. I don't remember now but its 99.5% functional or should at least be a good basis to start from.

good luck
smile.gif



Thank you.  I've looked this it's sorta where I'm getting to, but I have some more questions.

I would like to be able to read the layout off the disk, in a drive. (A Sh-d163 using Kreon firmware)

I'm guesing that the kreon firmware opens some new sense modes that you can call using IOCTL_SCSI_PASS_THROUGH_DIRECT and DeviceIoControl to get a segment of memory that contains the layout. (or is putting the drive in modeb enough for that?)

I thought it might be in clear text, I've used kev.nu memdump_win tool looking where I thought it might (blind guessing) without a seeing anything.  I thought maybe it's not in clear text.

In xtract360ex, I see strncmp's, assuming the .360 file represents something like the sturcture on the xbox disk, something must be in clear text which can be read easily?

I'd like to be able to identify the disk without needing to make an iso first.


Thank you again


edit: found the firmware functionality listing: http://www.xboxhacke...hp?topic=8715.0  smile.gif I'm going to experiment a bit.
Logged

Redline99

  • Archived User
  • Full Member
  • *
  • Posts: 207
Dir List On A Xbox On Pc
« Reply #2 on: December 09, 2008, 08:53:00 PM »

QUOTE
I would like to be able to read the layout off the disk, in a drive. (A Sh-d163 using Kreon firmware)  


I backup or original, original I assume for now.. to read an original you must use kreons firmware or (c4e 0800 fw) but you need to use the CDB command for the appropriate commands that are documented with the firmware.

Yes I use DeviceIoControl  on Win NT OS's anything above Win9x.

the www.xbox-linux.org website used to have some documentation on gdfs file system or xdvdfs depending on who you are talking to. but it looks like the page has moved.  Im sure you can find something from google.

All of kev's tools are for working with a Hitachi which isnt the drive you stated you wanted to work with.

xtract360ex is a Win32 commandline based tool for reading an ISO and not from the DVD drive. But.. if you were to swap in the FileIO to use DeviceIoControl the basic code structure would be there to parse the filesystem from DVD.  Just need to be a little creative there, but the filesystem is the same whether on DVD or in an ISO.

QUOTE
I'd like to be able to identify the disk without needing to make an iso first.

What do you mean by "Identify" You need to explain your intentions more.
Logged

Cleverglove

  • Archived User
  • Newbie
  • *
  • Posts: 4
Dir List On A Xbox On Pc
« Reply #3 on: December 10, 2008, 04:34:00 PM »

I think I got it.


Your software and Schtrom's where huge in my figuring this thing out. I can't you enough for you hardwork.

Although there are still some unknowns to me.

I find this site usefull on xdvdfs: http://home.comcast..../dvddrives.html

The problem is, I could find documentation for the CDB commands, just functions that say... unlock a drive... or get disk format information.  In schtrom's software he has the command below.

    //Read Video Sector On Disc (Sector 32)= 28 00 00 00 00 10 00 00 01 00

I made the below assumtions based on playing with it a little. I started to increase the "10" until I got to 20. Then I saw "MICROSOFT*XBOX*MEDIA" the link says that I should find that at sector 32... (20 in hex is 32). Then the 6th postion must be the last Byte for addressing.

I used the info on the link to find the start of the TOC, 7D 38 1B 00 (however it's in little endian) below is the core what will return the TOC


    // command descriptor block (CDB)
    sptd->Cdb[0] = 0x28;  // <- read sense mode?
    sptd->Cdb[1] = 0x00;  //
    sptd->Cdb[2] = 0x00;  // <- start address bytes
    sptd->Cdb[3] = 0x1B;  //
    sptd->Cdb[4] = 0x38;  //
    sptd->Cdb[5] = 0x7D;  // <- end address bytes
    sptd->Cdb[6] = 0x00;  //
    sptd->Cdb[7] = 0x20;  // <- blocks to read
    sptd->Cdb[8] = 0x01;  // <- offset?
    sptd->Cdb[9] = 0x00;  //
    sptd->Cdb[10] = 0x00; //
    sptd->Cdb[11] = 0x00; //


If you don't mind I'll clean up my code and post it. It will be a simple C++ program that will write the TOC to the screen.


I don't really know that the other commands do, I'm totally guessing but this will return a TOC on Call of Duty 2.

Why do I want to do this crazy thing?

I'm a contractor, a little dvd rental company a year ago asked me to help with a automated return system. You put movie into a slot and a robotic arm (sounds much cooler than it is) puts your disk into a drive and checks to make the disk is playable, and it's the movie you rented. Then closes your account and puts the disk in a stack to be returned to inventory.

Movies have a ID so they where really easy to make a system validate your return.

It worked so well, they asked me to expand this to games... only there is allot trickery with games.  I spoke to the game companies and they refused to help.


PS2 has an ID
PS3 was a snap. (Lite-on drive)

Wii took a little work but a number of Hitachi drives will return a full data frame which is needed to describable the frame as the CRC and payload segments are swapped.

That left the Xbox, which has taken me the longest.

I guess the outcome is peoples returns will go a bit quicker, and I'll post my leanings so hopefully others can learn from what has been done as I have.








Logged

Redline99

  • Archived User
  • Full Member
  • *
  • Posts: 207
Dir List On A Xbox On Pc
« Reply #4 on: December 10, 2008, 08:58:00 PM »

Sounds cool. I only have a few seconds before I have to but, i'll post this for now and come back later with more.

google for "INF-8090.pdf" this a document that will explain nearly all regular atapi cdb commands and even give insight into the dvd structure.

for example you "28 00 00 00 00 10 00 00 01 00" is a Read(10) command and this document will explain it all. There are a few versions but most of them have a table of contents/bookmarks and you can easily locate a section somewhat title "Table 204 - Packet commands for C/DVD/HD DVD logical units"

Logged

Redline99

  • Archived User
  • Full Member
  • *
  • Posts: 207
Dir List On A Xbox On Pc
« Reply #5 on: December 10, 2008, 09:55:00 PM »

Detecting the actual game will take some creativity.  There is a Title ID or Media ID embedded in the xex/xbe's you can try to read those or come up with some unique data to crc.
Logged