*Added support for using USB port 1 (ONLY ON HERMES CIOS)

*Added support for using both USB ports at once (ONLY ON HERMES CIOS)

Big thanks to rodries for writing the necessary ehcmodules!

NOTE: You can change port of USB device in the Loader Settings. The loader currently does not support loading configs off port 1 (only from port 0)

If you select to use both usb ports the loader will switch between ports automatically, on demand. It is not possible to use both ports at once currently. Right now the wiilight blinks each time it switches the port. I will talk to rodries and see if we can disable it. Using the "both ports" option only makes sense in combination with "Multiple Partitions" option. In that case all games on all partitions from BOTH HDDs will be loaded. I think I don't have to say that switching between ports and loading all games is slower than normal mode with one port only in use. You might wanna just set one port and switch yourself when you need to. Well the option for both ports (automatic switching) is there for the lazy ones who don't like to hit the settings button ;).
This commit is contained in:
dimok321 2011-02-05 21:06:52 +00:00
parent f43bdc65d3
commit d625c5adfc
47 changed files with 1371 additions and 1052 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>2.0 r1065</version>
<release_date>201102051739</release_date>
<version>2.0 r1066</version>
<release_date>201102052106</release_date>
<no_ios_reload/>
<short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: David Jelinek (djelinek@hotmail.com) e->e,r->r,u->u, c->c \n"
"Language-Team: r1056 - last version on http://djelinek.sweb.cz/_USBLoderGX/czech.lang \n"
@ -243,6 +243,9 @@ msgstr "Spustit?"
msgid "Both"
msgstr "Oboje"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Nelze naformátovat"
@ -1321,6 +1324,12 @@ msgstr "USB zarízení nenalezeno"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX je zabezpecen"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Odinstalace"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Fox888[dk]\n"
"Language-Team: [dk]\n"
@ -243,6 +243,9 @@ msgstr "Genstart?"
msgid "Both"
msgstr "Begge"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Kan ikke formateres"
@ -1321,6 +1324,12 @@ msgstr "USB-enhed ikke fundet"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX er beskyttet"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Afinstallér"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2011-02-04 13:06+0100\n"
"Last-Translator: glowy\n"
"Language-Team: tj_cool, glowy\n"
@ -243,6 +243,9 @@ msgstr "Start?"
msgid "Both"
msgstr "Beide"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Kan niet geformatteerd worden"
@ -1321,6 +1324,12 @@ msgstr "USB Apparaat niet gevonden"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX is vergrendeld"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Verwijderen"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -243,6 +243,9 @@ msgstr ""
msgid "Both"
msgstr ""
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr ""
@ -1321,6 +1324,12 @@ msgstr ""
msgid "USB Loader GX is protected"
msgstr ""
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: c64rmx\n"
"Language-Team: \n"
@ -243,6 +243,9 @@ msgstr "Boottaa?"
msgid "Both"
msgstr "Molemmat"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Ei voida formatoida"
@ -1321,6 +1324,12 @@ msgstr "USB-laitetta ei löytynyt"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX on suojattu."
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Poista"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Cyan\n"
"Language-Team: Badablek, Amour, ikya & Kin8\n"
@ -243,6 +243,9 @@ msgstr "Lancer ?"
msgid "Both"
msgstr "Les deux"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Formatage impossible"
@ -1321,6 +1324,12 @@ msgstr "Périphérique USB introuvable"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX est verrouillé"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Désinstaller"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2010-07-03 17:35-0800\n"
"Last-Translator: TheRealVisitor\n"
"Language-Team: Bertilax, Snoozer, wishmasterf, ZEN.13, TheRealVisitor\n"
@ -243,6 +243,9 @@ msgstr "Kanal starten?"
msgid "Both"
msgstr "ID und Region"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Kann nicht formatiert werden."
@ -1321,6 +1324,12 @@ msgstr "USB Gerät nicht gefunden."
msgid "USB Loader GX is protected"
msgstr "USB Loader GX ist jetzt geschützt."
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Deinstallieren"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-12-29 11:05+0100\n"
"Last-Translator: Springdale\n"
"Language-Team: Tusk, Springdale\n"
@ -243,6 +243,9 @@ msgstr ""
msgid "Both"
msgstr "Mindkettõ"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Nem Formázható"
@ -1321,6 +1324,12 @@ msgstr "USB Meghajtó nem található"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX levédve"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Törlés"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2011-01-22 20:00+0200\n"
"Last-Translator: Cambo \n"
"Language-Team: Cambo\n"
@ -243,6 +243,9 @@ msgstr "Vuoi riavviare?"
msgid "Both"
msgstr "Entrambi"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Non si può formattare"
@ -1321,6 +1324,12 @@ msgstr "Dispositivo USB non Trovato"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX è Protetto"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Disinstalla"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: ichiroling\n"
"Language-Team: hosigumayuugi, papa\n"
@ -243,6 +243,9 @@ msgstr "起動しますか?"
msgid "Both"
msgstr "IDとリージョンを表示"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "初期化できません"
@ -1321,6 +1324,12 @@ msgstr "USB機器が見つかりません"
msgid "USB Loader GX is protected"
msgstr "GXは保護されています"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "アンインストール"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: nextos@korea.com\n"
"Language-Team: \n"
@ -243,6 +243,9 @@ msgstr "부팅?"
msgid "Both"
msgstr "둘다"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "포맷할 수 없습니다."
@ -1321,6 +1324,12 @@ msgstr "USB 장치가 없습니다."
msgid "USB Loader GX is protected"
msgstr "USB 로더 GX 잠김 상태"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "제거"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: raschi\n"
"Language-Team: raschi\n"
@ -243,6 +243,9 @@ msgstr "Start?"
msgid "Both"
msgstr "Begge"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Kan ikke formateres"
@ -1321,6 +1324,12 @@ msgstr "USB enhet ikke funnet"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX er beskyttet"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Avinstallér"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: ziom666 (zadania_prog@vp.pl)\n"
"Language-Team: \n"
@ -243,6 +243,9 @@ msgstr ""
msgid "Both"
msgstr "Oba"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Nie mozna sformatowac"
@ -1321,6 +1324,12 @@ msgstr "Nie znaleziono urzadzenia USB"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX zabezpieczony"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Odinstaluj"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-23 18:52+0200\n"
"Last-Translator: aniemotion\n"
"Language-Team: boto12, aniemotion\n"
@ -243,6 +243,9 @@ msgstr "Carregar?"
msgid "Both"
msgstr "Ambos"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Não pode pode ser formatado"
@ -1321,6 +1324,12 @@ msgstr "Dispositivo USB não encontrado"
msgid "USB Loader GX is protected"
msgstr "O USB Loader GX está bloqueado"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Desinstalar"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2010-03-22 10:55-0000\n"
"Last-Translator: Sky8000\n"
"Language-Team: Sky8000 <sky8000@hotmail.com>\n"
@ -243,6 +243,9 @@ msgstr "Carregar?"
msgid "Both"
msgstr "Ambos"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Não pode ser formatado"
@ -1321,6 +1324,12 @@ msgstr "Dispositivo USB não encontrado"
msgid "USB Loader GX is protected"
msgstr "O USB Loader GX está bloqueado"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Desinstalar"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: nikolai_ca\n"
"Language-Team: Kir, alendit, nikolai_ca\n"
@ -243,6 +243,9 @@ msgstr "Загрузить?"
msgid "Both"
msgstr "Оба"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Невозможно отформатировать"
@ -1321,6 +1324,12 @@ msgstr "USB устройство не найдено"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX заблокирован"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Деинсталлировать"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: knife.hu kavid emul8ion\n"
"Language-Team: kavid\n"
@ -243,6 +243,9 @@ msgstr "启动?"
msgid "Both"
msgstr "全部"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "无法格式化"
@ -1321,6 +1324,12 @@ msgstr "找不到 USB 设备"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX 被锁定"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "删除"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: SirPalax\n"
"Language-Team: Penn, SirPalax\n"
@ -243,6 +243,9 @@ msgstr "¿Ejecutar?"
msgid "Both"
msgstr "Ambos"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "No se puede formatear"
@ -1321,6 +1324,12 @@ msgstr "USB no encontrado"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX está protegido"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Desinstalar"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2010-01-19 17:39+0200\n"
"Last-Translator: Katsurou\n"
"Language-Team: Katsurou, pirateX\n"
@ -243,6 +243,9 @@ msgstr "Starta?"
msgid "Both"
msgstr "Båda"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Kan inte formateras"
@ -1321,6 +1324,12 @@ msgstr "USB-enhet ej hittad"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX är skyddad"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Avinstallera"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2010-02-15 21:00+0800\n"
"Last-Translator: Jane.H\n"
"Language-Team: kyogc, Miller, Mika Li, Jane.H\n"
@ -243,6 +243,9 @@ msgstr "啟動?"
msgid "Both"
msgstr "全部"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "無法格式化"
@ -1321,6 +1324,12 @@ msgstr "找不到 USB 設備"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX 被上鎖保護"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "移除"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Nitro_subzero \n"
"Language-Team: Nitro_subzero\n"
@ -243,6 +243,9 @@ msgstr "บูต?"
msgid "Both"
msgstr "ทั้งคู่"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "ไม่สามารถฟอร์แมตได้"
@ -1321,6 +1324,12 @@ msgstr "ไม่พบอุปกรณ์ USB"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX 5 ถูกป้องกัน"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "ถอนการติดตั้ง"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-05 17:39+0100\n"
"POT-Creation-Date: 2011-02-05 22:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: omercigingelini\n"
"Language-Team: omercigingelini\n"
@ -243,6 +243,9 @@ msgstr "Başlat?"
msgid "Both"
msgstr "İkisi de"
msgid "Both Ports"
msgstr ""
msgid "Can't be formatted"
msgstr "Biçimlendirilemiyor"
@ -1321,6 +1324,12 @@ msgstr "USB Aygıtı bulunamadı"
msgid "USB Loader GX is protected"
msgstr "USB Loader GX koruma altında"
msgid "USB Port"
msgstr ""
msgid "USB Port changing is only supported on Hermes cIOS."
msgstr ""
msgid "Uninstall"
msgstr "Kaldır"

