XDVDMulleterBeta2 - the more useful edition
by badsheepy

XDVDMulleter is an iso extraction/creation/rebuilding app with several features making it useful for more 
precise dumps as required by xtreme firmwares.
Most stuff currently doesnt work for xbox360 games, but when someone works out the extra security itll 
be added :)

It supports layout files as made by XDVDFS Tools/Moogui, and can create them from an ISO
It unpatches and checks xbes within an iso to ensure they have valid signatures
It can rebuild an ISO on the fly, with optional video partitions and security things
It can insert SS/PFI/DMI into an image which doesnt have one, or replace one which does
And it can load ripped xbox 1 discs direct from the dvdrom to save time ripping them
It can convert dvd9 to dvd5 and back again, or just strip the padding from a dvd9 making it much more
compressible.
It can make your old xbox 1 scene releases work on xbox 360 either on dvd5 or dvd9
And some more stuff....

XDVDMulleter is very beta, very untested, and I dont have the media to test things like
dvd9. That said, its been used sucessfully a reasonable amount. But considering i have 
no beta testers and cant afford media, and my xbox360 refuses to read dvdr.. 
USE AT YOUR OWN RISK! MAY WASTE MEDIA, EAT YOUR BRAIN, OR MELT YOUR 360
Any problems/bugs try #fw on efnet.

======================================================================================================

Here is how to do things (although its pretty straightforward if you just follow the stuff on screen)

To check ISO region:
View ISO details -> Load ISO -> Look at screen

To check if ISO is patched/Has video:
View ISO details -> Load ISO -> Look at screen

To check/unpatch an ISOs XBE files:
Misc functions -> Check unpatch ISO for xtreme 5 -> Load ISO -> follow prompt
THIS WILL PERMANENTLY CHANGE YOUR ISO, SO BACK IT UP OR DONT BLAME ME if anything breaks 
(it shouldnt break though)


To check/unpatch/view region of a single XBE:
Misc Functions -> XBE Details -> Load XBE
And if the XBE is unpatched.. click Fix XBE and it will attempt to unpatch it
Note: region may change when you unpatch if it was patched to be multi regioned.
FIXING WILL PERMANENTLY CHANGE THE XBE FILE, so make a backup if you want.

To extract SS/DMI/PFI/Video/Data etc
View ISO details -> Load ISO -> Click relavent button

To Insert SS/PFI/DMI into an ISO with a video partition already there:
View ISO details -> Load ISO -> Click relavent button

To Insert SS/PFI/DMI into an XBOX360 ISO with no video Partition:
Rebuild an existing ISO -> Load ISO -> Create Cloned DVD9 -> Follow prompts

To Insert SS/PFI/DMI into an XBOX 1 ISO with no video Partition (will add video partition):
If your source is an unmodified DVD9 rip: 
Rebuild an existing ISO -> Load ISO -> Create Cloned DVD9 -> Follow prompts
And if it is a DVD5 or Patched, or you want to change the layout, or if you are 
just unsure about the ISO source in general:
For DVD9:
Rebuild an existing ISO -> Load ISO -> Create DVD9 ISO with zeroed padding -> Follow prompts
For DVD5 (xtreme 5.x only):
Rebuild an existing ISO -> Load ISO -> Create DVD5 ISO (Xtreme Compatible + Video) -> Follow prompts

To build an xbox 360 ISO from raw dump + SS + Video + Stealth:
Rebuild an existing ISO -> Load ISO -> Create Cloned DVD9 -> Follow prompts

To Build an Xbox 1 ISO to work on XBox360 as DVD5
Rebuild an existing ISO -> Load ISO ->
If Source is small enough to let you fit it on a dvd5+video, 
select Create DVD5 ISO (Xtreme Compatible + video)
else select Create Standard ISO (Xbox1 or Xtreme 5)
Follow prompts, use layout file if possible, pad to dvd5 may help loading speeds

To Build an Xbox 1 ISO to work on XBox360 as DVD9:
Rebuild an existing ISO -> Load ISO -> Create DVD9 ISO with zeroed padding
Follow prompts, use layout file if possible

To Extract files from an ISO:
Extract/Browse -> Load ISO -> right click on file to extract and select from menu
(extraction is recursive if you select a folder, multiple files can be selected at once)

To Replace files from an ISO:
Extract/Browse -> Load ISO -> right click on file to replace and select from menu

To extract ALL files from an iso:
Either: Select all files in the root folder and goto extract, or click the extract all button.
If you are extracting from an xbox 1 dvd9 to rebuild later, create a layout file or a .mullet file
to be able to restore the original file positions.

======================================================================================================

Options for ISO (re)building are as follows:

Create Cloned DVD9 ISO
Instead of rebuilding, this simply writes the video partition + SS + stealth stuff, then copies
the loaded ISO on the end, then pads to correct size. If the source ISO is good, this will work 
every time, and if its not, it will never work. This is the only option that works for xbox 360 games
at the moment

Create DVD9 ISO with zeroed padding:
Rebuilds ISO to dvd9 size, with video, SS, stealth stuff. Use a layout file for best results

