2009-05-03 20:53:31 +02:00
|
|
|
/*-------------------------------------------------------------
|
|
|
|
|
|
|
|
usbstorage_starlet.c -- USB mass storage support, inside starlet
|
|
|
|
Copyright (C) 2009 Kwiirk
|
|
|
|
|
2009-05-31 23:40:22 +02:00
|
|
|
If this driver is linked before libogc, this will replace the original
|
2009-05-03 20:53:31 +02:00
|
|
|
usbstorage driver by svpe from libogc
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
|
|
warranty. In no event will the authors be held liable for any
|
|
|
|
damages arising from the use of this software.
|
|
|
|
|
|
|
|
Permission is granted to anyone to use this software for any
|
|
|
|
purpose, including commercial applications, and to alter it and
|
|
|
|
redistribute it freely, subject to the following restrictions:
|
|
|
|
|
|
|
|
1. The origin of this software must not be misrepresented; you
|
|
|
|
must not claim that you wrote the original software. If you use
|
|
|
|
this software in a product, an acknowledgment in the product
|
|
|
|
documentation would be appreciated but is not required.
|
|
|
|
|
|
|
|
2. Altered source versions must be plainly marked as such, and
|
|
|
|
must not be misrepresented as being the original software.
|
|
|
|
|
|
|
|
3. This notice may not be removed or altered from any source
|
|
|
|
distribution.
|
|
|
|
|
|
|
|
-------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#include <gccore.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/* IOCTL commands */
|
|
|
|
#define UMS_BASE (('U'<<24)|('M'<<16)|('S'<<8))
|
2009-06-12 01:02:05 +02:00
|
|
|
#define USB_IOCTL_UMS_INIT (UMS_BASE+0x1)
|
2009-05-03 20:53:31 +02:00
|
|
|
#define USB_IOCTL_UMS_GET_CAPACITY (UMS_BASE+0x2)
|
|
|
|
#define USB_IOCTL_UMS_READ_SECTORS (UMS_BASE+0x3)
|
2009-06-12 01:02:05 +02:00
|
|
|
#define USB_IOCTL_UMS_WRITE_SECTORS (UMS_BASE+0x4)
|
|
|
|
#define USB_IOCTL_UMS_READ_STRESS (UMS_BASE+0x5)
|
2009-07-30 07:41:12 +02:00
|
|
|
#define USB_IOCTL_UMS_SET_VERBOSE (UMS_BASE+0x6)
|
|
|
|
#define USB_IOCTL_UMS_UNMOUNT (UMS_BASE+0x10)
|
2009-06-12 01:02:05 +02:00
|
|
|
#define USB_IOCTL_UMS_WATCHDOG (UMS_BASE+0x80)
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-12-19 15:05:31 +01:00
|
|
|
#define WBFS_BASE (('W'<<24)|('F'<<16)|('S'<<8))
|
|
|
|
#define USB_IOCTL_WBFS_OPEN_DISC (WBFS_BASE+0x1)
|
|
|
|
#define USB_IOCTL_WBFS_READ_DISC (WBFS_BASE+0x2)
|
|
|
|
#define USB_IOCTL_WBFS_READ_DEBUG (WBFS_BASE+0x3)
|
|
|
|
#define USB_IOCTL_WBFS_SET_DEVICE (WBFS_BASE+0x4)
|
|
|
|
#define USB_IOCTL_WBFS_SET_FRAGLIST (WBFS_BASE+0x5)
|
|
|
|
|
2009-09-30 05:57:15 +02:00
|
|
|
#define UMS_HEAPSIZE 0x1000
|
2009-05-03 20:53:31 +02:00
|
|
|
|
|
|
|
/* Variables */
|
2009-09-30 05:57:15 +02:00
|
|
|
static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/usb2";
|
|
|
|
static char fs2[] ATTRIBUTE_ALIGN(32) = "/dev/usb/ehc";
|
2009-05-31 23:40:22 +02:00
|
|
|
|
2009-05-03 20:53:31 +02:00
|
|
|
static s32 hid = -1, fd = -1;
|
|
|
|
static u32 sector_size;
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
s32 USBStorage_GetCapacity(u32 *_sector_size) {
|
|
|
|
if (fd > 0) {
|
|
|
|
s32 ret;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_GET_CAPACITY, ":i", §or_size);
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
if (ret && _sector_size)
|
|
|
|
*_sector_size = sector_size;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
return ret;
|
|
|
|
}
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
return IPC_ENOENT;
|
2009-05-03 20:53:31 +02:00
|
|
|
}
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
s32 USBStorage_Init(void) {
|
|
|
|
s32 ret;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Already open */
|
|
|
|
if (fd > 0)
|
|
|
|
return 0;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Create heap */
|
|
|
|
if (hid < 0) {
|
|
|
|
hid = iosCreateHeap(UMS_HEAPSIZE);
|
|
|
|
if (hid < 0)
|
|
|
|
return IPC_ENOMEM;
|
|
|
|
}
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Open USB device */
|
|
|
|
fd = IOS_Open(fs, 0);
|
2010-02-09 11:59:55 +01:00
|
|
|
if (fd < 0)
|
2009-09-30 05:57:15 +02:00
|
|
|
fd = IOS_Open(fs2, 0);
|
2009-07-30 07:41:12 +02:00
|
|
|
if (fd < 0)
|
|
|
|
return fd;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Initialize USB storage */
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_INIT, ":");
|
|
|
|
if (ret<0) goto err;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Get device capacity */
|
|
|
|
ret = USBStorage_GetCapacity(NULL);
|
|
|
|
if (!ret)
|
|
|
|
goto err;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
return 0;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
|
|
|
err:
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Close USB device */
|
|
|
|
if (fd > 0) {
|
|
|
|
IOS_Close(fd);
|
|
|
|
fd = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Hermes **/
|
|
|
|
s32 USBStorage_Watchdog(u32 on_off) {
|
|
|
|
if (fd >= 0) {
|
|
|
|
s32 ret;
|
|
|
|
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_WATCHDOG, "i:", on_off);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return IPC_ENOENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
s32 USBStorage_Umount(void) {
|
|
|
|
if (fd >= 0) {
|
|
|
|
s32 ret;
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_UNMOUNT, ":");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return IPC_ENOENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
void USBStorage_Deinit(void) {
|
|
|
|
/* Close USB device */
|
|
|
|
if (fd > 0) {
|
|
|
|
IOS_Close(fd);
|
|
|
|
fd = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
s32 USBStorage_ReadSectors(u32 sector, u32 numSectors, void *buffer) {
|
|
|
|
|
2009-12-04 16:05:20 +01:00
|
|
|
// void *buf = (void *)buffer;
|
2010-02-09 11:59:55 +01:00
|
|
|
u32 len = (sector_size * numSectors);
|
2009-09-30 05:57:15 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 ret;
|
2009-09-30 05:57:15 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
/* Device not opened */
|
|
|
|
if (fd < 0)
|
|
|
|
return fd;
|
2009-12-04 16:05:20 +01:00
|
|
|
|
2009-09-30 05:57:15 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_READ_SECTORS, "ii:d", sector, numSectors, buffer, len);
|
|
|
|
return ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
s32 USBStorage_WriteSectors(u32 sector, u32 numSectors, const void *buffer) {
|
2010-02-09 11:59:55 +01:00
|
|
|
u32 len = (sector_size * numSectors);
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
/* Device not opened */
|
|
|
|
if (fd < 0)
|
|
|
|
return fd;
|
2009-09-30 05:57:15 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
/* Write data */
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_WRITE_SECTORS, "ii:d", sector, numSectors, buffer, len);
|
2009-09-30 05:57:15 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
return ret;
|
2009-05-03 20:53:31 +02:00
|
|
|
}
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
static bool __io_usb_Startup(void)
|
|
|
|
{
|
|
|
|
return USBStorage_Init() >= 0;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
static bool __io_usb_IsInserted(void)
|
|
|
|
{
|
|
|
|
s32 ret;
|
|
|
|
if (fd < 0) return false;
|
|
|
|
ret = USBStorage_GetCapacity(NULL);
|
|
|
|
if (ret == 0) return false;
|
|
|
|
return true;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
bool __io_usb_ReadSectors(u32 sector, u32 count, void *buffer)
|
|
|
|
{
|
|
|
|
s32 ret = USBStorage_ReadSectors(sector, count, buffer);
|
|
|
|
return ret > 0;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
bool __io_usb_WriteSectors(u32 sector, u32 count, void *buffer)
|
|
|
|
{
|
|
|
|
s32 ret = USBStorage_WriteSectors(sector, count, buffer);
|
|
|
|
return ret > 0;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
static bool __io_usb_ClearStatus(void)
|
|
|
|
{
|
|
|
|
return true;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
static bool __io_usb_Shutdown(void)
|
|
|
|
{
|
|
|
|
// do nothing
|
|
|
|
return true;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
static bool __io_usb_NOP(void)
|
|
|
|
{
|
|
|
|
// do nothing
|
|
|
|
return true;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const DISC_INTERFACE __io_usbstorage_ro = {
|
2010-02-09 11:59:55 +01:00
|
|
|
DEVICE_TYPE_WII_USB,
|
|
|
|
FEATURE_MEDIUM_CANREAD | FEATURE_WII_USB,
|
|
|
|
(FN_MEDIUM_STARTUP) &__io_usb_Startup,
|
|
|
|
(FN_MEDIUM_ISINSERTED) &__io_usb_IsInserted,
|
|
|
|
(FN_MEDIUM_READSECTORS) &__io_usb_ReadSectors,
|
|
|
|
(FN_MEDIUM_WRITESECTORS) &__io_usb_NOP, //&__io_usb_WriteSectors,
|
|
|
|
(FN_MEDIUM_CLEARSTATUS) &__io_usb_ClearStatus,
|
|
|
|
(FN_MEDIUM_SHUTDOWN) &__io_usb_Shutdown
|
2009-12-19 15:05:31 +01:00
|
|
|
};
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 USBStorage_WBFS_Open(char *buffer)
|
|
|
|
{
|
|
|
|
u32 len = 8;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 ret;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
/* Device not opened */
|
|
|
|
if (fd < 0)
|
|
|
|
return fd;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
extern u32 wbfs_part_lba;
|
|
|
|
u32 part = wbfs_part_lba;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
/* Read data */
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_OPEN_DISC, "dd:", buffer, len, &part, 4);
|
2009-09-30 05:57:15 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
return ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
2009-09-30 05:57:15 +02:00
|
|
|
|
2009-12-19 15:05:31 +01:00
|
|
|
// woffset is in 32bit words, len is in bytes
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 USBStorage_WBFS_Read(u32 woffset, u32 len, void *buffer)
|
|
|
|
{
|
|
|
|
s32 ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
USBStorage_Init();
|
|
|
|
/* Device not opened */
|
|
|
|
if (fd < 0)
|
|
|
|
return fd;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
/* Read data */
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_READ_DISC, "ii:d", woffset, len, buffer, len);
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
return ret;
|
2009-05-03 20:53:31 +02:00
|
|
|
}
|
2009-06-10 01:26:03 +02:00
|
|
|
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 USBStorage_WBFS_ReadDebug(u32 off, u32 size, void *buffer)
|
|
|
|
{
|
|
|
|
s32 ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
USBStorage_Init();
|
|
|
|
/* Device not opened */
|
|
|
|
if (fd < 0)
|
|
|
|
return fd;
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
/* Read data */
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_READ_DEBUG, "ii:d", off, size, buffer, size);
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
return ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 USBStorage_WBFS_SetDevice(int dev)
|
|
|
|
{
|
|
|
|
s32 ret;
|
|
|
|
static s32 retval = 0;
|
|
|
|
retval = 0;
|
|
|
|
USBStorage_Init();
|
|
|
|
// Device not opened
|
|
|
|
if (fd < 0) return fd;
|
|
|
|
// ioctl
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_SET_DEVICE, "i:i", dev, &retval);
|
|
|
|
if (retval) return retval;
|
|
|
|
return ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
2010-02-09 11:59:55 +01:00
|
|
|
s32 USBStorage_WBFS_SetFragList(void *p, int size)
|
|
|
|
{
|
|
|
|
s32 ret;
|
|
|
|
USBStorage_Init();
|
|
|
|
// Device not opened
|
|
|
|
if (fd < 0) return fd;
|
|
|
|
// ioctl
|
|
|
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_SET_FRAGLIST, "d:", p, size);
|
|
|
|
return ret;
|
2009-12-19 15:05:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#define DEVICE_TYPE_WII_UMS (('W'<<24)|('U'<<16)|('M'<<8)|'S')
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
bool umsio_Startup() {
|
|
|
|
return USBStorage_Init() == 0;
|
2009-06-10 01:26:03 +02:00
|
|
|
}
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
bool umsio_IsInserted() {
|
|
|
|
return true; // allways true
|
2009-06-10 01:26:03 +02:00
|
|
|
}
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
bool umsio_ReadSectors(sec_t sector, sec_t numSectors, u8 *buffer) {
|
|
|
|
u32 cnt = 0;
|
|
|
|
s32 ret;
|
|
|
|
/* Do reads */
|
|
|
|
while (cnt < numSectors) {
|
|
|
|
u32 sectors = (numSectors - cnt);
|
|
|
|
|
|
|
|
/* Read sectors is too big */
|
|
|
|
if (sectors > 32)
|
|
|
|
sectors = 32;
|
|
|
|
|
|
|
|
/* USB read */
|
|
|
|
ret = USBStorage_ReadSectors(sector + cnt, sectors, &buffer[cnt*512]);
|
|
|
|
if (ret < 0)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/* Increment counter */
|
|
|
|
cnt += sectors;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
2009-06-10 01:26:03 +02:00
|
|
|
}
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
bool umsio_WriteSectors(sec_t sector, sec_t numSectors, const u8* buffer) {
|
|
|
|
u32 cnt = 0;
|
|
|
|
s32 ret;
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Do writes */
|
|
|
|
while (cnt < numSectors) {
|
|
|
|
u32 sectors = (numSectors - cnt);
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Write sectors is too big */
|
|
|
|
if (sectors > 32)
|
|
|
|
sectors = 32;
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* USB write */
|
|
|
|
ret = USBStorage_WriteSectors(sector + cnt, sectors, &buffer[cnt * 512]);
|
|
|
|
if (ret < 0)
|
|
|
|
return false;
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Increment counter */
|
|
|
|
cnt += sectors;
|
|
|
|
}
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
return true;
|
2009-06-10 01:26:03 +02:00
|
|
|
}
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
bool umsio_ClearStatus(void) {
|
|
|
|
return true;
|
2009-06-10 01:26:03 +02:00
|
|
|
}
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
bool umsio_Shutdown() {
|
|
|
|
USBStorage_Deinit();
|
|
|
|
return true;
|
2009-06-10 01:26:03 +02:00
|
|
|
}
|
2009-12-19 15:05:31 +01:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
const DISC_INTERFACE __io_wiiums = {
|
|
|
|
DEVICE_TYPE_WII_UMS,
|
|
|
|
FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_USB,
|
2009-12-19 15:05:31 +01:00
|
|
|
(FN_MEDIUM_STARTUP) &umsio_Startup,
|
|
|
|
(FN_MEDIUM_ISINSERTED) &umsio_IsInserted,
|
|
|
|
(FN_MEDIUM_READSECTORS) &umsio_ReadSectors,
|
|
|
|
(FN_MEDIUM_WRITESECTORS) &umsio_WriteSectors,
|
|
|
|
(FN_MEDIUM_CLEARSTATUS) &umsio_ClearStatus,
|
|
|
|
(FN_MEDIUM_SHUTDOWN) &umsio_Shutdown
|
|
|
|
};
|
|
|
|
|
|
|
|
const DISC_INTERFACE __io_wiiums_ro = {
|
|
|
|
DEVICE_TYPE_WII_UMS,
|
|
|
|
FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_USB,
|
|
|
|
(FN_MEDIUM_STARTUP) &umsio_Startup,
|
|
|
|
(FN_MEDIUM_ISINSERTED) &umsio_IsInserted,
|
|
|
|
(FN_MEDIUM_READSECTORS) &umsio_ReadSectors,
|
|
|
|
(FN_MEDIUM_WRITESECTORS) &__io_usb_NOP,
|
|
|
|
(FN_MEDIUM_CLEARSTATUS) &umsio_ClearStatus,
|
|
|
|
(FN_MEDIUM_SHUTDOWN) &umsio_Shutdown
|
2009-06-10 01:26:03 +02:00
|
|
|
};
|