File diff suppressed because one or more lines are too long

View File

@ -30,9 +30,11 @@
#include <ogc/system.h>
#include <sdcard/wiisd_io.h>
#include <sdcard/gcsd.h>
#include "settings/CSettings.h"
#include "usbloader/usbstorage2.h"
#include "DeviceHandler.hpp"
#include "usbloader/wbfs.h"
#include "system/IosLoader.h"
DeviceHandler * DeviceHandler::instance = NULL;
@ -159,24 +161,64 @@ static inline bool USBSpinUp()
return started;
}
bool DeviceHandler::SetUSBPort(int port)
{
if(Settings.USBPort != 2)
DeviceHandler::Instance()->UnMountAllUSB();
int ret = USBStorage2_SetPort(port);
USBSpinUp();
if(Settings.USBPort != 2)
DeviceHandler::Instance()->MountAllUSB();
return ret >= 0;
}
void DeviceHandler::SetUSBPortFromPartition(int part)
{
if(Settings.USBPort != 2)
return;
PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle();
if(!usbHandle)
return;
if(part < usbHandle->GetPartitionCount())
SetUSBPort(0);
else
SetUSBPort(1);
}
bool DeviceHandler::MountUSB(int pos, bool spinup)
{
if(spinup && !USBSpinUp())
return false;
if(!usb)
{
if(Settings.USBPort == 2) SetUSBPort(0);
usb = new PartitionHandle(GetUSBInterface());
if(Settings.USBPort == 2 && IosLoader::IsHermesIOS())
{
SetUSBPort(1);
usb->GetPort1Partitions();
}
}
if(usb->GetPartitionCount() < 1)
if(usb->GetPartitionTotalCount() < 1)
{
delete usb;
usb = NULL;
return false;
}
if(pos >= usb->GetPartitionCount())
if(pos >= usb->GetPartitionTotalCount())
return false;
SetUSBPortFromPartition(pos);
return usb->Mount(pos, DeviceName[USB1+pos]);
}
@ -186,16 +228,27 @@ bool DeviceHandler::MountAllUSB(bool spinup)
return false;
if(!usb)
{
if(Settings.USBPort == 2) SetUSBPort(0);
usb = new PartitionHandle(GetUSBInterface());
if(Settings.USBPort == 2 && IosLoader::IsHermesIOS())
{
SetUSBPort(1);
usb->GetPort1Partitions();
}
}
bool result = false;
for(int i = 0; i < usb->GetPartitionCount(); i++)
for(int i = 0; i < usb->GetPartitionTotalCount(); i++)
{
if(MountUSB(i, false))
result = true;
}
if(Settings.USBPort == 2)
SetUSBPort(0);
return result;
}
@ -204,9 +257,11 @@ void DeviceHandler::UnMountUSB(int pos)
if(!usb)
return;
if(pos >= usb->GetPartitionCount())
if(pos >= usb->GetPartitionTotalCount())
return;
SetUSBPortFromPartition(pos);
usb->UnMount(pos);
}
@ -215,8 +270,8 @@ void DeviceHandler::UnMountAllUSB()
if(!usb)
return;
for(int i = 0; i < usb->GetPartitionCount(); i++)
usb->UnMount(i);
for(int i = 0; i < usb->GetPartitionTotalCount(); i++)
UnMountUSB(i);
delete usb;
usb = NULL;