Create DVD5 ISO (Xtreme compatible with video):
Rebuilds ISO to dvd5 + video file + SS + stealth
If you ripped the game yourself, and it fits on dvd5 with video, always use this option for dvd5 rips.
It allows you to use the specific SS and stealth data from your original, and seems to load quicker
Checks XBES for validity.

Create Standard ISO (Xbox1 or xtreme 5):
Creates a normal XBOX 1 style iso with no video partition. Checks and validates XBES.
Use a layout file for best results, pad to dvd5 for faster loading.

Create Standard XBox1 ISO (No XBE Checks):
Same as standard iso, but doesnt check XBES. Use this for xbox 1 homebrew, patched games etc.
They wont work on an xbox 360 though if they are patched or not signed obviously.

==================================================================================================

ISO creation is pretty much straightforward, only works from filesystem atm, just select a folder and 
follow the prompts in the same way as with a rebuild.

If your source is NOT a rip you made yourself, look on layouts.xbox-scene.com for a layout for the
game you are rebuilding, this will optimise the ISO somewhat.

A '.mullet' file is SS/PFI/DMI/Layout in xml format, allows you to use one file instead of 4. Only XDVDMulleter uses them. But its pretty simple to work out the structure, just open it in notepad

Only DVD5/DVD9 WITHOUT a video partition load directly from DVD at the moment. Its
mostly trivial to fix, but i cant be bothered unless there is demand.

Xtreme compatible XBox 1 DVD5s seem to work better with the video file. This might just be because
of the slightly increased offsets of the files making loading quicker, so might be useless if you use 
the Pad to DVD5 option, but if the files are small enough, its probably worth doing anyhow.

Using a layout file on dvd5 will use the layouts file order, but also pad all the files to the end of the 
filesystem, if there is any reason not to do this, hopefully someone will let me know.

Region Codes may change if the xbe has been patched and you want to unpatch it, so check the region fields 
when you are rebuilding to save wasting discs.

Layout files store the original file offsets of the iso, and make for quicker and better disc reading. 
Use them if you can, find them at layouts.xbox-scene.com. If your source is a dvd9 it doesnt need a 
layout file, unless you want to manually adjust things for dvd5.
If you have a layout file and rebuild a dvd5 to a dvd9 you should end up with a perfect copy of the original disc, just with the padding zeroed. Itll compress to the same size as the dvd5, but itll work
on hitachi firmware too.

Embedded SS for xbox 1 games means you dont need to find an SS for the game even if making a dvd9 or 
dvd5 with video. It relies on a bug in the xbox 1 emulator letting you use ANY xbox 1ss for any xbox 1
game (just as xtreme 5 does it too i think)

Video partitions are both included rarred up. Xdvdmulleter will unrar and use them on the fly, so dont
remove them from where they are. If you wanted to replace the video partition for some reason
just rar up the replacement video.iso and replace the appropriate file.

Unrarring on the fly is never going to happen, as properly ripped isos have filesystem entries in places
you can only get to by parsing the entire file first. Its possible (suxx does it in fact) but its 
not really worth the hassle of implementing considering most isos will require unrarring twice on the fly.
The only real reason for doing this would be hard disk space considerations.
(rar is a compression stream, doesnt allow random access, so if a file is references in a folder entry
and the file is placed before that folder, the extraction must begin from the beginning again to extract
that file, and in addition, the entire file needs to be unrarred to read the filesystem properly as 
directory entries are spread throughout the iso)
I note qwix puts all the folders at the start for this very reason, but original xbox1/xbox 360 images 
dont, so at very best on the fly extraction would only work for isos who didnt have original layout.

However, the next version will do batch extraction
to ftp/hard disk etc and will have the option of unrarring first, and deleting the iso when done.

======================================================================================================

Coming soon if i can be bothered:

Multi game disk making
Batch extraction
FTP Upload/download
Advanced ISO making (full control over file placement etc)
Auto Shrinking (removing unneeded files, downsampling vids, crosslinking etc)
Any other stuff i can think of
Bug fixes
Somewhat less confusing UI
A WHOLE large amount of code cleanup, cause its currently a bit of a mess
If someone works out single layer xbox 360, expect that to be implemented as a priority.

When cleaning up code and stuff is complete, source will be released

======================================================================================================

Notes:

Included in the rar is LayoutDumper.xbe from XDVDFS Tools. Pop an original dvd in your modded xbox 1,
run the xbe file, and it will create a layout file for you. 

You can probably make an xbox360 compatible xbox 1 game on dvd9 also work on the Xbox 1 xtreme firmware
by simply appending the xbox 1 SS to the end of the file. HAvent tested this though. Support to do it 
properly should be in the next version.

My xbox360, and many other peoples, appears to have terrible problems reading dvd5 media properly. 
If you get consistent disc errors etc, try dvd+r media, or dvd+-rw as they seem to work a bit better.
If you still cant read stuff, dvd9 works consistently well.
I dont know if this is a firmware or a drive issue. Some people dont seem to have a problem at all 
though so Id be more inclined to think it was due to the drives being rubbish. Perhaps a pot tweak
would help, but i havent tried it myself.