Skip to content

Commit

Permalink
wise fwom youw gwave
Browse files Browse the repository at this point in the history
  • Loading branch information
jckarter committed Jun 8, 2012
0 parents commit 98d4163
Show file tree
Hide file tree
Showing 27 changed files with 13,011 additions and 0 deletions.
367 changes: 367 additions & 0 deletions APPLE_LICENSE

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions Info.plist
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>fatx</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>name.JoeGroff.filesystems.fatx</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>fatx</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0d1</string>
<key>IOKitPersonalities</key>
<dict/>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kernel.bsd</key>
<string>1.1</string>
<key>com.apple.kernel.iokit</key>
<string>1.0.0b1</string>
<key>com.apple.kernel.mach</key>
<string>1.0.0b1</string>
</dict>
</dict>
</plist>
3 changes: 3 additions & 0 deletions README
@@ -0,0 +1,3 @@
This is a Mac OS X driver for the FATX filesystem used by the original XBox.
It's a hackup of the stock FAT filesystem driver code. It worked for PowerPC
MacOS X 10.4; I haven't tested it on a modern Mac yet.
35 changes: 35 additions & 0 deletions fatx.kextproj/Info.plist
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>msdosfs</string>
<key>CFBundleIdentifier</key>
<string>com.apple.filesystems.msdosfs</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>msdosfs</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3</string>
<key>IOKitPersonalities</key>
<dict/>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kernel.bsd</key>
<string>1.1</string>
<key>com.apple.kernel.iokit</key>
<string>1.0.0b1</string>
<key>com.apple.kernel.mach</key>
<string>1.0.0b1</string>
</dict>
</dict>
</plist>
59 changes: 59 additions & 0 deletions fatx.kextproj/bootsect.h
@@ -0,0 +1,59 @@
/*
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/* $FreeBSD: src/sys/msdosfs/bootsect.h,v 1.7 1999/08/28 00:48:06 peter Exp $ */
/* $NetBSD: bootsect.h,v 1.9 1997/11/17 15:36:17 ws Exp $ */

/*
* Written by Paul Popelka (paulp@uts.amdahl.com)
*
* You can do anything you want with this software, just don't say you wrote
* it, and don't remove this notice.
*
* This software is provided "as is".
*
* The author supplies this software to be publicly redistributed on the
* understanding that the author is not responsible for the correct
* functioning of this software in any circumstances and is not liable for
* any damages caused by this software.
*
* October 1992
*/
/* FATX modifications made by Joe Groff. */

/* "Boot sector" is a bit of a misnomer in the xbox's case since no boot code
actually resides in the sector, and the structure actually comprises not one
but eight sectors, but let's keep the name for tradition's sake. */
struct bootsectorx {
int8_t bsXBootSectSig[4]; /* Signature 'FATX' */
u_int8_t bsXVolumeID[4]; /* Volume ID */
u_int8_t bsXSectPerClust[4]; /* Cluster size on this volume (always 32) */
u_int8_t bsXFATS[2]; /* Number of FATs (always 1) */
u_int8_t bsXReserved[4082]; /* Pad struct to 4096 bytes */
};

#define XBOOTSIG0 'F'
#define XBOOTSIG1 'A'
#define XBOOTSIG2 'T'
#define XBOOTSIG3 'X'
72 changes: 72 additions & 0 deletions fatx.kextproj/bpb.h
@@ -0,0 +1,72 @@
/*
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/* $FreeBSD: src/sys/msdosfs/bpb.h,v 1.7 1999/08/28 00:48:07 peter Exp $ */
/* $NetBSD: bpb.h,v 1.7 1997/11/17 15:36:24 ws Exp $ */

/*
* Written by Paul Popelka (paulp@uts.amdahl.com)
*
* You can do anything you want with this software, just don't say you wrote
* it, and don't remove this notice.
*
* This software is provided "as is".
*
* The author supplies this software to be publicly redistributed on the
* understanding that the author is not responsible for the correct
* functioning of this software in any circumstances and is not liable for
* any damages caused by this software.
*
* October 1992
*/
/* FATX modifications by Joe Groff. */

/*
* The following structures represent how the bpb's look on disk. shorts
* and longs are just character arrays of the appropriate length. This is
* because the compiler forces shorts and longs to align on word or
* halfword boundaries.
*
* XXX The little-endian code here assumes that the processor can access
* 16-bit and 32-bit quantities on byte boundaries. If this is not true,
* use the macros for the big-endian case.
*/
#include <machine/endian.h>
#if (BYTE_ORDER == LITTLE_ENDIAN) /* && defined(UNALIGNED_ACCESS) */
#define getushort(x) *((u_int16_t *)(x))
#define getulong(x) *((u_int32_t *)(x))
#define putushort(p, v) (*((u_int16_t *)(p)) = (v))
#define putulong(p, v) (*((u_int32_t *)(p)) = (v))
#else
#define getushort(x) (((u_int8_t *)(x))[0] + (((u_int8_t *)(x))[1] << 8))
#define getulong(x) (((u_int8_t *)(x))[0] + (((u_int8_t *)(x))[1] << 8) \
+ (((u_int8_t *)(x))[2] << 16) \
+ (((u_int8_t *)(x))[3] << 24))
#define putushort(p, v) (((u_int8_t *)(p))[0] = (v), \
((u_int8_t *)(p))[1] = (v) >> 8)
#define putulong(p, v) (((u_int8_t *)(p))[0] = (v), \
((u_int8_t *)(p))[1] = (v) >> 8, \
((u_int8_t *)(p))[2] = (v) >> 16,\
((u_int8_t *)(p))[3] = (v) >> 24)
#endif

0 comments on commit 98d4163

Please sign in to comment.