View File

@ -83,6 +83,8 @@ class DeviceHandler
static const char * GetFSName(int dev);
static const char * PathToFSName(const char * path) { return GetFSName(PathToDriveType(path)); };
static const DISC_INTERFACE * GetUSBInterface();
static bool SetUSBPort(int port);
static void SetUSBPortFromPartition(int part);
private:
DeviceHandler() : sd(0), usb(0) { };
~DeviceHandler();

View File

@ -68,6 +68,7 @@ static inline const char * PartFromType(int type)
PartitionHandle::PartitionHandle(const DISC_INTERFACE *discio)
{
Port0Size = 0;
interface = discio;
// Sanity check
@ -92,6 +93,23 @@ PartitionHandle::~PartitionHandle()
interface->shutdown();
}
void PartitionHandle::GetPort1Partitions()
{
if(Port0Size != 0)
return;
Port0Size = PartitionList.size();
// Start the device and check that it is inserted
if (!interface->startup())
return;
if (!interface->isInserted())
return;
FindPartitions();
}
bool PartitionHandle::IsMounted(int pos)
{
if(pos < 0 || pos >= (int) MountNameList.size())
@ -114,7 +132,7 @@ bool PartitionHandle::Mount(int pos, const char * name, bool forceFAT)
UnMount(pos);
if(pos >= (int) MountNameList.size())
MountNameList.resize(GetPartitionCount());
MountNameList.resize(pos+1);
MountNameList[pos] = name;
@ -236,7 +254,7 @@ int PartitionHandle::FindPartitions()
continue;
}
if(le32(partition->block_count) > 0 && !IsExisting(le32(partition->lba_start)))
if(le32(partition->block_count) > 0 && (!IsExisting(le32(partition->lba_start)) || Port0Size))
{
AddPartition(PartFromType(partition->type), le32(partition->lba_start),
le32(partition->block_count), (partition->status == PARTITION_BOOTABLE),

View File

@ -145,24 +145,29 @@ class PartitionHandle
//! Get the entrie number in MBR of this partition
int GetPartitionNum(int pos) { if(valid(pos)) return PartitionList[pos].PartitionNum; else return -1; };
//! Get the count of found partitions
int GetPartitionCount() { return PartitionList.size(); };
int GetPartitionCount() const { if(Port0Size) return Port0Size; else return PartitionList.size(); };
//! Get the partition size in bytes
u64 GetSize(int pos) { if(valid(pos)) return (u64) PartitionList[pos].SecCount*BYTES_PER_SECTOR; else return 0; };
//! Get the whole partition record struct
PartitionFS * GetPartitionRecord(int pos) { if(valid(pos)) return &PartitionList[pos]; else return NULL; };
//! Get the disc interface of this handle
const DISC_INTERFACE * GetDiscInterface() { return interface; };
//! Get the port 1 partitions on usb
void GetPort1Partitions();
//! Get the count of found partitions including second port partitions on usb
int GetPartitionTotalCount() const { return PartitionList.size(); };
protected:
bool valid(int pos) { return (pos >= 0 && pos < (int) PartitionList.size()); }
void AddPartition(const char * name, u64 lba_start, u64 sec_count, bool bootable, u8 part_type, u8 part_num);
int FindPartitions();
bool IsExisting(u64 lba);
int FindPartitions();
void CheckEBR(u8 PartNum, sec_t ebr_lba);
int CheckGPT(u8 PartNum);
const DISC_INTERFACE *interface;
std::vector<PartitionFS> PartitionList;
std::vector<std::string> MountNameList;
int Port0Size;
};
#endif

View File

@ -157,6 +157,14 @@ bool StartUpProcess::Execute()
DeviceHandler::Instance()->MountAllUSB(false);
}
if(!IosLoader::IsHermesIOS())
Settings.USBPort = 0;
else if(Settings.USBPort == 1)
{
SetTextf("Changing USB Port to %i\n", Settings.USBPort);
DeviceHandler::SetUSBPort(Settings.USBPort);
}
gprintf("\tLoading font...%s\n", Theme::LoadFont(Settings.theme_path) ? "done" : "failed (using default)");
gprintf("\tLoading theme...%s\n", Theme::Load(Settings.theme) ? "done" : "failed (using default)");

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,3 @@
#ifndef EHC_MODULE5_H_
#define EHC_MODULE5_H_
#define size_ehcmodule_5 25856
#ifdef __cplusplus
extern "C" {
#endif
extern unsigned char ehcmodule_5[25883];
#define ehcmodule_5_size sizeof(ehcmodule_5)
#ifdef __cplusplus
}
#endif
#endif
extern unsigned char ehcmodule_5[25856];

