Skip to content

Commit

Permalink
Make Xbox great again
Browse files Browse the repository at this point in the history
  • Loading branch information
JayFoxRox committed May 21, 2017
1 parent 5b410ae commit 89a7a60
Show file tree
Hide file tree
Showing 86 changed files with 1,626 additions and 24,459 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
*.bin
*.iso
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 2.4)

if(WIN32)
set(ARCH windows)
set(CMAKE_EXE_LINKER_FLAGS "-static")
elseif(APPLE)
set(ARCH macosx)
set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework CoreFoundation")
elseif(UNIX)
set(ARCH linux)
else()
message(FATAL_ERROR "Unknown platform")
endif()


find_package(ZLIB REQUIRED)

include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS})

add_executable(dump-xbox-dvd main.c ${ARCH}.c platform.h ss.c ss.h scsi.c scsi.h md5.c md5.h sha1.c sha1.h crc32.c crc32.h)
target_link_libraries(dump-xbox-dvd ${ZLIB_LIBRARIES})
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

24 changes: 15 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
BINARY := freecell
EXEFLAGS :=
ARCH := linux
CRCLIB := crcutil.a -Icrcutil-1.0/code -Icrcutil-1.0/examples
CRC := crcutil-1.0 crcutil.a

#FIXME: Possibly reintegrate this (using the normal / easier interfaces)
#CRCLIB := crcutil.a -Icrcutil-1.0/code -Icrcutil-1.0/examples
#CRC := crcutil-1.0 crcutil.a

CRCLIB := crc32.c
CRC := crc32.c crc32.h
STRIPARG := -s

ifeq ($(OS), Windows_NT)
Expand All @@ -13,8 +18,6 @@ else
ifeq ($(shell uname -s), Darwin)
EXEFLAGS := -framework IOKit -framework CoreFoundation
ARCH := macosx
CRCLIB := crc32.c
CRC := crc32.c crc32.h
STRIPARG :=
endif
endif
Expand All @@ -24,11 +27,11 @@ ZIPNAME := $(shell pwd | awk -F '/' '{print $$(NF - 1)}' | tr "A-Z" "a-z").zip

.PHONY: all
all:
@make --no-print-directory $(BINARY)
@make --no-print-directory $(BINARY) $(BINARY)-foo

.PHONY: clean
clean:
rm -rf freecell FreeCell.exe crcutil.a *.o
rm -rf $(BINARY) crcutil.a *.o

.PHONY: dist
dist:
Expand All @@ -41,9 +44,12 @@ dist:
(cd ../.. ; zip -r $(ZIPNAME) $(DISTNAME))
mv ../../$(ZIPNAME) ../$(ZIPNAME)

$(BINARY): main.cc $(ARCH).c $(ARCH).h md5.c md5.h sha1.c sha1.h $(CRC)
g++ -O3 -Wall -Werror -o $@ $(EXEFLAGS) main.cc $(ARCH).c md5.c sha1.c $(CRCLIB)
strip $(STRIPARG) $@
#$(BINARY): main.cc $(ARCH).c $(ARCH).h md5.c md5.h sha1.c sha1.h $(CRC)
# g++ -O3 -Wall -Werror -o $@ $(EXEFLAGS) main.cc $(ARCH).c md5.c sha1.c $(CRCLIB)
# strip $(STRIPARG) $@

$(BINARY)-foo: main.c $(ARCH).c ss.c ss.h scsi.c scsi.h md5.c md5.h sha1.c sha1.h $(CRC)
g++ -O0 -Wall -Werror -g -o $@ $(EXEFLAGS) main.c $(ARCH).c ss.c scsi.c md5.c sha1.c $(CRCLIB)

crcutil.a: crcutil-1.0
rm -rf *.o
Expand Down
69 changes: 56 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,56 @@

Usage: FreeCell <DRIVE> [-n|-o OUTPUTFILE] [SECTORFILE]

Dumps an XGD from a compatible drive, padding sectors in SECTORFILE.
The resulting OUTPUTFILE will include all video layers data.
Outputs the crc, md5 and sha1 of the resulting dump.

-n don't save to OUTPUTFILE, only calculate and show hashes
can not be used together with -o
-o OUTPUTFILE use OUTPUTFILE as file to extract to
if no -o option is given, it will default to "Track 01.iso"
can not be used together with -n

A tool to dump original Xbox games to [redump](http://redump.org/) standards (and better).
Based on FreeCell.

**DO NOT USE THIS TOOL FOR PRESERVING YOUR DISCS YET**


## Supported drives / firmwares

Currently only Kreon 1.00 has been tested and confirmed working.
For a list of drives supporting this firmware, [check this article on XboxDevWiki](http://xboxdevwiki.net/Xbox_Game_Disc).


## Building

* Install [zlib](https://www.zlib.net/)
* MSYS2: `pacman -S zlib`
* For other platforms check your platforms documentation
* Clone this repository: `git clone https://github.com/JayFoxRox/dump-xbox-dvd.git`
* Change into the repository folder: `cd dump-xbox-dvd`
* Create a build folder and move into it: `mkdir build; cd build`
* Run CMake to generate build files `cmake ..`

You can now use your platforms build system to compile.
For most platforms this can be done by running `make`.


## Running

Insert the game disc you want to dump into your drive which is connected to your system.
Then run:

`xbox-dump-dvd <drive name>`

Typical drive names:

* Linux: `/dev/sr0`, `/dev/sr1`, ..
* MacOS: `IODVDServices[/0]`, `IODVDServices[/1]`, ..
* Windows: `D:`, `E:`, ..

Note that you need administrative / super-user permissions on most platforms.


## License

Licensed under GPLv3 or any later version.
Refer to the LICENSE.txt file included.

Also, this software makes use of the MD5 implementation of Alexander Peslyak.
This is found at http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
Changes were made for OpenSSL compatibility and a small casting patch for g++ support.
These changes are released under the same license as the original md5.c file.

Finally, this software makes use of the SHA1 implementation of Steve Reid, Ralph Giles et al.
Changes were made for OpenSSL compatibility and using standard c types in the header.
Also, SHA1HANDSOFF is defined to protect input data.
These changes are also released under the same license as the original sha1.c file.
13 changes: 0 additions & 13 deletions README.txt

This file was deleted.

4 changes: 0 additions & 4 deletions crcutil-1.0/AUTHORS

This file was deleted.

202 changes: 0 additions & 202 deletions crcutil-1.0/COPYING

This file was deleted.

4 changes: 0 additions & 4 deletions crcutil-1.0/ChangeLog

This file was deleted.

Loading

0 comments on commit 89a7a60

Please sign in to comment.