BENQ & LITEON BATCH FILES (build 09.01.04) by eXOBeX
====================================================

This is a collection of batch files which allow you to "manage" flashing of BenQ and
LiteOn firmwares in the same way that the batch files for X360SAM operate.
In other words, the batch files are the same as the ones for X360SAM and Samsung drives,
except:-
1) they use FIRMTOOL instead of X360SAM
2) they use DOSFLASH 1.3 and DOSFLASH 1.7 instead of MTKFLASH
3) they're for BenQ and LiteOn drives instead of Samsungs!

The X360SAM batch files store firmwares in folders named after the 360s' serial
numbers, these batch files do the same and are called in the same way.
For example, firmwares for Xbox 1234567 81005 would be in BACKUPS\81005\1234567
In this order, all the similarly-dated firmwares are grouped together in folders,
handy if you need to scrounge another firmware from a similar drive!

*** USE AT YOUR OWN RISK - DON'T BLAME ME IF ANYTHING GOES WRONG ***

There are ten batch files altogether:-

BENREAD.BAT
To run this, type BENREAD followed by the Xbox serial number,
e.g. BENREAD 1234567 81005
This will create a folder especially for that Xbox, read the firmware from
the drive, storing it in the folder as BORIG.BIN.  It will then use FIRMTOOL.EXE
to create a hacked version (called BHACKED.BIN), storing it in the same folder.

BENHACK.BAT
To run this, type BENHACK followed by the Xbox serial number,
e.g. BENHACK 1234567 81005
This flashes the BHACKED.BIN file (created by BENREAD.BAT) onto the drive.

BENREMOD.BAT
To run this, type BENREMOD followed by the Xbox serial number,
e.g. BENREMOD 1234567 81005
This does the same as BENREAD.BAT but without re-reading BORIG.BIN from the 360.
Useful if you've used read the drive in the past, but now you want to flash a
newer firmware to the same drive.

BENORIG.BAT
To run this, type BENORIG followed by the Xbox serial number,
e.g. BENORIG 1234567 81005
This flashes the BORIG.BIN file (created by BENREAD.BAT) back onto the drive,
returning it to its "retail" state.

LITREAD.BAT
To run this, type LITREAD followed by the Xbox serial number,
e.g. LITREAD 1234567 81005
This will create a folder especially for that Xbox, read the keys from
the drive, storing them in the folder as INQUIRY.BIN, IDENTIFY.BIN, KEY.BIN and
DUMMY.BIN.  It will then use FIRMTOOL.EXE to create a hacked version
(called LHACKED.BIN), storing it in the same folder.

LITHACK.BAT
To run this, type LITHACK followed by the Xbox serial number,
e.g. LITHACK 1234567 81005
This flashes the LHACKED.BIN file (created by LITREAD.BAT) onto the drive.

LITREMOD.BAT
To run this, type LITREMOD followed by the Xbox serial number,
e.g. LITREMOD 1234567 81005
This does the same as LITREAD.BAT but without re-reading DUMMY.BIN from the 360.
Useful if you've used read the drive in the past, but now you want to flash a
newer firmware to the same drive.

LITORIG.BAT
To run this, type LITORIG followed by the Xbox serial number,
e.g. LITORIG 1234567 81005
This creates a new file, LORIG.BIN, by merging the DUMMY.BIN file (created by
LITREAD.BAT) with a RETAIL.BIN (a full retail LiteOn firmware). LORIG.BIN is
then flashed back onto the drive, returning it to its "retail" state.

MAKEFOLD.BAT
To run this, type MAKEFOLD followed by the Xbox serial number,
e.g. MAKEFOLD 1234567 81005
This is a "bonus" batch file, I use it to create folders within the existing
"BACKUPS\yyyyy\xxxxxxx" structure, I use these folders when flashing Hitachi
drives with Firmware Toolbox.

WIPEFIRM.BAT
To run this, type WIPEFIRM followed by the Xbox serial number,
e.g. WIPEFIRM 1234567 81005
This is another "bonus" batch file.  If for any reason you need to delete a
firmware folder altogether, that's what it does (after asking for confirmation!)

NOTES
=====

You may need to edit most of the batch files to suit your own SATA chipset
(they're currently customised for VIA EPIA SP series Mini-ITX motherboards
with PnP OS disabled).
The bits you need to change are CLEARLY MARKED OUT in each file (one change in
each of the BENREAD, BENREMOD, LITREAD and LITREMOD batch files, two changes in
the BENORIG, BENHACK, LITORIG and LITHACK batch files).

Before using, put your iXtreme firmware files (ix15benq.bin and ix15-lit.bin)
in the BENQ and LITEON folders.

If using LITORIG.BAT, you'll need to get hold of a retail LiteOn firmware and
put it in the LiteOn folder, renaming it to RETAIL.BIN.  As this file is so
hard to get hold of, I haven't been able to test LITORIG.BAT yet.
Do NOT try to "cheat" by renaming a DUMMY.BIN as RETAIL.BIN.
In the words of the great Mark Benton, "It doesn't work like that."

The LiteOn batch files use DOSFLASH 1.7.  The BenQ batch files, however, still
use DOSFLASH 1.3 (named DFLASH13.EXE and included with the files).  This is due
to issues I encountered when trying to get DOSFLASH 1.7 to behave in manual
mode with BenQ drives.  Non-ejecting trays, erase errors, too much trouble so
I've given up for now!  DOSFLASH 1.7 is perfect for LiteOns, though.

If you're wondering why the files are called BORIG.BIN, BHACKED.BIN,
LORIG.BIN and LHACKED.BIN, it's to prevent accidental cross-flashing of BenQ,
LiteOn and Samsung drives.

CHANGES SINCE LAST VERSION (apart from the LiteOn ones, obviously)
==========================
BenQ files use DFLASH13.EXE instead of DOSFLASH.EXE
If FIRMTOOL.EXE encounters a problem, the resulting BHACKED.BIN is deleted as
it probably has the wrong key.
If you run BENREMOD.BAT then change your mind, it exits cleanly.

Thanks go to:-
Commodore4Eva, GaryOPA, Team Jungle and all the rest for their excellent
work on the Xtreme firmwares
Caster420 for FirmTool
Schtrom for DOSFlash
Maximus for Firmware Toolbox
Anyone else I've forgotten!