View File

@ -114,6 +114,7 @@ void CSettings::SetDefault()
widescreen = (CONF_GetAspectRatio() == CONF_ASPECT_16_9);
HomeMenu = HOME_MENU_DEFAULT;
MultiplePartitions = OFF;
USBPort = 0;
}
bool CSettings::Load()
@ -255,6 +256,7 @@ bool CSettings::Save()
fprintf(file, "returnTo = %s\n ", returnTo);
fprintf(file, "HomeMenu = %d\n ", HomeMenu);
fprintf(file, "MultiplePartitions = %d\n ", MultiplePartitions);
fprintf(file, "USBPort = %d\n ", USBPort);
fclose(file);
return true;
@ -462,6 +464,11 @@ bool CSettings::SetSetting(char *name, char *value)
if (sscanf(value, "%d", &i) == 1) MultiplePartitions = i;
return true;
}
else if (strcmp(name, "USBPort") == 0)
{
if (sscanf(value, "%d", &i) == 1) USBPort = i;
return true;
}
else if (strcmp(name, "patchcountrystrings") == 0)
{
if (sscanf(value, "%d", &i) == 1) patchcountrystrings = i;

View File

@ -111,6 +111,7 @@ class CSettings
short ShowFreeSpace;
short HomeMenu;
short MultiplePartitions;
short USBPort;
u32 InstallPartitions;
u32 ParentalBlocks;
protected:

View File

@ -25,6 +25,7 @@
#include <sys/statvfs.h>
#include "LoaderSettings.hpp"
#include "Controls/DeviceHandler.hpp"
#include "usbloader/usbstorage2.h"
#include "settings/CSettings.h"
#include "prompts/ProgressWindow.h"
#include "prompts/PromptWindows.h"
@ -116,6 +117,7 @@ LoaderSettings::LoaderSettings()
Options->SetName(Idx++, "%s", tr( "Boot/Standard" ));
Options->SetName(Idx++, "%s", tr( "Game/Install Partition" ));
Options->SetName(Idx++, "%s", tr( "Multiple Partitions" ));
Options->SetName(Idx++, "%s", tr( "USB Port" ));
Options->SetName(Idx++, "%s", tr( "Install directories" ));
Options->SetName(Idx++, "%s", tr( "Game Split Size" ));
Options->SetName(Idx++, "%s", tr( "Quick Boot" ));
@ -129,15 +131,24 @@ LoaderSettings::LoaderSettings()
OldSettingsPartition = Settings.partition;
OldSettingsMultiplePartitions = Settings.MultiplePartitions;
OldSettingsUSBPort = Settings.USBPort;
}
LoaderSettings::~LoaderSettings()
{
//! if partition has changed, Reinitialize it
if (Settings.partition != OldSettingsPartition ||
Settings.MultiplePartitions != OldSettingsMultiplePartitions)
Settings.MultiplePartitions != OldSettingsMultiplePartitions ||
Settings.USBPort != OldSettingsUSBPort)
{
int tempPort = Settings.USBPort;
Settings.USBPort = OldSettingsUSBPort;
WBFS_CloseAll();
DeviceHandler::Instance()->UnMountAllUSB();
Settings.USBPort = tempPort;
DeviceHandler::SetUSBPort(Settings.USBPort);
if(Settings.USBPort == 2) DeviceHandler::Instance()->MountAllUSB();
if(Settings.MultiplePartitions)
WBFS_OpenAll();
else
@ -182,6 +193,12 @@ void LoaderSettings::SetOptionValues()
//! Settings: Multiple Partitions
Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.MultiplePartitions] ));
//! Settings: USB Port
if(Settings.USBPort == 2)
Options->SetValue(Idx++, tr("Both Ports"));
else
Options->SetValue(Idx++, "%i", Settings.USBPort);
//! Settings: Install directories
Options->SetValue(Idx++, "%s", tr( InstallToText[Settings.InstallToDir] ));
@ -290,7 +307,7 @@ int LoaderSettings::GetMenuInternal()
int retries = 20;
do
{
Settings.partition = (Settings.partition + 1) % DeviceHandler::Instance()->GetUSBHandle()->GetPartitionCount();
Settings.partition = (Settings.partition + 1) % DeviceHandler::Instance()->GetUSBHandle()->GetPartitionTotalCount();
fs_type = DeviceHandler::GetUSBFilesystemType(Settings.partition);
}
while (!IsValidPartition(fs_type, ios) && --retries > 0);
@ -305,6 +322,19 @@ int LoaderSettings::GetMenuInternal()
if (++Settings.MultiplePartitions >= MAX_ON_OFF) Settings.MultiplePartitions = 0;
}
//! Settings: USB Port
else if (ret == ++Idx)
{
if(!IosLoader::IsHermesIOS())
{
WindowPrompt(tr("ERROR:"), tr("USB Port changing is only supported on Hermes cIOS."), tr("OK"));
Settings.USBPort = 0;
}
else if (++Settings.USBPort >= 3) // 2 = both ports
Settings.USBPort = 0;
}
//! Settings: Install directories
else if (ret == ++Idx)
{

View File

@ -38,6 +38,7 @@ class LoaderSettings : public SettingsMenu
int OldSettingsPartition;
int OldSettingsMultiplePartitions;
int OldSettingsUSBPort;
OptionList GuiOptions;
};

