* Added initial NTFS support

* Added load system based on fragments

This commit is made possible for Oggzee and his great work on supporting other filesystems!
This commit is contained in:
e.bovendeur 2009-12-19 14:05:31 +00:00
parent f9358f8b30
commit 3aa838dec9
61 changed files with 1552 additions and 442 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>1.0 r866</version> <version>1.0 r867</version>
<release_date>200912151155</release_date> <release_date>200912161915</release_date>
<short_description>Loads games from USB-devices</short_description> <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. <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.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: David Jelinek (djelinek@hotmail.com) \n" "Last-Translator: David Jelinek (djelinek@hotmail.com) \n"
"Language-Team: r823 - last version on http://djelinek.sweb.cz/_USBLoderGX/czech.lang \n" "Language-Team: r823 - last version on http://djelinek.sweb.cz/_USBLoderGX/czech.lang \n"
@ -665,6 +665,9 @@ msgstr "Chyba pri instalaci"
msgid "Install a game" msgid "Install a game"
msgstr "Nainstalovat hru" msgstr "Nainstalovat hru"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "Žádné zarízení USB"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Nebylo nalezeno zarízení USB" msgstr "Nebylo nalezeno zarízení USB"
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "Pokoušíte se smazat "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Vybíráte zobrazení oblíbených, ale žádné jste dosud nevybral" msgstr "Vybíráte zobrazení oblíbených, ale žádné jste dosud nevybral"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "souboru zbývá"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "souboru nenalezeno na serveru" msgstr "souboru nenalezeno na serveru"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: dorf[dk]\n" "Last-Translator: dorf[dk]\n"
"Language-Team: dorf[dk]\n" "Language-Team: dorf[dk]\n"
@ -665,6 +665,9 @@ msgstr "Installationsfejl!"
msgid "Install a game" msgid "Install a game"
msgstr "Installér nyt spil" msgstr "Installér nyt spil"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,8 +816,8 @@ msgstr "Ingen USB-enhed tilsluttet"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Ingen USB-enhed fundet." msgstr "Ingen USB-enhed fundet."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Der blev ikke fundet en WBFS- eller FAT-partition med spil" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Der blev ikke valgt nogle cheats" msgstr "Der blev ikke valgt nogle cheats"
@ -1260,6 +1263,9 @@ msgstr "Du er ved at slette "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Du har valgt at vise favoritter, men ingen spil er markerede som favoritter." msgstr "Du har valgt at vise favoritter, men ingen spil er markerede som favoritter."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "filer tilbage"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "filer blev ikke fundet på serveren!" msgstr "filer blev ikke fundet på serveren!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
@ -1339,6 +1345,9 @@ msgstr "af"
msgid "seconds left" msgid "seconds left"
msgstr "sekunder tilbage" msgstr "sekunder tilbage"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Der blev ikke fundet en WBFS- eller FAT-partition med spil"
#~ msgid "Exit USB Loader GX?" #~ msgid "Exit USB Loader GX?"
#~ msgstr "Afslut USB Loader GX?" #~ msgstr "Afslut USB Loader GX?"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-15 12:58+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: glowy\n" "Last-Translator: glowy\n"
"Language-Team: tj_cool, glowy\n" "Language-Team: tj_cool, glowy\n"
@ -665,6 +665,9 @@ msgstr "Installatiefout!"
msgid "Install a game" msgid "Install a game"
msgstr "Spel installeren" msgstr "Spel installeren"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "Installatie partitie" msgstr "Installatie partitie"
@ -813,8 +816,8 @@ msgstr "Geen USB apparaat"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Geen USB apparaat gevonden." msgstr "Geen USB apparaat gevonden."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Geen WBFS of FAT spel partitie gevonden" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Geen cheats geselecteerd" msgstr "Geen cheats geselecteerd"
@ -1260,6 +1263,9 @@ msgstr "Je wilt nu verwijderen: "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Je wilt favorieten tonen, maar je hebt er geen ingesteld." msgstr "Je wilt favorieten tonen, maar je hebt er geen ingesteld."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "Je hebt ouderlijk toezicht niet ingeschakeld. Als je ouderlijk toezicht wilt gebruiken, zet het dan aan in de Wii instellingen." msgstr "Je hebt ouderlijk toezicht niet ingeschakeld. Als je ouderlijk toezicht wilt gebruiken, zet het dan aan in de Wii instellingen."
@ -1300,8 +1306,8 @@ msgstr "Bestanden resterend"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "Bestanden niet gevonden op server!" msgstr "Bestanden niet gevonden op server!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "voor FAT ondersteuning" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "voor Ocarina" msgstr "voor Ocarina"
@ -1339,6 +1345,12 @@ msgstr "van"
msgid "seconds left" msgid "seconds left"
msgstr "seconden over" msgstr "seconden over"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Geen WBFS of FAT spel partitie gevonden"
#~ msgid "for FAT support"
#~ msgstr "voor FAT ondersteuning"
#~ msgid "Failed to extract opening.bnr" #~ msgid "Failed to extract opening.bnr"
#~ msgstr "Uitpakken opening.bnr mislukt" #~ msgstr "Uitpakken opening.bnr mislukt"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -665,6 +665,9 @@ msgstr ""
msgid "Install a game" msgid "Install a game"
msgstr "" msgstr ""
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr ""
msgid "No USB Device found." msgid "No USB Device found."
msgstr "" msgstr ""
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr ""
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "" msgstr ""
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr ""
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "" msgstr ""
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: c64rmx\n" "Last-Translator: c64rmx\n"
"Language-Team: \n" "Language-Team: \n"
@ -665,6 +665,9 @@ msgstr "Asennusvirhe!"
msgid "Install a game" msgid "Install a game"
msgstr "Asenna peli" msgstr "Asenna peli"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "Ei USB-laitetta"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "USB-laitetta ei löytynyt." msgstr "USB-laitetta ei löytynyt."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "Olet tuhoamassa "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Olet valinnut näyttääksesi suosikit mutta sinulla ei ole valittuna yhtään." msgstr "Olet valinnut näyttääksesi suosikit mutta sinulla ei ole valittuna yhtään."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "Tiedostoja jäljellä"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "tiedostoja ei löytynyt serveriltä!" msgstr "tiedostoja ei löytynyt serveriltä!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Kin8\n" "Last-Translator: Kin8\n"
"Language-Team: Badablek, Amour, ikya, dj_skual & Kin8\n" "Language-Team: Badablek, Amour, ikya, dj_skual & Kin8\n"
@ -665,6 +665,9 @@ msgstr "Erreur à l'installation !"
msgid "Install a game" msgid "Install a game"
msgstr "Installer un jeu" msgstr "Installer un jeu"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "Installation" msgstr "Installation"
@ -813,8 +816,8 @@ msgstr "Aucun périphérique USB"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Aucun périphérique USB trouvé." msgstr "Aucun périphérique USB trouvé."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Aucune partition WBFS ou FAT trouvée" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Aucune selection de triche" msgstr "Aucune selection de triche"
@ -1260,6 +1263,9 @@ msgstr "Vous êtes sur le point de supprimer "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Vous choisissez d'afficher des favoris alors que vous n'en avez aucun." msgstr "Vous choisissez d'afficher des favoris alors que vous n'en avez aucun."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "Contrôle Parental désactivé. Si vous voulez l'utiliser, activez-le dans les Paramètres de votre Wii." msgstr "Contrôle Parental désactivé. Si vous voulez l'utiliser, activez-le dans les Paramètres de votre Wii."
@ -1300,8 +1306,8 @@ msgstr "fichiers restants"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "fichiers introuvables sur le serveur !" msgstr "fichiers introuvables sur le serveur !"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "pour le support FAT" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "pour Ocarina" msgstr "pour Ocarina"
@ -1339,6 +1345,12 @@ msgstr "sur"
msgid "seconds left" msgid "seconds left"
msgstr "secondes restantes" msgstr "secondes restantes"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Aucune partition WBFS ou FAT trouvée"
#~ msgid "for FAT support"
#~ msgstr "pour le support FAT"
#~ msgid "Failed to extract opening.bnr" #~ msgid "Failed to extract opening.bnr"
#~ msgstr "Extraction opening.bnr échouée" #~ msgstr "Extraction opening.bnr échouée"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-15 12:58+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: ZEN.13\n" "Last-Translator: ZEN.13\n"
"Language-Team: Snoozer, wishmasterf, Bertilax, ZEN.13\n" "Language-Team: Snoozer, wishmasterf, Bertilax, ZEN.13\n"
@ -665,6 +665,9 @@ msgstr "Installationsfehler!"
msgid "Install a game" msgid "Install a game"
msgstr "ein Spiel installieren" msgstr "ein Spiel installieren"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "Partitionen installieren" msgstr "Partitionen installieren"
@ -813,8 +816,8 @@ msgstr "Kein USB Gerät"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Kein USB Gerät gefunden." msgstr "Kein USB Gerät gefunden."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Keine WBFS oder FAT Partition gefunden" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Es wurden keine Cheats ausgewählt" msgstr "Es wurden keine Cheats ausgewählt"
@ -1260,6 +1263,9 @@ msgstr "Du bist dabei zu löschen "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Du willst Favoriten anzeigen, hast aber keine ausgewählt." msgstr "Du willst Favoriten anzeigen, hast aber keine ausgewählt."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "Du hast die Altersbeschränkung nicht aktiviert. Wenn du sie nutzen möchtest, aktiviere sie in den Wii-Systemeinstellungen." msgstr "Du hast die Altersbeschränkung nicht aktiviert. Wenn du sie nutzen möchtest, aktiviere sie in den Wii-Systemeinstellungen."
@ -1300,8 +1306,8 @@ msgstr "Dateien fehlen"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "Datei(en) auf dem Server nicht gefunden!" msgstr "Datei(en) auf dem Server nicht gefunden!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "für den FAT Support" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "für Ocarina" msgstr "für Ocarina"
@ -1339,6 +1345,12 @@ msgstr "von"
msgid "seconds left" msgid "seconds left"
msgstr "Sekunden verbleiben" msgstr "Sekunden verbleiben"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Keine WBFS oder FAT Partition gefunden"
#~ msgid "for FAT support"
#~ msgstr "für den FAT Support"
#~ msgid "No WBFS partition found" #~ msgid "No WBFS partition found"
#~ msgstr "Keine WBFS Partition gefunden" #~ msgstr "Keine WBFS Partition gefunden"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-12-01 13:23+0100\n" "PO-Revision-Date: 2009-12-01 13:23+0100\n"
"Last-Translator: Springdale\n" "Last-Translator: Springdale\n"
"Language-Team: Tusk, Springdale\n" "Language-Team: Tusk, Springdale\n"
@ -665,6 +665,9 @@ msgstr "Telepítési Hiba!"
msgid "Install a game" msgid "Install a game"
msgstr "Játék telepítése" msgstr "Játék telepítése"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,8 +816,8 @@ msgstr "Nincs USB meghajtó"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Nincs USB meghajtó csatlakoztatva." msgstr "Nincs USB meghajtó csatlakoztatva."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Nem található WBFS vagy FAT partíció" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Nincsenek kiválasztott cheat-ek" msgstr "Nincsenek kiválasztott cheat-ek"
@ -1260,6 +1263,9 @@ msgstr "Törölni készülsz: "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "A Kedvencek megjelenítését választottad, de egy játék sincs így megjelölve." msgstr "A Kedvencek megjelenítését választottad, de egy játék sincs így megjelölve."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "hátralévõ fájl"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "fájl nem található a szerveren" msgstr "fájl nem található a szerveren"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
@ -1339,6 +1345,9 @@ msgstr "./"
msgid "seconds left" msgid "seconds left"
msgstr "hátralévõ másodperc" msgstr "hátralévõ másodperc"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Nem található WBFS vagy FAT partíció"
#~ msgid "Exit USB Loader GX?" #~ msgid "Exit USB Loader GX?"
#~ msgstr "Kilépés az USB Loader GX-bõl?" #~ msgstr "Kilépés az USB Loader GX-bõl?"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Cambo \n" "Last-Translator: Cambo \n"
"Language-Team: FoxeJoe, Cambo\n" "Language-Team: FoxeJoe, Cambo\n"
@ -665,6 +665,9 @@ msgstr "Errore Installazione!"
msgid "Install a game" msgid "Install a game"
msgstr "Installa un gioco" msgstr "Installa un gioco"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "Installa partizioni" msgstr "Installa partizioni"
@ -813,8 +816,8 @@ msgstr "Nessun Dispositivo USB"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Nessun Dispositivo USB trovato." msgstr "Nessun Dispositivo USB trovato."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Nessuna partizione WBFS o FAT trovata" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Non è stato selezionato alcun trucco" msgstr "Non è stato selezionato alcun trucco"
@ -1260,6 +1263,9 @@ msgstr "Stai per eliminare "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Hai scelto di visualizzare i preferiti e non ne hai selezionato nessuno" msgstr "Hai scelto di visualizzare i preferiti e non ne hai selezionato nessuno"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "Il Controllo Genitori non è attivo. Se vuoi utilizzare il Controllo Genitori abilitalo nelle Impostazioni della Wii." msgstr "Il Controllo Genitori non è attivo. Se vuoi utilizzare il Controllo Genitori abilitalo nelle Impostazioni della Wii."
@ -1300,8 +1306,8 @@ msgstr "file mancanti"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "file non trovato/i sul server!" msgstr "file non trovato/i sul server!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "per il supporto delle partizioni FAT" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "per Ocarina" msgstr "per Ocarina"
@ -1339,6 +1345,12 @@ msgstr "di"
msgid "seconds left" msgid "seconds left"
msgstr "secondi mancanti" msgstr "secondi mancanti"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Nessuna partizione WBFS o FAT trovata"
#~ msgid "for FAT support"
#~ msgstr "per il supporto delle partizioni FAT"
#~ msgid "Failed to extract opening.bnr" #~ msgid "Failed to extract opening.bnr"
#~ msgstr "Estrazione opening.bnr fallita" #~ msgstr "Estrazione opening.bnr fallita"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: hosigumayuugi\n" "Last-Translator: hosigumayuugi\n"
"Language-Team: hosigumayuugi\n" "Language-Team: hosigumayuugi\n"
@ -665,6 +665,9 @@ msgstr "インストールエラー!"
msgid "Install a game" msgid "Install a game"
msgstr "ゲームをインストール" msgstr "ゲームをインストール"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "保存する領域" msgstr "保存する領域"
@ -813,8 +816,8 @@ msgstr "USB機器がありません"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "USB機器が検出されていません" msgstr "USB機器が検出されていません"
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "WBFS・FAT領域が見つかりません" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "何も選ばれていません" msgstr "何も選ばれていません"
@ -1260,6 +1263,9 @@ msgstr "削除していいですか "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "お気に入りの登録がありません" msgstr "お気に入りの登録がありません"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "Wii本体設定で使用制限機能を有効にしてください" msgstr "Wii本体設定で使用制限機能を有効にしてください"
@ -1300,8 +1306,8 @@ msgstr "個未完了"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "個サーバーにありませんでした…" msgstr "個サーバーにありませんでした…"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "…FATの対応" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "…Ocarinaを制作" msgstr "…Ocarinaを制作"
@ -1339,6 +1345,12 @@ msgstr "中"
msgid "seconds left" msgid "seconds left"
msgstr "秒で完了" msgstr "秒で完了"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "WBFS・FAT領域が見つかりません"
#~ msgid "for FAT support"
#~ msgstr "…FATの対応"
#~ msgid "Exit USB Loader GX?" #~ msgid "Exit USB Loader GX?"
#~ msgstr "USBLoaderGXを終了しますか" #~ msgstr "USBLoaderGXを終了しますか"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: nextos@korea.com\n" "Last-Translator: nextos@korea.com\n"
"Language-Team: \n" "Language-Team: \n"
@ -665,6 +665,9 @@ msgstr "설치 에러!"
msgid "Install a game" msgid "Install a game"
msgstr "게임을 설치할까요" msgstr "게임을 설치할까요"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "USB 장치가 없습니다."
msgid "No USB Device found." msgid "No USB Device found."
msgstr "USB 장치가 없습니다." msgstr "USB 장치가 없습니다."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "삭제 하려고 합니다."
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "즐겨찾기를 선택했으나 선택된 즐겨찾기가 없네요." msgstr "즐겨찾기를 선택했으나 선택된 즐겨찾기가 없네요."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "화일들이 남음"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "파일이 서버에 없습니다!" msgstr "파일이 서버에 없습니다!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: raschi\n" "Last-Translator: raschi\n"
"Language-Team: raschi\n" "Language-Team: raschi\n"
@ -665,6 +665,9 @@ msgstr "Installasjonsfeil!"
msgid "Install a game" msgid "Install a game"
msgstr "Installér et spill" msgstr "Installér et spill"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "Ingen USB enhet"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Ingen USB enhet funnet." msgstr "Ingen USB enhet funnet."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "Du er i ferd med å slette "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Du prøver å vise favoritter når du ikke har noen valgt." msgstr "Du prøver å vise favoritter når du ikke har noen valgt."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "filer gjenstår"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "filer ikke funnet på serveren!" msgstr "filer ikke funnet på serveren!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: ziom666 (zadania_prog@vp.pl)\n" "Last-Translator: ziom666 (zadania_prog@vp.pl)\n"
"Language-Team: \n" "Language-Team: \n"
@ -665,6 +665,9 @@ msgstr "Blad instalacji"
msgid "Install a game" msgid "Install a game"
msgstr "Zainstaluj gre" msgstr "Zainstaluj gre"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "Nie wykryto urzadzenia USB"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Nie wykryto urzadzenia USB" msgstr "Nie wykryto urzadzenia USB"
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "Zamierzasz usunac"
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "WybraleS wySwietlenie usubionych, ale zadnych nie wybraleS" msgstr "WybraleS wySwietlenie usubionych, ale zadnych nie wybraleS"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "pozostalo"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "nie znaleziono na serwerze" msgstr "nie znaleziono na serwerze"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-23 18:52+0200\n" "PO-Revision-Date: 2009-10-23 18:52+0200\n"
"Last-Translator: boto12\n" "Last-Translator: boto12\n"
"Language-Team: boto12\n" "Language-Team: boto12\n"
@ -665,6 +665,9 @@ msgstr "Erro de Instalação!"
msgid "Install a game" msgid "Install a game"
msgstr "Instalar um jogo" msgstr "Instalar um jogo"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "Nenhum dispositivo USB"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Nenhum dispositivo USB encontrado." msgstr "Nenhum dispositivo USB encontrado."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "Irá eliminar "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Está tentando visualizar os favoritos, mas não existe nenhum selecionado." msgstr "Está tentando visualizar os favoritos, mas não existe nenhum selecionado."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "arquivos restantes"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "arquivos não encontrados no servidor!" msgstr "arquivos não encontrados no servidor!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-15 12:58+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-12-14 16:11-0000\n" "PO-Revision-Date: 2009-12-14 16:11-0000\n"
"Last-Translator: Sky8000\n" "Last-Translator: Sky8000\n"
"Language-Team: Sky8000 <sky8000@hotmail.com>\n" "Language-Team: Sky8000 <sky8000@hotmail.com>\n"
@ -665,6 +665,9 @@ msgstr "Erro de Instalação!"
msgid "Install a game" msgid "Install a game"
msgstr "Instalar um jogo" msgstr "Instalar um jogo"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "Instalar partições" msgstr "Instalar partições"
@ -813,8 +816,8 @@ msgstr "Nenhum dispositivo USB encontrado"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Nenhum dispositivo USB encontrado." msgstr "Nenhum dispositivo USB encontrado."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Nenhuma partição com jogos encontrada (WBFS ou FAT)" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Não foram seleccionados truques" msgstr "Não foram seleccionados truques"
@ -1260,6 +1263,9 @@ msgstr "Vais eliminar "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Está a tentar visualizar os favoritos mas não existe nenhum seleccionado." msgstr "Está a tentar visualizar os favoritos mas não existe nenhum seleccionado."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "O Controlo Parental não está activo. Se deseja utilizar o Controlo Parental active-o na configuração da Wii (Wii Settings)." msgstr "O Controlo Parental não está activo. Se deseja utilizar o Controlo Parental active-o na configuração da Wii (Wii Settings)."
@ -1300,8 +1306,8 @@ msgstr "ficheiros restantes"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "ficheiros não encontrados no servidor!" msgstr "ficheiros não encontrados no servidor!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "pelo suporte FAT" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "pelo Ocarina" msgstr "pelo Ocarina"
@ -1339,6 +1345,12 @@ msgstr "de"
msgid "seconds left" msgid "seconds left"
msgstr "segundos restantes" msgstr "segundos restantes"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Nenhuma partição com jogos encontrada (WBFS ou FAT)"
#~ msgid "for FAT support"
#~ msgstr "pelo suporte FAT"
#~ msgid "Failed to extract opening.bnr" #~ msgid "Failed to extract opening.bnr"
#~ msgstr "Falha ao extrair o opening.bnr" #~ msgstr "Falha ao extrair o opening.bnr"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Kir\n" "Last-Translator: Kir\n"
"Language-Team: Kir\n" "Language-Team: Kir\n"
@ -665,6 +665,9 @@ msgstr "Ошибка установки!"
msgid "Install a game" msgid "Install a game"
msgstr "Установить игру" msgstr "Установить игру"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "Нет USB устройств"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "USB устройств не обнаружено" msgstr "USB устройств не обнаружено"
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "Вы хотите удалить "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Нельзя отобразить избранные, если вы их до этого не выбрали." msgstr "Нельзя отобразить избранные, если вы их до этого не выбрали."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "файлов осталось"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "файлы не найдены на сервере!" msgstr "файлы не найдены на сервере!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: knife.hu kavid\n" "Last-Translator: knife.hu kavid\n"
"Language-Team: kavid\n" "Language-Team: kavid\n"
@ -665,6 +665,9 @@ msgstr "安装错误!"
msgid "Install a game" msgid "Install a game"
msgstr "安装游戏" msgstr "安装游戏"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "没有 USB 设备"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "找不到 USB 设备." msgstr "找不到 USB 设备."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "要删除"
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "你选择显示收藏夹但里面还没有任何收藏" msgstr "你选择显示收藏夹但里面还没有任何收藏"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "剩余文件"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "服务器中无此文件!" msgstr "服务器中无此文件!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Penn\n" "Last-Translator: Penn\n"
"Language-Team: Penn\n" "Language-Team: Penn\n"
@ -665,6 +665,9 @@ msgstr "¡Error de Instalación!"
msgid "Install a game" msgid "Install a game"
msgstr "Instalar un juego" msgstr "Instalar un juego"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "USB no encontrado"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "USB no encontrado." msgstr "USB no encontrado."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "Estás apunto de borrar "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Estás intentando mostrar los favoritos pero no tienes ninguno seleccionado." msgstr "Estás intentando mostrar los favoritos pero no tienes ninguno seleccionado."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "archivos restantes"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "archivo(s) no encontrado(s) en el servidor." msgstr "archivo(s) no encontrado(s) en el servidor."
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-11-24 22:11+0200\n" "PO-Revision-Date: 2009-11-24 22:11+0200\n"
"Last-Translator: Katsurou\n" "Last-Translator: Katsurou\n"
"Language-Team: Katsurou, pirateX\n" "Language-Team: Katsurou, pirateX\n"
@ -665,6 +665,9 @@ msgstr "Fel vid installering!"
msgid "Install a game" msgid "Install a game"
msgstr "Installera ett spel" msgstr "Installera ett spel"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,8 +816,8 @@ msgstr "Ingen USB-enhet"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "Ingen USB-enhet hittad." msgstr "Ingen USB-enhet hittad."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "Ingen WBFS eller FAT spel partition hittad" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Inga fusk har valda" msgstr "Inga fusk har valda"
@ -1260,6 +1263,9 @@ msgstr "Då håller på att radera "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Du har valt att visa favoriter men du har inga favoriter valda." msgstr "Du har valt att visa favoriter men du har inga favoriter valda."
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "filer kvar"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "filerna hittades inte på servern!" msgstr "filerna hittades inte på servern!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
@ -1339,6 +1345,9 @@ msgstr "av"
msgid "seconds left" msgid "seconds left"
msgstr "sekunder kvar" msgstr "sekunder kvar"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "Ingen WBFS eller FAT spel partition hittad"
#~ msgid "Exit USB Loader GX?" #~ msgid "Exit USB Loader GX?"
#~ msgstr "Avsluta USB Loader GX?" #~ msgstr "Avsluta USB Loader GX?"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Miller Liang\n" "Last-Translator: Miller Liang\n"
"Language-Team: kyogc, Miller\n" "Language-Team: kyogc, Miller\n"
@ -665,6 +665,9 @@ msgstr "安裝錯誤!"
msgid "Install a game" msgid "Install a game"
msgstr "安裝遊戲" msgstr "安裝遊戲"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,8 +816,8 @@ msgstr "沒有 USB 設備"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "找不到 USB 設備." msgstr "找不到 USB 設備."
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "沒有 WBFS 或 FAT 磁區中的遊戲" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "沒有選擇金手指" msgstr "沒有選擇金手指"
@ -1260,6 +1263,9 @@ msgstr "欲刪除:"
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "你選擇顯示收藏夾但裡面還沒有任何收藏" msgstr "你選擇顯示收藏夾但裡面還沒有任何收藏"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,8 +1306,8 @@ msgstr "剩下的檔案"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "伺服器中無此檔案!" msgstr "伺服器中無此檔案!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "FAT 格式支持" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "的 Ocarina" msgstr "的 Ocarina"
@ -1339,6 +1345,12 @@ msgstr "的"
msgid "seconds left" msgid "seconds left"
msgstr "剩餘秒數" msgstr "剩餘秒數"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "沒有 WBFS 或 FAT 磁區中的遊戲"
#~ msgid "for FAT support"
#~ msgstr "FAT 格式支持"
#~ msgid "Exit USB Loader GX?" #~ msgid "Exit USB Loader GX?"
#~ msgstr "離開 USB Loader GX?" #~ msgstr "離開 USB Loader GX?"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Nitro_subzero \n" "Last-Translator: Nitro_subzero \n"
"Language-Team: Nitro_subzero\n" "Language-Team: Nitro_subzero\n"
@ -665,6 +665,9 @@ msgstr "ผิดพลาดขณะติดตั้ง!"
msgid "Install a game" msgid "Install a game"
msgstr "ติดตั้งเกมส์" msgstr "ติดตั้งเกมส์"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,7 +816,7 @@ msgstr "ไม่ได้เสียบอุปกรณ์ USB"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "ไม่พบอุปกรณ์ USB" msgstr "ไม่พบอุปกรณ์ USB"
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
@ -1260,6 +1263,9 @@ msgstr "คุณกำลังจะลบ "
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "คุณเลือกจะแสดงเกมส์ที่ชอบ แต่คุณไม่ได้กำหนดเกมส์ที่ชื่นชอบไว้" msgstr "คุณเลือกจะแสดงเกมส์ที่ชอบ แต่คุณไม่ได้กำหนดเกมส์ที่ชื่นชอบไว้"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,7 +1306,7 @@ msgstr "ไฟล์ที่ยังเหลือ"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "ไม่พบไฟล์/i บนเซิฟเวอร์!" msgstr "ไม่พบไฟล์/i บนเซิฟเวอร์!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n" "POT-Creation-Date: 2009-12-17 00:06+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: omercigingelini\n" "Last-Translator: omercigingelini\n"
"Language-Team: omercigingelini\n" "Language-Team: omercigingelini\n"
@ -665,6 +665,9 @@ msgstr "Kurulum Hatasi!"
msgid "Install a game" msgid "Install a game"
msgstr "Oyun kur" msgstr "Oyun kur"
msgid "Install not possible"
msgstr ""
msgid "Install partitions" msgid "Install partitions"
msgstr "" msgstr ""
@ -813,8 +816,8 @@ msgstr "USB Aygıtı yok"
msgid "No USB Device found." msgid "No USB Device found."
msgstr "USB Aygıtı bulunamadı" msgstr "USB Aygıtı bulunamadı"
msgid "No WBFS or FAT game partition found" msgid "No WBFS or FAT/NTFS partition found"
msgstr "WBFS veya FAT oyun bölümü bulunamadı" msgstr ""
msgid "No cheats were selected" msgid "No cheats were selected"
msgstr "Hile seçilmedi" msgstr "Hile seçilmedi"
@ -1260,6 +1263,9 @@ msgstr "Silmek üzeresiniz"
msgid "You are choosing to display favorites and you do not have any selected." msgid "You are choosing to display favorites and you do not have any selected."
msgstr "Favorileri göstermeyi seçtiniz ama hiç seçili yok" msgstr "Favorileri göstermeyi seçtiniz ama hiç seçili yok"
msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."
msgstr ""
msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."
msgstr "" msgstr ""
@ -1300,8 +1306,8 @@ msgstr "dosyalar kaldı"
msgid "files not found on the server!" msgid "files not found on the server!"
msgstr "dosyalar sunucuda bulunamadı!" msgstr "dosyalar sunucuda bulunamadı!"
msgid "for FAT support" msgid "for FAT/NTFS support"
msgstr "FAT desteği için" msgstr ""
msgid "for Ocarina" msgid "for Ocarina"
msgstr "Ocarina için" msgstr "Ocarina için"
@ -1339,6 +1345,12 @@ msgstr "./"
msgid "seconds left" msgid "seconds left"
msgstr "saniye kaldı" msgstr "saniye kaldı"
#~ msgid "No WBFS or FAT game partition found"
#~ msgstr "WBFS veya FAT oyun bölümü bulunamadı"
#~ msgid "for FAT support"
#~ msgstr "FAT desteği için"
#~ msgid "Failed to extract opening.bnr" #~ msgid "Failed to extract opening.bnr"
#~ msgstr "opening.bnr çıkartılamadı" #~ msgstr "opening.bnr çıkartılamadı"