View File

@ -147,19 +147,18 @@ void IosLoader::LoadIOSModules(s32 ios, s32 ios_rev)
int dip_plugin_size = 0;
ech_module = ehcmodule_5;
ehc_module_size = ehcmodule_5_size;
ehc_module_size = size_ehcmodule_5;
dip_plugin = odip_frag;
dip_plugin_size = odip_frag_size;
gprintf("Loading ehc v5 and opendip module\n");
u8 *ehc_cfg = search_for_ehcmodule_cfg((u8 *) ech_module, ehc_module_size);
if (ehc_cfg)
{
ehc_cfg += 12;
ehc_cfg[0] = 0; // USB Port 0
gprintf("Patched ehc module to use usb port 0.\n");
}
// u8 *ehc_cfg = search_for_ehcmodule_cfg((u8 *) ech_module, ehc_module_size);
// if (ehc_cfg)
// {
// ehc_cfg += 12;
// ehc_cfg[0] = 0; // USB Port 0
// gprintf("Patched ehc module to use usb port 0.\n");
// }
load_modules(ech_module, ehc_module_size, dip_plugin, dip_plugin_size);
}
//! Waninkoko IOS

View File

@ -6,6 +6,7 @@
#include "Controls/DeviceHandler.hpp"
#include "usbloader/disc.h"
#include "usbloader/apploader.h"
#include "usbloader/usbstorage2.h"
#include "usbloader/wdvd.h"
#include "usbloader/GameList.h"
#include "settings/Settings.h"
@ -267,11 +268,22 @@ int GameBooter::BootGame(const char * gameID)
//! Shadow mload - Only needed on some games with Hermes v5.1 (Check is inside the function)
shadow_mload();
//! Remember game's USB port
int usbport = USBStorage2_GetPort();
//! Flush all caches and close up all devices
WBFS_CloseAll();
DeviceHandler::DestroyInstance();
USB_Deinitialize();
if(Settings.USBPort == 2)
{
//! Reset USB port because device handler changes it for cache flushing
USBStorage2_Init();
USBStorage2_SetPort(usbport);
USBStorage2_Deinit();
}
//! Modify Wii Message Board to display the game starting here
if(Settings.PlaylogUpdate)
Playlog_Update((char *) gameHeader.id, BNRInstance::Instance()->GetIMETTitle(CONF_GetLanguage()));

View File

@ -169,7 +169,7 @@ int GameList::ReadGameList()
PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle();
int cnt = 0;
for(int part = 0; part < usbHandle->GetPartitionCount(); ++part)
for(int part = 0; part < usbHandle->GetPartitionTotalCount(); ++part)
{
int ret = InternalReadList(part);
if(ret > 0) cnt += ret;

View File

@ -1,6 +1,8 @@
/*-------------------------------------------------------------
usbstorage_starlet.c -- USB mass storage support, inside starlet
Copyright (C) 2011 Dimok
Copyright (C) 2011 Rodries
Copyright (C) 2009 Kwiirk
If this driver is linked before libogc, this will replace the original
@ -32,6 +34,7 @@
#include <string.h>
#include "usbstorage2.h"
#include "memory/mem2.h"
#include "gecko.h"
/* IOCTL commands */
@ -46,6 +49,7 @@
#define USB_IOCTL_UMS_WATCHDOG (UMS_BASE+0x80)
#define USB_IOCTL_UMS_TESTMODE (UMS_BASE+0x81)
#define USB_IOCTL_SET_PORT (UMS_BASE+0x83)
#define WBFS_BASE (('W'<<24)|('F'<<16)|('S'<<8))
#define USB_IOCTL_WBFS_OPEN_DISC (WBFS_BASE+0x1)
@ -65,6 +69,7 @@ static char fs3[] ATTRIBUTE_ALIGN(32) = "/dev/usb/ehc";
static u8 * mem2_ptr = NULL;
static s32 hid = -1, fd = -1;
static u32 usb2_port = 0; //autodetect mode (works only with hermes ios & rodries ehcmodule)
u32 hdd_sector_size = 512;
s32 USBStorage2_Init(void)
@ -85,9 +90,10 @@ s32 USBStorage2_Init(void)
fd = IOS_Open(fs, 0);
if (fd < 0) fd = IOS_Open(fs2, 0);
if (fd < 0) fd = IOS_Open(fs3, 0);
if (fd < 0) return fd;
IOS_IoctlvFormat(hid, fd, USB_IOCTL_SET_PORT, "i:", usb2_port);
/* Initialize USB storage */
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_INIT, ":");
if (ret < 0) goto err;
@ -124,6 +130,29 @@ void USBStorage2_Deinit(void)
hdd_sector_size = 512;
}
s32 USBStorage2_SetPort(u32 port)
{
if(port < 0 || port > 1)
return -1;
if(port == usb2_port)
return 0;
s32 ret = -1;
usb2_port = port;
gprintf("Changing USB port to port %i....\n", port);
//must be called before USBStorage2_Init (default port 0)
if (fd >= 0)
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_SET_PORT, "i:", usb2_port);
return ret;
}
s32 USBStorage2_GetPort()
{
return usb2_port;
}
s32 USBStorage2_Watchdog(u32 on_off)
{
@ -245,7 +274,7 @@ s32 USBStorage2_WriteSectors(u32 sector, u32 numSectors, const void *buffer)
static bool __usbstorage_Startup(void)
{
return USBStorage2_Init() == 0;
return USBStorage2_Init() >= 0;
}
static bool __usbstorage_IsInserted(void)
@ -283,64 +312,3 @@ const DISC_INTERFACE __io_usbstorage2 = {
(FN_MEDIUM_CLEARSTATUS) &__usbstorage_ClearStatus,
(FN_MEDIUM_SHUTDOWN) &__usbstorage_Shutdown
};
// woffset is in 32bit words, len is in bytes
s32 USBStorage_WBFS_Read(u32 woffset, u32 len, void *buffer)
{
s32 ret;
USBStorage2_Init();
/* Device not opened */
if (fd < 0) return fd;
/* Read data */
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_READ_DISC, "ii:d", woffset, len, buffer, len);
return ret;
}
s32 USBStorage_WBFS_SetFragList(void *p, int size)
{
s32 ret;
USBStorage2_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;
}
// Not used currently
#if 0
s32 USBStorage_WBFS_Open(char *buffer)
{
u32 len = 8;
s32 ret;
/* Device not opened */
if (fd < 0) return fd;
extern u32 wbfs_part_lba;
u32 part = wbfs_part_lba;
/* Read data */
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_OPEN_DISC, "dd:", buffer, len, &part, 4);
return ret;
}
s32 USBStorage_WBFS_SetDevice(int dev)
{
s32 ret, retval = 0;
USBStorage2_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;
}
#endif

View File