View File

@ -20,7 +20,7 @@ SOURCES := source source/libwiigui source/images source/fonts source/sounds \
source/libwbfs source/unzip source/language source/mload source/patches \ source/libwbfs source/unzip source/language source/mload source/patches \
source/usbloader source/xml source/network source/settings source/prompts \ source/usbloader source/xml source/network source/settings source/prompts \
source/ramdisk source/wad source/banner source/cheats source/homebrewboot \ source/ramdisk source/wad source/banner source/cheats source/homebrewboot \
source/themes source/menu source/libfat source/memory source/themes source/menu source/libfat source/memory source/libntfs
DATA := data DATA := data
INCLUDES := source INCLUDES := source
@ -28,7 +28,7 @@ INCLUDES := source
# options for code generation # options for code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
CFLAGS = -g -O2 -save-temps -Wall $(MACHDEP) $(INCLUDE) CFLAGS = -ffast-math -g -O3 -pipe -mrvl -mcpu=750 -meabi -mhard-float -Wall $(MACHDEP) $(INCLUDE) -DHAVE_CONFIG_H -DGEKKO -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CXXFLAGS = -Xassembler -aln=$@.lst $(CFLAGS) CXXFLAGS = -Xassembler -aln=$@.lst $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80B00000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80B00000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size
-include $(PROJECTDIR)/Make.config -include $(PROJECTDIR)/Make.config

View File