@ -19,9 +19,8 @@ extern "C"
s32 USBStorage2_Watchdog(u32 on_off);
s32 USBStorage_WBFS_Read(u32 woffset, u32 len, void *buffer);
s32 USBStorage_WBFS_SetDevice(int dev);
s32 USBStorage_WBFS_SetFragList(void *p, int size);
s32 USBStorage2_SetPort(u32 port);
s32 USBStorage2_GetPort();
#define DEVICE_TYPE_WII_UMS (('W'<<24)|('U'<<16)|('M'<<8)|'S')

View File

@ -25,10 +25,12 @@ wbfs_disc_t* WBFS_OpenDisc(u8 *discid)
if(!discid) return NULL;
int part = gameList.GetPartitionNumber(discid);
if(VALID(part))
return WbfsList[part]->OpenDisc(discid);
if(!VALID(part))
return NULL;
return NULL;
DeviceHandler::SetUSBPortFromPartition(part);
return WbfsList[part]->OpenDisc(discid);
}
void WBFS_CloseDisc(wbfs_disc_t *disc)
@ -40,6 +42,8 @@ void WBFS_CloseDisc(wbfs_disc_t *disc)
if(!VALID(part_num))
return;
DeviceHandler::SetUSBPortFromPartition(part_num);
WbfsList[part_num]->CloseDisc(disc);
}
@ -54,7 +58,7 @@ s32 WBFS_OpenAll()
PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle();
for(int i = 0; i < usbHandle->GetPartitionCount(); ++i)
for(int i = 0; i < usbHandle->GetPartitionTotalCount(); ++i)
{
if(WBFS_OpenPart(i) == 0)
ret = 0;
@ -66,9 +70,11 @@ s32 WBFS_OpenAll()
s32 WBFS_OpenPart(int part_num)
{
PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle();
if(part_num < 0 || part_num >= usbHandle->GetPartitionCount())
if(part_num < 0 || part_num >= usbHandle->GetPartitionTotalCount())
return -1;
DeviceHandler::SetUSBPortFromPartition(part_num);
// close
WBFS_Close(part_num);
@ -79,19 +85,19 @@ s32 WBFS_OpenPart(int part_num)
if (strncmp(usbHandle->GetFSName(part_num), "FAT", 3) == 0)
{
WbfsList[part_num] = new Wbfs_Fat(WBFS_MIN_DEVICE, usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num));
WbfsList[part_num] = new Wbfs_Fat(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num);
}
else if (strncmp(usbHandle->GetFSName(part_num), "NTFS", 4) == 0)
{
WbfsList[part_num] = new Wbfs_Ntfs(WBFS_MIN_DEVICE, usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num));
WbfsList[part_num] = new Wbfs_Ntfs(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num);
}
else if (strncmp(usbHandle->GetFSName(part_num), "LINUX", 5) == 0)
{
WbfsList[part_num] = new Wbfs_Ext(WBFS_MIN_DEVICE, usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num));
WbfsList[part_num] = new Wbfs_Ext(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num);
}
else if (strncmp(usbHandle->GetFSName(part_num), "WBFS", 4) == 0)
{
WbfsList[part_num] = new Wbfs_Wbfs(WBFS_MIN_DEVICE, usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num));
WbfsList[part_num] = new Wbfs_Wbfs(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num);
}
else
{
@ -113,6 +119,8 @@ bool WBFS_Close(int part_num)
if(!VALID(part_num))
return false;
DeviceHandler::SetUSBPortFromPartition(part_num);
delete WbfsList[part_num];
WbfsList[part_num] = NULL;
@ -141,7 +149,10 @@ s32 WBFS_GetCount(int part_num, u32 *count)
if(!VALID(part_num))
return -1;
return WbfsList[part_num]->GetCount(count);
DeviceHandler::SetUSBPortFromPartition(part_num);
int ret = WbfsList[part_num]->GetCount(count);
return ret;
}
s32 WBFS_GetHeaders(int part_num, struct discHdr *outbuf, u32 cnt, u32 len)
@ -149,6 +160,8 @@ s32 WBFS_GetHeaders(int part_num, struct discHdr *outbuf, u32 cnt, u32 len)
if(!VALID(part_num))
return -1;
DeviceHandler::SetUSBPortFromPartition(part_num);
return WbfsList[part_num]->GetHeaders(outbuf, cnt, len);
}
@ -158,6 +171,8 @@ s32 WBFS_CheckGame(u8 *discid)
if(!VALID(part_num))
return 0;
DeviceHandler::SetUSBPortFromPartition(part_num);
return WbfsList[part_num]->CheckGame(discid);
}
@ -166,6 +181,8 @@ s32 WBFS_AddGame(void)
if(!VALID(Settings.partition))
return -1;
DeviceHandler::SetUSBPortFromPartition(Settings.partition);
return WbfsList[Settings.partition]->AddGame();
}
@ -175,6 +192,8 @@ s32 WBFS_RemoveGame(u8 *discid)
if(!VALID(part_num))
return -1;
DeviceHandler::SetUSBPortFromPartition(part_num);
return WbfsList[part_num]->RemoveGame(discid);
}
@ -184,6 +203,8 @@ s32 WBFS_GameSize(u8 *discid, f32 *size)
if(!VALID(part_num))
return -1;
DeviceHandler::SetUSBPortFromPartition(part_num);
return WbfsList[part_num]->GameSize(discid, size);
}
@ -192,6 +213,8 @@ s32 WBFS_DiskSpace(f32 *used, f32 *free)
if(!VALID(Settings.partition))
return -1;
DeviceHandler::SetUSBPortFromPartition(Settings.partition);
return WbfsList[Settings.partition]->DiskSpace(used, free);
}
@ -201,6 +224,8 @@ s32 WBFS_RenameGame(u8 *discid, const void *newname)
if(!VALID(part_num))
return -1;
DeviceHandler::SetUSBPortFromPartition(part_num);
return WbfsList[part_num]->RenameGame(discid, newname);
}
@ -210,6 +235,8 @@ s32 WBFS_ReIDGame(u8 *discid, const void *newID)
if(!VALID(part_num))
return -1;
DeviceHandler::SetUSBPortFromPartition(part_num);
return WbfsList[part_num]->ReIDGame(discid, newID);
}
@ -218,6 +245,8 @@ u64 WBFS_EstimeGameSize(void)
if(!VALID(Settings.partition))
return 0;
DeviceHandler::SetUSBPortFromPartition(Settings.partition);
return WbfsList[Settings.partition]->EstimateGameSize();
}
@ -227,6 +256,8 @@ int WBFS_GetFragList(u8 *id)
if(!VALID(part_num))
return -1;
DeviceHandler::SetUSBPortFromPartition(part_num);
return WbfsList[part_num]->GetFragList(id);
}

View File

@ -12,8 +12,8 @@
#include "wbfs_base.h"
Wbfs::Wbfs(u32 dev, u32 l, u32 s)
: hdd(NULL), device(dev), lba(l), size(s)
Wbfs::Wbfs(u32 l, u32 s, u32 part)
: hdd(NULL), lba(l), size(s), partition(part)
{
}
@ -22,7 +22,7 @@ s32 Wbfs::Init(u32 device)
s32 ret;
const DISC_INTERFACE * handle = DeviceHandler::GetUSBInterface();
switch (device)
switch (WBFS_DEVICE_USB)
{
case WBFS_DEVICE_USB:
/* Initialize USB storage */

View File

@ -11,7 +11,7 @@
class Wbfs
{
public:
Wbfs(u32 dev, u32 lba, u32 size);
Wbfs(u32 lba, u32 size, u32 part);
~Wbfs() { Close(); };
static s32 Init(u32);
s32 CheckGame(u8 *);
@ -37,9 +37,9 @@ class Wbfs
const wbfs_t *GetHDDHandle(void) const { return hdd; }
protected:
wbfs_t *hdd;
const u32 device;
const u32 lba;
const u32 size;
const u32 partition;
};
#endif //_H

View File

@ -6,8 +6,8 @@
class Wbfs_Ext: public Wbfs_Fat
{
public:
Wbfs_Ext(u32 device, u32 lba, u32 size) :
Wbfs_Fat(device, lba, size)
Wbfs_Ext(u32 lba, u32 size, u32 part) :
Wbfs_Fat(lba, size, part)
{
}
virtual const u8 GetFSType(void) const { return PART_FS_EXT; }

View File

@ -38,8 +38,8 @@ static const char wbfs_fat_dir[] = "/wbfs";
static const char invalid_path[] = "/\\:|<>?*\"'";
extern u32 hdd_sector_size;
Wbfs_Fat::Wbfs_Fat(u32 device, u32 lba, u32 size) :
Wbfs(device, lba, size), fat_hdr_list(NULL), fat_hdr_count(0)
Wbfs_Fat::Wbfs_Fat(u32 lba, u32 size, u32 part) :
Wbfs(lba, size, part), fat_hdr_list(NULL), fat_hdr_count(0)
{
memset(wbfs_fs_drive, 0, sizeof(wbfs_fs_drive));
}
@ -50,11 +50,11 @@ s32 Wbfs_Fat::Open()
PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle();
for(int i = 0; i < usbHandle->GetPartitionCount(); ++i)
if(partition >= 0 && partition < usbHandle->GetPartitionTotalCount())
{
if (device == WBFS_DEVICE_USB && lba == usbHandle->GetLBAStart(i))
if (lba == usbHandle->GetLBAStart(partition))
{
sprintf(wbfs_fs_drive, "%s:", usbHandle->MountName(i));
sprintf(wbfs_fs_drive, "%s:", usbHandle->MountName(partition));
return 0;
}
}

View File

@ -10,7 +10,7 @@
class Wbfs_Fat: public Wbfs
{
public:
Wbfs_Fat(u32 device, u32 lba, u32 size);
Wbfs_Fat(u32 lba, u32 size, u32 part);
virtual s32 Open();
virtual void Close();

View File

@ -6,8 +6,8 @@
class Wbfs_Ntfs: public Wbfs_Fat
{
public:
Wbfs_Ntfs(u32 device, u32 lba, u32 size) :
Wbfs_Fat(device, lba, size)
Wbfs_Ntfs(u32 lba, u32 size, u32 part) :
Wbfs_Fat(lba, size, part)
{
}
virtual const u8 GetFSType(void) const { return PART_FS_NTFS; }