@ -4,23 +4,35 @@
#include <ogc/system.h> #include <ogc/system.h>
#include <ogc/usbstorage.h> #include <ogc/usbstorage.h>
#include <sdcard/wiisd_io.h> #include <sdcard/wiisd_io.h>
#include <locale.h>
#include "usbloader/sdhc.h" #include "usbloader/sdhc.h"
#include "usbloader/usbstorage.h" #include "usbloader/usbstorage.h"
#include "usbloader/wbfs.h"
#include "libfat/fat.h" #include "libfat/fat.h"
#include "libntfs/ntfs.h"
#include "gecko.h" #include "gecko.h"
//these are the only stable and speed is good //these are the only stable and speed is good
#define CACHE 32 #define CACHE 32
#define SECTORS 64 #define SECTORS 64
#define SECTORS_SD 32
#define MOUNT_NONE 0 #define MOUNT_NONE 0
#define MOUNT_SD 1 #define MOUNT_SD 1
#define MOUNT_SDHC 2 #define MOUNT_SDHC 2
extern DISC_INTERFACE __io_sdhc; /* Disc interfaces */
extern const DISC_INTERFACE __io_sdhc;
// read-only
extern const DISC_INTERFACE __io_sdhc_ro;
extern const DISC_INTERFACE __io_usbstorage_ro;
void _FAT_mem_init();
extern sec_t _FAT_startSector; extern sec_t _FAT_startSector;
extern s32 wbfsDev;
int fat_sd_mount = MOUNT_NONE; int fat_sd_mount = MOUNT_NONE;
sec_t fat_sd_sec = 0; // u32 sec_t fat_sd_sec = 0; // u32
@ -30,9 +42,11 @@ sec_t fat_usb_sec = 0;
int fat_wbfs_mount = 0; int fat_wbfs_mount = 0;
sec_t fat_wbfs_sec = 0; sec_t fat_wbfs_sec = 0;
int USBDevice_Init() { int fs_ntfs_mount = 0;
gprintf("\nUSBDevice_Init()"); sec_t fs_ntfs_sec = 0;
int USBDevice_Init() {
gprintf("\nUSBDevice_Init()");
//closing all open Files write back the cache and then shutdown em! //closing all open Files write back the cache and then shutdown em!
fatUnmount("USB:/"); fatUnmount("USB:/");
@ -54,7 +68,7 @@ gprintf("\nUSBDevice_Init()");
} }
void USBDevice_deInit() { void USBDevice_deInit() {
gprintf("\nUSBDevice_deInit()"); gprintf("\nUSBDevice_deInit()");
//closing all open Files write back the cache and then shutdown em! //closing all open Files write back the cache and then shutdown em!
fatUnmount("USB:/"); fatUnmount("USB:/");
@ -68,7 +82,7 @@ int WBFSDevice_Init(u32 sector) {
//right now mounts first FAT-partition //right now mounts first FAT-partition
//try first mount with cIOS //try first mount with cIOS
if (!fatMount("WBFS", &__io_wiiums, 0, CACHE, SECTORS)) { if (!fatMount("USB", &__io_wiiums, 0, CACHE, SECTORS)) {
//try now mount with libogc //try now mount with libogc
if (!fatMount("WBFS", &__io_usbstorage, 0, CACHE, SECTORS)) { if (!fatMount("WBFS", &__io_usbstorage, 0, CACHE, SECTORS)) {
return -1; return -1;
@ -129,3 +143,98 @@ gprintf("\nSDCard_deInit()");
fat_sd_mount = MOUNT_NONE; fat_sd_mount = MOUNT_NONE;
fat_sd_sec = 0; fat_sd_sec = 0;
} }
void ntfsInit();
s32 MountNTFS(u32 sector)
{
s32 ret;
if (fs_ntfs_mount) return 0;
//printf("mounting NTFS\n");
//Wpad_WaitButtons();
_FAT_mem_init();
ntfsInit();
// ntfsInit resets locale settings
// which breaks unicode in console
// so we change it back to C-UTF-8
setlocale(LC_CTYPE, "C-UTF-8");
setlocale(LC_MESSAGES, "C-UTF-8");
if (wbfsDev == WBFS_DEVICE_USB) {
/* Initialize WBFS interface */
if (!__io_wiiums.startup()) {
ret = __io_usbstorage.startup();
if (!ret) {
return -1;
}
}
/* Mount device */
if (!ntfsMount("NTFS", &__io_wiiums_ro, sector, CACHE, SECTORS, NTFS_DEFAULT)) {
ret = ntfsMount("NTFS", &__io_usbstorage_ro, sector, CACHE, SECTORS, NTFS_DEFAULT);
if (!ret) {
return -2;
}
}
} else if (wbfsDev == WBFS_DEVICE_SDHC) {
if (sdhc_mode_sd == 0) {
ret = ntfsMount("NTFS", &__io_sdhc_ro, 0, CACHE, SECTORS, NTFS_DEFAULT);
} else {
ret = ntfsMount("NTFS", &__io_sdhc_ro, 0, CACHE, SECTORS_SD, NTFS_DEFAULT);
}
if (!ret) {
return -5;
}
}
fs_ntfs_mount = 1;
fs_ntfs_sec = sector; //_FAT_startSector;
return 0;
}
s32 UnmountNTFS(void)
{
/* Unmount device */
fatUnmount("NTFS:/");
fs_ntfs_mount = 0;
fs_ntfs_sec = 0;
return 0;
}
void _FAT_mem_init()
{
}
void* _FAT_mem_allocate(size_t size)
{
return malloc(size);
}
void* _FAT_mem_align(size_t size)
{
return memalign(32, size);
}
void _FAT_mem_free(void *mem)
{
free(mem);
}
void* ntfs_alloc (size_t size)
{
return _FAT_mem_allocate(size);
}
void* ntfs_align (size_t size)
{
return _FAT_mem_align(size);
}
void ntfs_free (void* mem)
{
_FAT_mem_free(mem);
}

View File

@ -20,6 +20,16 @@ extern "C" {
int SDCard_Init(); int SDCard_Init();
void SDCard_deInit(); void SDCard_deInit();
s32 MountNTFS(u32 sector);
s32 UnmountNTFS(void);
extern int fat_usb_mount;
extern sec_t fat_usb_sec;
extern int fat_wbfs_mount;
extern sec_t fat_wbfs_sec;
extern int fs_ntfs_mount;
extern sec_t fs_ntfs_sec;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -37,7 +37,7 @@
#include <limits.h> #include <limits.h>
#include "common.h" #include "common.h"
#include "cache.h" #include "fat_cache.h"
#include "disc_fat.h" #include "disc_fat.h"
#include "mem_allocate.h" #include "mem_allocate.h"

View File

@ -36,7 +36,7 @@
#include "fatdir.h" #include "fatdir.h"
#include "cache.h" #include "fat_cache.h"
#include "file_allocation_table.h" #include "file_allocation_table.h"
#include "partition.h" #include "partition.h"
#include "directory.h" #include "directory.h"

View File

@ -39,7 +39,7 @@
#include <ctype.h> #include <ctype.h>
#include <unistd.h> #include <unistd.h>
#include "cache.h" #include "fat_cache.h"
#include "file_allocation_table.h" #include "file_allocation_table.h"
#include "bit_ops.h" #include "bit_ops.h"
#include "filetime.h" #include "filetime.h"
@ -1129,3 +1129,54 @@ int _FAT_fsync_r (struct _reent *r, int fd) {
return ret; return ret;
} }
typedef int (*_frag_append_t)(void *ff, u32 offset, u32 sector, u32 count);
int _FAT_get_fragments (const char *path, _frag_append_t append_fragment, void *callback_data)
{
struct _reent r;
FILE_STRUCT file;
PARTITION* partition;
u32 cluster;
u32 sector;
u32 offset; // in sectors
u32 size; // in sectors
int ret = -1;
int fd;
fd = _FAT_open_r (&r, &file, path, O_RDONLY, 0);
if (fd == -1) return -1;
if (fd != (int)&file) return -1;
partition = file.partition;
_FAT_lock(&partition->lock);
size = file.filesize / BYTES_PER_READ;
cluster = file.startCluster;
offset = 0;
do {
if (!_FAT_fat_isValidCluster(partition, cluster)) {
// invalid cluster
goto out;
}
// add cluster to fileinfo
sector = _FAT_fat_clusterToSector(partition, cluster);
if (append_fragment(callback_data, offset, sector, partition->sectorsPerCluster)) {
// too many fragments
goto out;
}
offset += partition->sectorsPerCluster;
cluster = _FAT_fat_nextCluster (partition, cluster);
} while (offset < size);
// set size
append_fragment(callback_data, size, 0, 0);
// success
ret = 0;
out:
_FAT_unlock(&partition->lock);
_FAT_close_r(&r, fd);
return ret;
}

View File

@ -29,8 +29,8 @@
*/ */
#ifndef __FATFILE_H #ifndef _FATFILE_H
#define __FATFILE_H #define _FATFILE_H
#include <sys/reent.h> #include <sys/reent.h>
#include <sys/stat.h> #include <sys/stat.h>

View File

@ -31,7 +31,7 @@
#define __PARTITION_H #define __PARTITION_H
#include "common.h" #include "common.h"
#include "cache.h" #include "fat_cache.h"
#include "lock.h" #include "lock.h"
// Device name // Device name

View File

@ -10,6 +10,9 @@
#define ERROR(x) do {wbfs_error(x);goto error;}while(0) #define ERROR(x) do {wbfs_error(x);goto error;}while(0)
#define ALIGN_LBA(x) (((x)+p->hd_sec_sz-1)&(~(p->hd_sec_sz-1))) #define ALIGN_LBA(x) (((x)+p->hd_sec_sz-1)&(~(p->hd_sec_sz-1)))
wbfs_t wbfs_iso_file;
static int force_mode=0; static int force_mode=0;
void wbfs_set_force_mode(int force) void wbfs_set_force_mode(int force)
{ {
@ -217,6 +220,9 @@ void wbfs_close_disc(wbfs_disc_t*d)
// offset is pointing 32bit words to address the whole dvd, although len is in bytes // offset is pointing 32bit words to address the whole dvd, although len is in bytes
int wbfs_disc_read(wbfs_disc_t*d,u32 offset, u32 len, u8 *data) int wbfs_disc_read(wbfs_disc_t*d,u32 offset, u32 len, u8 *data)
{ {
if (d->p == &wbfs_iso_file) {
return wbfs_iso_file_read(d, offset, data, len);
}
wbfs_t *p = d->p; wbfs_t *p = d->p;
u16 wlba = offset>>(p->wbfs_sec_sz_s-2); u16 wlba = offset>>(p->wbfs_sec_sz_s-2);
@ -691,3 +697,70 @@ u32 wbfs_trim(wbfs_t*p)
// os layer will truncate the file. // os layer will truncate the file.
return maxbl; return maxbl;
} }
int wbfs_get_fragments(wbfs_disc_t *d, _frag_append_t append_fragment, void *callback_data)
{
if (!d) return -1;
wbfs_t *p = d->p;
int src_wbs_nlb = p->wbfs_sec_sz / p->hd_sec_sz;
int i, ret, last = 0;
for( i=0; i< p->n_wbfs_sec_per_disc; i++)
{
u32 iwlba = wbfs_ntohs(d->header->wlba_table[i]);
if (iwlba)
{
ret = append_fragment(callback_data,
i * src_wbs_nlb, // offset
p->part_lba + iwlba * src_wbs_nlb, // sector
src_wbs_nlb); // count
if (ret) return ret; // error
last = i;
}
}
if (last < p->n_wbfs_sec_per_disc / 2) {
last = p->n_wbfs_sec_per_disc / 2;
}
u32 size = last * src_wbs_nlb;
append_fragment(callback_data, size, 0, 0); // set size
return 0;
}
// wrapper for reading .iso files using wbfs apis
#include <unistd.h>
#include <sys/stat.h>
// offset is pointing 32bit words to address the whole dvd, although len is in bytes
int wbfs_iso_file_read(wbfs_disc_t*d,u32 offset, u8 *data, u32 len)
{
if (!d || d->p != &wbfs_iso_file) return -1;
int fd = (int)d->header;
off_t off = ((u64)offset) << 2;
off_t ret_off;
int ret;
ret_off = lseek(fd, off, SEEK_SET);
if (ret_off != off) return -1;
ret = read(fd, data, len);
if (ret != len) return -2;
return 0;
}
u32 wbfs_disc_sector_used(wbfs_disc_t *d, u32 *num_blk)
{
if (d->p == &wbfs_iso_file) {
int fd = (int)d->header;
struct stat st;
if (fstat(fd, &st) == -1) return 0;
if (num_blk) {
*num_blk = (st.st_size >> 9); // in 512 units
}
return st.st_blocks; // in 512 units (can be sparse)
}
u32 last_blk;
u32 ret;
ret = wbfs_sector_used2(d->p, d->header, &last_blk);
if (num_blk) {
*num_blk = last_blk + 1;
}
return ret;
}

View File

@ -224,6 +224,13 @@ u32 wbfs_size_disc(wbfs_t*p,read_wiidisc_callback_t read_src_wii_disc,
void *callback_data,partition_selector_t sel, void *callback_data,partition_selector_t sel,
u32 *comp_size, u32 *real_size); u32 *comp_size, u32 *real_size);
typedef int (*_frag_append_t)(void *ff, u32 offset, u32 sector, u32 count);
int wbfs_get_fragments(wbfs_disc_t *d, _frag_append_t append_fragment, void *callback_data);
extern wbfs_t wbfs_iso_file;
u32 wbfs_disc_sector_used(wbfs_disc_t *d, u32 *num_blk);
int wbfs_iso_file_read(wbfs_disc_t*d,u32 offset, u8 *data, u32 len);
/*! trim the file-system to its minimum size /*! trim the file-system to its minimum size
This allows to use wbfs as a wiidisc container This allows to use wbfs as a wiidisc container
*/ */

View File

@ -354,6 +354,15 @@ main(int argc, char *argv[]) {
printf("\n\tConfiguration file is on %s", bootDevice); printf("\n\tConfiguration file is on %s", bootDevice);
} }
// Try opening and closing the configuration file here
// to prevent a crash dump later on - giantpune
char GXGlobal_cfg[26];
sprintf(GXGlobal_cfg, "%s/config/GXGlobal.cfg", bootDevice);
FILE *fp = fopen(GXGlobal_cfg, "r");
if (fp) {
fclose(fp);
}
gettextCleanUp(); gettextCleanUp();
printf("\n\tLoading configuration..."); printf("\n\tLoading configuration...");
CFG_Load(); CFG_Load();

View File

@ -31,6 +31,8 @@
#include "wpad.h" #include "wpad.h"
#include "settings/newtitles.h" #include "settings/newtitles.h"
#include "patches/fst.h" #include "patches/fst.h"
#include "usbloader/frag.h"
#include "usbloader/wbfs.h"
/*** Variables that are also used extern ***/ /*** Variables that are also used extern ***/
GuiWindow * mainWindow = NULL; GuiWindow * mainWindow = NULL;
@ -45,7 +47,7 @@ int currentMenu;
u8 mountMethod=0; u8 mountMethod=0;
char game_partition[6]; char game_partition[6];
bool load_from_fat; int load_from_fs;
/*** Variables used only in the menus ***/ /*** Variables used only in the menus ***/
GuiText * GameIDTxt = NULL; GuiText * GameIDTxt = NULL;
@ -460,10 +462,10 @@ int MainMenu(int menu) {
} }
// When the selected ios is 249, and you're loading from FAT, reset ios to 222 // When the selected ios is 249, and you're loading from FAT, reset ios to 222
if (load_from_fat && ios2 == 249) { if (load_from_fs != PART_FS_WBFS && ios2 == 249) {
ios2 = 222; ios2 = 222;
} }
bool onlinefix = !load_from_fat && ShutdownWC24(); bool onlinefix = load_from_fs != PART_FS_WBFS && ShutdownWC24();
// You cannot reload ios when loading from fat // You cannot reload ios when loading from fat
if (IOS_GetVersion() != ios2 || onlinefix) { if (IOS_GetVersion() != ios2 || onlinefix) {
@ -474,6 +476,14 @@ int MainMenu(int menu) {
} }
if (!mountMethod) if (!mountMethod)
{ {
gprintf("\nLoading fragment list...");
ret = get_frag_list(header->id);
gprintf("%d\n", ret);
gprintf("\nSetting fragment list...");
ret = set_frag_list(header->id);
gprintf("%d\n", ret);
ret = Disc_SetUSB(header->id); ret = Disc_SetUSB(header->id);
if (ret < 0) Sys_BackToLoader(); if (ret < 0) Sys_BackToLoader();
gprintf("\n\tUSB set to game"); gprintf("\n\tUSB set to game");
@ -497,7 +507,7 @@ int MainMenu(int menu) {
if (reloadblock == on && Sys_IsHermes()) { if (reloadblock == on && Sys_IsHermes()) {
patch_cios_data(); patch_cios_data();
if (!load_from_fat) { if (load_from_fs == PART_FS_WBFS) {
mload_close(); mload_close();
} }
} }

View File

@ -7,7 +7,7 @@
#include "usbloader/getentries.h" #include "usbloader/getentries.h"
#include "usbloader/wbfs.h" #include "usbloader/wbfs.h"
extern bool load_from_fat; extern int load_from_fs;
extern char game_partition[6]; extern char game_partition[6];
extern char headlessID[8]; extern char headlessID[8];
@ -53,7 +53,7 @@ int MenuCheck() {
ret2 = -1; ret2 = -1;
memset(game_partition, 0, 6); memset(game_partition, 0, 6);
load_from_fat = false; load_from_fs = -1;
extern PartList partitions; extern PartList partitions;
// Added for slow HDD // Added for slow HDD
@ -65,12 +65,10 @@ int MenuCheck() {
if (Settings.partition != -1 && partitions.num > Settings.partition) { if (Settings.partition != -1 && partitions.num > Settings.partition) {
PartInfo pinfo = partitions.pinfo[Settings.partition]; PartInfo pinfo = partitions.pinfo[Settings.partition];
int index = pinfo.fs_type == FS_TYPE_FAT32 ? pinfo.fat_i : pinfo.wbfs_i; if (WBFS_OpenPart(pinfo.part_fs, pinfo.index, partitions.pentry[Settings.partition].sector, partitions.pentry[Settings.partition].size, (char *) &game_partition) == 0)
ret2 = WBFS_OpenPart(pinfo.fs_type == FS_TYPE_FAT32, index, partitions.pentry[Settings.partition].sector, partitions.pentry[Settings.partition].size, (char *) &game_partition);
if (ret2 == 0)
{ {
load_from_fat = pinfo.fs_type == FS_TYPE_FAT32; ret2 = 0;
load_from_fs = pinfo.part_fs;
break; break;
} }
} }
@ -80,21 +78,23 @@ int MenuCheck() {
for (int p = 0; p < partitions.num; p++) { for (int p = 0; p < partitions.num; p++) {
if (partitions.pinfo[p].fs_type == FS_TYPE_WBFS) { if (partitions.pinfo[p].fs_type == FS_TYPE_WBFS) {
Settings.partition = p; Settings.partition = p;
load_from_fs = PART_FS_WBFS;
break; break;
} }
} }
} else if (Sys_IsHermes() && partitions.fat_n != 0) { } else if (Sys_IsHermes() && (partitions.fat_n != 0 || partitions.ntfs_n != 0)) {
// Loop through FAT partitions, and find the first partition with games on it (if there is one) // Loop through FAT/NTFS partitions, and find the first partition with games on it (if there is one)
u32 count; u32 count;
for (int i = 0; i < partitions.num; i++) { for (int i = 0; i < partitions.num; i++) {
if (partitions.pinfo[i].fs_type == FS_TYPE_FAT32) { if (partitions.pinfo[i].fs_type == FS_TYPE_FAT32 || partitions.pinfo[i].fs_type == FS_TYPE_NTFS) {
if (!WBFS_OpenPart(1, partitions.pinfo[i].fat_i, partitions.pentry[i].sector, partitions.pentry[i].size, (char *) &game_partition)) {
if (!WBFS_OpenPart(partitions.pinfo[i].part_fs, partitions.pinfo[i].index, partitions.pentry[i].sector, partitions.pentry[i].size, (char *) &game_partition)) {
// Get the game count... // Get the game count...
WBFS_GetCount(&count); WBFS_GetCount(&count);
if (count > 0) { if (count > 0) {
load_from_fat = true; load_from_fs = partitions.pinfo[i].part_fs;
Settings.partition = i; Settings.partition = i;
break; break;
} else { } else {
@ -105,19 +105,19 @@ int MenuCheck() {
} }
} }
if (ret2 >= 0 || load_from_fat) { if (ret2 >= 0 || load_from_fs != PART_FS_WBFS) {
cfg_save_global(); cfg_save_global();
break; break;
} }
sleep(1); sleep(1);
} }
if (ret2 < 0 && !load_from_fat) { if (ret2 < 0 && load_from_fs != PART_FS_WBFS) {
choice = WindowPrompt(tr("No WBFS or FAT game partition found"),tr("You need to select or format a partition"), tr("Select"), tr("Format"), tr("Return")); choice = WindowPrompt(tr("No WBFS or FAT/NTFS partition found"),tr("You need to select or format a partition"), tr("Select"), tr("Format"), tr("Return"));
if (choice == 0) { if (choice == 0) {
Sys_LoadMenu(); Sys_LoadMenu();
} else { } else {
load_from_fat = choice == 1; load_from_fs = choice == 1 ? PART_FS_FAT : PART_FS_WBFS;
menu = MENU_FORMAT; menu = MENU_FORMAT;
} }
} }

View File

@ -20,7 +20,7 @@
extern struct discHdr *dvdheader; extern struct discHdr *dvdheader;
extern u8 mountMethod; extern u8 mountMethod;
extern bool load_from_fat; extern int load_from_fs;
extern s32 gameSelected; extern s32 gameSelected;
extern GuiText * GameIDTxt; extern GuiText * GameIDTxt;
extern GuiText * GameRegionTxt; extern GuiText * GameRegionTxt;
@ -88,7 +88,7 @@ int MenuDiscList() {
char theTime[80]=""; char theTime[80]="";
time_t lastrawtime=0; time_t lastrawtime=0;
if (mountMethod != 3 && !load_from_fat) { if (mountMethod != 3 && load_from_fs == PART_FS_WBFS) {
WBFS_DiskSpace(&used, &freespace); WBFS_DiskSpace(&used, &freespace);
} }
@ -189,7 +189,7 @@ int MenuDiscList() {
trig1.SetButtonOnlyTrigger(-1, WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y, 0); trig1.SetButtonOnlyTrigger(-1, WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y, 0);
char spaceinfo[30]; char spaceinfo[30];
if (load_from_fat) { if (load_from_fs != PART_FS_WBFS) {
memset(spaceinfo, 0, 30); memset(spaceinfo, 0, 30);
} else { } else {
if (!strcmp(Settings.db_language,"JA")) { if (!strcmp(Settings.db_language,"JA")) {
@ -570,7 +570,7 @@ int MenuDiscList() {
w.Append(&sdcardBtn); w.Append(&sdcardBtn);
w.Append(&poweroffBtn); w.Append(&poweroffBtn);
w.Append(&gameInfo); w.Append(&gameInfo);
if (Settings.godmode) if (Settings.godmode && load_from_fs != PART_FS_NTFS)
w.Append(&installBtn); w.Append(&installBtn);
w.Append(&homeBtn); w.Append(&homeBtn);
w.Append(&settingsBtn); w.Append(&settingsBtn);
@ -801,9 +801,13 @@ int MenuDiscList() {
gprintf("\n\tNew Disc Detected"); gprintf("\n\tNew Disc Detected");
choice = WindowPrompt(tr("New Disc Detected"),0,tr("Install"),tr("Mount DVD drive"),tr("Cancel")); choice = WindowPrompt(tr("New Disc Detected"),0,tr("Install"),tr("Mount DVD drive"),tr("Cancel"));
if (choice == 1) { if (choice == 1) {
if (load_from_fs == PART_FS_NTFS) {
WindowPrompt(tr("Install not possible"), tr("You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."), tr("OK"));
} else {
menu = MENU_INSTALL; menu = MENU_INSTALL;
break; break;
} }
}
else if (choice ==2) else if (choice ==2)
{ {
dvdBtn.SetState(STATE_CLICKED); dvdBtn.SetState(STATE_CLICKED);

View File

@ -7,7 +7,7 @@
#include "usbloader/wbfs.h" #include "usbloader/wbfs.h"
#include "libwiigui/gui_customoptionbrowser.h" #include "libwiigui/gui_customoptionbrowser.h"
extern bool load_from_fat; extern int load_from_fs;
extern char game_partition[6]; extern char game_partition[6];
/**************************************************************************** /****************************************************************************
@ -33,9 +33,6 @@ int MenuFormat() {
//create the partitionlist //create the partitionlist
for (cnt = 0; cnt < (u32) partitions.num; cnt++) { for (cnt = 0; cnt < (u32) partitions.num; cnt++) {
partitionEntry *entry = &partitions.pentry[cnt]; partitionEntry *entry = &partitions.pentry[cnt];
if (load_from_fat && partitions.pinfo[cnt].fs_type != FS_TYPE_FAT32) {
continue; // Skip non FAT partitions when fat loading is enabled.
}
/* Calculate size in gigabytes */ /* Calculate size in gigabytes */
f32 size = entry->size * (partitions.sector_size / GB_SIZE); f32 size = entry->size * (partitions.sector_size / GB_SIZE);
@ -109,10 +106,10 @@ int MenuFormat() {
if(Settings.godmode == 1) { if(Settings.godmode == 1) {
partitionEntry *entry = &partitions.pentry[ret]; partitionEntry *entry = &partitions.pentry[ret];
if (entry->size) { if (entry->size) {
if (load_from_fat) { if (load_from_fs == PART_FS_FAT) {
WBFS_OpenPart(1, partitions.pinfo[ret].fat_i, entry->sector, WBFS_OpenPart(partitions.pinfo[ret].part_fs, partitions.pinfo[ret].index, entry->sector,
entry->size, (char *) &game_partition); entry->size, (char *) &game_partition);
load_from_fat = true; load_from_fs = partitions.pinfo[ret].part_fs;
menu = MENU_DISCLIST; menu = MENU_DISCLIST;
Settings.partition = ret; Settings.partition = ret;

View File

@ -16,7 +16,7 @@
*/ */
#include "mload.h" #include "mload.h"
#include "ehcmodule_fat_bin.h" #include "ehcmodule_frag_bin.h"
#include "dip_plugin.h" #include "dip_plugin.h"
#include <malloc.h> #include <malloc.h>
@ -549,7 +549,7 @@ int load_ehc_module()
if(!external_ehcmodule) if(!external_ehcmodule)
{ {
if(mload_init()<0) return -1; if(mload_init()<0) return -1;
mload_elf((void *) ehcmodule_fat_bin, &my_data_elf); mload_elf((void *) ehcmodule_frag_bin, &my_data_elf);
thread_id = mload_run_thread(my_data_elf.start, my_data_elf.stack, my_data_elf.size_stack, my_data_elf.prio); thread_id = mload_run_thread(my_data_elf.start, my_data_elf.stack, my_data_elf.size_stack, my_data_elf.prio);
if(thread_id < 0) return -1; if(thread_id < 0) return -1;
} }

View File

@ -398,7 +398,7 @@ void WindowCredits() {
i++; i++;
y+=22; y+=22;
sprintf(text, "Oggzee %s", tr("for FAT support")); sprintf(text, "Oggzee %s", tr("for FAT/NTFS support"));
txt[i] = new GuiText(text); txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(60,y); txt[i]->SetPosition(60,y);

View File

@ -77,7 +77,7 @@ int InitBrowsers() {
char rootdir[ROOTDIRLEN]; char rootdir[ROOTDIRLEN];
for(int i=3; i<STD_MAX; i++) for(int i=3; i<STD_MAX; i++)
{ {
if(strcmp(devoptab_list[i]->name, "stdnull")) if(strcmp(devoptab_list[i]->name, "stdnull") && devoptab_list[i]->write_r != NULL)
{ {
snprintf(rootdir, sizeof(rootdir) , "%s:/", devoptab_list[i]->name); snprintf(rootdir, sizeof(rootdir) , "%s:/", devoptab_list[i]->name);
if(DIR_ITER *dir = diropen(rootdir)) if(DIR_ITER *dir = diropen(rootdir))

View File

@ -40,7 +40,7 @@ extern u8 mountMethod;
extern struct discHdr *dvdheader; extern struct discHdr *dvdheader;
extern PartList partitions; extern PartList partitions;
extern char game_partition[6]; extern char game_partition[6];
extern bool load_from_fat; extern u8 load_from_fs;
static const char *opts_no_yes[settings_off_on_max] = {trNOOP("No"),trNOOP("Yes") }; static const char *opts_no_yes[settings_off_on_max] = {trNOOP("No"),trNOOP("Yes") };
static const char *opts_off_on[settings_off_on_max] = {trNOOP("OFF"),trNOOP("ON") }; static const char *opts_off_on[settings_off_on_max] = {trNOOP("OFF"),trNOOP("ON") };
@ -55,7 +55,7 @@ bool IsValidPartition(int fs_type, int cios) {
if (cios == 249 || cios == 250) { if (cios == 249 || cios == 250) {
return fs_type == FS_TYPE_WBFS; return fs_type == FS_TYPE_WBFS;
} else { } else {
return fs_type == FS_TYPE_WBFS || fs_type == FS_TYPE_FAT32; return fs_type == FS_TYPE_WBFS || fs_type == FS_TYPE_FAT32 || fs_type == FS_TYPE_NTFS;
} }
} }
@ -1027,8 +1027,8 @@ int MenuSettings()
f32 partition_size = partitions.pentry[Settings.partition].size * (partitions.sector_size / GB_SIZE); f32 partition_size = partitions.pentry[Settings.partition].size * (partitions.sector_size / GB_SIZE);
// Get the partition name and it's size in GB's // Get the partition name and it's size in GB's
options2.SetValue(Idx,"%s%d (%.2fGB)", pInfo.fs_type == FS_TYPE_FAT32 ? "FAT" : "WBFS", options2.SetValue(Idx,"%s%d (%.2fGB)", pInfo.fs_type == FS_TYPE_FAT32 ? "FAT" : pInfo.fs_type == FS_TYPE_NTFS ? "NTFS" : "WBFS",
pInfo.fs_type == FS_TYPE_FAT32 ? pInfo.fat_i : pInfo.wbfs_i, pInfo.index,
partition_size); partition_size);
} }
@ -2148,10 +2148,11 @@ int MenuSettings()
// if partition has changed, Reinitialize it // if partition has changed, Reinitialize it
PartInfo pinfo = partitions.pinfo[Settings.partition]; PartInfo pinfo = partitions.pinfo[Settings.partition];
load_from_fat = pinfo.fs_type == FS_TYPE_FAT32; partitionEntry pentry = partitions.pentry[Settings.partition];
load_from_fs = pinfo.part_fs;
if (Settings.partition != settingspartitionold) { if (Settings.partition != settingspartitionold) {
WBFS_Close(); WBFS_Close();
WBFS_OpenPart(load_from_fat, Settings.partition, partitions.pentry[Settings.partition].sector, partitions.pentry[Settings.partition].size, (char *) &game_partition); WBFS_OpenPart(load_from_fs, pinfo.index, pentry.sector, pentry.size, (char *) &game_partition);
} }
// if language has changed, reload titles // if language has changed, reload titles

View File

@ -1310,7 +1310,7 @@ bool cfg_save_global() { // save global settings
/* Closing and reopening because of a write issue we are having right now */ /* Closing and reopening because of a write issue we are having right now */
f = fopen(GXGlobal_cfg, "w"); f = fopen(GXGlobal_cfg, "w");
fprintf(f, "# USB Loader global settings file\n"); fprintf(f, "# USB Loader global settings file\n");
fprintf(f, "# Note: This file is automatically generated\n"); fprintf(f, "# Note: This file is automatically generated\n ");
fprintf(f, "video = %d\n ", Settings.video); fprintf(f, "video = %d\n ", Settings.video);
fprintf(f, "vpatch = %d\n ", Settings.vpatch); fprintf(f, "vpatch = %d\n ", Settings.vpatch);
fprintf(f, "language = %d\n ", Settings.language); fprintf(f, "language = %d\n ", Settings.language);
@ -1330,7 +1330,7 @@ bool cfg_save_global() { // save global settings
fprintf(f, "xflip = %d\n ", Settings.xflip); fprintf(f, "xflip = %d\n ", Settings.xflip);
fprintf(f, "gridRows = %d\n ", Settings.gridRows); fprintf(f, "gridRows = %d\n ", Settings.gridRows);
fprintf(f, "qboot = %d\n ", Settings.qboot); fprintf(f, "qboot = %d\n ", Settings.qboot);
fprintf(f, "wsprompt = %d\n", Settings.wsprompt); fprintf(f, "wsprompt = %d\n ", Settings.wsprompt);
fprintf(f, "parentalcontrol = %d\n ", Settings.parentalcontrol); fprintf(f, "parentalcontrol = %d\n ", Settings.parentalcontrol);
fprintf(f, "cover_path = %s\n ", Settings.covers_path); fprintf(f, "cover_path = %s\n ", Settings.covers_path);
fprintf(f, "cover2d_path = %s\n ", Settings.covers2d_path); fprintf(f, "cover2d_path = %s\n ", Settings.covers2d_path);
@ -1354,8 +1354,8 @@ bool cfg_save_global() { // save global settings
fprintf(f, "theme_downloadpath = %s\n ", Settings.theme_downloadpath); fprintf(f, "theme_downloadpath = %s\n ", Settings.theme_downloadpath);
fprintf(f, "homebrewapps_path = %s\n ", Settings.homebrewapps_path); fprintf(f, "homebrewapps_path = %s\n ", Settings.homebrewapps_path);
fprintf(f, "Cheatcodespath = %s\n ", Settings.Cheatcodespath); fprintf(f, "Cheatcodespath = %s\n ", Settings.Cheatcodespath);
fprintf(f, "BcaCodepath = %s\n", Settings.BcaCodepath); fprintf(f, "BcaCodepath = %s\n ", Settings.BcaCodepath);
fprintf(f, "WipCodepath = %s\n", Settings.WipCodepath); fprintf(f, "WipCodepath = %s\n ", Settings.WipCodepath);
fprintf(f, "titlesOverride = %d\n ", Settings.titlesOverride); fprintf(f, "titlesOverride = %d\n ", Settings.titlesOverride);
//fprintf(f, "db_url = %s\n ", Settings.db_url); //fprintf(f, "db_url = %s\n ", Settings.db_url);
//fprintf(f, "db_JPtoEN = %d\n ", Settings.db_JPtoEN); //fprintf(f, "db_JPtoEN = %d\n ", Settings.db_JPtoEN);
@ -1365,12 +1365,12 @@ bool cfg_save_global() { // save global settings
fprintf(f, "error002 = %d\n ", Settings.error002); fprintf(f, "error002 = %d\n ", Settings.error002);
fprintf(f, "autonetwork = %d\n ", Settings.autonetwork); fprintf(f, "autonetwork = %d\n ", Settings.autonetwork);
fprintf(f, "discart = %d\n ", Settings.discart); fprintf(f, "discart = %d\n ", Settings.discart);
fprintf(f, "partition = %d\n", Settings.partition); fprintf(f, "partition = %d\n ", Settings.partition);
fprintf(f, "marknewtitles = %d\n", Settings.marknewtitles); fprintf(f, "marknewtitles = %d\n ", Settings.marknewtitles);
fprintf(f, "fatInstallToDir = %d\n", Settings.FatInstallToDir); fprintf(f, "fatInstallToDir = %d\n ", Settings.FatInstallToDir);
fprintf(f, "partitions = %d\n", Settings.partitions_to_install); fprintf(f, "partitions = %d\n ", Settings.partitions_to_install);
fprintf(f, "fullcopy = %d\n", Settings.fullcopy); fprintf(f, "fullcopy = %d\n ", Settings.fullcopy);
fprintf(f, "beta_upgrades = %d\n", Settings.beta_upgrades); fprintf(f, "beta_upgrades = %d\n ", Settings.beta_upgrades);
fclose(f); fclose(f);
return true; return true;
} }
@ -1850,6 +1850,8 @@ void CFG_Load(void) {
// if GUI language is set to default Settings.language_path needs to remain "notset" (if the detected setting was kept detection wouldn't work next time) // if GUI language is set to default Settings.language_path needs to remain "notset" (if the detected setting was kept detection wouldn't work next time)
if (langisdefault) if (langisdefault)
sprintf(Settings.language_path, "notset"); sprintf(Settings.language_path, "notset");
Settings.godmode = (Settings.parental.enabled == 0 && (Settings.parentalcontrol == 0 || strlen(Settings.unlockCode) == 0)) ? 1 : 0;
} }
void CFG_LoadGlobal(void) { void CFG_LoadGlobal(void) {

View File

@ -6,6 +6,7 @@
#include "usbloader/usbstorage.h" #include "usbloader/usbstorage.h"
#include "usbloader/disc.h" #include "usbloader/disc.h"
#include "usbloader/wbfs.h" #include "usbloader/wbfs.h"
#include "usbloader/partition_usbloader.h"
#include "mload/mload.h" #include "mload/mload.h"
#include "video.h" #include "video.h"
#include "audio.h" #include "audio.h"
@ -15,7 +16,7 @@
#include "wpad.h" #include "wpad.h"
extern char game_partition[6]; extern char game_partition[6];
extern bool load_from_fat; extern u8 load_from_fs;
//Wiilight stuff //Wiilight stuff
static vu32 *_wiilight_reg = (u32*)0xCD0000C0; static vu32 *_wiilight_reg = (u32*)0xCD0000C0;
@ -99,7 +100,7 @@ int Sys_ChangeIos(int ios) {
WBFS_Init(WBFS_DEVICE_USB); WBFS_Init(WBFS_DEVICE_USB);
Disc_Init(); Disc_Init();
if (load_from_fat && (ios == 222 || ios == 223)) { if (Sys_IsHermes()) {
WBFS_OpenNamed((char *) &game_partition); WBFS_OpenNamed((char *) &game_partition);
} else { } else {
WBFS_Open(); WBFS_Open();

View File

@ -12,6 +12,7 @@
#include "wdvd.h" #include "wdvd.h"
#include "alternatedol.h" #include "alternatedol.h"
#include "memory.h" #include "memory.h"
#include "wbfs.h"
#include "../gecko.h" #include "../gecko.h"
#include "../fatmounter.h" #include "../fatmounter.h"
@ -23,10 +24,6 @@
static u32 *buffer = (u32 *)0x93000000; static u32 *buffer = (u32 *)0x93000000;
static u8 *diskid = (u8 *)Disc_ID; static u8 *diskid = (u8 *)Disc_ID;
extern int wbfs_part_fat;
extern u32 wbfs_part_idx;
extern u32 wbfs_part_lba;
void __Disc_SetLowMem(void) { void __Disc_SetLowMem(void) {
*Sys_Magic = 0x0D15EA5E; // Standard Boot Code *Sys_Magic = 0x0D15EA5E; // Standard Boot Code
@ -240,7 +237,7 @@ s32 Disc_Wait(void) {
s32 Disc_SetUSB(const u8 *id) { s32 Disc_SetUSB(const u8 *id) {
u32 part = 0; u32 part = 0;
if (wbfs_part_fat) { if (wbfs_part_fs) {
part = wbfs_part_lba; part = wbfs_part_lba;
} else { } else {
part = wbfs_part_idx ? wbfs_part_idx - 1 : 0; part = wbfs_part_idx ? wbfs_part_idx - 1 : 0;

272
source/usbloader/frag.c Normal file
View File

@ -0,0 +1,272 @@
#include <ogcsys.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include "fatmounter.h"
#include "libntfs/ntfs.h"
#include "libwbfs/libwbfs.h"
#include "wbfs.h"
#include "wbfs_fat.h"
#include "usbstorage.h"
#include "frag.h"
#include "utils.h"
int _FAT_get_fragments (const char *path, _frag_append_t append_fragment, void *callback_data);
FragList *frag_list = NULL;
void frag_init(FragList *ff, int maxnum)
{
memset(ff, 0, sizeof(Fragment) * (maxnum+1));
ff->maxnum = maxnum;
}
int frag_append(FragList *ff, u32 offset, u32 sector, u32 count)
{
int n;
if (count) {
n = ff->num - 1;
if (ff->num > 0
&& ff->frag[n].offset + ff->frag[n].count == offset
&& ff->frag[n].sector + ff->frag[n].count == sector)
{
// merge
ff->frag[n].count += count;
}
else
{
// add
if (ff->num >= ff->maxnum) {
// too many fragments
return -500;
}
n = ff->num;
ff->frag[n].offset = offset;
ff->frag[n].sector = sector;
ff->frag[n].count = count;
ff->num++;
}
}
ff->size = offset + count;
return 0;
}
int _frag_append(void *ff, u32 offset, u32 sector, u32 count)
{
return frag_append(ff, offset, sector, count);
}
int frag_concat(FragList *ff, FragList *src)
{
int i, ret;
u32 size = ff->size;
//printf("concat: %d %d <- %d %d\n", ff->num, ff->size, src->num, src->size);
for (i=0; i<src->num; i++) {
ret = frag_append(ff, size + src->frag[i].offset,
src->frag[i].sector, src->frag[i].count);
if (ret) return ret;
}
ff->size = size + src->size;
//printf("concat: -> %d %d\n", ff->num, ff->size);
return 0;
}
// in case a sparse block is requested,
// the returned poffset might not be equal to requested offset
// the difference should be filled with 0
int frag_get(FragList *ff, u32 offset, u32 count,
u32 *poffset, u32 *psector, u32 *pcount)
{
int i;
u32 delta;
//printf("frag_get(%u %u)\n", offset, count);
for (i=0; i<ff->num; i++) {
if (ff->frag[i].offset <= offset
&& ff->frag[i].offset + ff->frag[i].count > offset)
{
delta = offset - ff->frag[i].offset;
*poffset = offset;
*psector = ff->frag[i].sector + delta;
*pcount = ff->frag[i].count - delta;
if (*pcount > count) *pcount = count;
goto out;
}
if (ff->frag[i].offset > offset
&& ff->frag[i].offset < offset + count)
{
delta = ff->frag[i].offset - offset;
*poffset = ff->frag[i].offset;
*psector = ff->frag[i].sector;
*pcount = ff->frag[i].count;
count -= delta;
if (*pcount > count) *pcount = count;
goto out;
}
}
// not found
if (offset + count > ff->size) {
// error: out of range!
return -1;
}
// if inside range, then it must be just sparse, zero filled
// return empty block at the end of requested
*poffset = offset + count;
*psector = 0;
*pcount = 0;
out:
//printf("=>(%u %u %u)\n", *poffset, *psector, *pcount);
return 0;
}
int frag_remap(FragList *ff, FragList *log, FragList *phy)
{
int i;
int ret;
u32 offset;
u32 sector;
u32 count;
u32 delta;
for (i=0; i<log->num; i++) {
delta = 0;
count = 0;
do {
ret = frag_get(phy,
log->frag[i].sector + delta + count,
log->frag[i].count - delta - count,
&offset, &sector, &count);
if (ret) return ret; // error
delta = offset - log->frag[i].sector;
ret = frag_append(ff, log->frag[i].offset + delta, sector, count);
if (ret) return ret; // error
} while (count + delta < log->frag[i].count);
}
return 0;
}
int get_frag_list(u8 *id)
{
char fname[1024];
char fname1[1024];
struct stat st;
FragList *fs = NULL;
FragList *fa = NULL;
FragList *fw = NULL;
int ret;
int i, j;
int is_wbfs = 0;
int ret_val = -1;
if (wbfs_part_fs == PART_FS_WBFS) return 0;
ret = WBFS_FAT_find_fname(id, fname, sizeof(fname));
if (!ret) return -1;
if (strcasecmp(strrchr(fname,'.'), ".wbfs") == 0) {
is_wbfs = 1;
}
fs = malloc(sizeof(FragList));
fa = malloc(sizeof(FragList));
fw = malloc(sizeof(FragList));
frag_init(fa, MAX_FRAG);
for (i=0; i<10; i++) {
frag_init(fs, MAX_FRAG);
if (i > 0) {
fname[strlen(fname)-1] = '0' + i;
if (stat(fname, &st) == -1) break;
}
strcpy(fname1, fname);
//printf("::*%s\n", strrchr(fname,'/'));
if (wbfs_part_fs == PART_FS_FAT) {
ret = _FAT_get_fragments(fname, &_frag_append, fs);
if (ret) {
printf("fat getf: %d\n", ret);
// don't return failure, let it fallback to old method
//ret_val = ret;
ret_val = 0;
goto out;
}
} else if (wbfs_part_fs == PART_FS_NTFS) {
ret = _NTFS_get_fragments(fname, &_frag_append, fs);
if (ret) {
printf("ntfs getf: %d\n", ret);
if (ret == -50 || ret == -500) {
printf("Too many fragments! %d\n", fs->num);
}
ret_val = ret;
goto out;
}
// offset to start of partition
for (j=0; j<fs->num; j++) {
fs->frag[j].sector += fs_ntfs_sec;
}
}
frag_concat(fa, fs);
}
frag_list = malloc(sizeof(FragList));
frag_init(frag_list, MAX_FRAG);
if (is_wbfs) {
// if wbfs file format, remap.
//printf("=====\n");
wbfs_disc_t *d = WBFS_OpenDisc(id);
if (!d) goto out;
frag_init(fw, MAX_FRAG);
ret = wbfs_get_fragments(d, &_frag_append, fw);
if (ret) goto out;
WBFS_CloseDisc(d);
// DEBUG: frag_list->num = MAX_FRAG-10; // stress test
ret = frag_remap(frag_list, fw, fa);
if (ret) goto out;
} else {
// .iso does not need remap just copy
//printf("fa:\n");
memcpy(frag_list, fa, sizeof(FragList));
}
ret_val = 0;
out:
if (ret_val) {
// error
SAFE_FREE(frag_list);
}
SAFE_FREE(fs);
SAFE_FREE(fa);
SAFE_FREE(fw);
return ret_val;
}
int set_frag_list(u8 *id)
{
if (wbfs_part_fs == PART_FS_WBFS) return 0;
if (frag_list == NULL) {
if (wbfs_part_fs == PART_FS_FAT) {
// fall back to old fat method
printf("FAT: fallback to old method\n");
return 0;
}
// ntfs has no fallback, return error
return -1;
}
// (+1 for header which is same size as fragment)
int size = sizeof(Fragment) * (frag_list->num + 1);
int ret = USBStorage_WBFS_SetFragList(frag_list, size);
if (ret) {
printf("set_frag: %d\n", ret);
return ret;
}
// verify id matches
char discid[8];
memset(discid, 0, sizeof(discid));
ret = USBStorage_WBFS_Read(0, 6, discid);
return 0;
}

51
source/usbloader/frag.h Normal file
View File

@ -0,0 +1,51 @@
// worst case wbfs fragmentation scenario:
// 9GB (dual layer) / 2mb (wbfs sector size) = 4608
#define MAX_FRAG 20000
// max that ehcmodule_frag will allow at the moment is about:
// 40000/4/3-1 = 21844
#ifdef __cplusplus
extern "C" {
#endif
#include "libwbfs/libwbfs.h"
typedef struct
{
u32 offset; // file offset, in sectors unit
u32 sector;
u32 count;
} Fragment;
typedef struct
{
u32 size; // num sectors
u32 num; // num fragments
u32 maxnum;
Fragment frag[MAX_FRAG];
} FragList;
typedef int (*frag_append_t)(void *ff, u32 offset, u32 sector, u32 count);
int _FAT_get_fragments (const char *path, _frag_append_t append_fragment, void *callback_data);
void frag_init(FragList *ff, int maxnum);
int frag_append(FragList *ff, u32 offset, u32 sector, u32 count);
int _frag_append(void *ff, u32 offset, u32 sector, u32 count);
int frag_concat(FragList *ff, FragList *src);
// in case a sparse block is requested,
// the returned poffset might not be equal to requested offset
// the difference should be filled with 0
int frag_get(FragList *ff, u32 offset, u32 count,
u32 *poffset, u32 *psector, u32 *pcount);
int frag_remap(FragList *ff, FragList *log, FragList *phy);
int get_frag_list(u8 *id);
int set_frag_list(u8 *id);
#ifdef __cplusplus
}
#endif

View File

@ -273,6 +273,16 @@ int get_fs_type(void *buff)
return FS_TYPE_UNK; return FS_TYPE_UNK;
} }
int get_part_fs(int fs_type)
{
switch(fs_type) {
case FS_TYPE_FAT32: return PART_FS_FAT;
case FS_TYPE_NTFS: return PART_FS_NTFS;
case FS_TYPE_WBFS: return PART_FS_WBFS;
default: return -1;
}
}
bool is_type_fat(int type) bool is_type_fat(int type)
{ {
return (type == FS_TYPE_FAT16 || type == FS_TYPE_FAT32); return (type == FS_TYPE_FAT16 || type == FS_TYPE_FAT32);
@ -309,7 +319,7 @@ s32 Partition_GetList(u32 device, PartList *plist)
pinfo = &plist->pinfo[0]; pinfo = &plist->pinfo[0];
entry = &plist->pentry[0]; entry = &plist->pentry[0];
plist->wbfs_n = 1; plist->wbfs_n = 1;
pinfo->wbfs_i = 1; pinfo->wbfs_i = pinfo->index = 1;
return 0; return 0;
} }
@ -330,11 +340,15 @@ s32 Partition_GetList(u32 device, PartList *plist)
// multiple wbfs on sdhc not supported // multiple wbfs on sdhc not supported
if (device == WBFS_DEVICE_SDHC && (plist->wbfs_n > 1 || i > 4)) continue; if (device == WBFS_DEVICE_SDHC && (plist->wbfs_n > 1 || i > 4)) continue;
plist->wbfs_n++; plist->wbfs_n++;
pinfo->wbfs_i = plist->wbfs_n; pinfo->wbfs_i = pinfo->index = plist->wbfs_n;
} else if (is_type_fat(pinfo->fs_type)) { } else if (is_type_fat(pinfo->fs_type)) {
plist->fat_n++; plist->fat_n++;
pinfo->fat_i = plist->fat_n; pinfo->fat_i = pinfo->index = plist->fat_n;
} else if (pinfo->fs_type == FS_TYPE_NTFS) {
plist->ntfs_n++;
pinfo->ntfs_i = pinfo->index = plist->ntfs_n;
} }
pinfo->part_fs = get_part_fs(pinfo->fs_type);
} }
return 0; return 0;
} }
@ -357,5 +371,3 @@ int Partition_FixEXT(u32 device, int part)
} }
return -1; return -1;
} }

View File

@ -39,8 +39,11 @@ typedef struct {
typedef struct typedef struct
{ {
int fs_type; int fs_type;
int part_fs;
int wbfs_i; // seq wbfs part index int wbfs_i; // seq wbfs part index
int fat_i; // seq fat part index int fat_i; // seq fat part index
int ntfs_i; // seq ntfs part index
int index;
} PartInfo; } PartInfo;
typedef struct typedef struct
@ -50,6 +53,7 @@ typedef struct
partitionEntry pentry[MAX_PARTITIONS_EX]; partitionEntry pentry[MAX_PARTITIONS_EX];
int wbfs_n; int wbfs_n;
int fat_n; int fat_n;
int ntfs_n;
PartInfo pinfo[MAX_PARTITIONS_EX]; PartInfo pinfo[MAX_PARTITIONS_EX];
} PartList; } PartList;

View File

@ -12,19 +12,29 @@
#define IOCTL_SDHC_ISINSERTED 0x04 #define IOCTL_SDHC_ISINSERTED 0x04
#define SDHC_HEAPSIZE 0x8000 #define SDHC_HEAPSIZE 0x8000
#define SDHC_MEM2_SIZE 0x10000
int sdhc_mode_sd = 0;
/* Variables */ /* Variables */
static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/sdio/sdhc"; static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/sdio/sdhc";
static s32 hid = -1, fd = -1; static s32 hid = -1, fd = -1;
static u32 sector_size = SDHC_SECTOR_SIZE; static u32 sector_size = SDHC_SECTOR_SIZE;
static void *sdhc_buf2;
extern void* SYS_AllocArena2MemLo(u32 size,u32 align);
bool SDHC_Init(void) { bool SDHC_Init(void)
{
s32 ret; s32 ret;
if (sdhc_mode_sd) {
return __io_wiisd.startup();
}
/* Already open */ /* Already open */
if (fd > 0) if (fd >= 0)
return true; return true;
/* Create heap */ /* Create heap */
@ -34,6 +44,11 @@ bool SDHC_Init(void) {
goto err; goto err;
} }
// allocate buf2
if (sdhc_buf2 == NULL) {
sdhc_buf2 = SYS_AllocArena2MemLo(SDHC_MEM2_SIZE, 32);
}
/* Open SDHC device */ /* Open SDHC device */
fd = IOS_Open(fs, 0); fd = IOS_Open(fs, 0);
if (fd < 0) if (fd < 0)
@ -48,7 +63,7 @@ bool SDHC_Init(void) {
err: err:
/* Close SDHC device */ /* Close SDHC device */
if (fd > 0) { if (fd >= 0) {
IOS_Close(fd); IOS_Close(fd);
fd = -1; fd = -1;
} }
@ -56,18 +71,32 @@ err:
return false; return false;
} }
bool SDHC_Close(void) { bool SDHC_Close(void)
{
if (sdhc_mode_sd) {
return __io_wiisd.shutdown();
}
/* Close SDHC device */ /* Close SDHC device */
if (fd > 0) { if (fd >= 0) {
IOS_Close(fd); IOS_Close(fd);
fd = -1; fd = -1;
} }
/*if (hid > 0) {
iosDestroyHeap(hid);
hid = -1;
}*/
return true; return true;
} }
bool SDHC_IsInserted(void) { bool SDHC_IsInserted(void)
{
s32 ret; s32 ret;
if (sdhc_mode_sd) {
return __io_wiisd.isInserted();
}
/* Check if SD card is inserted */ /* Check if SD card is inserted */
ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_ISINSERTED, ":"); ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_ISINSERTED, ":");
@ -75,7 +104,13 @@ bool SDHC_IsInserted(void) {
return (!ret) ? true : false; return (!ret) ? true : false;
} }
bool SDHC_ReadSectors(u32 sector, u32 count, void *buffer) { bool SDHC_ReadSectors(u32 sector, u32 count, void *buffer)
{
//printf("SD-R(%u %u)\n", sector, count);
if (sdhc_mode_sd) {
return __io_wiisd.readSectors(sector, count, buffer);
}
void *buf = (void *)buffer; void *buf = (void *)buffer;
u32 len = (sector_size * count); u32 len = (sector_size * count);
@ -88,7 +123,8 @@ bool SDHC_ReadSectors(u32 sector, u32 count, void *buffer) {
/* Buffer not aligned */ /* Buffer not aligned */
if ((u32)buffer & 0x1F) { if ((u32)buffer & 0x1F) {
/* Allocate memory */ /* Allocate memory */
buf = iosAlloc(hid, len); //buf = iosAlloc(hid, len);
buf = sdhc_buf2;
if (!buf) if (!buf)
return false; return false;
} }
@ -99,13 +135,18 @@ bool SDHC_ReadSectors(u32 sector, u32 count, void *buffer) {
/* Copy data */ /* Copy data */
if (buf != buffer) { if (buf != buffer) {
memcpy(buffer, buf, len); memcpy(buffer, buf, len);
iosFree(hid, buf); //iosFree(hid, buf);
} }
return (!ret) ? true : false; return (!ret) ? true : false;
} }
bool SDHC_WriteSectors(u32 sector, u32 count, void *buffer) { bool SDHC_WriteSectors(u32 sector, u32 count, void *buffer)
{
if (sdhc_mode_sd) {
return __io_wiisd.writeSectors(sector, count, buffer);
}
void *buf = (void *)buffer; void *buf = (void *)buffer;
u32 len = (sector_size * count); u32 len = (sector_size * count);
@ -118,7 +159,8 @@ bool SDHC_WriteSectors(u32 sector, u32 count, void *buffer) {
/* Buffer not aligned */ /* Buffer not aligned */
if ((u32)buffer & 0x1F) { if ((u32)buffer & 0x1F) {
/* Allocate memory */ /* Allocate memory */
buf = iosAlloc(hid, len); //buf = iosAlloc(hid, len);
buf = sdhc_buf2;
if (!buf) if (!buf)
return false; return false;
@ -130,16 +172,28 @@ bool SDHC_WriteSectors(u32 sector, u32 count, void *buffer) {
ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_WRITE, "ii:d", sector, count, buf, len); ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_WRITE, "ii:d", sector, count, buf, len);
/* Free memory */ /* Free memory */
if (buf != buffer) //if (buf != buffer)
iosFree(hid, buf); // iosFree(hid, buf);
return (!ret) ? true : false; return (!ret) ? true : false;
} }
bool SDHC_ClearStatus(void) { bool SDHC_ClearStatus(void)
{
return true; return true;
} }
bool __io_SDHC_Close(void)
{
// do nothing.
return true;
}
bool __io_SDHC_NOP(void)
{
// do nothing.
return true;
}
const DISC_INTERFACE __io_sdhc = { const DISC_INTERFACE __io_sdhc = {
DEVICE_TYPE_WII_SD, DEVICE_TYPE_WII_SD,
@ -149,5 +203,20 @@ const DISC_INTERFACE __io_sdhc = {
(FN_MEDIUM_READSECTORS)&SDHC_ReadSectors, (FN_MEDIUM_READSECTORS)&SDHC_ReadSectors,
(FN_MEDIUM_WRITESECTORS)&SDHC_WriteSectors, (FN_MEDIUM_WRITESECTORS)&SDHC_WriteSectors,
(FN_MEDIUM_CLEARSTATUS)&SDHC_ClearStatus, (FN_MEDIUM_CLEARSTATUS)&SDHC_ClearStatus,
(FN_MEDIUM_SHUTDOWN)&SDHC_Close //(FN_MEDIUM_SHUTDOWN)&SDHC_Close
(FN_MEDIUM_SHUTDOWN)&__io_SDHC_Close
}; };
const DISC_INTERFACE __io_sdhc_ro = {
DEVICE_TYPE_WII_SD,
FEATURE_MEDIUM_CANREAD | FEATURE_WII_SD,
(FN_MEDIUM_STARTUP) &SDHC_Init,
(FN_MEDIUM_ISINSERTED) &SDHC_IsInserted,
(FN_MEDIUM_READSECTORS) &SDHC_ReadSectors,
(FN_MEDIUM_WRITESECTORS) &__io_SDHC_NOP, // &SDHC_WriteSectors,
(FN_MEDIUM_CLEARSTATUS) &SDHC_ClearStatus,
//(FN_MEDIUM_SHUTDOWN)&SDHC_Close
(FN_MEDIUM_SHUTDOWN) &__io_SDHC_Close
};

View File

@ -13,6 +13,7 @@ extern "C" {
bool SDHC_Close(void); bool SDHC_Close(void);
bool SDHC_ReadSectors(u32, u32, void *); bool SDHC_ReadSectors(u32, u32, void *);
bool SDHC_WriteSectors(u32, u32, void *); bool SDHC_WriteSectors(u32, u32, void *);
extern int sdhc_mode_sd;
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -1,3 +1,6 @@
// by oggzee
#include <ogcsys.h> #include <ogcsys.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -14,12 +17,12 @@
#define FMT_llu "%llu" #define FMT_llu "%llu"
#define FMT_lld "%lld" #define FMT_lld "%lld"
#define split_error(x) do { /* gprintf("\nsplit error: %s\n\n",x); */ } while(0) #define split_error(x) do { printf("\nsplit error: %s\n\n",x); } while(0)
// 1 sector less than 4gb // 1 cluster less than 4gb
u64 OPT_split_size = (u64)4LL * 1024 * 1024 * 1024 - (32 * 1024); u64 OPT_split_size = (u64)4LL * 1024 * 1024 * 1024 - 32 * 1024;
// 1 sector less than 2gb // 1 cluster less than 2gb
// u64 OPT_split_size = (u64)2LL * 1024 * 1024 * 1024 - 512; //u64 OPT_split_size = (u64)2LL * 1024 * 1024 * 1024 - 32 * 1024;
//split_info_t split; //split_info_t split;

View File

@ -42,6 +42,13 @@ distribution.
#define USB_IOCTL_UMS_UNMOUNT (UMS_BASE+0x10) #define USB_IOCTL_UMS_UNMOUNT (UMS_BASE+0x10)
#define USB_IOCTL_UMS_WATCHDOG (UMS_BASE+0x80) #define USB_IOCTL_UMS_WATCHDOG (UMS_BASE+0x80)
#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)
#define UMS_HEAPSIZE 0x1000 #define UMS_HEAPSIZE 0x1000
/* Variables */ /* Variables */
@ -51,16 +58,6 @@ static char fs2[] ATTRIBUTE_ALIGN(32) = "/dev/usb/ehc";
static s32 hid = -1, fd = -1; static s32 hid = -1, fd = -1;
static u32 sector_size; static u32 sector_size;
extern void* SYS_AllocArena2MemLo(u32 size,u32 align);
//static void *mem2_ptr=NULL;
inline s32 __USBStorage_isMEM2Buffer(const void *buffer) {
u32 high_addr = ((u32)buffer) >> 24;
return (high_addr == 0x90) || (high_addr == 0xD0);
}
s32 USBStorage_GetCapacity(u32 *_sector_size) { s32 USBStorage_GetCapacity(u32 *_sector_size) {
if (fd > 0) { if (fd > 0) {
s32 ret; s32 ret;
@ -160,30 +157,12 @@ s32 USBStorage_ReadSectors(u32 sector, u32 numSectors, void *buffer) {
if (fd < 0) if (fd < 0)
return fd; return fd;
// if(!mem2_ptr) mem2_ptr=SYS_AllocArena2MemLo(2048*256,32);
/* MEM1 buffer */
// if (!__USBStorage_isMEM2Buffer(buffer)) {
/* Allocate memory */
// buf = mem2_ptr; //iosAlloc(hid, len);
// if (!buf)
// return IPC_ENOMEM;
// }
/* Read data */
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_READ_SECTORS, "ii:d", sector, numSectors, buffer, len); ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_READ_SECTORS, "ii:d", sector, numSectors, buffer, len);
/* Copy data */
// if (buf != buffer) {
// memcpy(buffer, buf, len);
//iosFree(hid, buf);
// }
return ret; return ret;
} }
s32 USBStorage_WriteSectors(u32 sector, u32 numSectors, const void *buffer) { s32 USBStorage_WriteSectors(u32 sector, u32 numSectors, const void *buffer) {
// void *buf = (void *)buffer;
u32 len = (sector_size * numSectors); u32 len = (sector_size * numSectors);
s32 ret; s32 ret;
@ -191,33 +170,145 @@ s32 USBStorage_WriteSectors(u32 sector, u32 numSectors, const void *buffer) {
/* Device not opened */ /* Device not opened */
if (fd < 0) if (fd < 0)
return fd; return fd;
// if(!mem2_ptr) mem2_ptr = SYS_AllocArena2MemLo(2048*256,32);
/* MEM1 buffer */
// if (!__USBStorage_isMEM2Buffer(buffer)) {
/* Allocate memory */
// buf = mem2_ptr; //buf = iosAlloc(hid, len);
// if (!buf)
// return IPC_ENOMEM;
/* Copy data */
// memcpy(buf, buffer, len);
// }
/* Write data */ /* Write data */
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_WRITE_SECTORS, "ii:d", sector, numSectors, buffer, len); ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_WRITE_SECTORS, "ii:d", sector, numSectors, buffer, len);
/* Free memory */ return ret;
// if (buf != buffer) }
// iosFree(hid, buf);
static bool __io_usb_Startup(void)
{
return USBStorage_Init() >= 0;
}
static bool __io_usb_IsInserted(void)
{
s32 ret;
if (fd < 0) return false;
ret = USBStorage_GetCapacity(NULL);
if (ret == 0) return false;
return true;
}
bool __io_usb_ReadSectors(u32 sector, u32 count, void *buffer)
{
s32 ret = USBStorage_ReadSectors(sector, count, buffer);
return ret > 0;
}
bool __io_usb_WriteSectors(u32 sector, u32 count, void *buffer)
{
s32 ret = USBStorage_WriteSectors(sector, count, buffer);
return ret > 0;
}
static bool __io_usb_ClearStatus(void)
{
return true;
}
static bool __io_usb_Shutdown(void)
{
// do nothing
return true;
}
static bool __io_usb_NOP(void)
{
// do nothing
return true;
}
const DISC_INTERFACE __io_usbstorage_ro = {
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
};
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;
}
// woffset is in 32bit words, len is in bytes
s32 USBStorage_WBFS_Read(u32 woffset, u32 len, void *buffer)
{
s32 ret;
USBStorage_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; return ret;
} }
#define DEVICE_TYPE_WII_UMS (('W'<<24)|('U'<<16)|('M'<<8)|'S') s32 USBStorage_WBFS_ReadDebug(u32 off, u32 size, void *buffer)
{
s32 ret;
USBStorage_Init();
/* Device not opened */
if (fd < 0)
return fd;
/* Read data */
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_WBFS_READ_DEBUG, "ii:d", off, size, buffer, size);
return ret;
}
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;
}
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;
}
#define DEVICE_TYPE_WII_UMS (('W'<<24)|('U'<<16)|('M'<<8)|'S')
bool umsio_Startup() { bool umsio_Startup() {
return USBStorage_Init() == 0; return USBStorage_Init() == 0;
@ -226,6 +317,7 @@ bool umsio_Startup() {
bool umsio_IsInserted() { bool umsio_IsInserted() {
return true; // allways true return true; // allways true
} }
bool umsio_ReadSectors(sec_t sector, sec_t numSectors, u8 *buffer) { bool umsio_ReadSectors(sec_t sector, sec_t numSectors, u8 *buffer) {
u32 cnt = 0; u32 cnt = 0;
s32 ret; s32 ret;
@ -272,6 +364,7 @@ bool umsio_WriteSectors(sec_t sector, sec_t numSectors, const u8* buffer) {
return true; return true;
} }
bool umsio_ClearStatus(void) { bool umsio_ClearStatus(void) {
return true; return true;
} }
@ -280,13 +373,25 @@ bool umsio_Shutdown() {
USBStorage_Deinit(); USBStorage_Deinit();
return true; return true;
} }
const DISC_INTERFACE __io_wiiums = { const DISC_INTERFACE __io_wiiums = {
DEVICE_TYPE_WII_UMS, DEVICE_TYPE_WII_UMS,
FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_USB, FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_USB,
(FN_MEDIUM_STARTUP)&umsio_Startup, (FN_MEDIUM_STARTUP) &umsio_Startup,
(FN_MEDIUM_ISINSERTED)&umsio_IsInserted, (FN_MEDIUM_ISINSERTED) &umsio_IsInserted,
(FN_MEDIUM_READSECTORS)&umsio_ReadSectors, (FN_MEDIUM_READSECTORS) &umsio_ReadSectors,
(FN_MEDIUM_WRITESECTORS)&umsio_WriteSectors, (FN_MEDIUM_WRITESECTORS) &umsio_WriteSectors,
(FN_MEDIUM_CLEARSTATUS)&umsio_ClearStatus, (FN_MEDIUM_CLEARSTATUS) &umsio_ClearStatus,
(FN_MEDIUM_SHUTDOWN)&umsio_Shutdown (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
}; };

View File

@ -11,7 +11,15 @@ extern "C" {
s32 USBStorage_Watchdog(u32 on_off); s32 USBStorage_Watchdog(u32 on_off);
s32 USBStorage_ReadSectors(u32, u32, void *); s32 USBStorage_ReadSectors(u32, u32, void *);
s32 USBStorage_WriteSectors(u32, u32, const void *); s32 USBStorage_WriteSectors(u32, u32, const void *);
s32 USBStorage_WBFS_Open(char *buf_id);
s32 USBStorage_WBFS_Read(u32 woffset, u32 len, void *buffer);
s32 USBStorage_WBFS_ReadDebug(u32 off, u32 size, void *buffer);
s32 USBStorage_WBFS_SetDevice(int dev);
s32 USBStorage_WBFS_SetFragList(void *p, int size);
extern const DISC_INTERFACE __io_wiiums; extern const DISC_INTERFACE __io_wiiums;
extern const DISC_INTERFACE __io_wiiums_ro;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -13,6 +13,8 @@ extern "C" {
/* Macros */ /* Macros */
#define round_up(x,n) (-(-(x) & -(n))) #define round_up(x,n) (-(-(x) & -(n)))
#define SAFE_FREE(P) if(P){free(P);P=NULL;}
/* Prototypes */ /* Prototypes */
u32 swap32(u32); u32 swap32(u32);

View File

@ -24,7 +24,7 @@
s32 wbfsDev = WBFS_MIN_DEVICE; s32 wbfsDev = WBFS_MIN_DEVICE;
// partition // partition
int wbfs_part_fat = 0; int wbfs_part_fs = PART_FS_WBFS;
u32 wbfs_part_idx = 0; u32 wbfs_part_idx = 0;
u32 wbfs_part_lba = 0; u32 wbfs_part_lba = 0;
@ -46,7 +46,7 @@ void WBFS_Spinner(s32 x, s32 max) {
wbfs_disc_t* WBFS_OpenDisc(u8 *discid) wbfs_disc_t* WBFS_OpenDisc(u8 *discid)
{ {
if (wbfs_part_fat) return WBFS_FAT_OpenDisc(discid); if (wbfs_part_fs) return WBFS_FAT_OpenDisc(discid);
/* No device open */ /* No device open */
if (!hdd) if (!hdd)
@ -58,7 +58,7 @@ wbfs_disc_t* WBFS_OpenDisc(u8 *discid)
void WBFS_CloseDisc(wbfs_disc_t *disc) void WBFS_CloseDisc(wbfs_disc_t *disc)
{ {
if (wbfs_part_fat) { if (wbfs_part_fs) {
WBFS_FAT_CloseDisc(disc); WBFS_FAT_CloseDisc(disc);
return; return;
} }
@ -273,7 +273,7 @@ s32 WBFS_Open(void) {
wbfs_close(hdd); wbfs_close(hdd);
/* Open hard disk */ /* Open hard disk */
wbfs_part_fat = wbfs_part_idx = wbfs_part_lba = 0; wbfs_part_fs = wbfs_part_idx = wbfs_part_lba = 0;
hdd = wbfs_open_hd(readCallback, writeCallback, NULL, sector_size, nb_sectors, 0); hdd = wbfs_open_hd(readCallback, writeCallback, NULL, sector_size, nb_sectors, 0);
if (!hdd) if (!hdd)
return -1; return -1;
@ -285,37 +285,45 @@ s32 WBFS_Open(void) {
return 0; return 0;
} }
s32 WBFS_OpenPart(u32 part_fat, u32 part_idx, u32 part_lba, u32 part_size, char *partition) s32 WBFS_OpenPart(u32 part_fs, u32 part_idx, u32 part_lba, u32 part_size, char *partition)
{ {
// close // close
WBFS_Close(); WBFS_Close();
if (part_fat) { if (part_fs == PART_FS_FAT) {
if (wbfsDev != WBFS_DEVICE_USB) return -1; if (wbfsDev == WBFS_DEVICE_USB && part_lba == fat_usb_sec) {
if (part_lba == fat_usb_sec) { strcpy(wbfs_fs_drive, "USB:");
strcpy(wbfs_fat_drive, "USB:"); } else if (wbfsDev == WBFS_DEVICE_SDHC && part_lba == fat_sd_sec) {
strcpy(wbfs_fs_drive, "SD:");
} else { } else {
if (WBFSDevice_Init(part_lba)) return -1; if (WBFSDevice_Init(part_lba)) return -1;
strcpy(wbfs_fat_drive, "WBFS:"); strcpy(wbfs_fs_drive, "WBFS:");
} }
} else if (part_fs == PART_FS_NTFS) {
int ret = MountNTFS(part_lba);
if (ret) return ret;
strcpy(wbfs_fs_drive, "NTFS:");
} else { } else {
if (WBFS_OpenLBA(part_lba, part_size)) return -3; if (WBFS_OpenLBA(part_lba, part_size)) return -3;
} }
// success // success
wbfs_part_fat = part_fat; wbfs_part_fs = part_fs;
wbfs_part_idx = part_idx; wbfs_part_idx = part_idx;
wbfs_part_lba = part_lba; wbfs_part_lba = part_lba;
sprintf(partition, "%s%d", wbfs_part_fat ? "FAT" : "WBFS", wbfs_part_idx); char *fs = "WBFS";
if (wbfs_part_fs == PART_FS_FAT) fs = "FAT";
if (wbfs_part_fs == PART_FS_NTFS) fs = "NTFS";
sprintf(partition, "%s%d", fs, wbfs_part_idx);
return 0; return 0;
} }
s32 WBFS_OpenNamed(char *partition) s32 WBFS_OpenNamed(char *partition)
{ {
int i; int i;
u32 part_fs = PART_FS_WBFS;
u32 part_idx = 0; u32 part_idx = 0;
u32 part_fat = 0;
u32 part_lba = 0; u32 part_lba = 0;
s32 ret = 0; s32 ret = 0;
PartList plist; PartList plist;
@ -327,13 +335,19 @@ s32 WBFS_OpenNamed(char *partition)
if (strncasecmp(partition, "WBFS", 4) == 0) { if (strncasecmp(partition, "WBFS", 4) == 0) {
i = atoi(partition+4); i = atoi(partition+4);
if (i < 1 || i > 4) goto err; if (i < 1 || i > 4) goto err;
part_fs = PART_FS_WBFS;
part_idx = i; part_idx = i;
} else if (strncasecmp(partition, "FAT", 3) == 0) { } else if (strncasecmp(partition, "FAT", 3) == 0) {
if (wbfsDev != WBFS_DEVICE_USB) goto err; if (wbfsDev != WBFS_DEVICE_USB) goto err;
i = atoi(partition+3); i = atoi(partition+3);
if (i < 1 || i > 9) goto err; if (i < 1 || i > 9) goto err;
part_fs = PART_FS_FAT;
part_idx = i;
} else if (strncasecmp(partition, "NTFS", 4) == 0) {
i = atoi(partition+4);
if (i < 1 || i > 9) goto err;
part_fs = PART_FS_NTFS;
part_idx = i; part_idx = i;
part_fat = 1;
} else { } else {
goto err; goto err;
} }
@ -342,22 +356,27 @@ s32 WBFS_OpenNamed(char *partition)
ret = Partition_GetList(wbfsDev, &plist); ret = Partition_GetList(wbfsDev, &plist);
if (ret || plist.num == 0) return -1; if (ret || plist.num == 0) return -1;
if (part_fat) { if (part_fs == PART_FS_WBFS) {
if (part_idx > plist.wbfs_n) goto err;
for (i=0; i<plist.num; i++) {
if (plist.pinfo[i].wbfs_i == part_idx) break;
}
} else if (part_fs == PART_FS_FAT) {
if (part_idx > plist.fat_n) goto err; if (part_idx > plist.fat_n) goto err;
for (i=0; i<plist.num; i++) { for (i=0; i<plist.num; i++) {
if (plist.pinfo[i].fat_i == part_idx) break; if (plist.pinfo[i].fat_i == part_idx) break;
} }
} else { } else if (part_fs == PART_FS_NTFS) {
if (part_idx > plist.wbfs_n) goto err; if (part_idx > plist.ntfs_n) goto err;
for (i=0; i<plist.num; i++) { for (i=0; i<plist.num; i++) {
if (plist.pinfo[i].wbfs_i == part_idx) break; if (plist.pinfo[i].ntfs_i == part_idx) break;
} }
} }
if (i >= plist.num) goto err; if (i >= plist.num) goto err;
// set partition lba sector // set partition lba sector
part_lba = plist.pentry[i].sector; part_lba = plist.pentry[i].sector;
if (WBFS_OpenPart(part_fat, part_idx, part_lba, plist.pentry[i].size, partition)) { if (WBFS_OpenPart(part_fs, part_idx, part_lba, plist.pentry[i].size, partition)) {
goto err; goto err;
} }
// success // success
@ -390,10 +409,10 @@ bool WBFS_Close(void)
} }
WBFSDevice_deInit(); WBFSDevice_deInit();
wbfs_part_fat = 0; wbfs_part_fs = 0;
wbfs_part_idx = 0; wbfs_part_idx = 0;
wbfs_part_lba = 0; wbfs_part_lba = 0;
wbfs_fat_drive[0] = '\0'; wbfs_fs_drive[0] = '\0';
return 0; return 0;
} }
@ -405,7 +424,7 @@ bool WBFS_Mounted()
bool WBFS_Selected() bool WBFS_Selected()
{ {
if (wbfs_part_fat && wbfs_part_lba && *wbfs_fat_drive) return true; if (wbfs_part_fs && wbfs_part_lba && *wbfs_fs_drive) return true;
return WBFS_Mounted(); return WBFS_Mounted();
} }
@ -424,7 +443,7 @@ s32 WBFS_Format(u32 lba, u32 size) {
} }
s32 WBFS_GetCount(u32 *count) { s32 WBFS_GetCount(u32 *count) {
if (wbfs_part_fat) return WBFS_FAT_GetCount(count); if (wbfs_part_fs) return WBFS_FAT_GetCount(count);
/* No device open */ /* No device open */
if (!hdd) if (!hdd)
@ -437,7 +456,7 @@ s32 WBFS_GetCount(u32 *count) {
} }
s32 WBFS_GetHeaders(void *outbuf, u32 cnt, u32 len) { s32 WBFS_GetHeaders(void *outbuf, u32 cnt, u32 len) {
if (wbfs_part_fat) return WBFS_FAT_GetHeaders(outbuf, cnt, len); if (wbfs_part_fs) return WBFS_FAT_GetHeaders(outbuf, cnt, len);
u32 idx, size; u32 idx, size;
s32 ret; s32 ret;
@ -474,7 +493,7 @@ s32 WBFS_CheckGame(u8 *discid) {
} }
s32 WBFS_AddGame(void) { s32 WBFS_AddGame(void) {
if (wbfs_part_fat) return WBFS_FAT_AddGame(); if (wbfs_part_fs) return WBFS_FAT_AddGame();
s32 ret; s32 ret;
@ -501,7 +520,7 @@ s32 WBFS_AddGame(void) {
} }
s32 WBFS_RemoveGame(u8 *discid) { s32 WBFS_RemoveGame(u8 *discid) {
if (wbfs_part_fat) return WBFS_FAT_RemoveGame(discid); if (wbfs_part_fs) return WBFS_FAT_RemoveGame(discid);
s32 ret; s32 ret;
@ -540,7 +559,7 @@ s32 WBFS_GameSize(u8 *discid, f32 *size) {
} }
s32 WBFS_DiskSpace(f32 *used, f32 *free) { s32 WBFS_DiskSpace(f32 *used, f32 *free) {
if (wbfs_part_fat) return WBFS_FAT_DiskSpace(used, free); if (wbfs_part_fs) return WBFS_FAT_DiskSpace(used, free);
f32 ssize; f32 ssize;
u32 cnt; u32 cnt;
@ -564,7 +583,7 @@ s32 WBFS_DiskSpace(f32 *used, f32 *free) {
s32 WBFS_RenameGame(u8 *discid, const void *newname) s32 WBFS_RenameGame(u8 *discid, const void *newname)
{ {
if (wbfs_part_fat) if (wbfs_part_fs)
{ {
return WBFS_FAT_RenameGame(discid, newname); return WBFS_FAT_RenameGame(discid, newname);
} }
@ -583,7 +602,7 @@ s32 WBFS_RenameGame(u8 *discid, const void *newname)
s32 WBFS_ReIDGame(u8 *discid, const void *newID) s32 WBFS_ReIDGame(u8 *discid, const void *newID)
{ {
if (wbfs_part_fat) if (wbfs_part_fs)
{ {
return WBFS_FAT_ReIDGame(discid, newID); return WBFS_FAT_ReIDGame(discid, newID);
} }
@ -601,7 +620,7 @@ s32 WBFS_ReIDGame(u8 *discid, const void *newID)
} }
f32 WBFS_EstimeGameSize(void) { f32 WBFS_EstimeGameSize(void) {
if (wbfs_part_fat) { if (wbfs_part_fs) {
u64 comp; u64 comp;
WBFS_FAT_DVD_Size(&comp, NULL); WBFS_FAT_DVD_Size(&comp, NULL);
return comp; return comp;

View File

@ -16,11 +16,15 @@ extern "C" {
#define WBFS_MIN_DEVICE 1 #define WBFS_MIN_DEVICE 1
#define WBFS_MAX_DEVICE 2 #define WBFS_MAX_DEVICE 2
#define PART_FS_WBFS 0
#define PART_FS_FAT 1
#define PART_FS_NTFS 2
extern s32 wbfsDev; extern s32 wbfsDev;
extern int wbfs_part_fat; extern int wbfs_part_fs;
extern u32 wbfs_part_idx; extern u32 wbfs_part_idx;
extern u32 wbfs_part_lba; extern u32 wbfs_part_lba;
extern char wbfs_fat_drive[16]; extern char wbfs_fs_drive[16];
/* Prototypes */ /* Prototypes */
void GetProgressValue(s32 * d, s32 * m); void GetProgressValue(s32 * d, s32 * m);

View File

@ -1,5 +1,8 @@
// WBFS FAT by oggzee // WBFS FAT by oggzee
// WBFS FAT by oggzee
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <malloc.h> #include <malloc.h>
@ -12,27 +15,27 @@
#include <ctype.h> #include <ctype.h>
#include "libwbfs/libwbfs.h" #include "libwbfs/libwbfs.h"
#include "sdhc.h" #include "usbloader/disc.h"
#include "usbstorage.h" #include "usbloader/sdhc.h"
#include "utils.h" #include "usbloader/usbstorage.h"
#include "video.h" #include "usbloader/utils.h"
#include "wbfs.h" #include "usbloader/wbfs.h"
#include "wdvd.h" #include "usbloader/wdvd.h"
#include "splits.h" #include "usbloader/splits.h"
#include "fat.h" #include "usbloader/wbfs_fat.h"
#include "partition_usbloader.h" #include "usbloader/partition_usbloader.h"
#include "libfat/fat.h"
#include "settings/cfg.h" #include "settings/cfg.h"
#include "wpad.h"
#include "wbfs_fat.h"
// max fat fname = 256
#define MAX_FAT_PATH 1024 #define MAX_FAT_PATH 1024
#define D_S(A) A, sizeof(A)
char wbfs_fat_drive[16]; char wbfs_fs_drive[16];
char wbfs_fat_dir[16] = "/wbfs"; char wbfs_fat_dir[16] = "/wbfs";
int wbfs_fat_vfs_have = 0; int wbfs_fat_vfs_have = 0;
int wbfs_fat_vfs_lba = 0; int wbfs_fat_vfs_lba = 0;
int wbfs_fat_vfs_dev = 0;
struct statvfs wbfs_fat_vfs; struct statvfs wbfs_fat_vfs;
split_info_t split; split_info_t split;
@ -42,6 +45,7 @@ static u32 fat_sector_size = 512;
static struct discHdr *fat_hdr_list = NULL; static struct discHdr *fat_hdr_list = NULL;
static int fat_hdr_count = 0; static int fat_hdr_count = 0;
void WBFS_Spinner(s32 x, s32 max); void WBFS_Spinner(s32 x, s32 max);
s32 __WBFS_ReadDVD(void *fp, u32 lba, u32 len, void *iobuf); s32 __WBFS_ReadDVD(void *fp, u32 lba, u32 len, void *iobuf);
@ -54,6 +58,7 @@ bool is_gameid(char *id)
return true; return true;
} }
s32 _WBFS_FAT_GetHeadersCount() s32 _WBFS_FAT_GetHeadersCount()
{ {
DIR_ITER *dir_iter; DIR_ITER *dir_iter;
@ -71,19 +76,16 @@ s32 _WBFS_FAT_GetHeadersCount()
//dbg_time1(); //dbg_time1();
if(fat_hdr_list){ SAFE_FREE(fat_hdr_list);
free(fat_hdr_list);
fat_hdr_list=NULL;
}
fat_hdr_count = 0; fat_hdr_count = 0;
strcpy(path, wbfs_fat_drive); strcpy(path, wbfs_fs_drive);
strcat(path, wbfs_fat_dir); strcat(path, wbfs_fat_dir);
dir_iter = diropen(path); dir_iter = diropen(path);
if (!dir_iter) return 0; if (!dir_iter) return 0;
while (dirnext(dir_iter, fname, &st) == 0) { while (dirnext(dir_iter, fname, &st) == 0) {
//printf("found: %s\n", fname); Wpad_WaitButtonsCommon();
if ((char)fname[0] == '.') continue; if ((char)fname[0] == '.') continue;
if (strlen(fname) < 8) continue; // "GAMEID_x" if (strlen(fname) < 8) continue; // "GAMEID_x"
@ -91,14 +93,24 @@ s32 _WBFS_FAT_GetHeadersCount()
id[6] = 0; id[6] = 0;
is_dir = S_ISDIR(st.st_mode); is_dir = S_ISDIR(st.st_mode);
//printf("mode: %d %d %x\n", is_dir, st.st_mode, st.st_mode);
if (is_dir) { if (is_dir) {
// usb:/wbfs/GAMEID_TITLE/GAMEID.wbfs // usb:/wbfs/GAMEID_TITLE/GAMEID.wbfs
if (fname[6] != '_') continue; if (fname[6] != '_') continue;
snprintf(fpath, sizeof(fpath), "%s/%s/%s.wbfs", path, fname, id); snprintf(fpath, sizeof(fpath), "%s/%s/%s.wbfs", path, fname, id);
//printf("path2: %s\n", fpath);
// if more than 50 games, skip second stat to improve speed // if more than 50 games, skip second stat to improve speed
if (fat_hdr_count < 50) { if (fat_hdr_count < 50) {
do_stat2: do_stat2:
if (stat(fpath, &st) == -1) continue; if (stat(fpath, &st) == -1) {
//printf("missing: %s\n", fpath);
// try .iso
strcpy(strrchr(fpath, '.'), ".iso"); // replace .wbfs with .iso
if (stat(fpath, &st) == -1) {
//printf("missing: %s\n", fpath);
continue;
}
}
} else { } else {
// just check if gameid is valid (alphanum) // just check if gameid is valid (alphanum)
if (!is_gameid((char*)id)) goto do_stat2; if (!is_gameid((char*)id)) goto do_stat2;
@ -106,12 +118,16 @@ s32 _WBFS_FAT_GetHeadersCount()
} }
} else { } else {
// usb:/wbfs/GAMEID.wbfs // usb:/wbfs/GAMEID.wbfs
// or usb:/wbfs/GAMEID.iso
p = strrchr(fname, '.'); p = strrchr(fname, '.');
if (!p) continue; if (!p) continue;
if (strcasecmp(p, ".wbfs") != 0) continue; if ( (strcasecmp(p, ".wbfs") != 0)
if (strlen(fname) != 11) continue; // GAMEID.wbfs && (strcasecmp(p, ".iso") != 0) ) continue;
if (p - fname != 6) continue; // GAMEID.
snprintf(fpath, sizeof(fpath), "%s/%s", path, fname);
} }
//printf("found: %s %d MB\n", fpath, (int)(st.st_size/1024/1024));
// size must be at least 1MB to be considered a valid wbfs file // size must be at least 1MB to be considered a valid wbfs file
if (st.st_size < 1024*1024) continue; if (st.st_size < 1024*1024) continue;
// if we have titles.txt entry use that // if we have titles.txt entry use that
@ -128,7 +144,9 @@ s32 _WBFS_FAT_GetHeadersCount()
goto add_hdr; goto add_hdr;
} }
// else read it from wbfs file directly // else read it from file directly
if (strcasecmp(strrchr(fpath,'.'), ".wbfs") == 0) {
// wbfs file directly
FILE *fp = fopen(fpath, "rb"); FILE *fp = fopen(fpath, "rb");
if (fp != NULL) { if (fp != NULL) {
fseek(fp, 512, SEEK_SET); fseek(fp, 512, SEEK_SET);
@ -141,21 +159,44 @@ s32 _WBFS_FAT_GetHeadersCount()
// no title found, read it from wbfs file // no title found, read it from wbfs file
// but this is a little bit slower // but this is a little bit slower
// open 'partition' file // open 'partition' file
part = WBFS_FAT_OpenPart(id); part = WBFS_FAT_OpenPart(fpath);
if (!part) { if (!part) {
printf("bad wbfs file: %s\n", fpath);
sleep(2);
continue; continue;
} }
/* Get header */ /* Get header */
ret = wbfs_get_disc_info(part, 0, (u8*)&tmpHdr, sizeof(struct discHdr), &size); ret = wbfs_get_disc_info(part, 0, (u8*)&tmpHdr,
sizeof(struct discHdr), &size);
WBFS_FAT_ClosePart(part); WBFS_FAT_ClosePart(part);
if (ret) continue; if (ret == 0) {
// add tmpHdr to list: goto add_hdr;
}
} else if (strcasecmp(strrchr(fpath,'.'), ".iso") == 0) {
// iso file
FILE *fp = fopen(fpath, "rb");
if (fp != NULL) {
fseek(fp, 0, SEEK_SET);
fread(&tmpHdr, sizeof(struct discHdr), 1, fp);
fclose(fp);
if ((tmpHdr.magic == 0x5D1C9EA3) && (memcmp(tmpHdr.id, id, 6) == 0)) {
goto add_hdr;
}
}
}
// fail:
continue;
// succes: add tmpHdr to list:
add_hdr: add_hdr:
memset(&st, 0, sizeof(st));
//printf("added: %.6s %.20s\n", tmpHdr.id, tmpHdr.title); Wpad_WaitButtons();
fat_hdr_count++; fat_hdr_count++;
fat_hdr_list = realloc(fat_hdr_list, fat_hdr_count * sizeof(struct discHdr)); fat_hdr_list = realloc(fat_hdr_list, fat_hdr_count * sizeof(struct discHdr));
memcpy(&fat_hdr_list[fat_hdr_count-1], &tmpHdr, sizeof(struct discHdr)); memcpy(&fat_hdr_list[fat_hdr_count-1], &tmpHdr, sizeof(struct discHdr));
} }
dirclose(dir_iter); dirclose(dir_iter);
//dbg_time2("\nFAT_GetCount"); Wpad_WaitButtonsCommon();
return 0; return 0;
} }
@ -170,9 +211,7 @@ s32 WBFS_FAT_GetCount(u32 *count)
struct discHdr *buf = malloc(size); struct discHdr *buf = malloc(size);
if (buf) { if (buf) {
memcpy(buf, fat_hdr_list, size); memcpy(buf, fat_hdr_list, size);
if (fat_hdr_list) { SAFE_FREE(fat_hdr_list);
free(fat_hdr_list);
}
fat_hdr_list = buf; fat_hdr_list = buf;
} }
} }
@ -190,17 +229,34 @@ s32 WBFS_FAT_GetHeaders(void *outbuf, u32 cnt, u32 len)
for (i=0; i<cnt && i<fat_hdr_count; i++) { for (i=0; i<cnt && i<fat_hdr_count; i++) {
memcpy(outbuf + i * len, &fat_hdr_list[i], slen); memcpy(outbuf + i * len, &fat_hdr_list[i], slen);
} }
if (fat_hdr_list) { SAFE_FREE(fat_hdr_list);
free(fat_hdr_list);
fat_hdr_list = NULL;
}
fat_hdr_count = 0; fat_hdr_count = 0;
return 0; return 0;
} }
wbfs_disc_t* WBFS_FAT_OpenDisc(u8 *discid) wbfs_disc_t* WBFS_FAT_OpenDisc(u8 *discid)
{ {
wbfs_t *part = WBFS_FAT_OpenPart(discid); char fname[MAX_FAT_PATH];
// wbfs 'partition' file
if ( !WBFS_FAT_find_fname(discid, fname, sizeof(fname)) ) return NULL;
if (strcasecmp(strrchr(fname,'.'), ".iso") == 0) {
// .iso file
// create a fake wbfs_disc
int fd;
fd = open(fname, O_RDONLY);
if (fd == -1) return NULL;
wbfs_disc_t *iso_file = calloc(sizeof(wbfs_disc_t),1);
if (iso_file == NULL) return NULL;
// mark with a special wbfs_part
wbfs_iso_file.wbfs_sec_sz = 512;
iso_file->p = &wbfs_iso_file;
iso_file->header = (void*)fd;
return iso_file;
}
wbfs_t *part = WBFS_FAT_OpenPart(fname);
if (!part) return NULL; if (!part) return NULL;
return wbfs_open_disc(part, discid); return wbfs_open_disc(part, discid);
} }
@ -209,6 +265,14 @@ void WBFS_FAT_CloseDisc(wbfs_disc_t* disc)
{ {
if (!disc) return; if (!disc) return;
wbfs_t *part = disc->p; wbfs_t *part = disc->p;
// is this really a .iso file?
if (part == &wbfs_iso_file) {
close((int)disc->header);
free(disc);
return;
}
wbfs_close_disc(disc); wbfs_close_disc(disc);
WBFS_FAT_ClosePart(part); WBFS_FAT_ClosePart(part);
return; return;
@ -222,11 +286,15 @@ s32 WBFS_FAT_DiskSpace(f32 *used, f32 *free)
*used = 0; *used = 0;
*free = 0; *free = 0;
// statvfs is slow, so cache values // statvfs is slow, so cache values
if (!wbfs_fat_vfs_have || wbfs_fat_vfs_lba != wbfs_part_lba) { if (!wbfs_fat_vfs_have
ret = statvfs(wbfs_fat_drive, &wbfs_fat_vfs); || wbfs_fat_vfs_lba != wbfs_part_lba
|| wbfs_fat_vfs_dev != wbfsDev )
{
ret = statvfs(wbfs_fs_drive, &wbfs_fat_vfs);
if (ret) return 0; if (ret) return 0;
wbfs_fat_vfs_have = 1; wbfs_fat_vfs_have = 1;
wbfs_fat_vfs_lba = wbfs_part_lba; wbfs_fat_vfs_lba = wbfs_part_lba;
wbfs_fat_vfs_dev = wbfsDev;
} }
/* FS size in GB */ /* FS size in GB */
@ -240,18 +308,20 @@ s32 WBFS_FAT_DiskSpace(f32 *used, f32 *free)
static int nop_read_sector(void *_fp,u32 lba,u32 count,void*buf) static int nop_read_sector(void *_fp,u32 lba,u32 count,void*buf)
{ {
//printf("read %d %d\n", lba, count); //Wpad_WaitButtons();
return 0; return 0;
} }
static int nop_write_sector(void *_fp,u32 lba,u32 count,void*buf) static int nop_write_sector(void *_fp,u32 lba,u32 count,void*buf)
{ {
//printf("write %d %d\n", lba, count); //Wpad_WaitButtons();
return 0; return 0;
} }
void WBFS_FAT_fname(u8 *id, char *fname, int len, char *path) void WBFS_FAT_fname(u8 *id, char *fname, int len, char *path)
{ {
if (path == NULL) { if (path == NULL) {
snprintf(fname, len, "%s%s/%.6s.wbfs", wbfs_fat_drive, wbfs_fat_dir, id); snprintf(fname, len, "%s%s/%.6s.wbfs", wbfs_fs_drive, wbfs_fat_dir, id);
} else { } else {
snprintf(fname, len, "%s/%.6s.wbfs", path, id); snprintf(fname, len, "%s/%.6s.wbfs", path, id);
} }
@ -280,7 +350,7 @@ void mk_gameid_title(struct discHdr *header, char *name, int re_space)
void WBFS_FAT_get_dir(struct discHdr *header, char *path) void WBFS_FAT_get_dir(struct discHdr *header, char *path)
{ {
strcpy(path, wbfs_fat_drive); strcpy(path, wbfs_fs_drive);
strcat(path, wbfs_fat_dir); strcat(path, wbfs_fat_dir);
if (Settings.FatInstallToDir) { if (Settings.FatInstallToDir) {
strcat(path, "/"); strcat(path, "/");
@ -288,18 +358,41 @@ void WBFS_FAT_get_dir(struct discHdr *header, char *path)
} }
} }
void mk_title_txt(struct discHdr *header, char *path)
{
char fname[MAX_FAT_PATH];
FILE *f;
strcpy(fname, path);
strcat(fname, "/");
mk_gameid_title(header, fname+strlen(fname), 1);
strcat(fname, ".txt");
f = fopen(fname, "wb");
if (!f) return;
fprintf(f, "%.6s = %.64s\n", header->id, get_title(header));
fclose(f);
printf("Info file: %s\n", fname);
}
int WBFS_FAT_find_fname(u8 *id, char *fname, int len) int WBFS_FAT_find_fname(u8 *id, char *fname, int len)
{ {
struct stat st; struct stat st;
// look for direct .wbfs file
WBFS_FAT_fname(id, fname, len, NULL); WBFS_FAT_fname(id, fname, len, NULL);
if (stat(fname, &st) == 0) return 1; if (stat(fname, &st) == 0) return 1;
// look for direct .iso file
strcpy(strrchr(fname, '.'), ".iso"); // replace .wbfs with .iso
if (stat(fname, &st) == 0) return 1;
// direct file not found, check subdirs // direct file not found, check subdirs
DIR_ITER *dir_iter; DIR_ITER *dir_iter;
char path[MAX_FAT_PATH]; char path[MAX_FAT_PATH];
char name[MAX_FAT_PATH]; char name[MAX_FAT_PATH];
strcpy(path, wbfs_fat_drive); strcpy(path, wbfs_fs_drive);
strcat(path, wbfs_fat_dir); strcat(path, wbfs_fat_dir);
dir_iter = diropen(path); dir_iter = diropen(path);
//printf("dir: %s %p\n", path, dir); Wpad_WaitButtons();
if (!dir_iter) { if (!dir_iter) {
goto err; goto err;
} }
@ -308,11 +401,18 @@ int WBFS_FAT_find_fname(u8 *id, char *fname, int len)
if (name[6] != '_') continue; if (name[6] != '_') continue;
if (strncmp(name, (char*)id, 6) != 0) continue; if (strncmp(name, (char*)id, 6) != 0) continue;
if (strlen(name) < 8) continue; if (strlen(name) < 8) continue;
// look for .wbfs file
snprintf(fname, len, "%s/%s/%.6s.wbfs", path, name, id); snprintf(fname, len, "%s/%s/%.6s.wbfs", path, name, id);
if (stat(fname, &st) == 0) { if (stat(fname, &st) == 0) {
dirclose(dir_iter); dirclose(dir_iter);
return 2; return 2;
} }
// look for .iso file
snprintf(fname, len, "%s/%s/%.6s.iso", path, name, id);
if (stat(fname, &st) == 0) {
dirclose(dir_iter);
return 2;
}
} }
dirclose(dir_iter); dirclose(dir_iter);
// not found // not found
@ -321,14 +421,12 @@ int WBFS_FAT_find_fname(u8 *id, char *fname, int len)
return 0; return 0;
} }
wbfs_t* WBFS_FAT_OpenPart(u8 *id) wbfs_t* WBFS_FAT_OpenPart(char *fname)
{ {
char fname[MAX_FAT_PATH];
wbfs_t *part = NULL; wbfs_t *part = NULL;
int ret; int ret;
// wbfs 'partition' file // wbfs 'partition' file
if ( !WBFS_FAT_find_fname(id, fname, sizeof(fname)) ) return NULL;
ret = split_open(&split, fname); ret = split_open(&split, fname);
if (ret) return NULL; if (ret) return NULL;
part = wbfs_open_partition( part = wbfs_open_partition(
@ -349,10 +447,12 @@ wbfs_t* WBFS_FAT_CreatePart(u8 *id, char *path)
u32 n_sector = size / 512; u32 n_sector = size / 512;
int ret; int ret;
snprintf(D_S(fname), "%s%s", wbfs_fat_drive, wbfs_fat_dir); //printf("CREATE PART %s %lld %d\n", id, size, n_sector);
snprintf(fname, sizeof(fname), "%s%s", wbfs_fs_drive, wbfs_fat_dir);
mkdir(fname, 0777); // base usb:/wbfs mkdir(fname, 0777); // base usb:/wbfs
mkdir(path, 0777); // game subdir mkdir(path, 0777); // game subdir
WBFS_FAT_fname(id, fname, sizeof(fname), path); WBFS_FAT_fname(id, fname, sizeof(fname), path);
printf("Writing to %s\n", fname);
ret = split_create(&split, fname, OPT_split_size, size, true); ret = split_create(&split, fname, OPT_split_size, size, true);
if (ret) return NULL; if (ret) return NULL;
@ -360,6 +460,8 @@ wbfs_t* WBFS_FAT_CreatePart(u8 *id, char *path)
u32 scnt = 0; u32 scnt = 0;
int fd = split_get_file(&split, 0, &scnt, 0); int fd = split_get_file(&split, 0, &scnt, 0);
if (fd<0) { if (fd<0) {
printf("ERROR creating file\n");
sleep(2);
split_close(&split); split_close(&split);
return NULL; return NULL;
} }
@ -417,10 +519,6 @@ s32 WBFS_FAT_RemoveGame(u8 *discid)
} }
dirclose(dir_iter); dirclose(dir_iter);
// remove game subdir // remove game subdir
//rmdir(path);
if (unlink(path) == -1) {
return -1;
}
return 0; return 0;
} }
@ -441,16 +539,19 @@ s32 WBFS_FAT_AddGame(void)
part = WBFS_FAT_CreatePart(header.id, path); part = WBFS_FAT_CreatePart(header.id, path);
if (!part) return -1; if (!part) return -1;
/* Add game to device */ /* Add game to device */
partition_selector_t part_sel; partition_selector_t part_sel = ALL_PARTITIONS;
int copy_1_1 = 0; int copy_1_1 = Settings.fullcopy;
switch (Settings.partitions_to_install) {
if (Settings.fullcopy) { case install_game_only:
part_sel = ONLY_GAME_PARTITION;
break;
case install_all:
part_sel = ALL_PARTITIONS;
break;
}
if (copy_1_1) {
part_sel = ALL_PARTITIONS; part_sel = ALL_PARTITIONS;
copy_1_1 = 1;
} else {
part_sel = Settings.partitions_to_install == install_game_only ? ONLY_GAME_PARTITION : ALL_PARTITIONS;
} }
extern wbfs_t *hdd; extern wbfs_t *hdd;
wbfs_t *old_hdd = hdd; wbfs_t *old_hdd = hdd;
hdd = part; // used by spinner hdd = part; // used by spinner
@ -458,10 +559,9 @@ s32 WBFS_FAT_AddGame(void)
hdd = old_hdd; hdd = old_hdd;
wbfs_trim(part); wbfs_trim(part);
WBFS_FAT_ClosePart(part); WBFS_FAT_ClosePart(part);
if (ret) {
return -1;
}
if (ret < 0) return ret; if (ret < 0) return ret;
mk_title_txt(&header, path);
return 0; return 0;
} }
@ -486,12 +586,11 @@ s32 WBFS_FAT_DVD_Size(u64 *comp_size, u64 *real_size)
/* Add game to device */ /* Add game to device */
partition_selector_t part_sel; partition_selector_t part_sel;
if (Settings.fullcopy) { if (Settings.partitions_to_install) {
part_sel = ALL_PARTITIONS; part_sel = ALL_PARTITIONS;
} else { } else {
part_sel = Settings.partitions_to_install == install_game_only ? ONLY_GAME_PARTITION : ALL_PARTITIONS; part_sel = ONLY_GAME_PARTITION;
} }
ret = wbfs_size_disc(part, __WBFS_ReadDVD, NULL, part_sel, &comp_sec, &last_sec); ret = wbfs_size_disc(part, __WBFS_ReadDVD, NULL, part_sel, &comp_sec, &last_sec);
wbfs_close(part); wbfs_close(part);
if (ret < 0) if (ret < 0)
@ -505,7 +604,7 @@ s32 WBFS_FAT_DVD_Size(u64 *comp_size, u64 *real_size)
s32 WBFS_FAT_RenameGame(u8 *discid, const void *newname) s32 WBFS_FAT_RenameGame(u8 *discid, const void *newname)
{ {
wbfs_t *part = WBFS_FAT_OpenPart(discid); wbfs_t *part = WBFS_FAT_OpenPart((char *) discid);
if (!part) if (!part)
return -1; return -1;
@ -518,7 +617,7 @@ s32 WBFS_FAT_RenameGame(u8 *discid, const void *newname)
s32 WBFS_FAT_ReIDGame(u8 *discid, const void *newID) s32 WBFS_FAT_ReIDGame(u8 *discid, const void *newID)
{ {
wbfs_t *part = WBFS_FAT_OpenPart(discid); wbfs_t *part = WBFS_FAT_OpenPart((char *) discid);
if (!part) if (!part)
return -1; return -1;

View File

@ -1,7 +1,7 @@
#ifndef _WBFS_FAT_H #ifndef _WBFS_FAT_H
#define _WBFS_FAT_H #define _WBFS_FAT_H
wbfs_t* WBFS_FAT_OpenPart(u8 *id); wbfs_t* WBFS_FAT_OpenPart(char *fname);
void WBFS_FAT_ClosePart(wbfs_t* part); void WBFS_FAT_ClosePart(wbfs_t* part);
s32 WBFS_FAT_GetCount(u32 *count); s32 WBFS_FAT_GetCount(u32 *count);
s32 WBFS_FAT_GetHeaders(void *outbuf, u32 cnt, u32 len); s32 WBFS_FAT_GetHeaders(void *outbuf, u32 cnt, u32 len);
@ -11,6 +11,7 @@ s32 WBFS_FAT_DiskSpace(f32 *used, f32 *free);
s32 WBFS_FAT_RemoveGame(u8 *discid); s32 WBFS_FAT_RemoveGame(u8 *discid);
s32 WBFS_FAT_AddGame(void); s32 WBFS_FAT_AddGame(void);
s32 WBFS_FAT_DVD_Size(u64 *comp_size, u64 *real_size); s32 WBFS_FAT_DVD_Size(u64 *comp_size, u64 *real_size);
int WBFS_FAT_find_fname(u8 *id, char *fname, int len);
s32 WBFS_FAT_RenameGame(u8 *discid, const void *newname); s32 WBFS_FAT_RenameGame(u8 *discid, const void *newname);
s32 WBFS_FAT_ReIDGame(u8 *discid, const void *newID); s32 WBFS_FAT_ReIDGame(u8 *discid, const void *newID);